Aggarwal-Raghav opened a new pull request, #6831: URL: https://github.com/apache/hive/pull/6831
### What changes were proposed in this pull request? [HIVE-30101](https://issues.apache.org/jira/browse/HIVE-30101) Modified `shouldDo()` in `SortedDynPartitionOptimizer` to return false (instead of true) when table statistics, column statistics, or partition cardinalities cannot be computed. ### Why are the changes needed? In Hive 3, SortedDynPartitionOptimizer optimization was controlled by a boolean config `hive.optimize.sort.dynamic.partition` and was false by default. In Hive 4, it was migrated to `hive.optimize.sort.dynamic.partition.threshold` and defaults to 0 (cost-based/automatic). Because of this new default, in prod, **multilple user reported severe query performance degradation** and after setting it to `hive.optimize.sort.dynamic.partition.threshold=-1` on beeline session it has helped achieve previous or improved SLA between **Hive3 vs Hive 4.0.1** Few Queries have degraded from 2 hr to 10-15 hrs as only 4 reducers are doing work instead of 200 causes massive bottleneck. ### Does this PR introduce _any_ user-facing change? NO ### How was this patch tested? On local setup -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
