JingDas opened a new pull request, #3264:
URL: https://github.com/apache/calcite/pull/3264

   This feature is mainly about expanding ProjectJoinRemoveRule to support 
inner join remove
   by the foreign-unique constraint in the catalog.
   
   The main steps are as follows:
   1. Analyse the column used by project, and then split them to left and right 
side.
   2. Acccording to the project info above and outer join type, bail out in 
some scene.
   3. Get join info such as join keys.
   4. For inner join check foreign and unique keys, these may use
   RelMetadataQuery#getForeignKeys(newly add, similar to 
RelMetadataQuery#getUniqueKeys).
   5. Check remove side join keys are areColumnsUnique both for outer join and 
inner join.
   6. If all done, calculate the fianl project and transform. 
   
   Test cases are added to RelOptRulesTest and RelMetadataTest.


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

Reply via email to