Conversation
…d SIMILAR TO to the operand type
dyemanov
reviewed
Oct 3, 2026
| if (blrOp == blr_between) | ||
| convertLiteralToOperand(procArg3, procArg1); | ||
| break; | ||
| } |
Member
There was a problem hiding this comment.
I'd also add all the pattern matching BLRs to the switch (with just break;) and the default section with fb_assert(false). This would trigger an explicit decision how any newly added BLR comparison op-code should be preprocessed in this routine.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #9186
#9108 converts a string literal to the type of the other operand at prepare time for every
ComparativeBoolNode. For the pattern matching operators the literal is a pattern matched against the text form of the operand, sodate_col LIKE '2024%',time_col LIKE '10%',double_col LIKE '3%'etc. failed with a conversion error. Patterns that happen to be valid literals (date_col LIKE '5-SEP-2024') matched values they shouldn't.The conversion is now done only for
=,<>,<,<=,>,>=,IS [NOT] DISTINCT FROMandBETWEEN.Tested on a debug build of master with the queries from the issue: they give the same results as 5.0. Comparisons such as
d = 'garbage'andd between 'x' and 'y'still fail at prepare, so the #9108 conversion is still applied to them.