Skip to content

Commit 5995bd5

Browse files
committed
[SPARK-21791][SQL] ORC should support column names with dot
1 parent 7880909 commit 5995bd5

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

sql/hive/src/test/scala/org/apache/spark/sql/hive/orc/OrcSourceSuite.scala

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import org.apache.spark.sql.{QueryTest, Row}
2525
import org.apache.spark.sql.hive.HiveExternalCatalog
2626
import org.apache.spark.sql.hive.test.TestHiveSingleton
2727
import org.apache.spark.sql.sources._
28+
import org.apache.spark.sql.test.SQLTestUtils
2829
import org.apache.spark.sql.types._
2930
import org.apache.spark.util.Utils
3031

@@ -196,7 +197,7 @@ abstract class OrcSuite extends QueryTest with TestHiveSingleton with BeforeAndA
196197
}
197198
}
198199

199-
class OrcSourceSuite extends OrcSuite {
200+
class OrcSourceSuite extends OrcSuite with SQLTestUtils {
200201
override def beforeAll(): Unit = {
201202
super.beforeAll()
202203

@@ -249,4 +250,15 @@ class OrcSourceSuite extends OrcSuite {
249250
)).get.toString
250251
}
251252
}
253+
254+
// This test works with Apache ORC 1.4.0
255+
// https://github.com/apache/spark/pull/18953
256+
ignore("SPARK-21791 ORC should support column names with dot") {
257+
import spark.implicits._
258+
withTempDir { dir =>
259+
val path = new File(dir, "orc").getCanonicalPath
260+
Seq(Some(1), None).toDF("col.dots").write.orc(path)
261+
assert(spark.read.orc(path).collect().length == 2)
262+
}
263+
}
252264
}

0 commit comments

Comments
 (0)