manbuyun opened a new pull request #30225:
URL: https://github.com/apache/spark/pull/30225


   ### What changes were proposed in this pull request?
   
   Add a check on the number of returned metastore partitions by calling 
Hive#getNumPartitionsByFilter, and add SQLConf 
spark.sql.hive.metastorePartitionLimit, default value is 100_000
   
   ### Why are the changes needed?
   
   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.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No
   
   ### How was this patch tested?
   
   This change is already covered by existing tests


----------------------------------------------------------------
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]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to