-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
68289: colexec: fix LIKE operators when patterns have escape characters r=yuzefovich a=yuzefovich **colexec: fix LIKE operators when patterns have escape characters** Fixes: #68040. Release note (bug fix): Previously, CockroachDB could incorrectly evaluate LIKE expressions when the pattern contained the escape characters `\` if the expressions were executed via the vectorized engine. **colbuilder: force planning of optimized projection operators** Whenever we're planning a projection expression, we have 3 cases: the left is constant, the right is constants, and neither are constants. For the second case we have some optimized operators. Previously, those operators weren't exercised via the TestEval/vectorized because in the eval tests the left side is constant. This commit switches the planning to force planning of those optimized operators. This shouldn't really have an effect on planning of actual queries. This was prompted by the bug in LIKE operators that is fixed in the previous commit. Had we forced the planning for our eval tests, we would have caught it earlier. This also revealed an incompatibility for our IN operator implementation when the right side is an empty tuple which this commit also fixes. However, I don't think this scenario can be hit in production because the optimizer folds such an expression into correct `false`. Thus, there is no release note. Release note: None Co-authored-by: Yahor Yuzefovich <[email protected]>
- Loading branch information
Showing
3 changed files
with
45 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters