[
https://issues.apache.org/jira/browse/HIVE-22311?focusedWorklogId=336172&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-336172
]
ASF GitHub Bot logged work on HIVE-22311:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 30/Oct/19 13:21
Start Date: 30/Oct/19 13:21
Worklog Time Spent: 10m
Work Description: miklosgergely commented on 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:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 336172)
Time Spent: 20m (was: 10m)
> Propagate min/max column values from statistics to the optimizer for
> timestamp type
> -----------------------------------------------------------------------------------
>
> Key: HIVE-22311
> URL: https://issues.apache.org/jira/browse/HIVE-22311
> Project: Hive
> Issue Type: Bug
> Components: Statistics
> Reporter: Jesus Camacho Rodriguez
> Assignee: Jesus Camacho Rodriguez
> Priority: Major
> Labels: pull-request-available
> Attachments: HIVE-22311.01.patch, HIVE-22311.01.patch,
> HIVE-22311.02.patch, HIVE-22311.03.patch, HIVE-22311.patch
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> Currently stats annotation does not consider timestamp type e.g. for
> estimates with range predicates.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)