wecharyu opened a new pull request, #5823: URL: https://github.com/apache/hive/pull/5823
### What changes were proposed in this pull request? 1. Calls `get_partitions_req` api to get all partitions to enable partition limit check 2. Avoid calls `get_partitions_req` if not `dataWasMoved` ### Why are the changes needed? Get all partitions of a table is a heavy operation that could affect both HMS server and backend DB, `alter_table` should also check and limit the fetched partition number. ### Does this PR introduce _any_ user-facing change? Yes, alter table cascade to large partitions may fail after this PR. ### How was this patch tested? Add a unit test: ```bash mvn test -Dtest.groups= -Dtest=org.apache.hadoop.hive.metastore.TestRemoteHiveMetaStore#testAlterTableCascadeExceedsPartitionLimits -pl :hive-standalone-metastore-server ``` -- 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: gitbox-unsubscr...@hive.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For additional commands, e-mail: gitbox-h...@hive.apache.org