diff --git a/be/src/olap/tablet_reader.cpp b/be/src/olap/tablet_reader.cpp index f0229431b7b932..1cecd56a82ab7e 100644 --- a/be/src/olap/tablet_reader.cpp +++ b/be/src/olap/tablet_reader.cpp @@ -578,6 +578,8 @@ void TabletReader::_init_conditions_param_except_leafnode_of_andnode( for (int id : read_params.topn_filter_source_node_ids) { auto& runtime_predicate = read_params.runtime_state->get_query_ctx()->get_runtime_predicate(id); + DCHECK(runtime_predicate.inited()) + << "runtime predicate not inited, source_node_id=" << id; runtime_predicate.set_tablet_schema(_tablet_schema); } } diff --git a/be/src/runtime/runtime_predicate.h b/be/src/runtime/runtime_predicate.h index ec5b9612cbc9c4..fcfc9db7021235 100644 --- a/be/src/runtime/runtime_predicate.h +++ b/be/src/runtime/runtime_predicate.h @@ -53,7 +53,7 @@ class RuntimePredicate { void set_tablet_schema(TabletSchemaSPtr tablet_schema) { std::unique_lock wlock(_rwlock); - if (_tablet_schema) { + if (_tablet_schema || !_inited) { return; } _tablet_schema = tablet_schema;