shardingsphere icon indicating copy to clipboard operation
shardingsphere copied to clipboard

Support parsing SQL Server SELECT TRIM

Open zhengkezhou1 opened this issue 1 year ago • 3 comments

Fixes #29162.

Changes proposed in this pull request:

Task

This issue is to support more SQL Server sql parsing, as follows:

SELECT TRIM( '.,! ' FROM '     #     test    .') AS Result
SELECT TRIM(LEADING '.,! ' FROM  '     .#     test    .') AS Result
SELECT TRIM(TRAILING '.,! ' FROM '     .#     test    .') AS Result
SELECT TRIM(BOTH '123' FROM '123abc123') AS Result

Before committing this PR, I'm sure that I have checked the following options:

  • [ ] My code follows the code of conduct of this project.
  • [ ] I have self-reviewed the commit code.
  • [ ] I have (or in comment I request) added corresponding labels for the pull request.
  • [ ] I have passed maven check locally : ./mvnw clean install -B -T1C -Dmaven.javadoc.skip -Dmaven.jacoco.skip -e.
  • [ ] I have made corresponding changes to the documentation.
  • [ ] I have added corresponding unit tests for my changes.

zhengkezhou1 avatar Feb 22 '24 15:02 zhengkezhou1

Hi @zzzk1, thank you for your contribution. Please solve ci exception on your local machine.

strongduanmu avatar Feb 23 '24 00:02 strongduanmu

@strongduanmu pls take a look

zhengkezhou1 avatar Feb 23 '24 18:02 zhengkezhou1

Hi @zzzk1, thank you for your contribution. I leave some comment, please take a look.

strongduanmu avatar Feb 23 '24 23:02 strongduanmu

Hi @zzzk1, can you take a look at https://github.com/apache/shardingsphere/pull/30270, I made some minor optimizations. You can get this code conduct from doc - https://shardingsphere.apache.org/community/cn/involved/conduct/code/#g4-%E8%A7%84%E8%8C%83.

strongduanmu avatar Feb 24 '24 07:02 strongduanmu

Hi @zzzk1, can you take a look at #30270, I made some minor optimizations. You can get this code conduct from doc - shardingsphere.apache.org/community/cn/involved/conduct/code/#g4-%E8%A7%84%E8%8C%83.

sorry about that i will be prudently next

zhengkezhou1 avatar Feb 24 '24 08:02 zhengkezhou1