-
Notifications
You must be signed in to change notification settings - Fork 567
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
[WIP] Introduce the "parser" feature to gate the SQL text processing and leaving only AST and other support types #1691
base: main
Are you sure you want to change the base?
Conversation
Caveats: - `dialect` is completely disabled which is not the final goal. - `parser/mod.rs` and `tokenizer/mod.rs` should be split so that the number of annotations is greatly reduced and applied at the file level instead of struct/function level.
b6f083b
to
33fb678
Compare
BTW another way to approach this issue would be to remove the dependency of sqlparser from DataFusion (e.g. make the parsing an optional module) |
I tried, but there are non-trivial dependencies on the |
The dependencies on the ast can be handled by copying the definitions into DataFusion The dpeendencies on BTW to be clear the idea in this PR seems fine to me -- I just figured I would comment |
But then
I might be fuzzy on the details as I'm just getting started on the codebase.
And thank you for commenting! |
I meant literally copy/pasting (or some variant thereof) of the relevant structures to break the dependency. Similar to the way @eliaperantoni did in this PR for |
This crate can become a very lightweight dependency to
datafusion
(and other projects) that have their own SQL parser but need to usedatafusion-sqlparser-rs
AST types to interact with the rest ofdatafusion
(as a modular library and not as a full-featured SQL engine).WORK-IN-PROGRESS notice: this is draft state and I want to see how CI behaves, reduce the number of
cfg(feature = "parser")
annotations needed and ensuredatafusion
still builds even if the"parser"
feature is disabled.Before merging,
"parser"
will of course, become part of the default set of features of the crate.