Bug report: Incorrect ranges in key condition#13333
Conversation
|
Actually, we get correct key condition |
|
Actually our code works badly with impossible KeyConditions. In this case, we have condition: Which is obviously always false for any interval. But for example, for interval I think we can simplify KeyCondition's RPN after it was parsed from |
| rpn_stack.back() = arg2; | ||
| else if (arg2.function == RPNElement::ALWAYS_TRUE) | ||
| rpn_stack.back() = arg1; | ||
| else if (arg1.function == RPNElement::FUNCTION_NOT_IN_RANGE && arg2.function == RPNElement::FUNCTION_NOT_IN_RANGE && arg1.range.intersectsRange(arg2.range)) |
There was a problem hiding this comment.
This looks incorrect.
range1: *****
range2: *****
not range1: ***** *****
not range2: ******** **
not both: ***** **
| }; | ||
|
|
||
|
|
||
| void KeyCondition::optimizeRPN() |
There was a problem hiding this comment.
The idea of RPN optimization is 👍
|
Closed in favor to #14225. |
I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
To be added Fixes: #13248