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/05 00:27:48 UTC
[GitHub] [doris] yiguolei commented on a diff in pull request #11468: [Refactor](push-down predicate) Derive push-down predicate from vconjuncts
yiguolei commented on code in PR #11468:
URL: https://github.com/apache/doris/pull/11468#discussion_r938350082
##########
be/src/vec/exec/volap_scan_node.cpp:
##########
@@ -621,133 +621,138 @@ Status VOlapScanNode::_add_blocks(std::vector<Block*>& block) {
return Status::OK();
}
-void VOlapScanNode::eval_const_conjuncts() {
- for (int conj_idx = 0; conj_idx < _conjunct_ctxs.size(); ++conj_idx) {
- // if conjunct is constant, compute direct and set eos = true
- if (_conjunct_ctxs[conj_idx]->root()->is_constant()) {
- void* value = _conjunct_ctxs[conj_idx]->get_value(nullptr);
- if (value == nullptr || *reinterpret_cast<bool*>(value) == false) {
- _eos = true;
- break;
- }
- }
- }
-}
-
Status VOlapScanNode::normalize_conjuncts() {
std::vector<SlotDescriptor*> slots = _tuple_desc->slots();
for (int slot_idx = 0; slot_idx < slots.size(); ++slot_idx) {
switch (slots[slot_idx]->type().type) {
case TYPE_TINYINT: {
ColumnValueRange<TYPE_TINYINT> range(slots[slot_idx]->col_name());
- normalize_predicate(range, slots[slot_idx]);
+ _id_to_slot_column_value_range[slots[slot_idx]->id()] =
+ std::pair {slots[slot_idx], range};
break;
}
Review Comment:
Could we use a template or macro to simply these code?
--
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