Coverage Report

Created: 2026-10-30 08:52

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
be/src/exec/operator/operator.cpp
Line
Count
Source
1
// Licensed to the Apache Software Foundation (ASF) under one
2
// or more contributor license agreements.  See the NOTICE file
3
// distributed with this work for additional information
4
// regarding copyright ownership.  The ASF licenses this file
5
// to you under the Apache License, Version 2.0 (the
6
// "License"); you may not use this file except in compliance
7
// with the License.  You may obtain a copy of the License at
8
//
9
//   http://www.apache.org/licenses/LICENSE-2.0
10
//
11
// Unless required by applicable law or agreed to in writing,
12
// software distributed under the License is distributed on an
13
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
// KIND, either express or implied.  See the License for the
15
// specific language governing permissions and limitations
16
// under the License.
17
18
#include "exec/operator/operator.h"
19
20
#include <algorithm>
21
22
#include "common/status.h"
23
#include "exec/common/util.hpp"
24
#include "exec/exchange/local_exchange_sink_operator.h"
25
#include "exec/exchange/local_exchange_source_operator.h"
26
#include "exec/operator/aggregation_sink_operator.h"
27
#include "exec/operator/aggregation_source_operator.h"
28
#include "exec/operator/analytic_sink_operator.h"
29
#include "exec/operator/analytic_source_operator.h"
30
#include "exec/operator/assert_num_rows_operator.h"
31
#include "exec/operator/blackhole_sink_operator.h"
32
#include "exec/operator/bucketed_aggregation_sink_operator.h"
33
#include "exec/operator/bucketed_aggregation_source_operator.h"
34
#include "exec/operator/cache_sink_operator.h"
35
#include "exec/operator/cache_source_operator.h"
36
#include "exec/operator/datagen_operator.h"
37
#include "exec/operator/dict_sink_operator.h"
38
#include "exec/operator/distinct_streaming_aggregation_operator.h"
39
#include "exec/operator/empty_set_operator.h"
40
#include "exec/operator/exchange_sink_operator.h"
41
#include "exec/operator/exchange_source_operator.h"
42
#include "exec/operator/file_scan_operator.h"
43
#include "exec/operator/group_commit_block_sink_operator.h"
44
#include "exec/operator/group_commit_scan_operator.h"
45
#include "exec/operator/hashjoin_build_sink.h"
46
#include "exec/operator/hashjoin_probe_operator.h"
47
#include "exec/operator/hive_table_sink_operator.h"
48
#include "exec/operator/iceberg_delete_sink_operator.h"
49
#include "exec/operator/iceberg_merge_sink_operator.h"
50
#include "exec/operator/iceberg_table_sink_operator.h"
51
#include "exec/operator/jdbc_scan_operator.h"
52
#include "exec/operator/jdbc_table_sink_operator.h"
53
#include "exec/operator/local_merge_sort_source_operator.h"
54
#include "exec/operator/materialization_opertor.h"
55
#include "exec/operator/maxcompute_table_sink_operator.h"
56
#include "exec/operator/memory_scratch_sink_operator.h"
57
#include "exec/operator/meta_scan_operator.h"
58
#include "exec/operator/mock_operator.h"
59
#include "exec/operator/mock_scan_operator.h"
60
#include "exec/operator/multi_cast_data_stream_sink.h"
61
#include "exec/operator/multi_cast_data_stream_source.h"
62
#include "exec/operator/nested_loop_join_build_operator.h"
63
#include "exec/operator/nested_loop_join_probe_operator.h"
64
#include "exec/operator/olap_scan_operator.h"
65
#include "exec/operator/olap_table_sink_operator.h"
66
#include "exec/operator/olap_table_sink_v2_operator.h"
67
#include "exec/operator/paimon_table_sink_operator.h"
68
#include "exec/operator/partition_sort_sink_operator.h"
69
#include "exec/operator/partition_sort_source_operator.h"
70
#include "exec/operator/partitioned_aggregation_sink_operator.h"
71
#include "exec/operator/partitioned_aggregation_source_operator.h"
72
#include "exec/operator/partitioned_hash_join_probe_operator.h"
73
#include "exec/operator/partitioned_hash_join_sink_operator.h"
74
#include "exec/operator/rec_cte_anchor_sink_operator.h"
75
#include "exec/operator/rec_cte_scan_operator.h"
76
#include "exec/operator/rec_cte_sink_operator.h"
77
#include "exec/operator/rec_cte_source_operator.h"
78
#include "exec/operator/repeat_operator.h"
79
#include "exec/operator/result_file_sink_operator.h"
80
#include "exec/operator/result_sink_operator.h"
81
#include "exec/operator/schema_scan_operator.h"
82
#include "exec/operator/select_operator.h"
83
#include "exec/operator/set_probe_sink_operator.h"
84
#include "exec/operator/set_sink_operator.h"
85
#include "exec/operator/set_source_operator.h"
86
#include "exec/operator/sort_sink_operator.h"
87
#include "exec/operator/sort_source_operator.h"
88
#include "exec/operator/spill_iceberg_table_sink_operator.h"
89
#include "exec/operator/spill_sort_sink_operator.h"
90
#include "exec/operator/spill_sort_source_operator.h"
91
#include "exec/operator/streaming_aggregation_operator.h"
92
#include "exec/operator/table_function_operator.h"
93
#include "exec/operator/tvf_table_sink_operator.h"
94
#include "exec/operator/union_sink_operator.h"
95
#include "exec/operator/union_source_operator.h"
96
#include "exec/pipeline/dependency.h"
97
#include "exec/pipeline/pipeline.h"
98
#include "exprs/vexpr.h"
99
#include "exprs/vexpr_context.h"
100
#include "runtime/runtime_profile.h"
101
#include "runtime/runtime_profile_counter_names.h"
102
#include "util/debug_util.h"
103
#include "util/string_util.h"
104
105
namespace doris {
106
class RowDescriptor;
107
class RuntimeState;
108
} // namespace doris
109
110
namespace doris {
111
112
0
Status OperatorBase::close(RuntimeState* state) {
113
0
    if (_is_closed) {
114
0
        return Status::OK();
115
0
    }
116
0
    _is_closed = true;
117
0
    return Status::OK();
118
0
}
119
120
template <typename SharedStateArg>
121
1.78M
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
1.78M
    if (_parent->nereids_id() == -1) {
123
941k
        return fmt::format("(id={})", _parent->node_id());
124
941k
    } else {
125
841k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
841k
    }
127
1.78M
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
73.6k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
73.6k
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
73.6k
    } else {
125
73.6k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
73.6k
    }
127
73.6k
}
_ZNK5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
4
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
4
    if (_parent->nereids_id() == -1) {
123
1
        return fmt::format("(id={})", _parent->node_id());
124
3
    } else {
125
3
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
3
    }
127
4
}
_ZNK5doris19PipelineXLocalStateINS_15SortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
232k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
232k
    if (_parent->nereids_id() == -1) {
123
12
        return fmt::format("(id={})", _parent->node_id());
124
232k
    } else {
125
232k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
232k
    }
127
232k
}
_ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
155
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
155
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
155
    } else {
125
155
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
155
    }
127
155
}
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
6.52k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
6.52k
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
6.52k
    } else {
125
6.52k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
6.52k
    }
127
6.52k
}
_ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
9.82k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
9.82k
    if (_parent->nereids_id() == -1) {
123
60
        return fmt::format("(id={})", _parent->node_id());
124
9.76k
    } else {
125
9.76k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
9.76k
    }
127
9.82k
}
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
108k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
108k
    if (_parent->nereids_id() == -1) {
123
29
        return fmt::format("(id={})", _parent->node_id());
124
108k
    } else {
125
108k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
108k
    }
127
108k
}
_ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
67.0k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
67.0k
    if (_parent->nereids_id() == -1) {
123
2
        return fmt::format("(id={})", _parent->node_id());
124
67.0k
    } else {
125
67.0k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
67.0k
    }
127
67.0k
}
_ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
109
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
109
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
109
    } else {
125
109
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
109
    }
127
109
}
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
541k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
541k
    if (_parent->nereids_id() == -1) {
123
259k
        return fmt::format("(id={})", _parent->node_id());
124
282k
    } else {
125
282k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
282k
    }
127
541k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
56.2k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
56.2k
    if (_parent->nereids_id() == -1) {
123
2
        return fmt::format("(id={})", _parent->node_id());
124
56.2k
    } else {
125
56.2k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
56.2k
    }
127
56.2k
}
_ZNK5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
26
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
26
    if (_parent->nereids_id() == -1) {
123
26
        return fmt::format("(id={})", _parent->node_id());
124
26
    } else {
125
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
0
    }
127
26
}
_ZNK5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
6.19k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
6.19k
    if (_parent->nereids_id() == -1) {
123
6.19k
        return fmt::format("(id={})", _parent->node_id());
124
18.4E
    } else {
125
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
18.4E
    }
127
6.19k
}
_ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
441
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
441
    if (_parent->nereids_id() == -1) {
123
102
        return fmt::format("(id={})", _parent->node_id());
124
339
    } else {
125
339
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
339
    }
127
441
}
_ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
4.97k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
4.97k
    if (_parent->nereids_id() == -1) {
123
13
        return fmt::format("(id={})", _parent->node_id());
124
4.95k
    } else {
125
4.95k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
4.95k
    }
127
4.97k
}
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
674k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
675k
    if (_parent->nereids_id() == -1) {
123
675k
        return fmt::format("(id={})", _parent->node_id());
124
18.4E
    } else {
125
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
18.4E
    }
127
674k
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
_ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
169
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
169
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
169
    } else {
125
169
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
169
    }
127
169
}
128
129
template <typename SharedStateArg>
130
1.23M
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
1.23M
    if (_parent->nereids_id() == -1) {
132
673k
        return fmt::format("(id={})", _parent->node_id());
133
673k
    } else {
134
560k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
560k
    }
136
1.23M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
122k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
122k
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
122k
    } else {
134
122k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
122k
    }
136
122k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
5
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
5
    if (_parent->nereids_id() == -1) {
132
1
        return fmt::format("(id={})", _parent->node_id());
133
4
    } else {
134
4
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
4
    }
136
5
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
235k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
235k
    if (_parent->nereids_id() == -1) {
132
9
        return fmt::format("(id={})", _parent->node_id());
133
235k
    } else {
134
235k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
235k
    }
136
235k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
162
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
162
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
162
    } else {
134
162
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
162
    }
136
162
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
6.54k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
6.54k
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
6.54k
    } else {
134
6.54k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
6.54k
    }
136
6.54k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
9.83k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
9.83k
    if (_parent->nereids_id() == -1) {
132
60
        return fmt::format("(id={})", _parent->node_id());
133
9.77k
    } else {
134
9.77k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
9.77k
    }
136
9.83k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
108k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
108k
    if (_parent->nereids_id() == -1) {
132
29
        return fmt::format("(id={})", _parent->node_id());
133
108k
    } else {
134
108k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
108k
    }
136
108k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
66.9k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
66.9k
    if (_parent->nereids_id() == -1) {
132
4
        return fmt::format("(id={})", _parent->node_id());
133
66.9k
    } else {
134
66.9k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
66.9k
    }
136
66.9k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
119
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
119
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
119
    } else {
134
119
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
119
    }
136
119
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
31
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
31
    if (_parent->nereids_id() == -1) {
132
31
        return fmt::format("(id={})", _parent->node_id());
133
31
    } else {
134
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
0
    }
136
31
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
9.97k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
9.97k
    if (_parent->nereids_id() == -1) {
132
3
        return fmt::format("(id={})", _parent->node_id());
133
9.97k
    } else {
134
9.97k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
9.97k
    }
136
9.97k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
442
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
442
    if (_parent->nereids_id() == -1) {
132
102
        return fmt::format("(id={})", _parent->node_id());
133
340
    } else {
134
340
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
340
    }
136
442
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
12.4k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
12.4k
    if (_parent->nereids_id() == -1) {
132
12.4k
        return fmt::format("(id={})", _parent->node_id());
133
18.4E
    } else {
134
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
18.4E
    }
136
12.4k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
253k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
253k
    if (_parent->nereids_id() == -1) {
132
253k
        return fmt::format("(id={})", _parent->node_id());
133
18.4E
    } else {
134
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
18.4E
    }
136
253k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
407k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
407k
    if (_parent->nereids_id() == -1) {
132
406k
        return fmt::format("(id={})", _parent->node_id());
133
406k
    } else {
134
384
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
384
    }
136
407k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
25
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
25
    if (_parent->nereids_id() == -1) {
132
25
        return fmt::format("(id={})", _parent->node_id());
133
25
    } else {
134
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
0
    }
136
25
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
338
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
338
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
338
    } else {
134
338
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
338
    }
136
338
}
137
138
template <typename SharedStateArg>
139
32.8k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
32.8k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
32.8k
    _terminated = true;
144
32.8k
    return Status::OK();
145
32.8k
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
24.0k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
24.0k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
24.0k
    _terminated = true;
144
24.0k
    return Status::OK();
145
24.0k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
3.93k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
3.93k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
3.93k
    _terminated = true;
144
3.93k
    return Status::OK();
145
3.93k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
3
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
3
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
3
    _terminated = true;
144
3
    return Status::OK();
145
3
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
1.77k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
1.77k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
1.77k
    _terminated = true;
144
1.77k
    return Status::OK();
145
1.77k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
1.73k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
1.73k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
1.73k
    _terminated = true;
144
1.73k
    return Status::OK();
145
1.73k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
529
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
529
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
529
    _terminated = true;
144
529
    return Status::OK();
145
529
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
314
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
314
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
314
    _terminated = true;
144
314
    return Status::OK();
145
314
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
6
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
6
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
6
    _terminated = true;
144
6
    return Status::OK();
145
6
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
77
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
77
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
77
    _terminated = true;
144
77
    return Status::OK();
145
77
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
6
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
6
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
6
    _terminated = true;
144
6
    return Status::OK();
145
6
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
243
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
243
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
243
    _terminated = true;
144
243
    return Status::OK();
145
243
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
125
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
125
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
125
    _terminated = true;
144
125
    return Status::OK();
145
125
}
146
147
317k
DataDistribution OperatorBase::required_data_distribution(RuntimeState* /*state*/) const {
148
317k
    return _child && _child->is_serial_operator() && !is_source()
149
317k
                   ? DataDistribution(TLocalPartitionType::PASSTHROUGH)
150
317k
                   : DataDistribution(TLocalPartitionType::NOOP);
151
317k
}
152
153
22.7k
bool OperatorBase::child_breaks_local_key_distribution(RuntimeState* state) const {
154
22.7k
    if (!_child) {
155
22.0k
        return false;
156
22.0k
    }
157
667
    if (_child->is_serial_operator()) {
158
33
        return true;
159
33
    }
160
634
    const auto child_distribution = _child->required_data_distribution(state);
161
634
    return child_distribution.need_local_exchange() &&
162
634
           !is_shuffled_exchange(child_distribution.distribution_type);
163
667
}
164
165
template <typename SharedStateArg>
166
14.9k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
14.9k
    fmt::memory_buffer debug_string_buffer;
168
14.9k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
14.9k
    return fmt::to_string(debug_string_buffer);
170
14.9k
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
28
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
28
    fmt::memory_buffer debug_string_buffer;
168
28
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
28
    return fmt::to_string(debug_string_buffer);
170
28
}
_ZNK5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
3
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
3
    fmt::memory_buffer debug_string_buffer;
168
3
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
3
    return fmt::to_string(debug_string_buffer);
170
3
}
_ZNK5doris19PipelineXLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
14
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
14
    fmt::memory_buffer debug_string_buffer;
168
14
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
14
    return fmt::to_string(debug_string_buffer);
170
14
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
116
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
116
    fmt::memory_buffer debug_string_buffer;
168
116
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
116
    return fmt::to_string(debug_string_buffer);
170
116
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
14.6k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
14.6k
    fmt::memory_buffer debug_string_buffer;
168
14.6k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
14.6k
    return fmt::to_string(debug_string_buffer);
170
14.6k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
1
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
1
    fmt::memory_buffer debug_string_buffer;
168
1
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
1
    return fmt::to_string(debug_string_buffer);
170
1
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
126
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
126
    fmt::memory_buffer debug_string_buffer;
168
126
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
126
    return fmt::to_string(debug_string_buffer);
170
126
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
171
172
template <typename SharedStateArg>
173
14.9k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
14.9k
    fmt::memory_buffer debug_string_buffer;
175
14.9k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
14.9k
    return fmt::to_string(debug_string_buffer);
177
14.9k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
14
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
14
    fmt::memory_buffer debug_string_buffer;
175
14
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
14
    return fmt::to_string(debug_string_buffer);
177
14
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
116
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
116
    fmt::memory_buffer debug_string_buffer;
175
116
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
116
    return fmt::to_string(debug_string_buffer);
177
116
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
84
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
84
    fmt::memory_buffer debug_string_buffer;
175
84
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
84
    return fmt::to_string(debug_string_buffer);
177
84
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
90
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
90
    fmt::memory_buffer debug_string_buffer;
175
90
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
90
    return fmt::to_string(debug_string_buffer);
177
90
}
_ZNK5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
14.6k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
14.6k
    fmt::memory_buffer debug_string_buffer;
175
14.6k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
14.6k
    return fmt::to_string(debug_string_buffer);
177
14.6k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
178
179
15.0k
std::string OperatorXBase::debug_string(int indentation_level) const {
180
15.0k
    fmt::memory_buffer debug_string_buffer;
181
15.0k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, parallel_tasks={}, _is_serial_operator={}",
182
15.0k
                   std::string(indentation_level * 2, ' '), _op_name, node_id(), _parallel_tasks,
183
15.0k
                   _is_serial_operator);
184
15.0k
    return fmt::to_string(debug_string_buffer);
185
15.0k
}
186
187
14.9k
std::string OperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
188
14.9k
    return state->get_local_state(operator_id())->debug_string(indentation_level);
189
14.9k
}
190
191
704k
Status OperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
192
704k
    std::string node_name = print_plan_node_type(tnode.node_type);
193
704k
    _nereids_id = tnode.nereids_id;
194
704k
    if (!tnode.intermediate_output_tuple_id_list.empty()) {
195
6.79k
        if (!has_projection()) {
196
0
            return Status::InternalError("no final output tuple id");
197
0
        }
198
6.79k
        if (tnode.intermediate_output_tuple_id_list.size() !=
199
6.79k
            tnode.intermediate_projections_list.size()) {
200
0
            return Status::InternalError(
201
0
                    "intermediate_output_tuple_id_list size:{} not match "
202
0
                    "intermediate_projections_list size:{}",
203
0
                    tnode.intermediate_output_tuple_id_list.size(),
204
0
                    tnode.intermediate_projections_list.size());
205
0
        }
206
6.79k
    }
207
704k
    auto substr = node_name.substr(0, node_name.find("_NODE"));
208
704k
    _op_name = substr + "_OPERATOR";
209
210
704k
    if (tnode.__isset.vconjunct) {
211
0
        return Status::InternalError("vconjunct is not supported yet");
212
704k
    } else if (tnode.__isset.conjuncts) {
213
285k
        for (const auto& conjunct : tnode.conjuncts) {
214
285k
            VExprContextSPtr context;
215
285k
            RETURN_IF_ERROR(VExpr::create_expr_tree(conjunct, context));
216
285k
            _conjuncts.emplace_back(context);
217
285k
        }
218
106k
    }
219
220
    // create the projections expr
221
704k
    if (tnode.__isset.projections) {
222
276k
        RETURN_IF_ERROR(VExpr::create_expr_trees(tnode.projections, _projection->projections));
223
276k
    }
224
704k
    if (!tnode.intermediate_projections_list.empty()) {
225
6.79k
        DCHECK(has_projection()) << "no final projections";
226
6.79k
        _projection->intermediate_projections.reserve(tnode.intermediate_projections_list.size());
227
12.2k
        for (const auto& tnode_projections : tnode.intermediate_projections_list) {
228
12.2k
            VExprContextSPtrs projections;
229
12.2k
            RETURN_IF_ERROR(VExpr::create_expr_trees(tnode_projections, projections));
230
12.2k
            _projection->intermediate_projections.push_back(projections);
231
12.2k
        }
232
6.79k
    }
233
704k
    return Status::OK();
234
704k
}
235
236
731k
Status OperatorXBase::prepare(RuntimeState* state) {
237
731k
    for (auto& conjunct : _conjuncts) {
238
285k
        RETURN_IF_ERROR(conjunct->prepare(state, operator_row_desc_before_projection()));
239
285k
    }
240
731k
    if (state->enable_adjust_conjunct_order_by_cost()) {
241
681k
        std::ranges::stable_sort(_conjuncts, [](const auto& a, const auto& b) {
242
348k
            return a->execute_cost() < b->execute_cost();
243
348k
        });
244
681k
    };
245
246
731k
    if (has_projection()) {
247
276k
        auto& projection = *_projection;
248
288k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
249
12.2k
            const auto& input_row_desc =
250
12.2k
                    i == 0 ? operator_row_desc_before_projection()
251
12.2k
                           : projection.intermediate_output_row_descriptors[i - 1];
252
12.2k
            RETURN_IF_ERROR(
253
12.2k
                    VExpr::prepare(projection.intermediate_projections[i], state, input_row_desc));
254
12.2k
        }
255
276k
        const auto& final_projection_input_row_desc =
256
276k
                projection.intermediate_output_row_descriptors.empty()
257
276k
                        ? operator_row_desc_before_projection()
258
276k
                        : projection.intermediate_output_row_descriptors.back();
259
276k
        RETURN_IF_ERROR(
260
276k
                VExpr::prepare(projection.projections, state, final_projection_input_row_desc));
261
276k
        RETURN_IF_ERROR(VExpr::check_expr_output_type(projection.projections,
262
276k
                                                      projection.output_row_descriptor));
263
276k
    }
264
265
731k
    for (auto& conjunct : _conjuncts) {
266
285k
        RETURN_IF_ERROR(conjunct->open(state));
267
285k
    }
268
731k
    if (has_projection()) {
269
276k
        RETURN_IF_ERROR(VExpr::open(_projection->projections, state));
270
276k
        for (auto& projections : _projection->intermediate_projections) {
271
12.2k
            RETURN_IF_ERROR(VExpr::open(projections, state));
272
12.2k
        }
273
276k
    }
274
731k
    if (_child && !is_source()) {
275
98.0k
        RETURN_IF_ERROR(_child->prepare(state));
276
98.0k
    }
277
278
731k
    if (VExpr::contains_blockable_function(_conjuncts) ||
279
731k
        (has_projection() && VExpr::contains_blockable_function(_projection->projections))) {
280
0
        _blockable = true;
281
0
    }
282
283
731k
    return Status::OK();
284
731k
}
285
286
9.56k
Status OperatorXBase::terminate(RuntimeState* state) {
287
9.56k
    if (_child && !is_source()) {
288
752
        RETURN_IF_ERROR(_child->terminate(state));
289
752
    }
290
9.56k
    auto result = state->get_local_state_result(operator_id());
291
9.56k
    if (!result) {
292
0
        return result.error();
293
0
    }
294
9.56k
    return result.value()->terminate(state);
295
9.56k
}
296
297
4.73M
Status OperatorXBase::close(RuntimeState* state) {
298
4.73M
    if (_child && !is_source()) {
299
701k
        RETURN_IF_ERROR(_child->close(state));
300
701k
    }
301
4.73M
    auto result = state->get_local_state_result(operator_id());
302
4.73M
    if (!result) {
303
0
        return result.error();
304
0
    }
305
4.73M
    return result.value()->close(state);
306
4.73M
}
307
308
311k
void PipelineXLocalStateBase::clear_origin_block() {
309
311k
    _origin_block.clear_column_data(_parent->operator_row_desc_before_projection().num_slots());
310
311k
}
311
312
700k
Status PipelineXLocalStateBase::filter_block(const VExprContextSPtrs& expr_contexts, Block* block) {
313
700k
    RETURN_IF_ERROR(VExprContext::filter_block(expr_contexts, block, block->columns()));
314
315
700k
    _estimate_memory_usage += VExprContext::get_memory_usage(expr_contexts);
316
700k
    return Status::OK();
317
700k
}
318
319
0
bool PipelineXLocalStateBase::is_blockable() const {
320
0
    return std::any_of(_projections.begin(), _projections.end(),
321
0
                       [&](VExprContextSPtr expr) -> bool { return expr->is_blockable(); });
322
0
}
323
324
Status OperatorXBase::do_projections(RuntimeState* state, Block* origin_block,
325
311k
                                     Block* output_block) const {
326
311k
    auto* local_state = state->get_local_state(operator_id());
327
311k
    SCOPED_TIMER(local_state->exec_time_counter());
328
311k
    SCOPED_TIMER(local_state->_projection_timer);
329
311k
    const size_t rows = origin_block->rows();
330
311k
    if (rows == 0) {
331
160k
        return Status::OK();
332
160k
    }
333
151k
    SCOPED_PEAK_MEM(&local_state->_estimate_memory_usage);
334
335
151k
    {
336
151k
        Block input_block = *origin_block;
337
338
151k
        ColumnsWithTypeAndName new_columns;
339
151k
        for (const auto& projections : local_state->_intermediate_projections) {
340
5.09k
            if (projections.empty()) {
341
0
                return Status::InternalError("meet empty intermediate projection, node id: {}",
342
0
                                             node_id());
343
0
            }
344
5.09k
            new_columns.resize(projections.size());
345
126k
            for (int i = 0; i < projections.size(); i++) {
346
121k
                RETURN_IF_ERROR(projections[i]->execute(&input_block, new_columns[i]));
347
121k
                if (new_columns[i].column->size() != rows) {
348
0
                    return Status::InternalError(
349
0
                            "intermediate projection result column size {} not equal input rows "
350
0
                            "{}, expr: {}",
351
0
                            new_columns[i].column->size(), rows,
352
0
                            projections[i]->root()->debug_string());
353
0
                }
354
121k
            }
355
5.08k
            Block tmp_block {new_columns};
356
5.08k
            input_block.swap(tmp_block);
357
5.08k
        }
358
359
150k
        if (input_block.rows() != rows) {
360
0
            return Status::InternalError(
361
0
                    "after intermediate projections input block rows {} not equal origin rows {}, "
362
0
                    "input_block: {}",
363
0
                    input_block.rows(), rows, input_block.dump_structure());
364
0
        }
365
366
150k
        auto scoped_mutable_block = VectorizedUtils::build_scoped_mutable_mem_reuse_block(
367
150k
                output_block, _projection->output_row_descriptor);
368
150k
        auto& mutable_columns = scoped_mutable_block.mutable_columns();
369
150k
        DCHECK_EQ(mutable_columns.size(), local_state->_projections.size()) << debug_string();
370
150k
        Columns shared_columns(mutable_columns.size());
371
372
850k
        for (int i = 0; i < mutable_columns.size(); ++i) {
373
699k
            ColumnPtr column_ptr;
374
699k
            RETURN_IF_ERROR(local_state->_projections[i]->execute(&input_block, column_ptr));
375
699k
            if (column_ptr->size() != rows) {
376
0
                return Status::InternalError(
377
0
                        "projection result column size {} not equal input rows {}, expr: {}",
378
0
                        column_ptr->size(), rows,
379
0
                        local_state->_projections[i]->root()->debug_string());
380
0
            }
381
699k
            column_ptr = column_ptr->convert_to_full_column_if_const();
382
699k
            if (is_column_nullable(*mutable_columns[i]) && !is_column_nullable(*column_ptr)) {
383
0
                column_ptr = make_nullable(column_ptr, false);
384
0
            }
385
699k
            if (column_ptr->is_exclusive()) {
386
247k
                mutable_columns[i] = IColumn::mutate(std::move(column_ptr));
387
452k
            } else {
388
452k
                shared_columns[i] = std::move(column_ptr);
389
452k
            }
390
699k
        }
391
392
150k
        scoped_mutable_block.restore();
393
850k
        for (int i = 0; i < shared_columns.size(); ++i) {
394
699k
            if (shared_columns[i]) {
395
452k
                output_block->replace_by_position(i, std::move(shared_columns[i]));
396
452k
            }
397
699k
        }
398
150k
    }
399
400
0
    origin_block->clear_column_data(
401
150k
            local_state->_parent->operator_row_desc_before_projection().num_slots());
402
150k
    DCHECK_EQ(output_block->rows(), rows);
403
404
150k
    return Status::OK();
405
150k
}
406
407
4.17M
Status OperatorXBase::get_block_after_projects(RuntimeState* state, Block* block, bool* eos) {
408
4.17M
    DBUG_EXECUTE_IF("Pipeline::return_empty_block", {
409
4.17M
        if (this->_op_name == "AGGREGATION_OPERATOR" || this->_op_name == "HASH_JOIN_OPERATOR" ||
410
4.17M
            this->_op_name == "PARTITIONED_AGGREGATION_OPERATOR" ||
411
4.17M
            this->_op_name == "PARTITIONED_HASH_JOIN_OPERATOR" ||
412
4.17M
            this->_op_name == "CROSS_JOIN_OPERATOR" || this->_op_name == "SORT_OPERATOR") {
413
4.17M
            if (_debug_point_count++ % 2 == 0) {
414
4.17M
                return Status::OK();
415
4.17M
            }
416
4.17M
        }
417
4.17M
    });
418
419
4.17M
    Status status;
420
4.17M
    auto* local_state = state->get_local_state(operator_id());
421
4.17M
    Defer defer([&]() {
422
4.17M
        if (status.ok()) {
423
4.17M
            local_state->update_output_block_counters(*block);
424
4.17M
        }
425
4.17M
    });
426
4.17M
    if (has_projection()) {
427
311k
        local_state->clear_origin_block();
428
311k
        status = get_block(state, &local_state->_origin_block, eos);
429
311k
        if (UNLIKELY(!status.ok())) {
430
42
            return status;
431
42
        }
432
311k
        status = do_projections(state, &local_state->_origin_block, block);
433
311k
        return status;
434
311k
    }
435
3.86M
    status = get_block(state, block, eos);
436
3.86M
    RETURN_IF_ERROR(block->check_type_and_column());
437
3.86M
    return status;
438
3.86M
}
439
440
2.83M
void PipelineXLocalStateBase::reached_limit(Block* block, bool* eos) {
441
2.83M
    if (_parent->_limit != -1 and _num_rows_returned + block->rows() >= _parent->_limit) {
442
10.0k
        block->set_num_rows(_parent->_limit - _num_rows_returned);
443
10.0k
        *eos = true;
444
10.0k
    }
445
446
2.83M
    DBUG_EXECUTE_IF("Pipeline::reached_limit_early", {
447
2.83M
        auto op_name = to_lower(_parent->_op_name);
448
2.83M
        auto arg_op_name = dp->param<std::string>("op_name");
449
2.83M
        arg_op_name = to_lower(arg_op_name);
450
451
2.83M
        if (op_name == arg_op_name) {
452
2.83M
            *eos = true;
453
2.83M
        }
454
2.83M
    });
455
456
2.83M
    if (auto rows = block->rows()) {
457
839k
        _num_rows_returned += rows;
458
839k
        _state->get_query_ctx()->resource_ctx()->io_context()->update_process_rows(rows);
459
839k
    }
460
2.83M
}
461
462
32.8k
Status DataSinkOperatorXBase::terminate(RuntimeState* state) {
463
32.8k
    auto result = state->get_sink_local_state_result();
464
32.8k
    if (!result) {
465
0
        return result.error();
466
0
    }
467
32.8k
    return result.value()->terminate(state);
468
32.8k
}
469
470
14.9k
std::string DataSinkOperatorXBase::debug_string(int indentation_level) const {
471
14.9k
    fmt::memory_buffer debug_string_buffer;
472
473
14.9k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, _is_serial_operator={}",
474
14.9k
                   std::string(indentation_level * 2, ' '), _name, node_id(), _is_serial_operator);
475
14.9k
    return fmt::to_string(debug_string_buffer);
476
14.9k
}
477
478
14.9k
std::string DataSinkOperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
479
14.9k
    return state->get_sink_local_state()->debug_string(indentation_level);
480
14.9k
}
481
482
365k
Status DataSinkOperatorXBase::init(const TDataSink& tsink) {
483
365k
    std::string op_name = "UNKNOWN_SINK";
484
365k
    auto it = _TDataSinkType_VALUES_TO_NAMES.find(tsink.type);
485
486
366k
    if (it != _TDataSinkType_VALUES_TO_NAMES.end()) {
487
366k
        op_name = it->second;
488
366k
    }
489
365k
    _name = op_name + "_OPERATOR";
490
365k
    return Status::OK();
491
365k
}
492
493
314k
Status DataSinkOperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
494
314k
    std::string op_name = print_plan_node_type(tnode.node_type);
495
314k
    _nereids_id = tnode.nereids_id;
496
314k
    auto substr = op_name.substr(0, op_name.find("_NODE"));
497
314k
    _name = substr + "_SINK_OPERATOR";
498
314k
    return Status::OK();
499
314k
}
500
501
template <typename LocalStateType>
502
Status DataSinkOperatorX<LocalStateType>::setup_local_state(RuntimeState* state,
503
1.76M
                                                            LocalSinkStateInfo& info) {
504
1.76M
    auto local_state = LocalStateType::create_unique(this, state);
505
1.76M
    RETURN_IF_ERROR(local_state->init(state, info));
506
1.76M
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
1.76M
    return Status::OK();
508
1.76M
}
_ZN5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
122k
                                                            LocalSinkStateInfo& info) {
504
122k
    auto local_state = LocalStateType::create_unique(this, state);
505
122k
    RETURN_IF_ERROR(local_state->init(state, info));
506
122k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
122k
    return Status::OK();
508
122k
}
_ZN5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
357k
                                                            LocalSinkStateInfo& info) {
504
357k
    auto local_state = LocalStateType::create_unique(this, state);
505
357k
    RETURN_IF_ERROR(local_state->init(state, info));
506
357k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
357k
    return Status::OK();
508
357k
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
6
                                                            LocalSinkStateInfo& info) {
504
6
    auto local_state = LocalStateType::create_unique(this, state);
505
6
    RETURN_IF_ERROR(local_state->init(state, info));
506
6
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
6
    return Status::OK();
508
6
}
_ZN5doris17DataSinkOperatorXINS_24ResultFileSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
361
                                                            LocalSinkStateInfo& info) {
504
361
    auto local_state = LocalStateType::create_unique(this, state);
505
361
    RETURN_IF_ERROR(local_state->init(state, info));
506
361
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
361
    return Status::OK();
508
361
}
_ZN5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
49.6k
                                                            LocalSinkStateInfo& info) {
504
49.6k
    auto local_state = LocalStateType::create_unique(this, state);
505
49.6k
    RETURN_IF_ERROR(local_state->init(state, info));
506
49.6k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
49.6k
    return Status::OK();
508
49.6k
}
_ZN5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
36
                                                            LocalSinkStateInfo& info) {
504
36
    auto local_state = LocalStateType::create_unique(this, state);
505
36
    RETURN_IF_ERROR(local_state->init(state, info));
506
36
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
36
    return Status::OK();
508
36
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
16
                                                            LocalSinkStateInfo& info) {
504
16
    auto local_state = LocalStateType::create_unique(this, state);
505
16
    RETURN_IF_ERROR(local_state->init(state, info));
506
16
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
16
    return Status::OK();
508
16
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_25PaimonTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_27IcebergDeleteSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_26IcebergMergeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_21MCTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
9.78k
                                                            LocalSinkStateInfo& info) {
504
9.78k
    auto local_state = LocalStateType::create_unique(this, state);
505
9.78k
    RETURN_IF_ERROR(local_state->init(state, info));
506
9.78k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
9.78k
    return Status::OK();
508
9.78k
}
_ZN5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
9
                                                            LocalSinkStateInfo& info) {
504
9
    auto local_state = LocalStateType::create_unique(this, state);
505
9
    RETURN_IF_ERROR(local_state->init(state, info));
506
9
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
9
    return Status::OK();
508
9
}
_ZN5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
235k
                                                            LocalSinkStateInfo& info) {
504
235k
    auto local_state = LocalStateType::create_unique(this, state);
505
235k
    RETURN_IF_ERROR(local_state->init(state, info));
506
235k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
235k
    return Status::OK();
508
235k
}
_ZN5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
162
                                                            LocalSinkStateInfo& info) {
504
162
    auto local_state = LocalStateType::create_unique(this, state);
505
162
    RETURN_IF_ERROR(local_state->init(state, info));
506
162
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
162
    return Status::OK();
508
162
}
_ZN5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
253k
                                                            LocalSinkStateInfo& info) {
504
253k
    auto local_state = LocalStateType::create_unique(this, state);
505
253k
    RETURN_IF_ERROR(local_state->init(state, info));
506
253k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
253k
    return Status::OK();
508
253k
}
_ZN5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
108k
                                                            LocalSinkStateInfo& info) {
504
108k
    auto local_state = LocalStateType::create_unique(this, state);
505
108k
    RETURN_IF_ERROR(local_state->init(state, info));
506
108k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
108k
    return Status::OK();
508
108k
}
_ZN5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
66.9k
                                                            LocalSinkStateInfo& info) {
504
66.9k
    auto local_state = LocalStateType::create_unique(this, state);
505
66.9k
    RETURN_IF_ERROR(local_state->init(state, info));
506
66.9k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
66.9k
    return Status::OK();
508
66.9k
}
_ZN5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
119
                                                            LocalSinkStateInfo& info) {
504
119
    auto local_state = LocalStateType::create_unique(this, state);
505
119
    RETURN_IF_ERROR(local_state->init(state, info));
506
119
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
119
    return Status::OK();
508
119
}
_ZN5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
527k
                                                            LocalSinkStateInfo& info) {
504
527k
    auto local_state = LocalStateType::create_unique(this, state);
505
527k
    RETURN_IF_ERROR(local_state->init(state, info));
506
527k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
527k
    return Status::OK();
508
527k
}
_ZN5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
6.53k
                                                            LocalSinkStateInfo& info) {
504
6.53k
    auto local_state = LocalStateType::create_unique(this, state);
505
6.53k
    RETURN_IF_ERROR(local_state->init(state, info));
506
6.53k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
6.53k
    return Status::OK();
508
6.53k
}
_ZN5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
9.95k
                                                            LocalSinkStateInfo& info) {
504
9.95k
    auto local_state = LocalStateType::create_unique(this, state);
505
9.95k
    RETURN_IF_ERROR(local_state->init(state, info));
506
9.95k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
9.95k
    return Status::OK();
508
9.95k
}
_ZN5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.52k
                                                            LocalSinkStateInfo& info) {
504
2.52k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.52k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.52k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.52k
    return Status::OK();
508
2.52k
}
_ZN5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
340
                                                            LocalSinkStateInfo& info) {
504
340
    auto local_state = LocalStateType::create_unique(this, state);
505
340
    RETURN_IF_ERROR(local_state->init(state, info));
506
340
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
340
    return Status::OK();
508
340
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
4.77k
                                                            LocalSinkStateInfo& info) {
504
4.77k
    auto local_state = LocalStateType::create_unique(this, state);
505
4.77k
    RETURN_IF_ERROR(local_state->init(state, info));
506
4.77k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
4.77k
    return Status::OK();
508
4.77k
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.55k
                                                            LocalSinkStateInfo& info) {
504
2.55k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.55k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.55k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.55k
    return Status::OK();
508
2.55k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.61k
                                                            LocalSinkStateInfo& info) {
504
2.61k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.61k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.61k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.61k
    return Status::OK();
508
2.61k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.50k
                                                            LocalSinkStateInfo& info) {
504
2.50k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.50k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.50k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.50k
    return Status::OK();
508
2.50k
}
_ZN5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
4
                                                            LocalSinkStateInfo& info) {
504
4
    auto local_state = LocalStateType::create_unique(this, state);
505
4
    RETURN_IF_ERROR(local_state->init(state, info));
506
4
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
4
    return Status::OK();
508
4
}
_ZN5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
570
                                                            LocalSinkStateInfo& info) {
504
570
    auto local_state = LocalStateType::create_unique(this, state);
505
570
    RETURN_IF_ERROR(local_state->init(state, info));
506
570
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
570
    return Status::OK();
508
570
}
_ZN5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
14
                                                            LocalSinkStateInfo& info) {
504
14
    auto local_state = LocalStateType::create_unique(this, state);
505
14
    RETURN_IF_ERROR(local_state->init(state, info));
506
14
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
14
    return Status::OK();
508
14
}
_ZN5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
106
                                                            LocalSinkStateInfo& info) {
504
106
    auto local_state = LocalStateType::create_unique(this, state);
505
106
    RETURN_IF_ERROR(local_state->init(state, info));
506
106
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
106
    return Status::OK();
508
106
}
_ZN5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
169
                                                            LocalSinkStateInfo& info) {
504
169
    auto local_state = LocalStateType::create_unique(this, state);
505
169
    RETURN_IF_ERROR(local_state->init(state, info));
506
169
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
169
    return Status::OK();
508
169
}
_ZN5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
169
                                                            LocalSinkStateInfo& info) {
504
169
    auto local_state = LocalStateType::create_unique(this, state);
505
169
    RETURN_IF_ERROR(local_state->init(state, info));
506
169
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
169
    return Status::OK();
508
169
}
509
510
template <typename LocalStateType>
511
1.41M
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
0
                                 LocalExchangeSharedState>) {
514
0
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
0
                                        MultiCastSharedState>) {
517
0
        throw Exception(Status::FatalError("should not reach here!"));
518
1.41M
    } else {
519
1.41M
        auto ss = LocalStateType::SharedStateType::create_shared();
520
1.41M
        ss->id = operator_id();
521
1.41M
        for (auto& dest : dests_id()) {
522
1.40M
            ss->related_op_ids.insert(dest);
523
1.40M
        }
524
1.41M
        return ss;
525
1.41M
    }
526
1.41M
}
_ZNK5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
108k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
108k
    } else {
519
108k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
108k
        ss->id = operator_id();
521
108k
        for (auto& dest : dests_id()) {
522
108k
            ss->related_op_ids.insert(dest);
523
108k
        }
524
108k
        return ss;
525
108k
    }
526
108k
}
_ZNK5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
357k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
357k
    } else {
519
357k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
357k
        ss->id = operator_id();
521
357k
        for (auto& dest : dests_id()) {
522
356k
            ss->related_op_ids.insert(dest);
523
356k
        }
524
357k
        return ss;
525
357k
    }
526
357k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
6
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
6
    } else {
519
6
        auto ss = LocalStateType::SharedStateType::create_shared();
520
6
        ss->id = operator_id();
521
6
        for (auto& dest : dests_id()) {
522
6
            ss->related_op_ids.insert(dest);
523
6
        }
524
6
        return ss;
525
6
    }
526
6
}
_ZNK5doris17DataSinkOperatorXINS_24ResultFileSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
361
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
361
    } else {
519
361
        auto ss = LocalStateType::SharedStateType::create_shared();
520
361
        ss->id = operator_id();
521
361
        for (auto& dest : dests_id()) {
522
361
            ss->related_op_ids.insert(dest);
523
361
        }
524
361
        return ss;
525
361
    }
526
361
}
_ZNK5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
49.7k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
49.7k
    } else {
519
49.7k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
49.7k
        ss->id = operator_id();
521
49.7k
        for (auto& dest : dests_id()) {
522
49.2k
            ss->related_op_ids.insert(dest);
523
49.2k
        }
524
49.7k
        return ss;
525
49.7k
    }
526
49.7k
}
_ZNK5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE19create_shared_stateEv
Line
Count
Source
511
36
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
36
    } else {
519
36
        auto ss = LocalStateType::SharedStateType::create_shared();
520
36
        ss->id = operator_id();
521
36
        for (auto& dest : dests_id()) {
522
36
            ss->related_op_ids.insert(dest);
523
36
        }
524
36
        return ss;
525
36
    }
526
36
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
16
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
16
    } else {
519
16
        auto ss = LocalStateType::SharedStateType::create_shared();
520
16
        ss->id = operator_id();
521
16
        for (auto& dest : dests_id()) {
522
16
            ss->related_op_ids.insert(dest);
523
16
        }
524
16
        return ss;
525
16
    }
526
16
}
_ZNK5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
8
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
8
    } else {
519
8
        auto ss = LocalStateType::SharedStateType::create_shared();
520
8
        ss->id = operator_id();
521
8
        for (auto& dest : dests_id()) {
522
8
            ss->related_op_ids.insert(dest);
523
8
        }
524
8
        return ss;
525
8
    }
526
8
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_25PaimonTableSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
8
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
8
    } else {
519
8
        auto ss = LocalStateType::SharedStateType::create_shared();
520
8
        ss->id = operator_id();
521
8
        for (auto& dest : dests_id()) {
522
8
            ss->related_op_ids.insert(dest);
523
8
        }
524
8
        return ss;
525
8
    }
526
8
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27IcebergDeleteSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26IcebergMergeSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_21MCTableSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
9.86k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
9.86k
    } else {
519
9.86k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
9.86k
        ss->id = operator_id();
521
9.86k
        for (auto& dest : dests_id()) {
522
9.82k
            ss->related_op_ids.insert(dest);
523
9.82k
        }
524
9.86k
        return ss;
525
9.86k
    }
526
9.86k
}
_ZNK5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
9
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
9
    } else {
519
9
        auto ss = LocalStateType::SharedStateType::create_shared();
520
9
        ss->id = operator_id();
521
9
        for (auto& dest : dests_id()) {
522
9
            ss->related_op_ids.insert(dest);
523
9
        }
524
9
        return ss;
525
9
    }
526
9
}
_ZNK5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
236k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
236k
    } else {
519
236k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
236k
        ss->id = operator_id();
521
236k
        for (auto& dest : dests_id()) {
522
236k
            ss->related_op_ids.insert(dest);
523
236k
        }
524
236k
        return ss;
525
236k
    }
526
236k
}
_ZNK5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
164
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
164
    } else {
519
164
        auto ss = LocalStateType::SharedStateType::create_shared();
520
164
        ss->id = operator_id();
521
164
        for (auto& dest : dests_id()) {
522
164
            ss->related_op_ids.insert(dest);
523
164
        }
524
164
        return ss;
525
164
    }
526
164
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
109k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
109k
    } else {
519
109k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
109k
        ss->id = operator_id();
521
109k
        for (auto& dest : dests_id()) {
522
109k
            ss->related_op_ids.insert(dest);
523
109k
        }
524
109k
        return ss;
525
109k
    }
526
109k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
118
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
118
    } else {
519
118
        auto ss = LocalStateType::SharedStateType::create_shared();
520
118
        ss->id = operator_id();
521
118
        for (auto& dest : dests_id()) {
522
118
            ss->related_op_ids.insert(dest);
523
118
        }
524
118
        return ss;
525
118
    }
526
118
}
_ZNK5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
528k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
528k
    } else {
519
528k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
528k
        ss->id = operator_id();
521
528k
        for (auto& dest : dests_id()) {
522
523k
            ss->related_op_ids.insert(dest);
523
523k
        }
524
528k
        return ss;
525
528k
    }
526
528k
}
_ZNK5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
6.55k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
6.55k
    } else {
519
6.55k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
6.55k
        ss->id = operator_id();
521
6.55k
        for (auto& dest : dests_id()) {
522
6.55k
            ss->related_op_ids.insert(dest);
523
6.55k
        }
524
6.55k
        return ss;
525
6.55k
    }
526
6.55k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
442
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
442
    } else {
519
442
        auto ss = LocalStateType::SharedStateType::create_shared();
520
442
        ss->id = operator_id();
521
442
        for (auto& dest : dests_id()) {
522
442
            ss->related_op_ids.insert(dest);
523
442
        }
524
442
        return ss;
525
442
    }
526
442
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE19create_shared_stateEv
Line
Count
Source
511
2.60k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
2.60k
    } else {
519
2.60k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
2.60k
        ss->id = operator_id();
521
2.60k
        for (auto& dest : dests_id()) {
522
2.60k
            ss->related_op_ids.insert(dest);
523
2.60k
        }
524
2.60k
        return ss;
525
2.60k
    }
526
2.60k
}
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE19create_shared_stateEv
Line
Count
Source
511
2.49k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
2.49k
    } else {
519
2.49k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
2.49k
        ss->id = operator_id();
521
2.49k
        for (auto& dest : dests_id()) {
522
2.48k
            ss->related_op_ids.insert(dest);
523
2.48k
        }
524
2.49k
        return ss;
525
2.49k
    }
526
2.49k
}
_ZNK5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
3
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
3
    } else {
519
3
        auto ss = LocalStateType::SharedStateType::create_shared();
520
3
        ss->id = operator_id();
521
3
        for (auto& dest : dests_id()) {
522
3
            ss->related_op_ids.insert(dest);
523
3
        }
524
3
        return ss;
525
3
    }
526
3
}
_ZNK5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
568
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
568
    } else {
519
568
        auto ss = LocalStateType::SharedStateType::create_shared();
520
568
        ss->id = operator_id();
521
568
        for (auto& dest : dests_id()) {
522
559
            ss->related_op_ids.insert(dest);
523
559
        }
524
568
        return ss;
525
568
    }
526
568
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
106
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
106
    } else {
519
106
        auto ss = LocalStateType::SharedStateType::create_shared();
520
106
        ss->id = operator_id();
521
106
        for (auto& dest : dests_id()) {
522
103
            ss->related_op_ids.insert(dest);
523
103
        }
524
106
        return ss;
525
106
    }
526
106
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE19create_shared_stateEv
527
528
template <typename LocalStateType>
529
2.04M
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.04M
    auto local_state = LocalStateType::create_unique(state, this);
531
2.04M
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.04M
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.04M
    return Status::OK();
534
2.04M
}
_ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
74.2k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
74.2k
    auto local_state = LocalStateType::create_unique(state, this);
531
74.2k
    RETURN_IF_ERROR(local_state->init(state, info));
532
74.2k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
74.2k
    return Status::OK();
534
74.2k
}
_ZN5doris9OperatorXINS_18OlapScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
245k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
245k
    auto local_state = LocalStateType::create_unique(state, this);
531
245k
    RETURN_IF_ERROR(local_state->init(state, info));
532
245k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
245k
    return Status::OK();
534
245k
}
_ZN5doris9OperatorXINS_21GroupCommitLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
147
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
147
    auto local_state = LocalStateType::create_unique(state, this);
531
147
    RETURN_IF_ERROR(local_state->init(state, info));
532
147
    state->emplace_local_state(operator_id(), std::move(local_state));
533
147
    return Status::OK();
534
147
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_18JDBCScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_18FileScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
3.26k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
3.26k
    auto local_state = LocalStateType::create_unique(state, this);
531
3.26k
    RETURN_IF_ERROR(local_state->init(state, info));
532
3.26k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
3.26k
    return Status::OK();
534
3.26k
}
_ZN5doris9OperatorXINS_18AnalyticLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
9.78k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
9.78k
    auto local_state = LocalStateType::create_unique(state, this);
531
9.78k
    RETURN_IF_ERROR(local_state->init(state, info));
532
9.78k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
9.78k
    return Status::OK();
534
9.78k
}
_ZN5doris9OperatorXINS_14SortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
9.12k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
9.12k
    auto local_state = LocalStateType::create_unique(state, this);
531
9.12k
    RETURN_IF_ERROR(local_state->init(state, info));
532
9.12k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
9.12k
    return Status::OK();
534
9.12k
}
_ZN5doris9OperatorXINS_19SpillSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
155
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
155
    auto local_state = LocalStateType::create_unique(state, this);
531
155
    RETURN_IF_ERROR(local_state->init(state, info));
532
155
    state->emplace_local_state(operator_id(), std::move(local_state));
533
155
    return Status::OK();
534
155
}
_ZN5doris9OperatorXINS_24LocalMergeSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
226k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
226k
    auto local_state = LocalStateType::create_unique(state, this);
531
226k
    RETURN_IF_ERROR(local_state->init(state, info));
532
226k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
226k
    return Status::OK();
534
226k
}
_ZN5doris9OperatorXINS_13AggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
108k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
108k
    auto local_state = LocalStateType::create_unique(state, this);
531
108k
    RETURN_IF_ERROR(local_state->init(state, info));
532
108k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
108k
    return Status::OK();
534
108k
}
_ZN5doris9OperatorXINS_21BucketedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
67.1k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
67.1k
    auto local_state = LocalStateType::create_unique(state, this);
531
67.1k
    RETURN_IF_ERROR(local_state->init(state, info));
532
67.1k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
67.1k
    return Status::OK();
534
67.1k
}
_ZN5doris9OperatorXINS_24PartitionedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
109
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
109
    auto local_state = LocalStateType::create_unique(state, this);
531
109
    RETURN_IF_ERROR(local_state->init(state, info));
532
109
    state->emplace_local_state(operator_id(), std::move(local_state));
533
109
    return Status::OK();
534
109
}
_ZN5doris9OperatorXINS_23TableFunctionLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
4.80k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
4.80k
    auto local_state = LocalStateType::create_unique(state, this);
531
4.80k
    RETURN_IF_ERROR(local_state->init(state, info));
532
4.80k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
4.80k
    return Status::OK();
534
4.80k
}
_ZN5doris9OperatorXINS_18ExchangeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
259k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
259k
    auto local_state = LocalStateType::create_unique(state, this);
531
259k
    RETURN_IF_ERROR(local_state->init(state, info));
532
259k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
259k
    return Status::OK();
534
259k
}
_ZN5doris9OperatorXINS_16RepeatLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.59k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.59k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.59k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.59k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.59k
    return Status::OK();
534
1.59k
}
_ZN5doris9OperatorXINS_29NestedLoopJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
6.54k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
6.54k
    auto local_state = LocalStateType::create_unique(state, this);
531
6.54k
    RETURN_IF_ERROR(local_state->init(state, info));
532
6.54k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
6.54k
    return Status::OK();
534
6.54k
}
_ZN5doris9OperatorXINS_23AssertNumRowsLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
29
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
29
    auto local_state = LocalStateType::create_unique(state, this);
531
29
    RETURN_IF_ERROR(local_state->init(state, info));
532
29
    state->emplace_local_state(operator_id(), std::move(local_state));
533
29
    return Status::OK();
534
29
}
_ZN5doris9OperatorXINS_18EmptySetLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.56k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.56k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.56k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.56k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.56k
    return Status::OK();
534
1.56k
}
_ZN5doris9OperatorXINS_21UnionSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
56.3k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
56.3k
    auto local_state = LocalStateType::create_unique(state, this);
531
56.3k
    RETURN_IF_ERROR(local_state->init(state, info));
532
56.3k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
56.3k
    return Status::OK();
534
56.3k
}
_ZN5doris9OperatorXINS_35MultiCastDataStreamSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
6.19k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
6.19k
    auto local_state = LocalStateType::create_unique(state, this);
531
6.19k
    RETURN_IF_ERROR(local_state->init(state, info));
532
6.19k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
6.19k
    return Status::OK();
534
6.19k
}
_ZN5doris9OperatorXINS_29PartitionSortSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
340
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
340
    auto local_state = LocalStateType::create_unique(state, this);
531
340
    RETURN_IF_ERROR(local_state->init(state, info));
532
340
    state->emplace_local_state(operator_id(), std::move(local_state));
533
340
    return Status::OK();
534
340
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.59k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.59k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.59k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.59k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.59k
    return Status::OK();
534
2.59k
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.48k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.48k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.48k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.48k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.48k
    return Status::OK();
534
2.48k
}
_ZN5doris9OperatorXINS_17DataGenLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
607
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
607
    auto local_state = LocalStateType::create_unique(state, this);
531
607
    RETURN_IF_ERROR(local_state->init(state, info));
532
607
    state->emplace_local_state(operator_id(), std::move(local_state));
533
607
    return Status::OK();
534
607
}
_ZN5doris9OperatorXINS_20SchemaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.72k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.72k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.72k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.72k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.72k
    return Status::OK();
534
1.72k
}
_ZN5doris9OperatorXINS_18MetaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
10.8k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
10.8k
    auto local_state = LocalStateType::create_unique(state, this);
531
10.8k
    RETURN_IF_ERROR(local_state->init(state, info));
532
10.8k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
10.8k
    return Status::OK();
534
10.8k
}
_ZN5doris9OperatorXINS_29LocalExchangeSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
679k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
679k
    auto local_state = LocalStateType::create_unique(state, this);
531
679k
    RETURN_IF_ERROR(local_state->init(state, info));
532
679k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
679k
    return Status::OK();
534
679k
}
_ZN5doris9OperatorXINS_34PartitionedHashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
3
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
3
    auto local_state = LocalStateType::create_unique(state, this);
531
3
    RETURN_IF_ERROR(local_state->init(state, info));
532
3
    state->emplace_local_state(operator_id(), std::move(local_state));
533
3
    return Status::OK();
534
3
}
_ZN5doris9OperatorXINS_21CacheSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
14
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
14
    auto local_state = LocalStateType::create_unique(state, this);
531
14
    RETURN_IF_ERROR(local_state->init(state, info));
532
14
    state->emplace_local_state(operator_id(), std::move(local_state));
533
14
    return Status::OK();
534
14
}
_ZN5doris9OperatorXINS_22RecCTESourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
169
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
169
    auto local_state = LocalStateType::create_unique(state, this);
531
169
    RETURN_IF_ERROR(local_state->init(state, info));
532
169
    state->emplace_local_state(operator_id(), std::move(local_state));
533
169
    return Status::OK();
534
169
}
_ZN5doris9OperatorXINS_20RecCTEScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.20k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.20k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.20k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.20k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.20k
    return Status::OK();
534
2.20k
}
_ZN5doris9OperatorXINS_25MaterializationLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
801
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
801
    auto local_state = LocalStateType::create_unique(state, this);
531
801
    RETURN_IF_ERROR(local_state->init(state, info));
532
801
    state->emplace_local_state(operator_id(), std::move(local_state));
533
801
    return Status::OK();
534
801
}
_ZN5doris9OperatorXINS_16SelectLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
902
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
902
    auto local_state = LocalStateType::create_unique(state, this);
531
902
    RETURN_IF_ERROR(local_state->init(state, info));
532
902
    state->emplace_local_state(operator_id(), std::move(local_state));
533
902
    return Status::OK();
534
902
}
_ZN5doris9OperatorXINS_22StreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
10.0k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
10.0k
    auto local_state = LocalStateType::create_unique(state, this);
531
10.0k
    RETURN_IF_ERROR(local_state->init(state, info));
532
10.0k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
10.0k
    return Status::OK();
534
10.0k
}
_ZN5doris9OperatorXINS_30DistinctStreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
248k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
248k
    auto local_state = LocalStateType::create_unique(state, this);
531
248k
    RETURN_IF_ERROR(local_state->init(state, info));
532
248k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
248k
    return Status::OK();
534
248k
}
535
536
PipelineXSinkLocalStateBase::PipelineXSinkLocalStateBase(DataSinkOperatorXBase* parent,
537
                                                         RuntimeState* state)
538
1.76M
        : _parent(parent), _state(state) {}
539
540
PipelineXLocalStateBase::PipelineXLocalStateBase(RuntimeState* state, OperatorXBase* parent)
541
2.03M
        : _num_rows_returned(0),
542
2.03M
          _rows_returned_counter(nullptr),
543
2.03M
          _parent(parent),
544
2.03M
          _state(state),
545
2.03M
          _budget(state->batch_size(), state->preferred_block_size_bytes()) {}
546
547
template <typename SharedStateArg>
548
2.04M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
2.04M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
2.04M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
2.04M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
2.04M
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
2.04M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
2.04M
    _operator_profile->add_child(_common_profile.get(), true);
557
2.04M
    _operator_profile->add_child(_custom_profile.get(), true);
558
2.04M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
2.04M
    if constexpr (!is_fake_shared) {
560
1.25M
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
756k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
756k
                                    .first.get()
563
756k
                                    ->template cast<SharedStateArg>();
564
565
756k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
756k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
756k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
756k
        } else if (info.shared_state) {
569
430k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
0
                DCHECK(false);
571
0
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
430k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
430k
            _dependency = _shared_state->create_source_dependency(
576
430k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
430k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
430k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
430k
        } else {
580
66.5k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
6.07k
                DCHECK(false);
582
6.07k
            }
583
66.5k
        }
584
1.25M
    }
585
586
2.04M
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
2.04M
    _rows_returned_counter =
591
2.04M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
2.04M
    _blocks_returned_counter =
593
2.04M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
2.04M
    _output_block_bytes_counter =
595
2.04M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
2.04M
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
2.04M
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
2.04M
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
2.04M
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
2.04M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
2.04M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
2.04M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
2.04M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
2.04M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
2.04M
    _memory_used_counter =
606
2.04M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
2.04M
    _common_profile->add_info_string("IsColocate",
608
2.04M
                                     std::to_string(_parent->is_colocated_operator()));
609
2.04M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
2.04M
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
2.04M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
2.04M
    return Status::OK();
613
2.04M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
74.4k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
74.4k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
74.4k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
74.4k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
74.4k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
74.4k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
74.4k
    _operator_profile->add_child(_common_profile.get(), true);
557
74.4k
    _operator_profile->add_child(_custom_profile.get(), true);
558
74.4k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
74.4k
    if constexpr (!is_fake_shared) {
560
74.4k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
13.5k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
13.5k
                                    .first.get()
563
13.5k
                                    ->template cast<SharedStateArg>();
564
565
13.5k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
13.5k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
13.5k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
60.9k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
59.7k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
59.7k
            _dependency = _shared_state->create_source_dependency(
576
59.7k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
59.7k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
59.7k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
59.7k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
1.22k
        }
584
74.4k
    }
585
586
74.4k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
74.4k
    _rows_returned_counter =
591
74.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
74.4k
    _blocks_returned_counter =
593
74.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
74.4k
    _output_block_bytes_counter =
595
74.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
74.4k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
74.4k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
74.4k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
74.4k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
74.4k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
74.4k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
74.4k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
74.4k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
74.4k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
74.4k
    _memory_used_counter =
606
74.4k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
74.4k
    _common_profile->add_info_string("IsColocate",
608
74.4k
                                     std::to_string(_parent->is_colocated_operator()));
609
74.4k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
74.4k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
74.4k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
74.4k
    return Status::OK();
613
74.4k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
4
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
4
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
4
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
4
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
4
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
4
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
4
    _operator_profile->add_child(_common_profile.get(), true);
557
4
    _operator_profile->add_child(_custom_profile.get(), true);
558
4
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
4
    if constexpr (!is_fake_shared) {
560
4
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
4
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
4
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
4
            _dependency = _shared_state->create_source_dependency(
576
4
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
4
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
4
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
4
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
4
    }
585
586
4
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
4
    _rows_returned_counter =
591
4
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
4
    _blocks_returned_counter =
593
4
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
4
    _output_block_bytes_counter =
595
4
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
4
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
4
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
4
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
4
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
4
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
4
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
4
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
4
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
4
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
4
    _memory_used_counter =
606
4
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
4
    _common_profile->add_info_string("IsColocate",
608
4
                                     std::to_string(_parent->is_colocated_operator()));
609
4
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
4
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
4
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
4
    return Status::OK();
613
4
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
236k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
236k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
236k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
236k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
236k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
236k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
236k
    _operator_profile->add_child(_common_profile.get(), true);
557
236k
    _operator_profile->add_child(_custom_profile.get(), true);
558
236k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
236k
    if constexpr (!is_fake_shared) {
560
236k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
236k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
230k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
230k
            _dependency = _shared_state->create_source_dependency(
576
230k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
230k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
230k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
230k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
5.52k
        }
584
236k
    }
585
586
236k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
236k
    _rows_returned_counter =
591
236k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
236k
    _blocks_returned_counter =
593
236k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
236k
    _output_block_bytes_counter =
595
236k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
236k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
236k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
236k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
236k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
236k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
236k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
236k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
236k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
236k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
236k
    _memory_used_counter =
606
236k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
236k
    _common_profile->add_info_string("IsColocate",
608
236k
                                     std::to_string(_parent->is_colocated_operator()));
609
236k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
236k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
236k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
236k
    return Status::OK();
613
236k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
155
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
155
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
155
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
155
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
155
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
155
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
155
    _operator_profile->add_child(_common_profile.get(), true);
557
155
    _operator_profile->add_child(_custom_profile.get(), true);
558
155
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
155
    if constexpr (!is_fake_shared) {
560
155
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
155
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
155
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
155
            _dependency = _shared_state->create_source_dependency(
576
155
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
155
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
155
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
155
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
155
    }
585
586
155
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
155
    _rows_returned_counter =
591
155
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
155
    _blocks_returned_counter =
593
155
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
155
    _output_block_bytes_counter =
595
155
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
155
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
155
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
155
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
155
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
155
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
155
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
155
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
155
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
155
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
155
    _memory_used_counter =
606
155
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
155
    _common_profile->add_info_string("IsColocate",
608
155
                                     std::to_string(_parent->is_colocated_operator()));
609
155
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
155
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
155
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
155
    return Status::OK();
613
155
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
6.55k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
6.55k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
6.55k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
6.55k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
6.55k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
6.55k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
6.55k
    _operator_profile->add_child(_common_profile.get(), true);
557
6.55k
    _operator_profile->add_child(_custom_profile.get(), true);
558
6.55k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
6.55k
    if constexpr (!is_fake_shared) {
560
6.55k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
6.55k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
6.50k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
6.50k
            _dependency = _shared_state->create_source_dependency(
576
6.50k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
6.50k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
6.50k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
6.50k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
50
        }
584
6.55k
    }
585
586
6.55k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
6.55k
    _rows_returned_counter =
591
6.55k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
6.55k
    _blocks_returned_counter =
593
6.55k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
6.55k
    _output_block_bytes_counter =
595
6.55k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
6.55k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
6.55k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
6.55k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
6.55k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
6.55k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
6.55k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
6.55k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
6.55k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
6.55k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
6.55k
    _memory_used_counter =
606
6.55k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
6.55k
    _common_profile->add_info_string("IsColocate",
608
6.55k
                                     std::to_string(_parent->is_colocated_operator()));
609
6.55k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
6.55k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
6.55k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
6.55k
    return Status::OK();
613
6.55k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
9.88k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
9.88k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
9.88k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
9.88k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
9.88k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
9.88k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
9.88k
    _operator_profile->add_child(_common_profile.get(), true);
557
9.88k
    _operator_profile->add_child(_custom_profile.get(), true);
558
9.88k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
9.88k
    if constexpr (!is_fake_shared) {
560
9.88k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
9.88k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
9.77k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
9.77k
            _dependency = _shared_state->create_source_dependency(
576
9.77k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
9.77k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
9.77k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
9.77k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
107
        }
584
9.88k
    }
585
586
9.88k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
9.88k
    _rows_returned_counter =
591
9.88k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
9.88k
    _blocks_returned_counter =
593
9.88k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
9.88k
    _output_block_bytes_counter =
595
9.88k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
9.88k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
9.88k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
9.88k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
9.88k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
9.88k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
9.88k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
9.88k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
9.88k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
9.88k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
9.88k
    _memory_used_counter =
606
9.88k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
9.88k
    _common_profile->add_info_string("IsColocate",
608
9.88k
                                     std::to_string(_parent->is_colocated_operator()));
609
9.88k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
9.88k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
9.88k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
9.88k
    return Status::OK();
613
9.88k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
109k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
109k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
109k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
109k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
109k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
109k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
109k
    _operator_profile->add_child(_common_profile.get(), true);
557
109k
    _operator_profile->add_child(_custom_profile.get(), true);
558
109k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
109k
    if constexpr (!is_fake_shared) {
560
109k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
109k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
107k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
107k
            _dependency = _shared_state->create_source_dependency(
576
107k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
107k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
107k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
107k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
1.56k
        }
584
109k
    }
585
586
109k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
109k
    _rows_returned_counter =
591
109k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
109k
    _blocks_returned_counter =
593
109k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
109k
    _output_block_bytes_counter =
595
109k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
109k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
109k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
109k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
109k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
109k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
109k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
109k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
109k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
109k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
109k
    _memory_used_counter =
606
109k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
109k
    _common_profile->add_info_string("IsColocate",
608
109k
                                     std::to_string(_parent->is_colocated_operator()));
609
109k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
109k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
109k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
109k
    return Status::OK();
613
109k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
67.0k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
67.0k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
67.0k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
67.0k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
67.0k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
67.0k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
67.0k
    _operator_profile->add_child(_common_profile.get(), true);
557
67.0k
    _operator_profile->add_child(_custom_profile.get(), true);
558
67.0k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
67.0k
    if constexpr (!is_fake_shared) {
560
67.1k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
67.1k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
67.1k
                                    .first.get()
563
67.1k
                                    ->template cast<SharedStateArg>();
564
565
67.1k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
67.1k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
67.1k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
18.4E
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
0
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
0
            _dependency = _shared_state->create_source_dependency(
576
0
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
18.4E
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
18.4E
        }
584
67.0k
    }
585
586
67.0k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
67.0k
    _rows_returned_counter =
591
67.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
67.0k
    _blocks_returned_counter =
593
67.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
67.0k
    _output_block_bytes_counter =
595
67.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
67.0k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
67.0k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
67.0k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
67.0k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
67.0k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
67.0k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
67.0k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
67.0k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
67.0k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
67.0k
    _memory_used_counter =
606
67.0k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
67.0k
    _common_profile->add_info_string("IsColocate",
608
67.0k
                                     std::to_string(_parent->is_colocated_operator()));
609
67.0k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
67.0k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
67.0k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
67.0k
    return Status::OK();
613
67.0k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
109
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
109
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
109
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
109
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
109
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
109
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
109
    _operator_profile->add_child(_common_profile.get(), true);
557
109
    _operator_profile->add_child(_custom_profile.get(), true);
558
109
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
109
    if constexpr (!is_fake_shared) {
560
109
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
109
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
109
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
109
            _dependency = _shared_state->create_source_dependency(
576
109
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
109
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
109
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
109
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
109
    }
585
586
109
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
109
    _rows_returned_counter =
591
109
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
109
    _blocks_returned_counter =
593
109
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
109
    _output_block_bytes_counter =
595
109
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
109
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
109
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
109
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
109
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
109
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
109
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
109
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
109
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
109
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
109
    _memory_used_counter =
606
109
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
109
    _common_profile->add_info_string("IsColocate",
608
109
                                     std::to_string(_parent->is_colocated_operator()));
609
109
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
109
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
109
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
109
    return Status::OK();
613
109
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
790k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
790k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
790k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
790k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
790k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
790k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
790k
    _operator_profile->add_child(_common_profile.get(), true);
557
790k
    _operator_profile->add_child(_custom_profile.get(), true);
558
790k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
    if constexpr (!is_fake_shared) {
560
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
                                    .first.get()
563
                                    ->template cast<SharedStateArg>();
564
565
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
            _dependency = _shared_state->create_source_dependency(
576
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
        }
584
    }
585
586
790k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
790k
    _rows_returned_counter =
591
790k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
790k
    _blocks_returned_counter =
593
790k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
790k
    _output_block_bytes_counter =
595
790k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
790k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
790k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
790k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
790k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
790k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
790k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
790k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
790k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
790k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
790k
    _memory_used_counter =
606
790k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
790k
    _common_profile->add_info_string("IsColocate",
608
790k
                                     std::to_string(_parent->is_colocated_operator()));
609
790k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
790k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
790k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
790k
    return Status::OK();
613
790k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
56.2k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
56.2k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
56.2k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
56.2k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
56.2k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
56.2k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
56.2k
    _operator_profile->add_child(_common_profile.get(), true);
557
56.2k
    _operator_profile->add_child(_custom_profile.get(), true);
558
56.2k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
56.2k
    if constexpr (!is_fake_shared) {
560
56.2k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
56.2k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
4.37k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
4.37k
            _dependency = _shared_state->create_source_dependency(
576
4.37k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
4.37k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
4.37k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
51.8k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
51.8k
        }
584
56.2k
    }
585
586
56.2k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
56.2k
    _rows_returned_counter =
591
56.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
56.2k
    _blocks_returned_counter =
593
56.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
56.2k
    _output_block_bytes_counter =
595
56.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
56.2k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
56.2k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
56.2k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
56.2k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
56.2k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
56.2k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
56.2k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
56.2k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
56.2k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
56.2k
    _memory_used_counter =
606
56.2k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
56.2k
    _common_profile->add_info_string("IsColocate",
608
56.2k
                                     std::to_string(_parent->is_colocated_operator()));
609
56.2k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
56.2k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
56.2k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
56.2k
    return Status::OK();
613
56.2k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
26
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
26
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
26
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
26
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
26
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
26
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
26
    _operator_profile->add_child(_common_profile.get(), true);
557
26
    _operator_profile->add_child(_custom_profile.get(), true);
558
26
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
26
    if constexpr (!is_fake_shared) {
560
26
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
26
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
26
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
26
            _dependency = _shared_state->create_source_dependency(
576
26
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
26
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
26
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
26
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
26
    }
585
586
26
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
26
    _rows_returned_counter =
591
26
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
26
    _blocks_returned_counter =
593
26
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
26
    _output_block_bytes_counter =
595
26
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
26
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
26
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
26
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
26
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
26
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
26
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
26
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
26
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
26
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
26
    _memory_used_counter =
606
26
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
26
    _common_profile->add_info_string("IsColocate",
608
26
                                     std::to_string(_parent->is_colocated_operator()));
609
26
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
26
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
26
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
26
    return Status::OK();
613
26
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
6.20k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
6.20k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
6.20k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
6.20k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
6.20k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
6.20k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
6.20k
    _operator_profile->add_child(_common_profile.get(), true);
557
6.20k
    _operator_profile->add_child(_custom_profile.get(), true);
558
6.20k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
6.20k
    if constexpr (!is_fake_shared) {
560
6.20k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
6.20k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
6.18k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
6.18k
            _dependency = _shared_state->create_source_dependency(
576
6.18k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
6.18k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
6.18k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
6.18k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
28
        }
584
6.20k
    }
585
586
6.20k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
6.20k
    _rows_returned_counter =
591
6.20k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
6.20k
    _blocks_returned_counter =
593
6.20k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
6.20k
    _output_block_bytes_counter =
595
6.20k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
6.20k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
6.20k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
6.20k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
6.20k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
6.20k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
6.20k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
6.20k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
6.20k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
6.20k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
6.20k
    _memory_used_counter =
606
6.20k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
6.20k
    _common_profile->add_info_string("IsColocate",
608
6.20k
                                     std::to_string(_parent->is_colocated_operator()));
609
6.20k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
6.20k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
6.20k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
6.20k
    return Status::OK();
613
6.20k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
442
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
442
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
442
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
442
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
442
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
442
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
442
    _operator_profile->add_child(_common_profile.get(), true);
557
442
    _operator_profile->add_child(_custom_profile.get(), true);
558
442
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
442
    if constexpr (!is_fake_shared) {
560
442
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
442
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
442
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
442
            _dependency = _shared_state->create_source_dependency(
576
442
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
442
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
442
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
442
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
442
    }
585
586
442
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
442
    _rows_returned_counter =
591
442
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
442
    _blocks_returned_counter =
593
442
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
442
    _output_block_bytes_counter =
595
442
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
442
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
442
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
442
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
442
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
442
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
442
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
442
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
442
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
442
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
442
    _memory_used_counter =
606
442
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
442
    _common_profile->add_info_string("IsColocate",
608
442
                                     std::to_string(_parent->is_colocated_operator()));
609
442
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
442
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
442
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
442
    return Status::OK();
613
442
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
5.14k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
5.14k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
5.14k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
5.14k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
5.14k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
5.14k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
5.14k
    _operator_profile->add_child(_common_profile.get(), true);
557
5.14k
    _operator_profile->add_child(_custom_profile.get(), true);
558
5.14k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
5.14k
    if constexpr (!is_fake_shared) {
560
5.14k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
5.14k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
4.90k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
4.90k
            _dependency = _shared_state->create_source_dependency(
576
4.90k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
4.90k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
4.90k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
4.90k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
240
        }
584
5.14k
    }
585
586
5.14k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
5.14k
    _rows_returned_counter =
591
5.14k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
5.14k
    _blocks_returned_counter =
593
5.14k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
5.14k
    _output_block_bytes_counter =
595
5.14k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
5.14k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
5.14k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
5.14k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
5.14k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
5.14k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
5.14k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
5.14k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
5.14k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
5.14k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
5.14k
    _memory_used_counter =
606
5.14k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
5.14k
    _common_profile->add_info_string("IsColocate",
608
5.14k
                                     std::to_string(_parent->is_colocated_operator()));
609
5.14k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
5.14k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
5.14k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
5.14k
    return Status::OK();
613
5.14k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
681k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
681k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
681k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
681k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
681k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
681k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
681k
    _operator_profile->add_child(_common_profile.get(), true);
557
681k
    _operator_profile->add_child(_custom_profile.get(), true);
558
681k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
681k
    if constexpr (!is_fake_shared) {
560
681k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
675k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
675k
                                    .first.get()
563
675k
                                    ->template cast<SharedStateArg>();
564
565
675k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
675k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
675k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
675k
        } else if (info.shared_state) {
569
0
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
0
                DCHECK(false);
571
0
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
0
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
0
            _dependency = _shared_state->create_source_dependency(
576
0
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
6.07k
        } else {
580
6.07k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
6.07k
                DCHECK(false);
582
6.07k
            }
583
6.07k
        }
584
681k
    }
585
586
681k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
681k
    _rows_returned_counter =
591
681k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
681k
    _blocks_returned_counter =
593
681k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
681k
    _output_block_bytes_counter =
595
681k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
681k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
681k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
681k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
681k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
681k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
681k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
681k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
681k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
681k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
681k
    _memory_used_counter =
606
681k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
681k
    _common_profile->add_info_string("IsColocate",
608
681k
                                     std::to_string(_parent->is_colocated_operator()));
609
681k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
681k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
681k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
681k
    return Status::OK();
613
681k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
169
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
169
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
169
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
169
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
169
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
169
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
169
    _operator_profile->add_child(_common_profile.get(), true);
557
169
    _operator_profile->add_child(_custom_profile.get(), true);
558
169
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
169
    if constexpr (!is_fake_shared) {
560
169
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
169
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
169
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
169
            _dependency = _shared_state->create_source_dependency(
576
169
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
169
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
169
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
169
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
169
    }
585
586
169
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
169
    _rows_returned_counter =
591
169
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
169
    _blocks_returned_counter =
593
169
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
169
    _output_block_bytes_counter =
595
169
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
169
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
169
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
169
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
169
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
169
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
169
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
169
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
169
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
169
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
169
    _memory_used_counter =
606
169
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
169
    _common_profile->add_info_string("IsColocate",
608
169
                                     std::to_string(_parent->is_colocated_operator()));
609
169
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
169
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
169
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
169
    return Status::OK();
613
169
}
614
615
template <typename SharedStateArg>
616
2.05M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
2.05M
    _conjuncts.resize(_parent->_conjuncts.size());
618
2.36M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
314k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
314k
    }
621
2.05M
    if (_parent->has_projection()) {
622
394k
        const auto& projection = *_parent->_projection;
623
394k
        _projections.resize(projection.projections.size());
624
2.46M
        for (size_t i = 0; i < _projections.size(); i++) {
625
2.07M
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
2.07M
        }
627
394k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
416k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
21.7k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
418k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
396k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
396k
                        state, _intermediate_projections[i][j]));
633
396k
            }
634
21.7k
        }
