[ https://issues.apache.org/jira/browse/SPARK-33187?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
jinhai updated SPARK-33187: --------------------------- Description: In the method Shim#getPartitionsByFilter, when filter is empty or when the hive table has a large number of partitions, calling getAllPartitionsMethod or getPartitionsByFilterMethod will results in Driver OOM. I think we need add a check on the number of returned partitions by calling Hive#getNumPartitionsByFilter, and add SQLConf spark.sql.hive.exceeded.partition.limit, default value is 100_000 was: In the method HiveShim#getPartitionsByFilter, when filter is empty or when the hive table has a large number of partitions, calling getAllPartitionsMethod or getPartitionsByFilterMethod will results in Driver OOM. I think we need add a check on the number of returned partitions by calling Hive#getNumPartitionsByFilter, and add SQLConf spark.sql.hive.exceeded.partition.limit, default value is 100_000 > Add a check on the number of returned partitions in the > HiveShim#getPartitionsByFilter method > --------------------------------------------------------------------------------------------- > > Key: SPARK-33187 > URL: https://issues.apache.org/jira/browse/SPARK-33187 > Project: Spark > Issue Type: Improvement > Components: SQL > Affects Versions: 3.0.1 > Reporter: jinhai > Priority: Major > > In the method Shim#getPartitionsByFilter, when filter is empty or when the > hive table has a large number of partitions, calling getAllPartitionsMethod > or getPartitionsByFilterMethod will results in Driver OOM. > I think we need add a check on the number of returned partitions by calling > Hive#getNumPartitionsByFilter, and add SQLConf > spark.sql.hive.exceeded.partition.limit, default value is 100_000 -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org