abstractdog commented on code in PR #6443:
URL: https://github.com/apache/hive/pull/6443#discussion_r3217943769


##########
ql/src/java/org/apache/hadoop/hive/ql/parse/ColumnStatsSemanticAnalyzer.java:
##########
@@ -257,10 +252,11 @@ private String genRewrittenQuery(List<String> colNames, 
List<String> colTypes, H
   protected static String genRewrittenQuery(Table tbl,
       HiveConf conf, List<TransformSpec> partTransformSpec, Map<String, 
String> partSpec, 
       boolean isPartitionStats) {
-    List<String> colNames = getColumnNamesSupportingStats(tbl);
-    List<String> colTypes = ColumnStatsSemanticAnalyzer.getColumnTypes(tbl, 
colNames);
+    List<FieldSchema> columnSchemas = getStatsEligibleFieldSchemas(tbl);
     return ColumnStatsSemanticAnalyzer.genRewrittenQuery(
-        tbl, colNames, colTypes, conf, partTransformSpec, -1, partSpec, 
isPartitionStats, true);
+        tbl, Utilities.getColumnNamesFromFieldSchema(columnSchemas),
+        Utilities.getColumnTypesFromFieldSchema(columnSchemas), conf, 
partTransformSpec, -1, partSpec,

Review Comment:
   in order to call `genRewrittenQuery`, we parse `columnSchemas`  back to 
names and types, why don't simply pass `columnSchemas` as is?



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