abstractdog commented on code in PR #6443:
URL: https://github.com/apache/hive/pull/6443#discussion_r3217975612
##########
ql/src/java/org/apache/hadoop/hive/ql/parse/ColumnStatsSemanticAnalyzer.java:
##########
@@ -749,10 +761,9 @@ static AnalyzeRewriteContext
genAnalyzeRewriteContext(HiveConf conf, Table tbl)
AnalyzeRewriteContext analyzeRewrite = new AnalyzeRewriteContext();
analyzeRewrite.setTableName(tbl.getFullyQualifiedName());
analyzeRewrite.setTblLvl(!(conf.getBoolVar(ConfVars.HIVE_STATS_COLLECT_PART_LEVEL_STATS)
&& tbl.isPartitioned()));
- List<String> colNames = getColumnNamesSupportingStats(tbl);
- List<String> colTypes = getColumnTypes(tbl, colNames);
- analyzeRewrite.setColName(colNames);
- analyzeRewrite.setColType(colTypes);
+ List<FieldSchema> columnSchemas = getStatsEligibleFieldSchemas(tbl);
+
analyzeRewrite.setColName(Utilities.getColumnNamesFromFieldSchema(columnSchemas));
+
analyzeRewrite.setColType(Utilities.getColumnTypesFromFieldSchema(columnSchemas));
Review Comment:
What about refactoring `analyzeRewrite` too, to simply accept
`columnSchemas`?
--
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]