Github user liancheng commented on a diff in the pull request:
https://github.com/apache/spark/pull/9517#discussion_r44244350
--- Diff:
sql/hive/src/test/scala/org/apache/spark/sql/sources/ParquetHadoopFsRelationSuite.scala
---
@@ -155,4 +155,22 @@ class ParquetHadoopFsRelationSuite extends
HadoopFsRelationTest {
assert(physicalPlan.collect { case p: execution.Filter => p }.length
=== 1)
}
}
+
+ test("SPARK-11500: Not deterministic order of columns when using merging
schemas.") {
+ import testImplicits._
+ withSQLConf(SQLConf.PARQUET_SCHEMA_MERGING_ENABLED.key -> "true") {
+ withTempPath { dir =>
+ val pathOne = s"${dir.getCanonicalPath}/table1"
+ Seq(1, 1).zipWithIndex.toDF("a", "b").write.parquet(pathOne)
+ val pathTwo = s"${dir.getCanonicalPath}/table2"
+ Seq(1, 1).zipWithIndex.toDF("c", "b").write.parquet(pathTwo)
+ val pathThree = s"${dir.getCanonicalPath}/table3"
+ Seq(1, 1).zipWithIndex.toDF("d", "b").write.parquet(pathThree)
--- End diff --
We should probably use a partitioned table here. Directories like
`base/table1`, `base/table2`, and `base/table3` are not valid partition
directory names, and loading `base` as a Parquet file should throw an
exception. It's not expected that this test case can pass.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]