Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-12300

Fix schema inferance on local collections

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 1.6.1, 2.0.0
    • PySpark, SQL
    • None

    Description

      Current schema inferance for local python collections halts as soon as there are no NullTypes. This is different than when we specify a sampling ratio of 1.0 on a distributed collection. This could result in incomplete schema information.

      Repro:

      input = [{"a": 1}, {"b": "coffee"}]
      df = sqlContext.createDataFrame(input)
      print df.schema
      

      Discovered while looking at SPARK-2870

      Attachments

        Activity

          People

            holden Holden Karau
            holden Holden Karau
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: