You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by "scarlin-cloudera (via GitHub)" <gi...@apache.org> on 2023/07/17 17:20:22 UTC

[GitHub] [hive] scarlin-cloudera commented on a diff in pull request #4478: HIVE-27495: NPE when trying to transform using clause to on clause

scarlin-cloudera commented on code in PR #4478:
URL: https://github.com/apache/hive/pull/4478#discussion_r1265637874


##########
ql/src/java/org/apache/hadoop/hive/ql/parse/CalcitePlanner.java:
##########
@@ -2631,6 +2631,21 @@ private RelNode genJoinRelNode(RelNode leftRel, String leftTableAlias, RelNode r
               unparseTranslator.addIdentifierTranslation((ASTNode) child);
             }
             namedColumns.add(columnName);
+
+            // if leftTableAlias is null, set it to the last tableAlias that contains the

Review Comment:
   If the column name is ambiguous and exists in multiple tables, perhaps we should throw an exception? 
   
   Because I was thinking...maybe it should join on the right most join table rather than the left most one.



-- 
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-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org