dongjoon-hyun commented on a change in pull request #29737:
URL: https://github.com/apache/spark/pull/29737#discussion_r557523160
##########
File path:
sql/hive/src/test/scala/org/apache/spark/sql/hive/orc/HiveOrcQuerySuite.scala
##########
@@ -313,4 +314,71 @@ class HiveOrcQuerySuite extends OrcQueryTest with
TestHiveSingleton {
}
}
}
+
+ test("SPARK-32864: Support ORC forced positional evolution") {
+ Seq("native", "hive").foreach { orcImpl =>
+ Seq(true, false).foreach { forcePositionalEvolution =>
+ withSQLConf(SQLConf.ORC_IMPLEMENTATION.key -> orcImpl,
+ OrcConf.FORCE_POSITIONAL_EVOLUTION.getAttribute ->
forcePositionalEvolution.toString) {
+ withTempPath { f =>
+ val path = f.getCanonicalPath
+ Seq((1, 2), (3, 4), (5, 6)).toDF("c1", "c2").write.orc(path)
+ val correctAnswer = Seq(Row(1, 2), Row(3, 4), Row(5, 6))
+ checkAnswer(spark.read.orc(path), correctAnswer)
+
+ withSQLConf(HiveUtils.CONVERT_METASTORE_ORC.key -> "true") {
+ withTable("t") {
+ sql(s"CREATE EXTERNAL TABLE t(c3 INT, c4 INT) STORED AS ORC
LOCATION '$path'")
Review comment:
If you don't mind, can we use `c3 INT, c2 INT` instead of `c3 INT, c4
INT`?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]