KiteSQL
KiteSQL copied to clipboard
feat(optimizer): Implement LIKE expression rule for query optimization
The commit introduces a new rule for the optimization of LIKE operator in SQL queries. The LIKE operator expressions are rewritten to make use of binary operators such as GtEq and Lt in certain cases which enhances the performance of queries. Additionally, new tests for incremented character rule have been added, and LikeRewrite has been added to optimizer rules in the rule set.
What problem does this PR solve?
Add corresponding issue link with summary if exists -->
Issue link:
What is changed and how it works?
Code changes
- [x] Has Rust code change
- [ ] Has CI related scripts change
Check List
Tests
- [x] 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
It looks good, but it lacks the test of the rules. Reference: https://github.com/KipData/KipSQL/blob/main/src/optimizer/rule/column_pruning.rs#L166