kasakrisz commented on code in PR #5613: URL: https://github.com/apache/hive/pull/5613#discussion_r1939161300
########## ql/src/java/org/apache/hadoop/hive/ql/parse/BaseSemanticAnalyzer.java: ########## @@ -2047,8 +2070,8 @@ public void startAnalysis() { /** * Called when we end analysis of a query. */ - public void endAnalysis() { - // Nothing to do + public void endAnalysis(ASTNode tree) { + setQueryType(tree); // at this point we know the query type for sure Review Comment: If the extra parameter is an issue maybe we can try doing one of these: Option 1: Add a field `ASTNode tree` to `BaseSemanticAnalyzer` Option 2: set it in `BaseSemanticAnalyzer.analyze` ``` public void analyze(ASTNode ast, Context ctx) throws SemanticException { initCtx(ctx); init(true); analyzeInternal(ast); // New code: set query type after `analyzeInternal` completed setQueryType(ast). } ``` But in this case we have to do it in `ColumnStatsSemanticAnalyzer.java` too because it overrides `BaseSemanticAnalyzer.analyze`. However it always sets `QueryType.STATS` Option 3: keep the extra parameter and leave this part as it is now. -- 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: gitbox-unsubscr...@hive.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For additional commands, e-mail: gitbox-h...@hive.apache.org