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

Fix schema inferance on local collections

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.6.1, 2.0.0
    • Component/s: PySpark, SQL
    • Labels:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: