File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
sql/hive/src/test/scala/org/apache/spark/sql/hive/orc Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ import org.apache.spark.sql.{QueryTest, Row}
2525import org .apache .spark .sql .hive .test .TestHiveSingleton
2626import org .apache .spark .sql .internal .SQLConf
2727import org .apache .spark .sql .sources ._
28+ import org .apache .spark .sql .test .SQLTestUtils
2829import org .apache .spark .sql .types ._
2930import org .apache .spark .util .Utils
3031
@@ -221,7 +222,7 @@ abstract class OrcSuite extends QueryTest with TestHiveSingleton with BeforeAndA
221222 }
222223}
223224
224- class OrcSourceSuite extends OrcSuite {
225+ class OrcSourceSuite extends OrcSuite with SQLTestUtils {
225226 override def beforeAll (): Unit = {
226227 super .beforeAll()
227228
@@ -270,4 +271,13 @@ class OrcSourceSuite extends OrcSuite {
270271 )).get.toString
271272 }
272273 }
274+
275+ test(" SPARK-21791 ORC should support column names with dot" ) {
276+ import spark .implicits ._
277+ withTempDir { dir =>
278+ val path = new File (dir, " orc" ).getCanonicalPath
279+ Seq (Some (1 ), None ).toDF(" col.dots" ).write.orc(path)
280+ assert(spark.read.orc(path).collect().length == 2 )
281+ }
282+ }
273283}
You can’t perform that action at this time.
0 commit comments