635
394k
    }
636
2.05M
    return Status::OK();
637
2.05M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
74.8k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
74.8k
    _conjuncts.resize(_parent->_conjuncts.size());
618
76.7k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
1.90k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1.90k
    }
621
74.8k
    if (_parent->has_projection()) {
622
74.8k
        const auto& projection = *_parent->_projection;
623
74.8k
        _projections.resize(projection.projections.size());
624
418k
        for (size_t i = 0; i < _projections.size(); i++) {
625
343k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
343k
        }
627
74.8k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
85.8k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
10.9k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
352k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
341k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
341k
                        state, _intermediate_projections[i][j]));
633
341k
            }
634
10.9k
        }
635
74.8k
    }
636
74.8k
    return Status::OK();
637
74.8k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
6
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
6
    _conjuncts.resize(_parent->_conjuncts.size());
618
6
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
6
    if (_parent->has_projection()) {
622
3
        const auto& projection = *_parent->_projection;
623
3
        _projections.resize(projection.projections.size());
624
9
        for (size_t i = 0; i < _projections.size(); i++) {
625
6
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
6
        }
627
3
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
3
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
3
    }
636
6
    return Status::OK();
637
6
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
236k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
236k
    _conjuncts.resize(_parent->_conjuncts.size());
618
236k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
236k
    if (_parent->has_projection()) {
622
134
        const auto& projection = *_parent->_projection;
623
134
        _projections.resize(projection.projections.size());
624
624
        for (size_t i = 0; i < _projections.size(); i++) {
625
490
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
490
        }
627
134
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
134
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
134
    }
636
236k
    return Status::OK();
637
236k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
150
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
150
    _conjuncts.resize(_parent->_conjuncts.size());
618
150
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
150
    if (_parent->has_projection()) {
622
0
        const auto& projection = *_parent->_projection;
623
0
        _projections.resize(projection.projections.size());
624
0
        for (size_t i = 0; i < _projections.size(); i++) {
625
0
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
0
        }
627
0
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
0
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
0
    }
636
150
    return Status::OK();
637
150
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
6.56k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
6.56k
    _conjuncts.resize(_parent->_conjuncts.size());
618
6.64k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
87
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
87
    }
621
6.56k
    if (_parent->has_projection()) {
622
6.56k
        const auto& projection = *_parent->_projection;
623
6.56k
        _projections.resize(projection.projections.size());
624
28.5k
        for (size_t i = 0; i < _projections.size(); i++) {
625
22.0k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
22.0k
        }
627
6.56k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
6.58k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
25
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
168
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
143
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
143
                        state, _intermediate_projections[i][j]));
633
143
            }
634
25
        }
635
6.56k
    }
636
6.56k
    return Status::OK();
637
6.56k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
9.87k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
9.87k
    _conjuncts.resize(_parent->_conjuncts.size());
618
10.6k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
804
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
804
    }
621
9.87k
    if (_parent->has_projection()) {
622
5.36k
        const auto& projection = *_parent->_projection;
623
5.36k
        _projections.resize(projection.projections.size());
624
21.7k
        for (size_t i = 0; i < _projections.size(); i++) {
625
16.4k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
16.4k
        }
627
5.36k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
5.45k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
83
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
623
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
540
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
540
                        state, _intermediate_projections[i][j]));
633
540
            }
634
83
        }
635
5.36k
    }
636
9.87k
    return Status::OK();
637
9.87k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
109k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
109k
    _conjuncts.resize(_parent->_conjuncts.size());
618
110k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
1.24k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1.24k
    }
621
109k
    if (_parent->has_projection()) {
622
34.1k
        const auto& projection = *_parent->_projection;
623
34.1k
        _projections.resize(projection.projections.size());
624
302k
        for (size_t i = 0; i < _projections.size(); i++) {
625
268k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
268k
        }
627
34.1k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
34.8k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
709
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
4.46k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
3.75k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
3.75k
                        state, _intermediate_projections[i][j]));
633
3.75k
            }
634
709
        }
635
34.1k
    }
636
109k
    return Status::OK();
637
109k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
67.1k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
67.1k
    _conjuncts.resize(_parent->_conjuncts.size());
618
67.2k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
17
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
17
    }
621
67.1k
    if (_parent->has_projection()) {
622
335
        const auto& projection = *_parent->_projection;
623
335
        _projections.resize(projection.projections.size());
624
1.40k
        for (size_t i = 0; i < _projections.size(); i++) {
625
1.06k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
1.06k
        }
627
335
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
336
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
1
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
4
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
3
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
3
                        state, _intermediate_projections[i][j]));
633
3
            }
634
1
        }
635
335
    }
636
67.1k
    return Status::OK();
637
67.1k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
113
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
113
    _conjuncts.resize(_parent->_conjuncts.size());
618
113
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
113
    if (_parent->has_projection()) {
622
3
        const auto& projection = *_parent->_projection;
623
3
        _projections.resize(projection.projections.size());
624
11
        for (size_t i = 0; i < _projections.size(); i++) {
625
8
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
8
        }
627
3
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
3
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
3
    }
636
113
    return Status::OK();
637
113
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
793k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
793k
    _conjuncts.resize(_parent->_conjuncts.size());
618
1.10M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
309k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
309k
    }
621
793k
    if (_parent->has_projection()) {
622
261k
        const auto& projection = *_parent->_projection;
623
261k
        _projections.resize(projection.projections.size());
624
1.57M
        for (size_t i = 0; i < _projections.size(); i++) {
625
1.31M
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
1.31M
        }
627
261k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
271k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
9.82k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
57.2k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
47.4k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
47.4k
                        state, _intermediate_projections[i][j]));
633
47.4k
            }
634
9.82k
        }
635
261k
    }
636
793k
    return Status::OK();
637
793k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
56.5k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
56.5k
    _conjuncts.resize(_parent->_conjuncts.size());
618
56.5k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
56.5k
    if (_parent->has_projection()) {
622
12.0k
        const auto& projection = *_parent->_projection;
623
12.0k
        _projections.resize(projection.projections.size());
624
116k
        for (size_t i = 0; i < _projections.size(); i++) {
625
104k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
104k
        }
627
12.0k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
12.1k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
150
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
2.83k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
2.68k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
2.68k
                        state, _intermediate_projections[i][j]));
633
2.68k
            }
634
150
        }
635
12.0k
    }
636
56.5k
    return Status::OK();
637
56.5k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
25
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
25
    _conjuncts.resize(_parent->_conjuncts.size());
618
25
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
25
    if (_parent->has_projection()) {
622
0
        const auto& projection = *_parent->_projection;
623
0
        _projections.resize(projection.projections.size());
624
0
        for (size_t i = 0; i < _projections.size(); i++) {
625
0
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
0
        }
627
0
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
0
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
0
    }
636
25
    return Status::OK();
637
25
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
6.20k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
6.20k
    _conjuncts.resize(_parent->_conjuncts.size());
618
7.11k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
907
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
907
    }
621
6.20k
    if (_parent->has_projection()) {
622
0
        const auto& projection = *_parent->_projection;
623
0
        _projections.resize(projection.projections.size());
624
0
        for (size_t i = 0; i < _projections.size(); i++) {
625
0
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
0
        }
627
0
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
0
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
0
    }
636
6.20k
    return Status::OK();
637
6.20k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
442
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
442
    _conjuncts.resize(_parent->_conjuncts.size());
618
442
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
442
    if (_parent->has_projection()) {
622
0
        const auto& projection = *_parent->_projection;
623
0
        _projections.resize(projection.projections.size());
624
0
        for (size_t i = 0; i < _projections.size(); i++) {
625
0
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
0
        }
627
0
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
0
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
0
    }
636
442
    return Status::OK();
637
442
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
5.18k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
5.18k
    _conjuncts.resize(_parent->_conjuncts.size());
618
5.18k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
5.18k
    if (_parent->has_projection()) {
622
107
        const auto& projection = *_parent->_projection;
623
107
        _projections.resize(projection.projections.size());
624
322
        for (size_t i = 0; i < _projections.size(); i++) {
625
215
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
215
        }
627
107
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
107
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
107
    }
636
5.18k
    return Status::OK();
637
5.18k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
684k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
684k
    _conjuncts.resize(_parent->_conjuncts.size());
618
684k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
684k
    if (_parent->has_projection()) {
622
0
        const auto& projection = *_parent->_projection;
623
0
        _projections.resize(projection.projections.size());
624
0
        for (size_t i = 0; i < _projections.size(); i++) {
625
0
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
0
        }
627
0
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
0
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
0
    }
636
684k
    return Status::OK();
637
684k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4openEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
169
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
169
    _conjuncts.resize(_parent->_conjuncts.size());
618
176
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
7
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
7
    }
621
169
    if (_parent->has_projection()) {
622
166
        const auto& projection = *_parent->_projection;
623
166
        _projections.resize(projection.projections.size());
624
491
        for (size_t i = 0; i < _projections.size(); i++) {
625
325
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
325
        }
627
166
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
169
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
3
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
11
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
8
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
8
                        state, _intermediate_projections[i][j]));
633
8
            }
634
3
        }
635
166
    }
636
169
    return Status::OK();
637
169
}
638
639
template <typename SharedStateArg>
640
9.56k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
9.56k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
9.56k
    _terminated = true;
645
9.56k
    return Status::OK();
646
9.56k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
480
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
480
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
480
    _terminated = true;
645
480
    return Status::OK();
646
480
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
38
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
38
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
38
    _terminated = true;
645
38
    return Status::OK();
646
38
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
31
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
31
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
31
    _terminated = true;
645
31
    return Status::OK();
646
31
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
1
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
1
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
1
    _terminated = true;
645
1
    return Status::OK();
646
1
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
64
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
64
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
64
    _terminated = true;
645
64
    return Status::OK();
646
64
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
7.66k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
7.66k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
7.66k
    _terminated = true;
645
7.66k
    return Status::OK();
646
7.66k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
43
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
43
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
43
    _terminated = true;
645
43
    return Status::OK();
646
43
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
1
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
1
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
1
    _terminated = true;
645
1
    return Status::OK();
646
1
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
137
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
137
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
137
    _terminated = true;
645
137
    return Status::OK();
646
137
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
1.07k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
1.07k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
1.07k
    _terminated = true;
645
1.07k
    return Status::OK();
646
1.07k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
34
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
34
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
34
    _terminated = true;
645
34
    return Status::OK();
646
34
}
647
648
template <typename SharedStateArg>
649
2.30M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
2.30M
    if (_closed) {
651
258k
        return Status::OK();
652
258k
    }
653
2.04M
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
1.25M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
1.25M
    }
656
2.04M
    _closed = true;
657
2.04M
    return Status::OK();
658
2.30M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
74.7k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
74.7k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
74.7k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
74.7k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
74.7k
    }
656
74.7k
    _closed = true;
657
74.7k
    return Status::OK();
658
74.7k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
7
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
7
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
7
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
7
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
7
    }
656
7
    _closed = true;
657
7
    return Status::OK();
658
7
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
468k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
468k
    if (_closed) {
651
235k
        return Status::OK();
652
235k
    }
653
233k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
233k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
233k
    }
656
233k
    _closed = true;
657
233k
    return Status::OK();
658
468k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
155
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
155
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
155
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
155
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
155
    }
656
155
    _closed = true;
657
155
    return Status::OK();
658
155
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
6.55k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
6.55k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
6.55k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
6.55k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
6.55k
    }
656
6.55k
    _closed = true;
657
6.55k
    return Status::OK();
658
6.55k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
9.81k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
9.81k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
9.81k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
9.81k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
9.81k
    }
656
9.81k
    _closed = true;
657
9.81k
    return Status::OK();
658
9.81k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
109k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
109k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
109k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
109k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
109k
    }
656
109k
    _closed = true;
657
109k
    return Status::OK();
658
109k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
66.6k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
66.6k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
66.6k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
66.6k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
66.6k
    }
656
66.6k
    _closed = true;
657
66.6k
    return Status::OK();
658
66.6k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
108
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
108
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
108
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
108
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
108
    }
656
108
    _closed = true;
657
108
    return Status::OK();
658
108
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
810k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
810k
    if (_closed) {
651
16.8k
        return Status::OK();
652
16.8k
    }
653
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
    }
656
794k
    _closed = true;
657
794k
    return Status::OK();
658
810k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
56.5k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
56.5k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
56.5k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
56.5k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
56.5k
    }
656
56.5k
    _closed = true;
657
56.5k
    return Status::OK();
658
56.5k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
28
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
28
    if (_closed) {
651
14
        return Status::OK();
652
14
    }
653
14
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
14
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
14
    }
656
14
    _closed = true;
657
14
    return Status::OK();
658
28
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
6.16k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
6.16k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
6.16k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
6.16k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
6.16k
    }
656
6.16k
    _closed = true;
657
6.16k
    return Status::OK();
658
6.16k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
676
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
676
    if (_closed) {
651
339
        return Status::OK();
652
339
    }
653
337
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
337
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
337
    }
656
337
    _closed = true;
657
337
    return Status::OK();
658
676
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
10.8k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
10.8k
    if (_closed) {
651
5.65k
        return Status::OK();
652
5.65k
    }
653
5.17k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
5.17k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
5.17k
    }
656
5.17k
    _closed = true;
657
5.17k
    return Status::OK();
658
10.8k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
685k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
685k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
685k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
685k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
685k
    }
656
685k
    _closed = true;
657
685k
    return Status::OK();
658
685k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
336
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
336
    if (_closed) {
651
176
        return Status::OK();
652
176
    }
653
160
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
160
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
160
    }
656
160
    _closed = true;
657
160
    return Status::OK();
658
336
}
659
660
template <typename SharedState>
661
1.76M
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
1.76M
    _operator_profile =
664
1.76M
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
1.76M
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
1.76M
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
1.76M
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
1.76M
    _operator_profile->add_child(_common_profile, true);
673
1.76M
    _operator_profile->add_child(_custom_profile, true);
674
675
1.76M
    _operator_profile->set_metadata(_parent->node_id());
676
1.76M
    _wait_for_finish_dependency_timer =
677
1.76M
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
1.76M
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
1.76M
    if constexpr (!is_fake_shared) {
680
1.23M
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
1.23M
            info.shared_state_map.end()) {
682
334k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
254k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
254k
            }
685
334k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
334k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
334k
                                                  ? 0
688
334k
                                                  : info.task_idx]
689
334k
                                  .get();
690
334k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
904k
        } else {
692
18.4E
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
18.4E
                DCHECK(false);
694
18.4E
            }
695
904k
            _shared_state = info.shared_state->template cast<SharedState>();
696
904k
            _dependency = _shared_state->create_sink_dependency(
697
904k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
904k
        }
699
1.23M
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
1.23M
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
1.23M
    }
702
703
1.76M
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
1.76M
    _rows_input_counter =
708
1.76M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
1.76M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
1.76M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
1.76M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
1.76M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
1.76M
    _memory_used_counter =
714
1.76M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
1.76M
    _common_profile->add_info_string("IsColocate",
716
1.76M
                                     std::to_string(_parent->is_colocated_operator()));
717
1.76M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
1.76M
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
1.76M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
1.76M
    return Status::OK();
721
1.76M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
122k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
122k
    _operator_profile =
664
122k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
122k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
122k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
122k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
122k
    _operator_profile->add_child(_common_profile, true);
673
122k
    _operator_profile->add_child(_custom_profile, true);
674
675
122k
    _operator_profile->set_metadata(_parent->node_id());
676
122k
    _wait_for_finish_dependency_timer =
677
122k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
122k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
122k
    if constexpr (!is_fake_shared) {
680
122k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
122k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
13.6k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
13.6k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
13.6k
                                                  ? 0
688
13.6k
                                                  : info.task_idx]
689
13.6k
                                  .get();
690
13.6k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
109k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
109k
            _shared_state = info.shared_state->template cast<SharedState>();
696
109k
            _dependency = _shared_state->create_sink_dependency(
697
109k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
109k
        }
699
122k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
122k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
122k
    }
702
703
122k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
122k
    _rows_input_counter =
708
122k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
122k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
122k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
122k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
122k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
122k
    _memory_used_counter =
714
122k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
122k
    _common_profile->add_info_string("IsColocate",
716
122k
                                     std::to_string(_parent->is_colocated_operator()));
717
122k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
122k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
122k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
122k
    return Status::OK();
721
122k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
5
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
5
    _operator_profile =
664
5
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
5
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
5
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
5
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
5
    _operator_profile->add_child(_common_profile, true);
673
5
    _operator_profile->add_child(_custom_profile, true);
674
675
5
    _operator_profile->set_metadata(_parent->node_id());
676
5
    _wait_for_finish_dependency_timer =
677
5
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
5
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
5
    if constexpr (!is_fake_shared) {
680
5
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
5
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
5
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
5
            _shared_state = info.shared_state->template cast<SharedState>();
696
5
            _dependency = _shared_state->create_sink_dependency(
697
5
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
5
        }
699
5
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
5
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
5
    }
702
703
5
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
5
    _rows_input_counter =
708
5
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
5
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
5
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
5
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
5
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
5
    _memory_used_counter =
714
5
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
5
    _common_profile->add_info_string("IsColocate",
716
5
                                     std::to_string(_parent->is_colocated_operator()));
717
5
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
5
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
5
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
5
    return Status::OK();
721
5
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
236k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
236k
    _operator_profile =
664
236k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
236k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
236k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
236k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
236k
    _operator_profile->add_child(_common_profile, true);
673
236k
    _operator_profile->add_child(_custom_profile, true);
674
675
236k
    _operator_profile->set_metadata(_parent->node_id());
676
236k
    _wait_for_finish_dependency_timer =
677
236k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
236k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
236k
    if constexpr (!is_fake_shared) {
680
236k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
236k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
236k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
236k
            _shared_state = info.shared_state->template cast<SharedState>();
696
236k
            _dependency = _shared_state->create_sink_dependency(
697
236k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
236k
        }
699
236k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
236k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
236k
    }
702
703
236k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
236k
    _rows_input_counter =
708
236k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
236k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
236k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
236k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
236k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
236k
    _memory_used_counter =
714
236k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
236k
    _common_profile->add_info_string("IsColocate",
716
236k
                                     std::to_string(_parent->is_colocated_operator()));
717
236k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
236k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
236k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
236k
    return Status::OK();
721
236k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
162
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
162
    _operator_profile =
664
162
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
162
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
162
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
162
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
162
    _operator_profile->add_child(_common_profile, true);
673
162
    _operator_profile->add_child(_custom_profile, true);
674
675
162
    _operator_profile->set_metadata(_parent->node_id());
676
162
    _wait_for_finish_dependency_timer =
677
162
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
162
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
162
    if constexpr (!is_fake_shared) {
680
162
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
162
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
162
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
162
            _shared_state = info.shared_state->template cast<SharedState>();
696
162
            _dependency = _shared_state->create_sink_dependency(
697
162
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
162
        }
699
162
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
162
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
162
    }
702
703
162
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
162
    _rows_input_counter =
708
162
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
162
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
162
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
162
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
162
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
162
    _memory_used_counter =
714
162
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
162
    _common_profile->add_info_string("IsColocate",
716
162
                                     std::to_string(_parent->is_colocated_operator()));
717
162
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
162
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
162
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
162
    return Status::OK();
721
162
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
6.55k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
6.55k
    _operator_profile =
664
6.55k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
6.55k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
6.55k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
6.55k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
6.55k
    _operator_profile->add_child(_common_profile, true);
673
6.55k
    _operator_profile->add_child(_custom_profile, true);
674
675
6.55k
    _operator_profile->set_metadata(_parent->node_id());
676
6.55k
    _wait_for_finish_dependency_timer =
677
6.55k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
6.55k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
6.55k
    if constexpr (!is_fake_shared) {
680
6.55k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
6.55k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
6.55k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
6.55k
            _shared_state = info.shared_state->template cast<SharedState>();
696
6.55k
            _dependency = _shared_state->create_sink_dependency(
697
6.55k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
6.55k
        }
699
6.55k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
6.55k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
6.55k
    }
702
703
6.55k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
6.55k
    _rows_input_counter =
708
6.55k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
6.55k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
6.55k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
6.55k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
6.55k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
6.55k
    _memory_used_counter =
714
6.55k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
6.55k
    _common_profile->add_info_string("IsColocate",
716
6.55k
                                     std::to_string(_parent->is_colocated_operator()));
717
6.55k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
6.55k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
6.55k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
6.55k
    return Status::OK();
721
6.55k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
9.87k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
9.87k
    _operator_profile =
664
9.87k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
9.87k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
9.87k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
9.87k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
9.87k
    _operator_profile->add_child(_common_profile, true);
673
9.87k
    _operator_profile->add_child(_custom_profile, true);
674
675
9.87k
    _operator_profile->set_metadata(_parent->node_id());
676
9.87k
    _wait_for_finish_dependency_timer =
677
9.87k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
9.87k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
9.87k
    if constexpr (!is_fake_shared) {
680
9.87k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
9.87k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
9.87k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
9.87k
            _shared_state = info.shared_state->template cast<SharedState>();
696
9.87k
            _dependency = _shared_state->create_sink_dependency(
697
9.87k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
9.87k
        }
699
9.87k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
9.87k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
9.87k
    }
702
703
9.87k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
9.87k
    _rows_input_counter =
708
9.87k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
9.87k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
9.87k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
9.87k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
9.87k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
9.87k
    _memory_used_counter =
714
9.87k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
9.87k
    _common_profile->add_info_string("IsColocate",
716
9.87k
                                     std::to_string(_parent->is_colocated_operator()));
717
9.87k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
9.87k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
9.87k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
9.87k
    return Status::OK();
721
9.87k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
109k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
109k
    _operator_profile =
664
109k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
109k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
109k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
109k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
109k
    _operator_profile->add_child(_common_profile, true);
673
109k
    _operator_profile->add_child(_custom_profile, true);
674
675
109k
    _operator_profile->set_metadata(_parent->node_id());
676
109k
    _wait_for_finish_dependency_timer =
677
109k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
109k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
109k
    if constexpr (!is_fake_shared) {
680
109k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
109k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
109k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
109k
            _shared_state = info.shared_state->template cast<SharedState>();
696
109k
            _dependency = _shared_state->create_sink_dependency(
697
109k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
109k
        }
699
109k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
109k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
109k
    }
702
703
109k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
109k
    _rows_input_counter =
708
109k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
109k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
109k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
109k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
109k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
109k
    _memory_used_counter =
714
109k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
109k
    _common_profile->add_info_string("IsColocate",
716
109k
                                     std::to_string(_parent->is_colocated_operator()));
717
109k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
109k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
109k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
109k
    return Status::OK();
721
109k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
67.1k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
67.1k
    _operator_profile =
664
67.1k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
67.1k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
67.1k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
67.1k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
67.1k
    _operator_profile->add_child(_common_profile, true);
673
67.1k
    _operator_profile->add_child(_custom_profile, true);
674
675
67.1k
    _operator_profile->set_metadata(_parent->node_id());
676
67.1k
    _wait_for_finish_dependency_timer =
677
67.1k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
67.1k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
67.1k
    if constexpr (!is_fake_shared) {
680
67.1k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
67.1k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
67.1k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
67.1k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
67.1k
                                                  ? 0
688
67.1k
                                                  : info.task_idx]
689
67.1k
                                  .get();
690
67.1k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
18.4E
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
18.4E
            _shared_state = info.shared_state->template cast<SharedState>();
696
18.4E
            _dependency = _shared_state->create_sink_dependency(
697
18.4E
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
18.4E
        }
699
67.1k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
67.1k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
67.1k
    }
702
703
67.1k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
67.1k
    _rows_input_counter =
708
67.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
67.1k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
67.1k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
67.1k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
67.1k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
67.1k
    _memory_used_counter =
714
67.1k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
67.1k
    _common_profile->add_info_string("IsColocate",
716
67.1k
                                     std::to_string(_parent->is_colocated_operator()));
717
67.1k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
67.1k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
67.1k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
67.1k
    return Status::OK();
721
67.1k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
119
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
119
    _operator_profile =
664
119
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
119
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
119
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
119
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
119
    _operator_profile->add_child(_common_profile, true);
673
119
    _operator_profile->add_child(_custom_profile, true);
674
675
119
    _operator_profile->set_metadata(_parent->node_id());
676
119
    _wait_for_finish_dependency_timer =
677
119
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
119
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
119
    if constexpr (!is_fake_shared) {
680
119
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
119
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
119
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
119
            _shared_state = info.shared_state->template cast<SharedState>();
696
119
            _dependency = _shared_state->create_sink_dependency(
697
119
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
119
        }
699
119
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
119
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
119
    }
702
703
119
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
119
    _rows_input_counter =
708
119
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
119
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
119
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
119
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
119
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
119
    _memory_used_counter =
714
119
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
119
    _common_profile->add_info_string("IsColocate",
716
119
                                     std::to_string(_parent->is_colocated_operator()));
717
119
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
119
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
119
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
119
    return Status::OK();
721
119
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
530k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
530k
    _operator_profile =
664
530k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
530k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
530k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
530k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
530k
    _operator_profile->add_child(_common_profile, true);
673
530k
    _operator_profile->add_child(_custom_profile, true);
674
675
530k
    _operator_profile->set_metadata(_parent->node_id());
676
530k
    _wait_for_finish_dependency_timer =
677
530k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
530k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
    if constexpr (!is_fake_shared) {
680
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
                                                  ? 0
688
                                                  : info.task_idx]
689
                                  .get();
690
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
            _shared_state = info.shared_state->template cast<SharedState>();
696
            _dependency = _shared_state->create_sink_dependency(
697
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
        }
699
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
    }
702
703
530k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
530k
    _rows_input_counter =
708
530k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
530k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
530k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
530k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
530k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
530k
    _memory_used_counter =
714
530k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
530k
    _common_profile->add_info_string("IsColocate",
716
530k
                                     std::to_string(_parent->is_colocated_operator()));
717
530k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
530k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
530k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
530k
    return Status::OK();
721
530k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
9.98k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
9.98k
    _operator_profile =
664
9.98k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
9.98k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
9.98k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
9.98k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
9.98k
    _operator_profile->add_child(_common_profile, true);
673
9.98k
    _operator_profile->add_child(_custom_profile, true);
674
675
9.98k
    _operator_profile->set_metadata(_parent->node_id());
676
9.98k
    _wait_for_finish_dependency_timer =
677
9.98k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
9.98k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
9.98k
    if constexpr (!is_fake_shared) {
680
9.98k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
9.98k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
9.98k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
9.98k
            _shared_state = info.shared_state->template cast<SharedState>();
696
9.98k
            _dependency = _shared_state->create_sink_dependency(
697
9.98k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
9.98k
        }
699
9.98k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
9.98k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
9.98k
    }
702
703
9.98k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
9.98k
    _rows_input_counter =
708
9.98k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
9.98k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
9.98k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
9.98k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
9.98k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
9.98k
    _memory_used_counter =
714
9.98k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
9.98k
    _common_profile->add_info_string("IsColocate",
716
9.98k
                                     std::to_string(_parent->is_colocated_operator()));
717
9.98k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
9.98k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
9.98k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
9.98k
    return Status::OK();
721
9.98k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
441
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
441
    _operator_profile =
664
441
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
441
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
441
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
441
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
441
    _operator_profile->add_child(_common_profile, true);
673
441
    _operator_profile->add_child(_custom_profile, true);
674
675
441
    _operator_profile->set_metadata(_parent->node_id());
676
441
    _wait_for_finish_dependency_timer =
677
441
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
441
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
441
    if constexpr (!is_fake_shared) {
680
441
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
441
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
441
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
441
            _shared_state = info.shared_state->template cast<SharedState>();
696
441
            _dependency = _shared_state->create_sink_dependency(
697
441
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
441
        }
699
441
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
441
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
441
    }
702
703
441
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
441
    _rows_input_counter =
708
441
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
441
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
441
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
441
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
441
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
441
    _memory_used_counter =
714
441
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
441
    _common_profile->add_info_string("IsColocate",
716
441
                                     std::to_string(_parent->is_colocated_operator()));
717
441
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
441
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
441
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
441
    return Status::OK();
721
441
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
2.52k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
2.52k
    _operator_profile =
664
2.52k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
2.52k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
2.52k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
2.52k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
2.52k
    _operator_profile->add_child(_common_profile, true);
673
2.52k
    _operator_profile->add_child(_custom_profile, true);
