korlov42 opened a new pull request, #6996: URL: https://github.com/apache/ignite-3/pull/6996
https://issues.apache.org/jira/browse/IGNITE-27077 This patch introduces support for LIKE predicate in search bounds. The main idea is to derive prefix string from given pattern (I will refer to this as `lowerBound`), compute smallest prefix at most of the same length which is lexicographically greater than derived one (I will refer to this as `upperBound`), and compose range condition out of these two patterns. For example, predicate like `col LIKE 'foo%'` will be converted to `col >= 'foo' AND col < 'fop'`. The main pitfall here is that it's not always possible to compute `upperBound`. Assume that prefix already biggest possible string (consists of `Character.MAX_VALUE` only). In this case, on indexes with certain collations we should generate range bounds with open upper bound: `col >= lowerBound`. Since index bounds are created during optimization time and actual values are not known, conditional bounds were introduced. ----- Thank you for submitting the pull request. To streamline the review process of the patch and ensure better code quality we ask both an author and a reviewer to verify the following: ### The Review Checklist - [ ] **Formal criteria:** TC status, codestyle, mandatory documentation. Also make sure to complete the following: \- There is a single JIRA ticket related to the pull request. \- The web-link to the pull request is attached to the JIRA ticket. \- The JIRA ticket has the Patch Available state. \- The description of the JIRA ticket explains WHAT was made, WHY and HOW. \- The pull request title is treated as the final commit message. The following pattern must be used: IGNITE-XXXX Change summary where XXXX - number of JIRA issue. - [ ] **Design:** new code conforms with the design principles of the components it is added to. - [ ] **Patch quality:** patch cannot be split into smaller pieces, its size must be reasonable. - [ ] **Code quality:** code is clean and readable, necessary developer documentation is added if needed. - [ ] **Tests code quality:** test set covers positive/negative scenarios, happy/edge cases. Tests are effective in terms of execution time and resources. ### Notes - [Apache Ignite Coding Guidelines](https://cwiki.apache.org/confluence/display/IGNITE/Java+Code+Style+Guide) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
