alamb commented on code in PR #8566:
URL: https://github.com/apache/arrow-datafusion/pull/8566#discussion_r1443401501
##########
datafusion/common/src/functional_dependencies.rs:
##########
@@ -97,8 +108,39 @@ impl Constraints {
Constraint::Unique(indices)
})
}
- TableConstraint::ForeignKey { .. } => {
- _plan_err!("Foreign key constraints are not currently
supported")
+ TableConstraint::ForeignKey {
+ foreign_table,
+ columns,
+ name: _,
+ on_delete: _,
+ on_update: _,
+ referred_columns,
+ } => {
+ let get_indices = |c: &[Ident]| {
Review Comment:
Isn't this code looking up the 'reference columns' in the current table's
schema (`df_schema`)? I think the column references should be to the schema of
`foreign_table`
--
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]