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}
25
25
import org .apache .spark .sql .hive .test .TestHiveSingleton
26
26
import org .apache .spark .sql .internal .SQLConf
27
27
import org .apache .spark .sql .sources ._
28
+ import org .apache .spark .sql .test .SQLTestUtils
28
29
import org .apache .spark .sql .types ._
29
30
import org .apache .spark .util .Utils
30
31
@@ -221,7 +222,7 @@ abstract class OrcSuite extends QueryTest with TestHiveSingleton with BeforeAndA
221
222
}
222
223
}
223
224
224
- class OrcSourceSuite extends OrcSuite {
225
+ class OrcSourceSuite extends OrcSuite with SQLTestUtils {
225
226
override def beforeAll (): Unit = {
226
227
super .beforeAll()
227
228
@@ -270,4 +271,13 @@ class OrcSourceSuite extends OrcSuite {
270
271
)).get.toString
271
272
}
272
273
}
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
+ }
273
283
}
You can’t perform that action at this time.
0 commit comments