You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
wjhuang2016
changed the title
binding normalize every number makes using expression index wrongly
binding normalize every number leads to use the expression index wrongly
Jul 9, 2021
If we use the hint directly, the SQL select * from t where a+2 > 2; will get the same plan. So I think it is like an enhancement rather than a bug. And it should not be easy to fix in the short term.
I think the result of the query is right, but the expression index should not be used. Maybe we can do some checks that when we build the full range for the expression index, we shouldn't use the expression index. The solutions need further investigation.
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
2. What did you expect to see? (Required)
For SQL
select * from t where a+2 > 2;
, don't use the expression index. But the hint work for it.3. What did you see instead (Required)
Wrong plan for
select * from t where a+2 > 2;
4. What is your TiDB version? (Required)
master
The text was updated successfully, but these errors were encountered: