deniskuzZ commented on code in PR #5674:
URL: https://github.com/apache/hive/pull/5674#discussion_r2023071554
##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/columnstats/aggr/LongColumnStatsAggregator.java:
##########
@@ -129,7 +129,16 @@ public ColumnStatisticsObj
aggregate(List<ColStatsObjWithSourceInfo> colStatsWit
// We have estimation, lowerbound and higherbound. We use estimation
// if it is between lowerbound and higherbound.
double densityAvg = densityAvgSum / partNames.size();
- estimation = (long) ((aggregateData.getHighValue() -
aggregateData.getLowValue()) / densityAvg);
+ if (densityAvg == 0) {
+ // This means each partition has exactly one value. (highValue ==
lowValue and NDV = 1).
Review Comment:
👍
--
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]