Skip to content
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

[Fix](inverted index) Fix wrong need read data opt when enable_common_expr_pushdown is disabled #40689 #41562

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions be/src/olap/rowset/segment_v2/segment_iterator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -972,6 +972,12 @@ Status SegmentIterator::_apply_inverted_index() {
*/
bool SegmentIterator::_check_all_conditions_passed_inverted_index_for_column(ColumnId cid,
bool default_return) {
// If common_expr_pushdown is disabled, we cannot guarantee that all conditions are processed by the inverted index.
// Consider a scenario where there is a column predicate and an expression involving the same column in the SQL query,
// such as 'a < 0' and 'abs(a) > 1'. This could potentially lead to errors.
if (_opts.runtime_state && !_opts.runtime_state->query_options().enable_common_expr_pushdown) {
return false;
}
auto pred_it = _column_predicate_inverted_index_status.find(cid);
if (pred_it != _column_predicate_inverted_index_status.end()) {
const auto& pred_map = pred_it->second;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,3 @@

-- !sql_11 --
1

Loading