LakeShen commented on PR #3345:
URL: https://github.com/apache/calcite/pull/3345#issuecomment-1676745035

   IMO,a foreign key is one of the table constraints, the current in Calcite, 
we could use Statistic# getReferentialConstraints method to get the table's 
foreign key.
   
   So in an SQL plan(RelNode Tree),for example,if a RelNode is Project and its 
child is a TableScan,we want to use the foreign key information of TableScan. 
Instead of getting the foreign key information of Project, we should use 
functional dependencies.
   
   In other words, only tables have foreign keys.The above is my 
understanding,If I understand this wrong,pls correct me,thanks.


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