Skip to content

Commit ed43eb7

Browse files
committed
merge SPARK-21791 into here.
1 parent 9317a37 commit ed43eb7

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

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

Lines changed: 11 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.test.TestHiveSingleton
2626
import org.apache.spark.sql.internal.SQLConf
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

@@ -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
}

0 commit comments

Comments
 (0)