-
Notifications
You must be signed in to change notification settings - Fork 317
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
optimizer & runner should consider NULL
special rules
#3925
Comments
relate issue #3685 |
some of the yaml testing cases are wrong:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For a index optimizer, the most common pattern is, for example, SQL
SELECT * FROM t1 WHERE gp = {const_val}
, is optimized based on FILTER expressiongp = {const_val}
:So if index
key=gp
exists for table t1, that index is utilized, as ** SEEK BY KEY{const_val}
>> OUTPUT ALL ROWS`**.However, if
{const_val}
isNULL
, this optimize rule should not go that approach, since<ANY_VAL> = NULL
isNULL
.This also happens for SQL like LAST JOIN
t1 LAST JOIN t2 on t1.key = t2.key
, where there is row exists in t1 thatt1.key = NULL
. It never joins.Optimizer should consider const NULL values, and Runner should consider NULL values as index_key
The text was updated successfully, but these errors were encountered: