[Chore](top-n) check runtime predicate inited when scan operator open (#32140)
check runtime predicate inited when scan operator open
This commit is contained in:
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@ -53,7 +53,7 @@ public:
|
||||
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user