jcamachor commented on a change in pull request #1034:
URL: https://github.com/apache/hive/pull/1034#discussion_r431176481
##########
File path:
ql/src/java/org/apache/hadoop/hive/ql/parse/ColumnStatsAutoGatherContext.java
##########
@@ -130,8 +130,10 @@ public void insertTableValuesAnalyzePipeline() throws
SemanticException {
partSpec.put(partKey, null);
}
}
+ List<String> colNames =
Utilities.getColumnNamesFromFieldSchema(tbl.getCols());
+ List<String> colTypes = ColumnStatsSemanticAnalyzer.getColumnTypes(tbl,
colNames);
String command = ColumnStatsSemanticAnalyzer.genRewrittenQuery(
- tbl, Utilities.getColumnNamesFromFieldSchema(tbl.getCols()), conf,
partSpec, isPartitionStats, true);
+ tbl, colNames, colTypes, conf, partSpec, isPartitionStats, true);
Review comment:
The underlying `genRewrittenQuery` method may work on a subset of
columns in the table, that is why it was receiving column names / types
separately. I have made the `protected static` method work directly with the
table and extract the column names and types from it, and added corresponding
comments to it.
----------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]