miklosgergely commented on a change in pull request #821: HIVE-22311 URL: https://github.com/apache/hive/pull/821#discussion_r340594059
########## 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: Minor - "min", "max", "numNulls", "distinctCount" and the rest of the keys should be put into constants. ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For additional commands, e-mail: gitbox-h...@hive.apache.org