| 107 | } |
| 108 | |
| 109 | void FilterContext::InsertPerCompareOp(TupleRow* row) const noexcept { |
| 110 | if (filter->getCompareOp() == extdatasource::TComparisonOp::type::EQ) { |
| 111 | Insert(row); |
| 112 | } else { |
| 113 | DCHECK(filter->is_min_max_filter()); |
| 114 | if (local_min_max_filter == nullptr || local_min_max_filter->AlwaysTrue()) return; |
| 115 | void* val = expr_eval->GetValue(row); |
| 116 | switch (filter->getCompareOp()) { |
| 117 | case extdatasource::TComparisonOp::type::LE: |
| 118 | local_min_max_filter->InsertForLE(val); |
| 119 | break; |
| 120 | case extdatasource::TComparisonOp::type::LT: |
| 121 | local_min_max_filter->InsertForLT(val); |
| 122 | break; |
| 123 | case extdatasource::TComparisonOp::type::GE: |
| 124 | local_min_max_filter->InsertForGE(val); |
| 125 | break; |
| 126 | case extdatasource::TComparisonOp::type::GT: |
| 127 | local_min_max_filter->InsertForGT(val); |
| 128 | break; |
| 129 | default: |
| 130 | DCHECK(false) |
| 131 | << "Unsupported comparison op in FilterContext::InsertPerCompareOp()"; |
| 132 | } |
| 133 | } |
| 134 | } |
| 135 | |
| 136 | void FilterContext::MaterializeValues() const { |
| 137 | if (filter->is_min_max_filter() && local_min_max_filter != nullptr) { |
no test coverage detected