-
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
Complete support for Expr --> String
#9726
Comments
Expr --> String
Expr --> String
take IsTrue, IsFalse, IsUnknown |
I'd like to work on isNotNull, Not and Between |
take ScalarFunction and InList |
take Case |
take Like |
take Sort, Exists |
I'd like to work on Negative |
It looks like there are a few things not yet complete in https://github.com/apache/arrow-datafusion/blob/main/datafusion/sql/src/unparser/expr.rs#L52
|
take SimilarTo, IsNotTrue, IsNotUnknown,Negative |
Here is a list that has not been done yet, for interested contributor to better view:
|
Also Aggregate Function only supports BuiltInAggregateFunction, and it didn't use |
I noticed that in the So I wanted to get some thoughts on how best to proceed, should we make a change in |
I think when converting The ORDER BY information is required when turning the expression back into an entire query I think... But at first just converting to |
Thank you everyone who has contributed so far 🙏. I just filed a PR to update datafusion-federation to point upstream for plan->SQL going forward datafusion-contrib/datafusion-federation#30. The additional expr implementations upstream here will enable datafusion-federation to handle many more queries than before. |
Take |
Thank you very much @devanbenz -- that would be awesome. Yes in general completing this list (or determining it is not possible) is very much needed |
Taking a look at this today. Will give it a try and update this thread with any thoughts, observations, or problems I run in to :) |
@alamb I beleive |
Thanks @devanbenz ! |
@alamb if you could please take a look at apache/datafusion-sqlparser-rs#1260 -- it's linked to this issue :) |
Thanks @devanbenz -- can you explain how this is related to this issue? (Sorry I am sure it is obvious but I can't keep everything in my head anymore ) |
All good - this is for the
|
It seems to me that datafusion/datafusion/sql/src/expr/identifier.rs Lines 28 to 43 in accce97
|
Sounds good - I'll have some time to come back to this in the next couple days! Will modify per your suggestion :) |
I filed tickets for the remaining issues These ones are likely straightforward.
The others are likely more involved as I don't know how to make a reproducer |
With the completion of #10555 from @xinlifoobar I think this epic is now done! |
Part of #9494
Is your feature request related to a problem or challenge?
This ticket tracks the remaining work to complete #9495
As @devinjdangelo says in #9494 (comment)
We now have a solid foundation for converting Exprs --> SQL (see #9495 for why this is valuable).
It should now be straightforward to add support for the remaining
Expr
types and doing so is a great way to get more familiar with DataFusion's core data structures and optimization algorithms without already having expertise in database internals.Describe the solution you'd like
The basic task is to:
match
statement)Here is the remaining list of exprs (just note on the ticket which you plan to work on)
ScalarVariable
Expr --> String Support #10518IsNull
/IsNotNull
Expr --> String Support #10519Placeholder
Expr --> String Support #10522TryCast
Expr --> String Support #10520GroupingSet
Expr --> String Support #10521OuterColumnReference
Expr --> String Support #10523Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: