-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[fix](delete) fix 'is null' or 'is not null' delete predicate will get wrong result #17190
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
Conversation
|
run buildall |
|
will add regression later |
|
clang-tidy review says "All clean, LGTM! 👍" |
…t wrong result Signed-off-by: nextdreamblue <zxw520blue1@163.com>
Signed-off-by: nextdreamblue <zxw520blue1@163.com>
a43f640 to
af212de
Compare
|
run buildall |
|
clang-tidy review says "All clean, LGTM! 👍" |
|
run p0 |
|
run buildall |
|
|
||
| bool evaluate_del(const std::pair<WrapperField*, WrapperField*>& statistic) const override { | ||
| // evaluate_del only use for delete condition to filter page, need use delete condition origin value, | ||
| // when opposite==true, origin value 'is null'->'is not null' and 'is not null'->'is null', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need to check if opposite==false ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
only deletehandler set opposite=true and evaluate_del only use for delete condition to filter page.
when opposite==false, evaluate_del will not be used to filter page.
xy720
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
PR approved by at least one committer and no changes requested. |
|
PR approved by anyone and no changes requested. |
…t wrong result (#17190) fix 'is null' or 'is not null' delete predicate will get wrong result Signed-off-by: nextdreamblue <zxw520blue1@163.com>
…t wrong result (apache#17190) fix 'is null' or 'is not null' delete predicate will get wrong result Signed-off-by: nextdreamblue <zxw520blue1@163.com>
* [fix](delete) fix delete from bug which can get wrong result (apache#17146) 理论上,如果是两次独立的删除,比如delete from table where a=1; delete from table where a=2;其实这个地方应该可以使用的,但是目前的代码,是把所有不同版本的delete predicates和不同列的delete predicates都放到一起了,失去了版本信息、失去了谓词间可能是and的关系,统一弱化成了delete predicates都是独立的,有一个delete predicates满足条件,就把page都去掉。 这个pr的修改方式,就是在当前代码的基础上,当只有一个delete predicate的时候才能保证后续淘汰page的正确性,所以这里一律加了 == 1的判断才传递delete predicates。 如果要把不同版本的delete predicates和不同列的delete predicates作为完整和严谨的逻辑去判断page,需要修改的设计就有点多了,目前的方案算是一种优先解决bug的思路,后续可以进一步把delete predicates这块加速zone判断进行page淘汰的逻辑完善,提高delete predicates使用的场景。 * [fix](delete) fix 'is null' or 'is not null' delete predicate will get wrong result (apache#17190) fix 'is null' or 'is not null' delete predicate will get wrong result Signed-off-by: nextdreamblue <zxw520blue1@163.com> --------- Signed-off-by: nextdreamblue <zxw520blue1@163.com> Co-authored-by: xueweizhang <zxw520blue1@163.com>
…t wrong result (apache#17190) fix 'is null' or 'is not null' delete predicate will get wrong result Signed-off-by: nextdreamblue <zxw520blue1@163.com>
* [fix](delete) fix delete from bug which can get wrong result (apache#17146) 理论上,如果是两次独立的删除,比如delete from table where a=1; delete from table where a=2;其实这个地方应该可以使用的,但是目前的代码,是把所有不同版本的delete predicates和不同列的delete predicates都放到一起了,失去了版本信息、失去了谓词间可能是and的关系,统一弱化成了delete predicates都是独立的,有一个delete predicates满足条件,就把page都去掉。 这个pr的修改方式,就是在当前代码的基础上,当只有一个delete predicate的时候才能保证后续淘汰page的正确性,所以这里一律加了 == 1的判断才传递delete predicates。 如果要把不同版本的delete predicates和不同列的delete predicates作为完整和严谨的逻辑去判断page,需要修改的设计就有点多了,目前的方案算是一种优先解决bug的思路,后续可以进一步把delete predicates这块加速zone判断进行page淘汰的逻辑完善,提高delete predicates使用的场景。 * [fix](delete) fix 'is null' or 'is not null' delete predicate will get wrong result (apache#17190) fix 'is null' or 'is not null' delete predicate will get wrong result Signed-off-by: nextdreamblue <zxw520blue1@163.com> --------- Signed-off-by: nextdreamblue <zxw520blue1@163.com> Co-authored-by: xueweizhang <zxw520blue1@163.com>
…t wrong result
Proposed changes
Issue Number: close #17183
Problem summary
Describe your changes.
Checklist(Required)
Further comments
If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...