[ 
https://issues.apache.org/jira/browse/HIVE-22248?focusedWorklogId=322390&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-322390
 ]

ASF GitHub Bot logged work on HIVE-22248:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 03/Oct/19 01:06
            Start Date: 03/Oct/19 01:06
    Worklog Time Spent: 10m 
      Work Description: jcamachor commented on pull request #801: HIVE-22248 
Fix statistics persisting issues
URL: https://github.com/apache/hive/pull/801#discussion_r330829541
 
 

 ##########
 File path: 
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/columnstats/merge/DoubleColumnStatsMerger.java
 ##########
 @@ -50,5 +50,16 @@ public void merge(ColumnStatisticsObj aggregateColStats, 
ColumnStatisticsObj new
           + aggregateData.getNumDVs() + " and " + newData.getNumDVs() + " to 
be " + ndv);
       aggregateData.setNumDVs(ndv);
     }
+
+    aggregateColStats.getStatsData().setDoubleStats(aggregateData);
+  }
+
+  private double getMinValue(DoubleColumnStatsDataInspector aggregateData, 
DoubleColumnStatsDataInspector newData) {
+    if (!aggregateData.isSetLowValue() && !newData.isSetLowValue()) {
+      return 0;
 
 Review comment:
   If they are both unset, why do we return `0` here instead of leaving it 
unset? I am not sure whether this will ever happen, but it seems the right 
behavior.
 
----------------------------------------------------------------
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: 322390)
    Time Spent: 20m  (was: 10m)

> Min value for column in stats is not set correctly for some data types
> ----------------------------------------------------------------------
>
>                 Key: HIVE-22248
>                 URL: https://issues.apache.org/jira/browse/HIVE-22248
>             Project: Hive
>          Issue Type: Bug
>          Components: Statistics
>            Reporter: Jesus Camacho Rodriguez
>            Assignee: Miklos Gergely
>            Priority: Major
>              Labels: pull-request-available
>         Attachments: HIVE-22248.01.patch, HIVE-22248.02.patch
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> I am not sure whether the problem is printing the value or in the value 
> stored in the metastore itself, but for some types (e.g. tinyint, smallint, 
> int, bigint, double or float), the min value does not seem to be set 
> correctly (set to 0).
> https://github.com/apache/hive/blob/master/ql/src/test/results/clientpositive/alter_table_update_status.q.out#L342



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to