soumyakanti3578 commented on code in PR #5294:
URL: https://github.com/apache/hive/pull/5294#discussion_r1697219028
##########
ql/src/java/org/apache/hadoop/hive/ql/parse/CalcitePlanner.java:
##########
@@ -5167,7 +5167,14 @@ private RelNode genGBHavingLogicalPlan(QB qb, RelNode
srcRel) throws SemanticExc
UnsupportedFeature.Having_clause_without_any_groupby);
}
ASTNode targetNode = (ASTNode) havingClause.getChild(0);
- validateNoHavingReferenceToAlias(qb, targetNode);
+ QBParseInfo qbPI = qb.getParseInfo();
+ Map<ASTNode, String> exprToAlias = qbPI.getAllExprToColumnAlias();
+ RowResolver inputRR = relToHiveRR.get(srcRel);
+ for (ASTNode astNode : exprToAlias.keySet()) {
+ if (inputRR.getExpression(astNode) != null) {
+ inputRR.put("", exprToAlias.get(astNode),
inputRR.getExpression(astNode));
Review Comment:
That is fine with me :)
--
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]