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

feat(core): implement the dialect-specific function unparsing #999

Merged

Conversation

goldmedal
Copy link
Contributor

@goldmedal goldmedal commented Dec 19, 2024

Description

close #946
The root cause of #946 is trim is the alias of btrim in the DataFusion. The btrim function call plan will be generated when we plan the SQL to the logical plan. That's why we got the btrim in the unparsing result. In this case, we need to override the behavior of SQL generation. This PR supports the trim function for MySQL. We can follow this pattern to support the similar cases for other data sources.

Changed

  • introduce InnerDialect to customize the function unparsing behavior for different data source.
  • Fix the data_source serde
  • Add trim to the function white list of MySQL

@github-actions github-actions bot added core ibis rust Pull requests that update Rust code python Pull requests that update Python code labels Dec 19, 2024
@goldmedal goldmedal marked this pull request as ready for review December 19, 2024 10:40
Copy link
Contributor

@grieve54706 grieve54706 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@grieve54706 grieve54706 merged commit d32124e into Canner:main Dec 23, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core ibis python Pull requests that update Python code rust Pull requests that update Rust code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrectly transform SQL from trim to btrim
2 participants