jcamachor commented on a change in pull request #821: HIVE-22311
URL: https://github.com/apache/hive/pull/821#discussion_r342187541
##########
File path:
ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/JsonMetaDataFormatter.java
##########
@@ -338,6 +338,19 @@ private ColumnStatisticsData getStatistics(FieldSchema
column, List<ColumnStatis
if (statistics.getDateStats().isSetNumDVs()) {
result.put("distinctCount", statistics.getDateStats().getNumDVs());
}
+ } else if (statistics.isSetTimestampStats()) {
+ if (statistics.getTimestampStats().isSetLowValue()) {
+ result.put("min",
MetaDataFormatUtils.convertToString(statistics.getTimestampStats().getLowValue()));
+ }
+ if (statistics.getTimestampStats().isSetHighValue()) {
+ result.put("max",
MetaDataFormatUtils.convertToString(statistics.getTimestampStats().getHighValue()));
+ }
+ if (statistics.getTimestampStats().isSetNumNulls()) {
+ result.put("numNulls", statistics.getTimestampStats().getNumNulls());
+ }
+ if (statistics.getTimestampStats().isSetNumDVs()) {
+ result.put("distinctCount",
statistics.getTimestampStats().getNumDVs());
Review comment:
I have done that for the column stats method. There are still many other
constants values spread in that class that should be moved into constants too.
I will create a follow-up for that.
----------------------------------------------------------------
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]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]