Skip to content

Commit

Permalink
[Chore](top-n) check runtime predicate inited when scan operator open (
Browse files Browse the repository at this point in the history
…#32140)

check runtime predicate inited when scan operator open
  • Loading branch information
BiteTheDDDDt authored Mar 12, 2024
1 parent dc7fcd0 commit 23aaf0f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions be/src/olap/tablet_reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down
2 changes: 1 addition & 1 deletion be/src/runtime/runtime_predicate.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class RuntimePredicate {

void set_tablet_schema(TabletSchemaSPtr tablet_schema) {
std::unique_lock<std::shared_mutex> wlock(_rwlock);
if (_tablet_schema) {
if (_tablet_schema || !_inited) {
return;
}
_tablet_schema = tablet_schema;
Expand Down

0 comments on commit 23aaf0f

Please sign in to comment.