JingDas opened a new pull request, #3345: URL: https://github.com/apache/calcite/pull/3345
We can get constraints by RelOptTable#getReferentialConstraints method, but maybe can't get appropriate constraints at top relNode. Foreign keys metadata is very useful in many optimize scenes. Such as it can be used in join eliminate when join type is inner join and some other star schema query optimize. So support to get foreign keys metadata in RelMetadataQuery, it support to get composite foreign keys and get the corresponding unique key on the arbitrary relNode if you want. Tests are added to `RelMetadataTest`, the test code takes up a large part of the PR. -- 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]
