konstantinb commented on code in PR #6244:
URL: https://github.com/apache/hive/pull/6244#discussion_r2644493019
##########
ql/src/java/org/apache/hadoop/hive/ql/stats/StatsUtils.java:
##########
@@ -832,6 +832,7 @@ public static ColStatistics
getColStatistics(ColumnStatisticsObj cso, String col
cs.setNumNulls(csd.getBinaryStats().getNumNulls());
} else if (colTypeLowerCase.equals(serdeConstants.TIMESTAMP_TYPE_NAME)) {
cs.setAvgColLen(JavaDataModel.get().lengthOfTimestamp());
+ cs.setCountDistint(csd.getTimestampStats().getNumDVs());
Review Comment:
I am unsure if this was deliberately not added or an unintended omission. It
does seem to improve stats' calculations of multiple .q test files, especially
after more conservative NDV handling by PessimisticStatCombiner
##########
ql/src/java/org/apache/hadoop/hive/ql/stats/StatsUtils.java:
##########
@@ -862,6 +863,7 @@ public static ColStatistics
getColStatistics(ColumnStatisticsObj cso, String col
cs.setHistogram(csd.getDecimalStats().getHistogram());
} else if (colTypeLowerCase.equals(serdeConstants.DATE_TYPE_NAME)) {
cs.setAvgColLen(JavaDataModel.get().lengthOfDate());
+ cs.setCountDistint(csd.getDateStats().getNumDVs());
Review Comment:
I am unsure if this was deliberately not added or an unintended omission. It
does seem to improve stats' calculations of multiple .q test files, especially
after more conservative NDV handling by PessimisticStatCombiner
--
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]