674
675
2.52k
    _operator_profile->set_metadata(_parent->node_id());
676
2.52k
    _wait_for_finish_dependency_timer =
677
2.52k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
2.52k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
2.52k
    if constexpr (!is_fake_shared) {
680
2.52k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
2.52k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
2.52k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
2.52k
            _shared_state = info.shared_state->template cast<SharedState>();
696
2.52k
            _dependency = _shared_state->create_sink_dependency(
697
2.52k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
2.52k
        }
699
2.52k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
2.52k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
2.52k
    }
702
703
2.52k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
2.52k
    _rows_input_counter =
708
2.52k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
2.52k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
2.52k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
2.52k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
2.52k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
2.52k
    _memory_used_counter =
714
2.52k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
2.52k
    _common_profile->add_info_string("IsColocate",
716
2.52k
                                     std::to_string(_parent->is_colocated_operator()));
717
2.52k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
2.52k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
2.52k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
2.52k
    return Status::OK();
721
2.52k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
12.5k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
12.5k
    _operator_profile =
664
12.5k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
12.5k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
12.5k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
12.5k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
12.5k
    _operator_profile->add_child(_common_profile, true);
673
12.5k
    _operator_profile->add_child(_custom_profile, true);
674
675
12.5k
    _operator_profile->set_metadata(_parent->node_id());
676
12.5k
    _wait_for_finish_dependency_timer =
677
12.5k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
12.5k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
12.5k
    if constexpr (!is_fake_shared) {
680
12.5k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
12.5k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
12.5k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
12.5k
            _shared_state = info.shared_state->template cast<SharedState>();
696
12.5k
            _dependency = _shared_state->create_sink_dependency(
697
12.5k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
12.5k
        }
699
12.5k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
12.5k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
12.5k
    }
702
703
12.5k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
12.5k
    _rows_input_counter =
708
12.5k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
12.5k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
12.5k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
12.5k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
12.5k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
12.5k
    _memory_used_counter =
714
12.5k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
12.5k
    _common_profile->add_info_string("IsColocate",
716
12.5k
                                     std::to_string(_parent->is_colocated_operator()));
717
12.5k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
12.5k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
12.5k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
12.5k
    return Status::OK();
721
12.5k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
253k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
253k
    _operator_profile =
664
253k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
253k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
253k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
253k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
253k
    _operator_profile->add_child(_common_profile, true);
673
253k
    _operator_profile->add_child(_custom_profile, true);
674
675
253k
    _operator_profile->set_metadata(_parent->node_id());
676
253k
    _wait_for_finish_dependency_timer =
677
253k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
253k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
253k
    if constexpr (!is_fake_shared) {
680
253k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
254k
            info.shared_state_map.end()) {
682
254k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
254k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
254k
            }
685
254k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
254k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
254k
                                                  ? 0
688
254k
                                                  : info.task_idx]
689
254k
                                  .get();
690
254k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
18.4E
        } else {
692
18.4E
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
18.4E
                DCHECK(false);
694
18.4E
            }
695
18.4E
            _shared_state = info.shared_state->template cast<SharedState>();
696
18.4E
            _dependency = _shared_state->create_sink_dependency(
697
18.4E
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
18.4E
        }
699
253k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
253k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
253k
    }
702
703
253k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
253k
    _rows_input_counter =
708
253k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
253k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
253k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
253k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
253k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
253k
    _memory_used_counter =
714
253k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
253k
    _common_profile->add_info_string("IsColocate",
716
253k
                                     std::to_string(_parent->is_colocated_operator()));
717
253k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
253k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
253k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
253k
    return Status::OK();
721
253k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
407k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
407k
    _operator_profile =
664
407k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
407k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
407k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
407k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
407k
    _operator_profile->add_child(_common_profile, true);
673
407k
    _operator_profile->add_child(_custom_profile, true);
674
675
407k
    _operator_profile->set_metadata(_parent->node_id());
676
407k
    _wait_for_finish_dependency_timer =
677
407k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
407k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
407k
    if constexpr (!is_fake_shared) {
680
407k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
407k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
407k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
407k
            _shared_state = info.shared_state->template cast<SharedState>();
696
407k
            _dependency = _shared_state->create_sink_dependency(
697
407k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
407k
        }
699
407k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
407k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
407k
    }
702
703
407k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
407k
    _rows_input_counter =
708
407k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
407k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
407k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
407k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
407k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
407k
    _memory_used_counter =
714
407k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
407k
    _common_profile->add_info_string("IsColocate",
716
407k
                                     std::to_string(_parent->is_colocated_operator()));
717
407k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
407k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
407k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
407k
    return Status::OK();
721
407k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
25
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
25
    _operator_profile =
664
25
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
25
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
25
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
25
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
25
    _operator_profile->add_child(_common_profile, true);
673
25
    _operator_profile->add_child(_custom_profile, true);
674
675
25
    _operator_profile->set_metadata(_parent->node_id());
676
25
    _wait_for_finish_dependency_timer =
677
25
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
25
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
25
    if constexpr (!is_fake_shared) {
680
25
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
25
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
25
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
25
            _shared_state = info.shared_state->template cast<SharedState>();
696
25
            _dependency = _shared_state->create_sink_dependency(
697
25
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
25
        }
699
25
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
25
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
25
    }
702
703
25
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
25
    _rows_input_counter =
708
25
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
25
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
25
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
25
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
25
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
25
    _memory_used_counter =
714
25
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
25
    _common_profile->add_info_string("IsColocate",
716
25
                                     std::to_string(_parent->is_colocated_operator()));
717
25
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
25
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
25
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
25
    return Status::OK();
721
25
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
338
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
338
    _operator_profile =
664
338
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
338
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
338
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
338
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
338
    _operator_profile->add_child(_common_profile, true);
673
338
    _operator_profile->add_child(_custom_profile, true);
674
675
338
    _operator_profile->set_metadata(_parent->node_id());
676
338
    _wait_for_finish_dependency_timer =
677
338
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
338
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
338
    if constexpr (!is_fake_shared) {
680
338
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
338
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
338
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
338
            _shared_state = info.shared_state->template cast<SharedState>();
696
338
            _dependency = _shared_state->create_sink_dependency(
697
338
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
338
        }
699
338
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
338
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
338
    }
702
703
338
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
338
    _rows_input_counter =
708
338
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
338
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
338
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
338
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
338
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
338
    _memory_used_counter =
714
338
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
338
    _common_profile->add_info_string("IsColocate",
716
338
                                     std::to_string(_parent->is_colocated_operator()));
717
338
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
338
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
338
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
338
    return Status::OK();
721
338
}
722
723
template <typename SharedState>
724
1.76M
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
1.76M
    if (_closed) {
726
2
        return Status::OK();
727
2
    }
728
1.76M
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
1.23M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
1.23M
    }
731
1.76M
    _closed = true;
732
1.76M
    return Status::OK();
733
1.76M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
122k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
122k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
122k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
122k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
122k
    }
731
122k
    _closed = true;
732
122k
    return Status::OK();
733
122k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
4
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
4
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
4
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
4
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
4
    }
731
4
    _closed = true;
732
4
    return Status::OK();
733
4
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
235k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
235k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
235k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
235k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
235k
    }
731
235k
    _closed = true;
732
235k
    return Status::OK();
733
235k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
153
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
153
    if (_closed) {
726
2
        return Status::OK();
727
2
    }
728
151
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
151
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
151
    }
731
151
    _closed = true;
732
151
    return Status::OK();
733
153
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
6.51k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
6.51k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
6.51k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
6.51k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
6.51k
    }
731
6.51k
    _closed = true;
732
6.51k
    return Status::OK();
733
6.51k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
9.79k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
9.79k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
9.79k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
9.79k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
9.79k
    }
731
9.79k
    _closed = true;
732
9.79k
    return Status::OK();
733
9.79k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
108k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
108k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
108k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
108k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
108k
    }
731
108k
    _closed = true;
732
108k
    return Status::OK();
733
108k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
66.5k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
66.5k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
66.5k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
66.5k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
66.5k
    }
731
66.5k
    _closed = true;
732
66.5k
    return Status::OK();
733
66.5k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
108
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
108
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
108
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
108
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
108
    }
731
108
    _closed = true;
732
108
    return Status::OK();
733
108
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
530k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
530k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
    }
731
530k
    _closed = true;
732
530k
    return Status::OK();
733
530k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
9.98k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
9.98k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
9.98k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
9.98k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
9.98k
    }
731
9.98k
    _closed = true;
732
9.98k
    return Status::OK();
733
9.98k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
339
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
339
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
339
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
339
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
339
    }
731
339
    _closed = true;
732
339
    return Status::OK();
733
339
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
2.54k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
2.54k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
2.54k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
2.54k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
2.54k
    }
731
2.54k
    _closed = true;
732
2.54k
    return Status::OK();
733
2.54k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
12.4k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
12.4k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
12.4k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
12.4k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
12.4k
    }
731
12.4k
    _closed = true;
732
12.4k
    return Status::OK();
733
12.4k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
254k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
254k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
254k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
254k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
254k
    }
731
254k
    _closed = true;
732
254k
    return Status::OK();
733
254k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
408k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
408k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
408k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
408k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
408k
    }
731
408k
    _closed = true;
732
408k
    return Status::OK();
733
408k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
14
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
14
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
14
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
14
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
14
    }
731
14
    _closed = true;
732
14
    return Status::OK();
733
14
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
338
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
338
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
338
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
338
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
338
    }
731
338
    _closed = true;
732
338
    return Status::OK();
733
338
}
734
735
template <typename LocalStateType>
736
Status StreamingOperatorX<LocalStateType>::get_block_impl(RuntimeState* state, Block* block,
737
1.28k
                                                          bool* eos) {
738
1.28k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
1.28k
    return pull(state, block, eos);
740
1.28k
}
_ZN5doris18StreamingOperatorXINS_23AssertNumRowsLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
39
                                                          bool* eos) {
738
39
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
39
    return pull(state, block, eos);
740
39
}
_ZN5doris18StreamingOperatorXINS_16SelectLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
1.24k
                                                          bool* eos) {
738
1.24k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
1.24k
    return pull(state, block, eos);
740
1.24k
}
741
742
template <typename LocalStateType>
743
Status StatefulOperatorX<LocalStateType>::get_block_impl(RuntimeState* state, Block* block,
744
492k
                                                         bool* eos) {
745
492k
    auto& local_state = get_local_state(state);
746
492k
    if (need_more_input_data(state)) {
747
460k
        local_state._child_block->clear_column_data(
748
460k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
460k
                        .num_slots());
750
460k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
460k
                state, local_state._child_block.get(), &local_state._child_eos));
752
460k
        *eos = local_state._child_eos;
753
460k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
61.3k
            return Status::OK();
755
61.3k
        }
756
399k
        {
757
399k
            SCOPED_TIMER(local_state.exec_time_counter());
758
399k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
399k
        }
760
399k
    }
761
762
431k
    if (!need_more_input_data(state)) {
763
402k
        SCOPED_TIMER(local_state.exec_time_counter());
764
402k
        bool new_eos = false;
765
402k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
402k
        if (new_eos) {
767
322k
            *eos = true;
768
322k
        } else if (!need_more_input_data(state)) {
769
24.3k
            *eos = false;
770
24.3k
        }
771
402k
    }
772
431k
    return Status::OK();
773
431k
}
_ZN5doris17StatefulOperatorXINS_23HashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
146k
                                                         bool* eos) {
745
146k
    auto& local_state = get_local_state(state);
746
146k
    if (need_more_input_data(state)) {
747
126k
        local_state._child_block->clear_column_data(
748
126k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
126k
                        .num_slots());
750
126k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
126k
                state, local_state._child_block.get(), &local_state._child_eos));
752
126k
        *eos = local_state._child_eos;
753
126k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
35.4k
            return Status::OK();
755
35.4k
        }
756
91.4k
        {
757
91.4k
            SCOPED_TIMER(local_state.exec_time_counter());
758
91.4k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
91.4k
        }
760
91.4k
    }
761
762
111k
    if (!need_more_input_data(state)) {
763
111k
        SCOPED_TIMER(local_state.exec_time_counter());
764
111k
        bool new_eos = false;
765
111k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
110k
        if (new_eos) {
767
50.2k
            *eos = true;
768
60.7k
        } else if (!need_more_input_data(state)) {
769
11.3k
            *eos = false;
770
11.3k
        }
771
110k
    }
772
110k
    return Status::OK();
773
111k
}
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_34PartitionedHashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
_ZN5doris17StatefulOperatorXINS_16RepeatLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
4.47k
                                                         bool* eos) {
745
4.47k
    auto& local_state = get_local_state(state);
746
4.47k
    if (need_more_input_data(state)) {
747
2.51k
        local_state._child_block->clear_column_data(
748
2.51k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
2.51k
                        .num_slots());
750
2.51k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
2.51k
                state, local_state._child_block.get(), &local_state._child_eos));
752
2.51k
        *eos = local_state._child_eos;
753
2.51k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
305
            return Status::OK();
755
305
        }
756
2.20k
        {
757
2.20k
            SCOPED_TIMER(local_state.exec_time_counter());
758
2.20k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
2.20k
        }
760
2.20k
    }
761
762
4.16k
    if (!need_more_input_data(state)) {
763
4.16k
        SCOPED_TIMER(local_state.exec_time_counter());
764
4.16k
        bool new_eos = false;
765
4.16k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
4.16k
        if (new_eos) {
767
1.59k
            *eos = true;
768
2.57k
        } else if (!need_more_input_data(state)) {
769
1.95k
            *eos = false;
770
1.95k
        }
771
4.16k
    }
772
4.16k
    return Status::OK();
773
4.16k
}
_ZN5doris17StatefulOperatorXINS_25MaterializationLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
1.93k
                                                         bool* eos) {
745
1.93k
    auto& local_state = get_local_state(state);
746
1.93k
    if (need_more_input_data(state)) {
747
1.93k
        local_state._child_block->clear_column_data(
748
1.93k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
1.93k
                        .num_slots());
750
1.93k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
1.93k
                state, local_state._child_block.get(), &local_state._child_eos));
752
1.93k
        *eos = local_state._child_eos;
753
1.93k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
796
            return Status::OK();
755
796
        }
756
1.13k
        {
757
1.13k
            SCOPED_TIMER(local_state.exec_time_counter());
758
1.13k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
1.13k
        }
760
1.13k
    }
761
762
1.13k
    if (!need_more_input_data(state)) {
763
1.13k
        SCOPED_TIMER(local_state.exec_time_counter());
764
1.13k
        bool new_eos = false;
765
1.13k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
1.13k
        if (new_eos) {
767
801
            *eos = true;
768
801
        } else if (!need_more_input_data(state)) {
769
0
            *eos = false;
770
0
        }
771
1.13k
    }
772
1.13k
    return Status::OK();
773
1.13k
}
_ZN5doris17StatefulOperatorXINS_22StreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
20.6k
                                                         bool* eos) {
745
20.6k
    auto& local_state = get_local_state(state);
746
20.6k
    if (need_more_input_data(state)) {
747
20.6k
        local_state._child_block->clear_column_data(
748
20.6k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
20.6k
                        .num_slots());
750
20.6k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
20.6k
                state, local_state._child_block.get(), &local_state._child_eos));
752
20.6k
        *eos = local_state._child_eos;
753
20.6k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
3.95k
            return Status::OK();
755
3.95k
        }
756
16.6k
        {
757
16.6k
            SCOPED_TIMER(local_state.exec_time_counter());
758
16.6k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
16.6k
        }
760
16.6k
    }
761
762
16.6k
    if (!need_more_input_data(state)) {
763
10.0k
        SCOPED_TIMER(local_state.exec_time_counter());
764
10.0k
        bool new_eos = false;
765
10.0k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
10.0k
        if (new_eos) {
767
9.86k
            *eos = true;
768
9.86k
        } else if (!need_more_input_data(state)) {
769
6
            *eos = false;
770
6
        }
771
10.0k
    }
772
16.6k
    return Status::OK();
773
16.6k
}
_ZN5doris17StatefulOperatorXINS_30DistinctStreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
289k
                                                         bool* eos) {
745
289k
    auto& local_state = get_local_state(state);
746
290k
    if (need_more_input_data(state)) {
747
290k
        local_state._child_block->clear_column_data(
748
290k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
290k
                        .num_slots());
750
290k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
290k
                state, local_state._child_block.get(), &local_state._child_eos));
752
290k
        *eos = local_state._child_eos;
753
290k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
19.2k
            return Status::OK();
755
19.2k
        }
756
271k
        {
757
271k
            SCOPED_TIMER(local_state.exec_time_counter());
758
271k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
271k
        }
760
271k
    }
761
762
270k
    if (!need_more_input_data(state)) {
763
249k
        SCOPED_TIMER(local_state.exec_time_counter());
764
249k
        bool new_eos = false;
765
249k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
249k
        if (new_eos) {
767
248k
            *eos = true;
768
248k
        } else if (!need_more_input_data(state)) {
769
5
            *eos = false;
770
5
        }
771
249k
    }
772
270k
    return Status::OK();
773
270k
}
_ZN5doris17StatefulOperatorXINS_29NestedLoopJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
20.8k
                                                         bool* eos) {
745
20.8k
    auto& local_state = get_local_state(state);
746
20.8k
    if (need_more_input_data(state)) {
747
10.1k
        local_state._child_block->clear_column_data(
748
10.1k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
10.1k
                        .num_slots());
750
10.1k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
10.1k
                state, local_state._child_block.get(), &local_state._child_eos));
752
10.1k
        *eos = local_state._child_eos;
753
10.1k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
348
            return Status::OK();
755
348
        }
756
9.83k
        {
757
9.83k
            SCOPED_TIMER(local_state.exec_time_counter());
758
9.83k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
9.83k
        }
760
9.83k
    }
761
762
20.4k
    if (!need_more_input_data(state)) {
763
19.9k
        SCOPED_TIMER(local_state.exec_time_counter());
764
19.9k
        bool new_eos = false;
765
19.9k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
19.9k
        if (new_eos) {
767
6.53k
            *eos = true;
768
13.4k
        } else if (!need_more_input_data(state)) {
769
10.6k
            *eos = false;
770
10.6k
        }
771
19.9k
    }
