This is an automated email from the ASF dual-hosted git repository.
panxiaolei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 23aaf0f368f [Chore](top-n) check runtime predicate inited when scan
operator open (#32140)
23aaf0f368f is described below
commit 23aaf0f368fd5271a73aabc4e76bbcf071fc0940
Author: Pxl <[email protected]>
AuthorDate: Tue Mar 12 22:39:58 2024 +0800
[Chore](top-n) check runtime predicate inited when scan operator open
(#32140)
check runtime predicate inited when scan operator open
---
be/src/olap/tablet_reader.cpp | 2 ++
be/src/runtime/runtime_predicate.h | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/be/src/olap/tablet_reader.cpp b/be/src/olap/tablet_reader.cpp
index f0229431b7b..1cecd56a82a 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 ec5b9612cbc..fcfc9db7021 100644
--- a/be/src/runtime/runtime_predicate.h
+++ b/be/src/runtime/runtime_predicate.h
@@ -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;
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]