zabetak commented on code in PR #4783: URL: https://github.com/apache/hive/pull/4783#discussion_r1350026921
########## ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java: ########## @@ -5996,7 +5996,7 @@ private ReduceSinkOperator genCommonGroupByPlanReduceSinkOperator(QB qb, List<St for (Map.Entry<ASTNode, ExprNodeDesc> entry : nodeOutputs.entrySet()) { ASTNode parameter = entry.getKey(); ExprNodeDesc expression = entry.getValue(); - if (!(expression instanceof ExprNodeColumnDesc)) { + if (!(expression instanceof ExprNodeColumnDesc) && !ExprNodeConstantDesc.isFoldedFromCol(expression)) { Review Comment: Do we really care what kind of constant it is? If it is not folded from a column but it is a plain constant what shall we do? ########## ql/src/test/queries/clientpositive/multi_insert_gby5.q: ########## @@ -0,0 +1,10 @@ +set hive.cbo.fallback.strategy=NEVER; + +create table tbl1 (key int, f1 int); +create table tbl2 (f1 int) partitioned by (key int); + +FROM (select key, f1 FROM tbl1 where key=5) a Review Comment: The query doesn't fail but we don't check the EXPLAIN and we don't check the results either so we can't be sure that it is working fine. Let's include and verify the EXPLAIN to be on the safe side. -- 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