Details
-
Bug
-
Status: Resolved
-
Critical
-
Resolution: Fixed
-
2.0.2
-
None
Description
This assertion fails when you run a stream against json data that is stored in partitioned folders, if you manually specify the schema and that schema omits the partitioned columns.
My hunch is that we are inferring those columns even though the schema is being passed in manually and adding them to the end.
While we are fixing this bug, it would be nice to make the assertion better. Truncating is not terribly useful as, at least in my case, it truncated the most interesting part. I changed it to this while debugging:
s""" |Batch does not have expected schema |Expected: ${output.mkString(",")} |Actual: ${newPlan.output.mkString(",")} | |== Original == |$logicalPlan | |== Batch == |$newPlan """.stripMargin
I also tried specifying the partition columns in the schema and now it appears that they are filled with corrupted data.
Attachments
Issue Links
- is superceded by
-
SPARK-18510 Partition schema inference corrupts data
- Resolved
- links to