You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/08/13 05:08:29 UTC
[GitHub] [doris] luozenglin opened a new pull request, #11754: [fix](delete) fix query result error after delete
luozenglin opened a new pull request, #11754:
URL: https://github.com/apache/doris/pull/11754
convert dictionary code for delete predicates.
# Proposed changes
Issue Number: close #11425
## Problem summary
Describe your changes.
## Checklist(Required)
1. Does it affect the original behavior:
- [ ] Yes
- [ ] No
- [ ] I don't know
2. Has unit tests been added:
- [ ] Yes
- [ ] No
- [ ] No Need
3. Has document been added or modified:
- [ ] Yes
- [ ] No
- [ ] No Need
4. Does it need to update dependencies:
- [ ] Yes
- [ ] No
5. Are there any changes that cannot be rolled back:
- [ ] Yes (If Yes, please explain WHY)
- [ ] No
## Further comments
If this is a relatively large or complex change, kick off the discussion at [dev@doris.apache.org](mailto:dev@doris.apache.org) by explaining why you chose the solution you did and what alternatives you considered, etc...
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] luozenglin commented on a diff in pull request #11754: [fix](delete) fix query result error after delete
Posted by GitBox <gi...@apache.org>.
luozenglin commented on code in PR #11754:
URL: https://github.com/apache/doris/pull/11754#discussion_r945272616
##########
be/src/olap/rowset/segment_v2/segment_iterator.cpp:
##########
@@ -1199,6 +1199,34 @@ Status SegmentIterator::next_batch(vectorized::Block* block) {
return Status::OK();
}
+void SegmentIterator::_convert_dict_code_for_predicate_if_necessary() {
+ for (auto predicate : _short_cir_eval_predicate) {
+ _convert_dict_code_for_predicate_if_necessary_impl(predicate);
+ }
+
+ for (auto predicate : _pre_eval_block_predicate) {
+ _convert_dict_code_for_predicate_if_necessary_impl(predicate);
+ }
+
+ std::set<const ColumnPredicate*> predicate_set {};
+ _opts.delete_condition_predicates->get_all_column_predicate(predicate_set);
Review Comment:
That sounds like a good idea. I have modified the code as you suggested. thank you.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] morningman merged pull request #11754: [fix](delete) fix query result error after delete
Posted by GitBox <gi...@apache.org>.
morningman merged PR #11754:
URL: https://github.com/apache/doris/pull/11754
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] luozenglin commented on a diff in pull request #11754: [fix](delete) fix query result error after delete
Posted by GitBox <gi...@apache.org>.
luozenglin commented on code in PR #11754:
URL: https://github.com/apache/doris/pull/11754#discussion_r945274864
##########
be/src/olap/rowset/segment_v2/segment_iterator.cpp:
##########
@@ -1199,6 +1199,34 @@ Status SegmentIterator::next_batch(vectorized::Block* block) {
return Status::OK();
}
+void SegmentIterator::_convert_dict_code_for_predicate_if_necessary() {
+ for (auto predicate : _short_cir_eval_predicate) {
+ _convert_dict_code_for_predicate_if_necessary_impl(predicate);
+ }
+
+ for (auto predicate : _pre_eval_block_predicate) {
+ _convert_dict_code_for_predicate_if_necessary_impl(predicate);
+ }
+
+ std::set<const ColumnPredicate*> predicate_set {};
+ _opts.delete_condition_predicates->get_all_column_predicate(predicate_set);
+ for (const auto column_predicate : predicate_set) {
Review Comment:
Yes, dev-1.1.2 has the same problem.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] github-actions[bot] commented on pull request #11754: [fix](delete) fix query result error after delete
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #11754:
URL: https://github.com/apache/doris/pull/11754#issuecomment-1214657212
PR approved by anyone and no changes requested.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] github-actions[bot] commented on pull request #11754: [fix](delete) fix query result error after delete
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #11754:
URL: https://github.com/apache/doris/pull/11754#issuecomment-1214657196
PR approved by at least one committer and no changes requested.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] wangbo commented on a diff in pull request #11754: [fix](delete) fix query result error after delete
Posted by GitBox <gi...@apache.org>.
wangbo commented on code in PR #11754:
URL: https://github.com/apache/doris/pull/11754#discussion_r945225567
##########
be/src/olap/rowset/segment_v2/segment_iterator.cpp:
##########
@@ -1199,6 +1199,34 @@ Status SegmentIterator::next_batch(vectorized::Block* block) {
return Status::OK();
}
+void SegmentIterator::_convert_dict_code_for_predicate_if_necessary() {
+ for (auto predicate : _short_cir_eval_predicate) {
+ _convert_dict_code_for_predicate_if_necessary_impl(predicate);
+ }
+
+ for (auto predicate : _pre_eval_block_predicate) {
+ _convert_dict_code_for_predicate_if_necessary_impl(predicate);
+ }
+
+ std::set<const ColumnPredicate*> predicate_set {};
+ _opts.delete_condition_predicates->get_all_column_predicate(predicate_set);
Review Comment:
How about keep predicate_set as field of SegmentIterator so we don't need get them for every batch?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] wangbo commented on a diff in pull request #11754: [fix](delete) fix query result error after delete
Posted by GitBox <gi...@apache.org>.
wangbo commented on code in PR #11754:
URL: https://github.com/apache/doris/pull/11754#discussion_r945225567
##########
be/src/olap/rowset/segment_v2/segment_iterator.cpp:
##########
@@ -1199,6 +1199,34 @@ Status SegmentIterator::next_batch(vectorized::Block* block) {
return Status::OK();
}
+void SegmentIterator::_convert_dict_code_for_predicate_if_necessary() {
+ for (auto predicate : _short_cir_eval_predicate) {
+ _convert_dict_code_for_predicate_if_necessary_impl(predicate);
+ }
+
+ for (auto predicate : _pre_eval_block_predicate) {
+ _convert_dict_code_for_predicate_if_necessary_impl(predicate);
+ }
+
+ std::set<const ColumnPredicate*> predicate_set {};
+ _opts.delete_condition_predicates->get_all_column_predicate(predicate_set);
Review Comment:
How about keep predicate_set as field of SegmentIterator so we don't need get them for every batch?
We can get the info that which Predicate is range and its id including delete pred or non-predicate in ```_vec_init_lazy_materialization```, then in ```_convert_dict_code_for_predicate_if_necessary``` we just get id and exec ```convert_dict_codes_if_necessary```.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] luozenglin commented on pull request #11754: [fix](delete) fix query result error after delete
Posted by GitBox <gi...@apache.org>.
luozenglin commented on PR #11754:
URL: https://github.com/apache/doris/pull/11754#issuecomment-1214342915
> Please add regression test from the issue.
done
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] yiguolei commented on a diff in pull request #11754: [fix](delete) fix query result error after delete
Posted by GitBox <gi...@apache.org>.
yiguolei commented on code in PR #11754:
URL: https://github.com/apache/doris/pull/11754#discussion_r945221172
##########
be/src/olap/rowset/segment_v2/segment_iterator.cpp:
##########
@@ -1199,6 +1199,34 @@ Status SegmentIterator::next_batch(vectorized::Block* block) {
return Status::OK();
}
+void SegmentIterator::_convert_dict_code_for_predicate_if_necessary() {
+ for (auto predicate : _short_cir_eval_predicate) {
+ _convert_dict_code_for_predicate_if_necessary_impl(predicate);
+ }
+
+ for (auto predicate : _pre_eval_block_predicate) {
+ _convert_dict_code_for_predicate_if_necessary_impl(predicate);
+ }
+
+ std::set<const ColumnPredicate*> predicate_set {};
+ _opts.delete_condition_predicates->get_all_column_predicate(predicate_set);
+ for (const auto column_predicate : predicate_set) {
Review Comment:
Could you please also check if dev-1.1.2 also have this problem?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org