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: add support for TRIM() #211

Merged
merged 2 commits into from
Jul 21, 2024
Merged

feat: add support for TRIM() #211

merged 2 commits into from
Jul 21, 2024

Conversation

tkzt
Copy link
Contributor

@tkzt tkzt commented Jul 18, 2024

What problem does this PR solve?

Generally, according to E21_09, adds support for the method TRIM().

Issue link: #130

What is changed and how it works?

Expression matching a pattern below will work fine:

TRIM([LEADING | TRAILING | BOTH] [trim_what FROM] exp)

Code changes

  • Has Rust code change
  • Has CI related scripts change

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Note for reviewer

None

@KKould
Copy link
Member

KKould commented Jul 19, 2024

I'm surprised you actually did this, welcome to rust and database!

@KKould
Copy link
Member

KKould commented Jul 19, 2024

There seems to be some problems with the github action, please check it

Tips: Please use cargo fmt to format the code

@tkzt
Copy link
Contributor Author

tkzt commented Jul 19, 2024

I'm surprised you actually did this, welcome to rust and database!

Time to move forward! 🙃

@tkzt
Copy link
Contributor Author

tkzt commented Jul 19, 2024

Test cases updated. But one thing has to be mentioned:

An expression like SELECT TRIM ( FROM 'foo' ); seems to be invalid, from sqlparser's point of view.

@KKould KKould merged commit 0d3e732 into KipData:main Jul 21, 2024
3 checks passed
@KKould
Copy link
Member

KKould commented Jul 21, 2024

Thank you for your contribution!

@KKould KKould mentioned this pull request Nov 3, 2024
51 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants