-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move TableConstraint to Constraints conversion #12953
Conversation
Reduce datafusion-common dependency on sqlparser
8f5874f
to
1bc51f5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @findepi it makes sense to me 👍 . Just one minor suggestion.
@@ -1262,6 +1263,74 @@ impl<'a, S: ContextProvider> SqlToRel<'a, S> { | |||
))) | |||
} | |||
|
|||
/// Convert each `TableConstraint` to corresponding `Constraint` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can improve the doc:
/// Convert each `TableConstraint` to corresponding `Constraint` | |
/// Convert each [TableConstraint] to corresponding [Constraint] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-> #12995
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @findepi and @goldmedal
I wonder how far we are from being able to remove the dependency entirely:
datafusion/datafusion/common/Cargo.toml
Line 65 in 44127ec
sqlparser = { workspace = true } |
🤔
thanks for review @goldmedal and the merge @alamb !
That's a good question. Actually this is where i'd like to get to eventually. It should be possible to use datafusion without pulling sqlparser-rs dependency, which anyone with their own grammar should not use. There is couple places where this is used.
@alamb what would you suggest? |
A feature cfg is probably best I suppose
We could make a trait in datafusion-sql maybe Though now that I see this list, I think maybe the extra code overhead of breaking this out won't really add much so perhaps it is not worth doing anything more at this time |
The cost/benefit trade off depends on the perspective.
i will give it a try, thanks! |
Reduce datafusion-common dependency on sqlparser