Tanya-W commented on code in PR #16569:
URL: https://github.com/apache/doris/pull/16569#discussion_r1101535585
##########
be/src/olap/rowset/segment_v2/segment_iterator.cpp:
##########
@@ -1562,5 +1633,83 @@ Status
SegmentIterator::current_block_row_locations(std::vector<RowLocation>* bl
return Status::OK();
}
+/**
+ * solution 1: where cluase included nodes are all `and` leaf nodes,
+ * predicate pushed down and remove from vconjunct.
+ * for example: where A = 1 and B = 'test' and B like '%he%';
+ * column A : `A = 1` pushed down, this column's predicates all pushed
down,
+ * call _check_column_pred_all_push_down will return true.
+ * column B : `B = 'test'` pushed down, but `B like '%he%'` remain in
vconjunct,
+ * call _check_column_pred_all_push_down will return false.
+ *
+ * solution 2: where cluase included nodes are compound or other complex
conditions,
+ * predicate pushed down but still remain in vconjunct.
+ * for exmple: where (A = 1 and B = 'test') or B = 'hi' or (C like '%ye%' and
C > 'aa');
+ * column A : `A = 1` pushed down, check it applyed by index,
+ * call _check_column_pred_all_push_down will return true.
+ * column B : `B = 'test'`, `B = 'hi'` all pushed down, check them all
applyed by index,
+ * call _check_column_pred_all_push_down will return true.
+ * column C : `C like '%ye%'` not pushed down, `C > 'aa'` pushed down,
only `C > 'aa'` applyed by index,
+ * call _check_column_pred_all_push_down will return false.
+*/
+bool SegmentIterator::_check_column_pred_all_push_down(ColumnPredicate*
predicate,
+ bool in_compound) {
+ if (_remaining_vconjunct_root == nullptr) {
+ return true;
+ }
+ std::unordered_map<std::string, std::vector<ColumnPredicateInfo>>
+ column_pred_in_remaining_vconjunct;
Review Comment:
yes, you are right, I will update this logic
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]