tanishq-chugh commented on code in PR #6443:
URL: https://github.com/apache/hive/pull/6443#discussion_r3159125356
##########
ql/src/java/org/apache/hadoop/hive/ql/parse/ColumnStatsSemanticAnalyzer.java:
##########
@@ -634,7 +640,13 @@ public void analyze(ASTNode ast, Context origCtx) throws
SemanticException {
*/
if (shouldRewrite(ast)) {
tbl = AnalyzeCommandUtils.getTable(ast, this);
- colNames = getColumnName(ast);
+ StatsEligibleColumns statsCols = null;
+ if (ast.getChildCount() == 2) {
+ statsCols = getStatsEligibleColumns(tbl);
+ colNames = statsCols.columnNames();
+ } else {
+ colNames = getColumnName(ast);
+ }
Review Comment:
Thanks for pointing this out @thomasrebele !
And, yes this definitely makes more sense and helps to keep code clean. I
have made all these changes in commit -
[84d81f9](https://github.com/apache/hive/pull/6443/commits/84d81f933cf7ecd8112293895c3d3997cc7292f1)
--
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]