wangyum commented on a change in pull request #25584: [SPARK-28876][SQL]
fallBackToHdfs should not support Hive partitioned table
URL: https://github.com/apache/spark/pull/25584#discussion_r317921347
##########
File path:
sql/hive/src/test/scala/org/apache/spark/sql/hive/StatisticsSuite.scala
##########
@@ -1484,4 +1484,27 @@ class StatisticsSuite extends
StatisticsCollectionTestBase with TestHiveSingleto
}
}
}
+
+ test("fallBackToHdfs should not support Hive partitioned table") {
+ Seq(true, false).foreach { fallBackToHdfs =>
+ withSQLConf(SQLConf.ENABLE_FALL_BACK_TO_HDFS_FOR_STATS.key ->
s"$fallBackToHdfs",
+ HiveUtils.CONVERT_METASTORE_PARQUET.key -> "false") {
+ withTempDir { tempDir =>
+ withTable("spark_28876") {
+ sql(s"""
+ |CREATE EXTERNAL TABLE spark_28876(id bigint)
+ |PARTITIONED BY (ds STRING)
+ |STORED AS PARQUET
+ |LOCATION '${tempDir.toURI}'
+ """.stripMargin)
+ sql("INSERT INTO TABLE spark_28876 PARTITION (ds='p1') SELECT 1")
Review comment:
Done
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]