deniskuzZ commented on code in PR #6208:
URL: https://github.com/apache/hive/pull/6208#discussion_r2571089334


##########
ql/src/java/org/apache/hadoop/hive/ql/ddl/table/info/desc/DescTableOperation.java:
##########
@@ -249,7 +249,7 @@ private void getColumnDataForPartitionKeyColumn(Table 
table, List<FieldSchema> c
     ColStatistics.Range r = cs.getRange();
     StatObjectConverter.fillColumnStatisticsData(partCol.getType(), data, r == 
null ? null : r.minValue,
         r == null ? null : r.maxValue, r == null ? null : r.minValue, r == 
null ? null : r.maxValue,
-        r == null ? null : r.minValue.toString(), r == null ? null : 
r.maxValue.toString(),
+        r == null || r.minValue == null ? null : r.minValue.toString(), r == 
null || r.maxValue == null ? null : r.maxValue.toString(),

Review Comment:
   why not do the same for long stats? 
   
   could we refactor `StatObjectConverter.fillColumnStatisticsData` and drop 
the repetition: Object llow, Object lhigh, Object dlow, Object dhigh, Object 
declow, Object dechigh. Anyways they are populated with exact same values.  
Then we can reuse method in StatsUtils.



-- 
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]

Reply via email to