Skip to content

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
@KKould
Copy link
Member

KKould commented Jul 21, 2024

Thank you for your contribution!

@KKould KKould mentioned this pull request Nov 3, 2024
48 tasks
@KKould KKould added this to the SQL 2016 milestone Jul 26, 2025
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