Github user gatorsmile commented on a diff in the pull request:
https://github.com/apache/spark/pull/19124#discussion_r136910368
--- Diff:
sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/SQLQuerySuite.scala
---
@@ -2000,4 +2000,15 @@ class SQLQuerySuite extends QueryTest with
SQLTestUtils with TestHiveSingleton {
assert(setOfPath.size() == pathSizeToDeleteOnExit)
}
}
+
+ test("SPARK-21912 Creating ORC datasource table should check invalid
column names") {
+ withTable("orc1") {
+ Seq(" ", "?", ",", ";", "{", "}", "(", ")", "\n", "\t", "=").foreach
{ name =>
+ val m = intercept[AnalysisException] {
+ sql(s"CREATE TABLE orc1 USING ORC AS SELECT 1 `column$name`")
--- End diff --
This is CTAS. How about `CREATE TABLE`?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]