sunchao commented on a change in pull request #30225:
URL: https://github.com/apache/spark/pull/30225#discussion_r527292257



##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala
##########
@@ -815,6 +815,16 @@ object SQLConf {
       .booleanConf
       .createWithDefault(true)
 
+  val HIVE_METASTORE_PARTITION_LIMIT =
+    buildConf("spark.sql.hive.metastorePartitionLimit")
+      .doc("The maximum number of metastore partitions allowed for a given 
table. The default " +
+           "value -1 to follow the Hive config (see 
HiveConf.METASTORE_LIMIT_PARTITION_REQUEST " +

Review comment:
       nit: can we use `hive.metastore.limit.partition.request instead of 
`HiveConf.METASTORE_LIMIT_PARTITION_REQUEST` here? also do we want to mention 
this is only used for HMS version 2.1 and up?

##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala
##########
@@ -815,6 +815,16 @@ object SQLConf {
       .booleanConf
       .createWithDefault(true)
 
+  val HIVE_METASTORE_PARTITION_LIMIT =
+    buildConf("spark.sql.hive.metastorePartitionLimit")
+      .doc("The maximum number of metastore partitions allowed for a given 
table. The default " +
+           "value -1 to follow the Hive config (see 
HiveConf.METASTORE_LIMIT_PARTITION_REQUEST " +
+           "for more information).")
+      .version("3.1.0")
+      .intConf
+      .checkValue(_ >= -1, "The maximum must be a positive integer, -1 to 
follow the Hive config.")
+      .createWithDefault(100000)

Review comment:
       have you considered to keep the default behavior as it is but allow it 
to be configurable? changing it means now we'll need to make two HMS calls (one 
additional `getNumPartitionsByFilter`) which I'm not sure is desirable (have 
seen HMS perform very badly in production before).




----------------------------------------------------------------
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:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to