kgyrtkirk commented on a change in pull request #2888:
URL: https://github.com/apache/hive/pull/2888#discussion_r772325885
##########
File path: ql/src/java/org/apache/hadoop/hive/ql/parse/CalcitePlanner.java
##########
@@ -4025,7 +4025,9 @@ private OBLogicalPlanGenState beginGenOBLogicalPlan(
// replace each of the position alias in ORDERBY with the actual column
if (ref != null && ref.getToken().getType() == HiveParser.Number) {
if (isObyByPos) {
- fieldIndex = getFieldIndexFromColumnNumber(selectOutputRR, ref);
Review comment:
yes; I know that will not solve this - the general problem is that going
to the `input` instead of the current one could be a mistake
Then I suppose we are getting the `outputRel` from
[here](https://github.com/apache/hive/blob/c39cc56e28172397d573ca9072f55551fef86a56/ql/src/java/org/apache/hadoop/hive/ql/parse/CalcitePlanner.java#L4794)
can't we fix the RR of that UDTF node - instead of returning `null` there and
falling back to the `input` here?
--
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]