772
20.4k
    return Status::OK();
773
20.4k
}
_ZN5doris17StatefulOperatorXINS_23TableFunctionLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
8.50k
                                                         bool* eos) {
745
8.50k
    auto& local_state = get_local_state(state);
746
8.50k
    if (need_more_input_data(state)) {
747
8.13k
        local_state._child_block->clear_column_data(
748
8.13k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
8.13k
                        .num_slots());
750
8.13k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
8.13k
                state, local_state._child_block.get(), &local_state._child_eos));
752
8.13k
        *eos = local_state._child_eos;
753
8.13k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
1.29k
            return Status::OK();
755
1.29k
        }
756
6.84k
        {
757
6.84k
            SCOPED_TIMER(local_state.exec_time_counter());
758
6.84k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
6.84k
        }
760
6.84k
    }
761
762
7.21k
    if (!need_more_input_data(state)) {
763
7.21k
        SCOPED_TIMER(local_state.exec_time_counter());
764
7.21k
        bool new_eos = false;
765
7.21k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
7.21k
        if (new_eos) {
767
4.76k
            *eos = true;
768
4.76k
        } else if (!need_more_input_data(state)) {
769
366
            *eos = false;
770
366
        }
771
7.21k
    }
772
7.20k
    return Status::OK();
773
7.20k
}
774
775
template <typename Writer, typename Parent>
776
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
777
49.5k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
49.5k
    RETURN_IF_ERROR(Base::init(state, info));
779
49.5k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
49.5k
                                                         "AsyncWriterDependency", true);
781
49.5k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
49.5k
                             _finish_dependency));
783
784
49.5k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
49.5k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
49.5k
    return Status::OK();
787
49.5k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
361
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
361
    RETURN_IF_ERROR(Base::init(state, info));
779
361
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
361
                                                         "AsyncWriterDependency", true);
781
361
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
361
                             _finish_dependency));
783
784
361
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
361
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
361
    return Status::OK();
787
361
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
49.1k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
49.1k
    RETURN_IF_ERROR(Base::init(state, info));
779
49.1k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
49.1k
                                                         "AsyncWriterDependency", true);
781
49.1k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
49.1k
                             _finish_dependency));
783
784
49.1k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
49.1k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
49.1k
    return Status::OK();
787
49.1k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
36
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
36
    RETURN_IF_ERROR(Base::init(state, info));
779
36
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
36
                                                         "AsyncWriterDependency", true);
781
36
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
36
                             _finish_dependency));
783
784
36
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
36
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
36
    return Status::OK();
787
36
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
16
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
16
    RETURN_IF_ERROR(Base::init(state, info));
779
16
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
16
                                                         "AsyncWriterDependency", true);
781
16
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
16
                             _finish_dependency));
783
784
16
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
16
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
16
    return Status::OK();
787
16
}
788
789
template <typename Writer, typename Parent>
790
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
791
50.2k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
50.2k
    RETURN_IF_ERROR(Base::open(state));
793
50.2k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
391k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
341k
        RETURN_IF_ERROR(
796
341k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
341k
    }
798
50.2k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
50.2k
    return Status::OK();
800
50.2k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
362
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
362
    RETURN_IF_ERROR(Base::open(state));
793
362
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
1.83k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
1.47k
        RETURN_IF_ERROR(
796
1.47k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
1.47k
    }
798
362
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
362
    return Status::OK();
800
362
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
49.8k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
49.8k
    RETURN_IF_ERROR(Base::open(state));
793
49.8k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
388k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
339k
        RETURN_IF_ERROR(
796
339k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
339k
    }
798
49.8k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
49.8k
    return Status::OK();
800
49.8k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
36
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
36
    RETURN_IF_ERROR(Base::open(state));
793
36
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
648
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
612
        RETURN_IF_ERROR(
796
612
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
612
    }
798
36
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
36
    return Status::OK();
800
36
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
16
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
16
    RETURN_IF_ERROR(Base::open(state));
793
16
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
33
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
17
        RETURN_IF_ERROR(
796
17
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
17
    }
798
16
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
16
    return Status::OK();
800
16
}
801
802
template <typename Writer, typename Parent>
803
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
804
65.6k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
65.6k
    return _writer->sink(block, eos);
806
65.6k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
1.62k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
1.62k
    return _writer->sink(block, eos);
806
1.62k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
63.9k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
63.9k
    return _writer->sink(block, eos);
806
63.9k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
36
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
36
    return _writer->sink(block, eos);
806
36
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
52
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
52
    return _writer->sink(block, eos);
806
52
}
807
808
template <typename Writer, typename Parent>
809
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
810
50.3k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
50.3k
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
50.3k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
50.3k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
816
    // if the init failed, the _writer may be nullptr. so here need check
817
50.4k
    if (_writer) {
818
50.4k
        Status st = _writer->get_writer_status();
819
50.4k
        if (exec_status.ok()) {
820
50.3k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
50.3k
                                                       : Status::Cancelled("force close"));
822
50.3k
        } else {
823
100
            _writer->force_close(exec_status);
824
100
        }
825
        // If there is an error in process_block thread, then we should get the writer
826
        // status before call force_close. For example, the thread may failed in commit
827
        // transaction.
828
50.4k
        RETURN_IF_ERROR(st);
829
50.4k
    }
830
50.3k
    return Base::close(state, exec_status);
831
50.3k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
351
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
351
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
351
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
351
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
816
    // if the init failed, the _writer may be nullptr. so here need check
817
351
    if (_writer) {
818
351
        Status st = _writer->get_writer_status();
819
351
        if (exec_status.ok()) {
820
351
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
351
                                                       : Status::Cancelled("force close"));
822
351
        } else {
823
0
            _writer->force_close(exec_status);
824
0
        }
825
        // If there is an error in process_block thread, then we should get the writer
826
        // status before call force_close. For example, the thread may failed in commit
827
        // transaction.
828
351
        RETURN_IF_ERROR(st);
829
351
    }
830
351
    return Base::close(state, exec_status);
831
351
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
49.9k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
49.9k
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
49.9k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
49.9k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
816
    // if the init failed, the _writer may be nullptr. so here need check
817
50.0k
    if (_writer) {
818
50.0k
        Status st = _writer->get_writer_status();
819
50.0k
        if (exec_status.ok()) {
820
49.9k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
49.9k
                                                       : Status::Cancelled("force close"));
822
49.9k
        } else {
823
100
            _writer->force_close(exec_status);
824
100
        }
825
        // If there is an error in process_block thread, then we should get the writer
826
        // status before call force_close. For example, the thread may failed in commit
827
        // transaction.
828
50.0k
        RETURN_IF_ERROR(st);
829
50.0k
    }
830
49.9k
    return Base::close(state, exec_status);
831
49.9k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
36
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
36
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
36
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
36
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
816
    // if the init failed, the _writer may be nullptr. so here need check
817
36
    if (_writer) {
818
36
        Status st = _writer->get_writer_status();
819
36
        if (exec_status.ok()) {
820
36
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
36
                                                       : Status::Cancelled("force close"));
822
36
        } else {
823
0
            _writer->force_close(exec_status);
824
0
        }
825
        // If there is an error in process_block thread, then we should get the writer
826
        // status before call force_close. For example, the thread may failed in commit
827
        // transaction.
828
36
        RETURN_IF_ERROR(st);
829
36
    }
830
36
    return Base::close(state, exec_status);
831
36
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
16
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
16
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
16
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
16
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
816
    // if the init failed, the _writer may be nullptr. so here need check
817
16
    if (_writer) {
818
16
        Status st = _writer->get_writer_status();
819
16
        if (exec_status.ok()) {
820
16
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
16
                                                       : Status::Cancelled("force close"));
822
16
        } else {
823
0
            _writer->force_close(exec_status);
824
0
        }
825
        // If there is an error in process_block thread, then we should get the writer
826
        // status before call force_close. For example, the thread may failed in commit
827
        // transaction.
828
16
        RETURN_IF_ERROR(st);
829
16
    }
830
16
    return Base::close(state, exec_status);
831
16
}
832
833
// An instantiation added outside the macros below needs the matching
834
// 'extern template' declaration in the operator's header (enforced by
835
// build-support/check-extern-template-pairing.py). Instantiations expanded
836
// through DECLARE_OPERATOR are invisible to that check -- macro bodies are
837
// skipped -- so their extern pairing has to be kept in sync by hand.
838
#define DECLARE_OPERATOR(LOCAL_STATE) template class DataSinkOperatorX<LOCAL_STATE>;
839
DECLARE_OPERATOR(HashJoinBuildSinkLocalState)
840
DECLARE_OPERATOR(ResultSinkLocalState)
841
DECLARE_OPERATOR(JdbcTableSinkLocalState)
842
DECLARE_OPERATOR(MemoryScratchSinkLocalState)
843
DECLARE_OPERATOR(ResultFileSinkLocalState)
844
DECLARE_OPERATOR(OlapTableSinkLocalState)
845
DECLARE_OPERATOR(OlapTableSinkV2LocalState)
846
DECLARE_OPERATOR(HiveTableSinkLocalState)
847
DECLARE_OPERATOR(TVFTableSinkLocalState)
848
DECLARE_OPERATOR(IcebergTableSinkLocalState)
849
DECLARE_OPERATOR(PaimonTableSinkLocalState)
850
DECLARE_OPERATOR(SpillIcebergTableSinkLocalState)
851
DECLARE_OPERATOR(IcebergDeleteSinkLocalState)
852
DECLARE_OPERATOR(IcebergMergeSinkLocalState)
853
DECLARE_OPERATOR(MCTableSinkLocalState)
854
DECLARE_OPERATOR(AnalyticSinkLocalState)
855
DECLARE_OPERATOR(BlackholeSinkLocalState)
856
DECLARE_OPERATOR(SortSinkLocalState)
857
DECLARE_OPERATOR(SpillSortSinkLocalState)
858
DECLARE_OPERATOR(LocalExchangeSinkLocalState)
859
DECLARE_OPERATOR(AggSinkLocalState)
860
DECLARE_OPERATOR(BucketedAggSinkLocalState)
861
DECLARE_OPERATOR(PartitionedAggSinkLocalState)
862
DECLARE_OPERATOR(ExchangeSinkLocalState)
863
DECLARE_OPERATOR(NestedLoopJoinBuildSinkLocalState)
864
DECLARE_OPERATOR(UnionSinkLocalState)
865
DECLARE_OPERATOR(MultiCastDataStreamSinkLocalState)
866
DECLARE_OPERATOR(PartitionSortSinkLocalState)
867
DECLARE_OPERATOR(SetProbeSinkLocalState<true>)
868
DECLARE_OPERATOR(SetProbeSinkLocalState<false>)
869
DECLARE_OPERATOR(SetSinkLocalState<true>)
870
DECLARE_OPERATOR(SetSinkLocalState<false>)
871
DECLARE_OPERATOR(PartitionedHashJoinSinkLocalState)
872
DECLARE_OPERATOR(GroupCommitBlockSinkLocalState)
873
DECLARE_OPERATOR(CacheSinkLocalState)
874
DECLARE_OPERATOR(DictSinkLocalState)
875
DECLARE_OPERATOR(RecCTESinkLocalState)
876
DECLARE_OPERATOR(RecCTEAnchorSinkLocalState)
877
878
#undef DECLARE_OPERATOR
879
880
#define DECLARE_OPERATOR(LOCAL_STATE) template class OperatorX<LOCAL_STATE>;
881
DECLARE_OPERATOR(HashJoinProbeLocalState)
882
DECLARE_OPERATOR(OlapScanLocalState)
883
DECLARE_OPERATOR(GroupCommitLocalState)
884
DECLARE_OPERATOR(JDBCScanLocalState)
885
DECLARE_OPERATOR(FileScanLocalState)
886
DECLARE_OPERATOR(AnalyticLocalState)
887
DECLARE_OPERATOR(SortLocalState)
888
DECLARE_OPERATOR(SpillSortLocalState)
889
DECLARE_OPERATOR(LocalMergeSortLocalState)
890
DECLARE_OPERATOR(AggLocalState)
891
DECLARE_OPERATOR(BucketedAggLocalState)
892
DECLARE_OPERATOR(PartitionedAggLocalState)
893
DECLARE_OPERATOR(TableFunctionLocalState)
894
DECLARE_OPERATOR(ExchangeLocalState)
895
DECLARE_OPERATOR(RepeatLocalState)
896
DECLARE_OPERATOR(NestedLoopJoinProbeLocalState)
897
DECLARE_OPERATOR(AssertNumRowsLocalState)
898
DECLARE_OPERATOR(EmptySetLocalState)
899
DECLARE_OPERATOR(UnionSourceLocalState)
900
DECLARE_OPERATOR(MultiCastDataStreamSourceLocalState)
901
DECLARE_OPERATOR(PartitionSortSourceLocalState)
902
DECLARE_OPERATOR(SetSourceLocalState<true>)
903
DECLARE_OPERATOR(SetSourceLocalState<false>)
904
DECLARE_OPERATOR(DataGenLocalState)
905
DECLARE_OPERATOR(SchemaScanLocalState)
906
DECLARE_OPERATOR(MetaScanLocalState)
907
DECLARE_OPERATOR(LocalExchangeSourceLocalState)
908
DECLARE_OPERATOR(PartitionedHashJoinProbeLocalState)
909
DECLARE_OPERATOR(CacheSourceLocalState)
910
DECLARE_OPERATOR(RecCTESourceLocalState)
911
DECLARE_OPERATOR(RecCTEScanLocalState)
912
913
#ifdef BE_TEST
914
DECLARE_OPERATOR(MockLocalState)
915
DECLARE_OPERATOR(MockScanLocalState)
916
#endif
917
#undef DECLARE_OPERATOR
918
919
template class StreamingOperatorX<AssertNumRowsLocalState>;
920
template class StreamingOperatorX<SelectLocalState>;
921
922
template class StatefulOperatorX<HashJoinProbeLocalState>;
923
template class StatefulOperatorX<PartitionedHashJoinProbeLocalState>;
924
template class StatefulOperatorX<RepeatLocalState>;
925
template class StatefulOperatorX<MaterializationLocalState>;
926
template class StatefulOperatorX<StreamingAggLocalState>;
927
template class StatefulOperatorX<DistinctStreamingAggLocalState>;
928
template class StatefulOperatorX<NestedLoopJoinProbeLocalState>;
929
template class StatefulOperatorX<TableFunctionLocalState>;
930
931
template class PipelineXSinkLocalState<HashJoinSharedState>;
932
template class PipelineXSinkLocalState<PartitionedHashJoinSharedState>;
933
template class PipelineXSinkLocalState<SortSharedState>;
934
template class PipelineXSinkLocalState<SpillSortSharedState>;
935
template class PipelineXSinkLocalState<NestedLoopJoinSharedState>;
936
template class PipelineXSinkLocalState<AnalyticSharedState>;
937
template class PipelineXSinkLocalState<AggSharedState>;
938
template class PipelineXSinkLocalState<BucketedAggSharedState>;
939
template class PipelineXSinkLocalState<PartitionedAggSharedState>;
940
template class PipelineXSinkLocalState<FakeSharedState>;
941
template class PipelineXSinkLocalState<UnionSharedState>;
942
template class PipelineXSinkLocalState<PartitionSortNodeSharedState>;
943
template class PipelineXSinkLocalState<MultiCastSharedState>;
944
template class PipelineXSinkLocalState<SetSharedState>;
945
template class PipelineXSinkLocalState<LocalExchangeSharedState>;
946
template class PipelineXSinkLocalState<BasicSharedState>;
947
template class PipelineXSinkLocalState<DataQueueSharedState>;
948
template class PipelineXSinkLocalState<RecCTESharedState>;
949
950
template class PipelineXLocalState<HashJoinSharedState>;
951
template class PipelineXLocalState<PartitionedHashJoinSharedState>;
952
template class PipelineXLocalState<SortSharedState>;
953
template class PipelineXLocalState<SpillSortSharedState>;
954
template class PipelineXLocalState<NestedLoopJoinSharedState>;
955
template class PipelineXLocalState<AnalyticSharedState>;
956
template class PipelineXLocalState<AggSharedState>;
957
template class PipelineXLocalState<BucketedAggSharedState>;
958
template class PipelineXLocalState<PartitionedAggSharedState>;
959
template class PipelineXLocalState<FakeSharedState>;
960
template class PipelineXLocalState<UnionSharedState>;
961
template class PipelineXLocalState<DataQueueSharedState>;
962
template class PipelineXLocalState<MultiCastSharedState>;
963
template class PipelineXLocalState<PartitionSortNodeSharedState>;
964
template class PipelineXLocalState<SetSharedState>;
965
template class PipelineXLocalState<LocalExchangeSharedState>;
966
template class PipelineXLocalState<BasicSharedState>;
967
template class PipelineXLocalState<RecCTESharedState>;
968
969
template class AsyncWriterSink<doris::VFileResultWriter, ResultFileSinkOperatorX>;
970
template class AsyncWriterSink<doris::VJdbcTableWriter, JdbcTableSinkOperatorX>;
971
template class AsyncWriterSink<doris::VTabletWriter, OlapTableSinkOperatorX>;
972
template class AsyncWriterSink<doris::VTabletWriterV2, OlapTableSinkV2OperatorX>;
973
template class AsyncWriterSink<doris::VHiveTableWriter, HiveTableSinkOperatorX>;
974
template class AsyncWriterSink<doris::VIcebergDeleteSink, IcebergDeleteSinkOperatorX>;
975
template class AsyncWriterSink<doris::VIcebergMergeSink, IcebergMergeSinkOperatorX>;
976
template class AsyncWriterSink<doris::VMCTableWriter, MCTableSinkOperatorX>;
977
template class AsyncWriterSink<doris::VTVFTableWriter, TVFTableSinkOperatorX>;
978
979
#ifdef BE_TEST
980
template class OperatorX<DummyOperatorLocalState>;
981
template class DataSinkOperatorX<DummySinkLocalState>;
982
#endif
983
984
} // namespace doris