cloud-fan commented on a change in pull request #34259:
URL: https://github.com/apache/spark/pull/34259#discussion_r727320220
##########
File path:
sql/hive/src/test/scala/org/apache/spark/sql/hive/HiveParquetSuite.scala
##########
@@ -144,4 +144,21 @@ class HiveParquetSuite extends QueryTest with ParquetTest
with TestHiveSingleton
.plus(123456, ChronoUnit.MICROS)))
}
}
+
+ test("SPARK-36949: Disallow tables with ANSI intervals stored as parquet") {
+ val tbl = "tbl_with_ansi_intervals"
+ withTable(tbl) {
+ val errMsg = intercept[UnsupportedOperationException] {
+ sql(
+ s"""
+ |CREATE TABLE $tbl
+ |STORED AS PARQUET
Review comment:
can we also test `CREATE TABLE` without `AS SELECT`?
##########
File path:
sql/hive/src/test/scala/org/apache/spark/sql/hive/HiveParquetSuite.scala
##########
@@ -144,4 +144,21 @@ class HiveParquetSuite extends QueryTest with ParquetTest
with TestHiveSingleton
.plus(123456, ChronoUnit.MICROS)))
}
}
+
+ test("SPARK-36949: Disallow tables with ANSI intervals stored as parquet") {
+ val tbl = "tbl_with_ansi_intervals"
+ withTable(tbl) {
+ val errMsg = intercept[UnsupportedOperationException] {
+ sql(
+ s"""
+ |CREATE TABLE $tbl
+ |STORED AS PARQUET
Review comment:
Since Serde does not matter, we can put the test in `SQLQuerySuite`
under sql/hive with parquet serde only.
##########
File path:
sql/hive/src/test/scala/org/apache/spark/sql/hive/HiveParquetSuite.scala
##########
@@ -144,4 +144,21 @@ class HiveParquetSuite extends QueryTest with ParquetTest
with TestHiveSingleton
.plus(123456, ChronoUnit.MICROS)))
}
}
+
+ test("SPARK-36949: Disallow tables with ANSI intervals stored as parquet") {
+ val tbl = "tbl_with_ansi_intervals"
+ withTable(tbl) {
+ val errMsg = intercept[UnsupportedOperationException] {
+ sql(
+ s"""
+ |CREATE TABLE $tbl
+ |STORED AS PARQUET
Review comment:
if INSERT works, I'm wondering why CTAS does not
##########
File path:
sql/hive/src/test/scala/org/apache/spark/sql/hive/HiveParquetSuite.scala
##########
@@ -144,4 +144,21 @@ class HiveParquetSuite extends QueryTest with ParquetTest
with TestHiveSingleton
.plus(123456, ChronoUnit.MICROS)))
}
}
+
+ test("SPARK-36949: Disallow tables with ANSI intervals stored as parquet") {
+ val tbl = "tbl_with_ansi_intervals"
+ withTable(tbl) {
+ val errMsg = intercept[UnsupportedOperationException] {
+ sql(
+ s"""
+ |CREATE TABLE $tbl
+ |STORED AS PARQUET
Review comment:
`HiveDDLSuite` sounds better!
##########
File path:
sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveDDLSuite.scala
##########
@@ -2999,4 +2999,27 @@ class HiveDDLSuite
assert(spark.sparkContext.listJars().exists(_.contains(jarName)))
}
}
+
+ test("SPARK-36949: Disallow tables with ANSI intervals when the provider is
Hive") {
+ val tbl = "tbl_with_ansi_intervals"
+ withTable(tbl) {
+ val errMsg = intercept[UnsupportedOperationException] {
+ sql(
+ s"""
+ |CREATE TABLE $tbl
+ |STORED AS ORC
+ |AS SELECT
Review comment:
can we also test CREATE TABLE without SELECT?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]