Skip to content
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

IsNull / IsNotNull Expr --> String Support #10519

Closed
Tracked by #9726
alamb opened this issue May 15, 2024 · 2 comments · Fixed by #10529
Closed
Tracked by #9726

IsNull / IsNotNull Expr --> String Support #10519

alamb opened this issue May 15, 2024 · 2 comments · Fixed by #10529
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@alamb
Copy link
Contributor

alamb commented May 15, 2024

Is your feature request related to a problem or challenge?

Part of #9726 to complete the Expr

Converting Expr back to SQL is valuable for several usecases such as using DataFusion in federated databases (e.g. generate SQL to push down) or using DataFusion's expr APIs to programatically create SQL.

Describe the solution you'd like

Support converting SQL syntax like this:

x IS NULL

and

x IS NOT NULL

Describe alternatives you've considered

The basic pattern is:

  1. Implement the Expr --> AST reverse code in Unparser::expr_to_sql(source link)
  2. Add a test to expr_to_sql_ok

Note you can run the tests like

cargo test -p datafusion-sql -- expr_to_sql_ok

Additional context

No response

@alamb alamb added enhancement New feature or request good first issue Good for newcomers labels May 15, 2024
@goldmedal
Copy link
Contributor

Hi @alamb, I'm new to DataFusion. Could I take this issue?

@alamb
Copy link
Contributor Author

alamb commented May 15, 2024

Hi @alamb, I'm new to DataFusion. Could I take this issue?

Absolutely ! Thank you @goldmedal -- in general feel free to take any issue, as described in https://datafusion.apache.org/contributor-guide/index.html#pull-request-overview

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants