zabetak opened a new pull request, #5998:
URL: https://github.com/apache/hive/pull/5998

   ### What changes were proposed in this pull request?
   1. Collect all table aliases under joins
   2. Introduce derived table whenever the same alias appears more than once
   
   ### Why are the changes needed?
   Some queries that contain joins of the same table more than twice fail 
during compilation while trying to transform the optimized AST (obtained from 
CBO) to an Operator tree. The "Ambiguous table alias" exception is raised when 
a HiveJoin contains the same table scan multiple times (without an interleaving 
project) cause the generated AST is ambiguous.
   
   ### Does this PR introduce _any_ user-facing change?
   No.
   
   ### How was this patch tested?
   ```
   mvn test -Dtest=TestMiniLlapLocalCliDriver -Dqfile_regex=cbo_self_join.*
   ```


-- 
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

Reply via email to