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 "common/status.h" |
21 | | #include "exec/common/util.hpp" |
22 | | #include "exec/exchange/local_exchange_sink_operator.h" |
23 | | #include "exec/exchange/local_exchange_source_operator.h" |
24 | | #include "exec/operator/aggregation_sink_operator.h" |
25 | | #include "exec/operator/aggregation_source_operator.h" |
26 | | #include "exec/operator/analytic_sink_operator.h" |
27 | | #include "exec/operator/analytic_source_operator.h" |
28 | | #include "exec/operator/assert_num_rows_operator.h" |
29 | | #include "exec/operator/blackhole_sink_operator.h" |
30 | | #include "exec/operator/bucketed_aggregation_sink_operator.h" |
31 | | #include "exec/operator/bucketed_aggregation_source_operator.h" |
32 | | #include "exec/operator/cache_sink_operator.h" |
33 | | #include "exec/operator/cache_source_operator.h" |
34 | | #include "exec/operator/datagen_operator.h" |
35 | | #include "exec/operator/dict_sink_operator.h" |
36 | | #include "exec/operator/distinct_streaming_aggregation_operator.h" |
37 | | #include "exec/operator/empty_set_operator.h" |
38 | | #include "exec/operator/exchange_sink_operator.h" |
39 | | #include "exec/operator/exchange_source_operator.h" |
40 | | #include "exec/operator/file_scan_operator.h" |
41 | | #include "exec/operator/group_commit_block_sink_operator.h" |
42 | | #include "exec/operator/group_commit_scan_operator.h" |
43 | | #include "exec/operator/hashjoin_build_sink.h" |
44 | | #include "exec/operator/hashjoin_probe_operator.h" |
45 | | #include "exec/operator/hive_table_sink_operator.h" |
46 | | #include "exec/operator/iceberg_delete_sink_operator.h" |
47 | | #include "exec/operator/iceberg_merge_sink_operator.h" |
48 | | #include "exec/operator/iceberg_table_sink_operator.h" |
49 | | #include "exec/operator/jdbc_scan_operator.h" |
50 | | #include "exec/operator/jdbc_table_sink_operator.h" |
51 | | #include "exec/operator/local_merge_sort_source_operator.h" |
52 | | #include "exec/operator/materialization_opertor.h" |
53 | | #include "exec/operator/maxcompute_table_sink_operator.h" |
54 | | #include "exec/operator/memory_scratch_sink_operator.h" |
55 | | #include "exec/operator/meta_scan_operator.h" |
56 | | #include "exec/operator/mock_operator.h" |
57 | | #include "exec/operator/mock_scan_operator.h" |
58 | | #include "exec/operator/multi_cast_data_stream_sink.h" |
59 | | #include "exec/operator/multi_cast_data_stream_source.h" |
60 | | #include "exec/operator/nested_loop_join_build_operator.h" |
61 | | #include "exec/operator/nested_loop_join_probe_operator.h" |
62 | | #include "exec/operator/olap_scan_operator.h" |
63 | | #include "exec/operator/olap_table_sink_operator.h" |
64 | | #include "exec/operator/olap_table_sink_v2_operator.h" |
65 | | #include "exec/operator/partition_sort_sink_operator.h" |
66 | | #include "exec/operator/partition_sort_source_operator.h" |
67 | | #include "exec/operator/partitioned_aggregation_sink_operator.h" |
68 | | #include "exec/operator/partitioned_aggregation_source_operator.h" |
69 | | #include "exec/operator/partitioned_hash_join_probe_operator.h" |
70 | | #include "exec/operator/partitioned_hash_join_sink_operator.h" |
71 | | #include "exec/operator/rec_cte_anchor_sink_operator.h" |
72 | | #include "exec/operator/rec_cte_scan_operator.h" |
73 | | #include "exec/operator/rec_cte_sink_operator.h" |
74 | | #include "exec/operator/rec_cte_source_operator.h" |
75 | | #include "exec/operator/repeat_operator.h" |
76 | | #include "exec/operator/result_file_sink_operator.h" |
77 | | #include "exec/operator/result_sink_operator.h" |
78 | | #include "exec/operator/schema_scan_operator.h" |
79 | | #include "exec/operator/select_operator.h" |
80 | | #include "exec/operator/set_probe_sink_operator.h" |
81 | | #include "exec/operator/set_sink_operator.h" |
82 | | #include "exec/operator/set_source_operator.h" |
83 | | #include "exec/operator/sort_sink_operator.h" |
84 | | #include "exec/operator/sort_source_operator.h" |
85 | | #include "exec/operator/spill_iceberg_table_sink_operator.h" |
86 | | #include "exec/operator/spill_sort_sink_operator.h" |
87 | | #include "exec/operator/spill_sort_source_operator.h" |
88 | | #include "exec/operator/streaming_aggregation_operator.h" |
89 | | #include "exec/operator/table_function_operator.h" |
90 | | #include "exec/operator/tvf_table_sink_operator.h" |
91 | | #include "exec/operator/union_sink_operator.h" |
92 | | #include "exec/operator/union_source_operator.h" |
93 | | #include "exec/pipeline/dependency.h" |
94 | | #include "exec/pipeline/pipeline.h" |
95 | | #include "exprs/vexpr.h" |
96 | | #include "exprs/vexpr_context.h" |
97 | | #include "runtime/runtime_profile.h" |
98 | | #include "runtime/runtime_profile_counter_names.h" |
99 | | #include "util/debug_util.h" |
100 | | #include "util/string_util.h" |
101 | | |
102 | | namespace doris { |
103 | | class RowDescriptor; |
104 | | class RuntimeState; |
105 | | } // namespace doris |
106 | | |
107 | | namespace doris { |
108 | | |
109 | 0 | Status OperatorBase::close(RuntimeState* state) { |
110 | 0 | if (_is_closed) { |
111 | 0 | return Status::OK(); |
112 | 0 | } |
113 | 0 | _is_closed = true; |
114 | 0 | return Status::OK(); |
115 | 0 | } |
116 | | |
117 | | template <typename SharedStateArg> |
118 | 361k | std::string PipelineXLocalState<SharedStateArg>::name_suffix() const { |
119 | 361k | if (_parent->nereids_id() == -1) { |
120 | 188k | return fmt::format("(id={})", _parent->node_id()); |
121 | 188k | } else { |
122 | 172k | return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id()); |
123 | 172k | } |
124 | 361k | } _ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev Line | Count | Source | 118 | 30.2k | std::string PipelineXLocalState<SharedStateArg>::name_suffix() const { | 119 | 30.2k | if (_parent->nereids_id() == -1) { | 120 | 0 | return fmt::format("(id={})", _parent->node_id()); | 121 | 30.2k | } else { | 122 | 30.2k | return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id()); | 123 | 30.2k | } | 124 | 30.2k | } |
_ZNK5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE11name_suffixB5cxx11Ev Line | Count | Source | 118 | 1 | std::string PipelineXLocalState<SharedStateArg>::name_suffix() const { | 119 | 1 | if (_parent->nereids_id() == -1) { | 120 | 1 | return fmt::format("(id={})", _parent->node_id()); | 121 | 1 | } else { | 122 | 0 | return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id()); | 123 | 0 | } | 124 | 1 | } |
_ZNK5doris19PipelineXLocalStateINS_15SortSharedStateEE11name_suffixB5cxx11Ev Line | Count | Source | 118 | 80.4k | std::string PipelineXLocalState<SharedStateArg>::name_suffix() const { | 119 | 80.4k | if (_parent->nereids_id() == -1) { | 120 | 12 | return fmt::format("(id={})", _parent->node_id()); | 121 | 80.3k | } else { | 122 | 80.3k | return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id()); | 123 | 80.3k | } | 124 | 80.4k | } |
_ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev Line | Count | Source | 118 | 11 | std::string PipelineXLocalState<SharedStateArg>::name_suffix() const { | 119 | 11 | if (_parent->nereids_id() == -1) { | 120 | 0 | return fmt::format("(id={})", _parent->node_id()); | 121 | 11 | } else { | 122 | 11 | return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id()); | 123 | 11 | } | 124 | 11 | } |
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev Line | Count | Source | 118 | 3.41k | std::string PipelineXLocalState<SharedStateArg>::name_suffix() const { | 119 | 3.41k | if (_parent->nereids_id() == -1) { | 120 | 0 | return fmt::format("(id={})", _parent->node_id()); | 121 | 3.41k | } else { | 122 | 3.41k | return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id()); | 123 | 3.41k | } | 124 | 3.41k | } |
_ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev Line | Count | Source | 118 | 67 | std::string PipelineXLocalState<SharedStateArg>::name_suffix() const { | 119 | 67 | if (_parent->nereids_id() == -1) { | 120 | 9 | return fmt::format("(id={})", _parent->node_id()); | 121 | 58 | } else { | 122 | 58 | return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id()); | 123 | 58 | } | 124 | 67 | } |
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev Line | Count | Source | 118 | 42.8k | std::string PipelineXLocalState<SharedStateArg>::name_suffix() const { | 119 | 42.8k | if (_parent->nereids_id() == -1) { | 120 | 27 | return fmt::format("(id={})", _parent->node_id()); | 121 | 42.8k | } else { | 122 | 42.8k | return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id()); | 123 | 42.8k | } | 124 | 42.8k | } |
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev _ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev Line | Count | Source | 118 | 62 | std::string PipelineXLocalState<SharedStateArg>::name_suffix() const { | 119 | 62 | if (_parent->nereids_id() == -1) { | 120 | 0 | return fmt::format("(id={})", _parent->node_id()); | 121 | 62 | } else { | 122 | 62 | return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id()); | 123 | 62 | } | 124 | 62 | } |
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev Line | Count | Source | 118 | 62.3k | std::string PipelineXLocalState<SharedStateArg>::name_suffix() const { | 119 | 62.3k | if (_parent->nereids_id() == -1) { | 120 | 51.0k | return fmt::format("(id={})", _parent->node_id()); | 121 | 51.0k | } else { | 122 | 11.2k | return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id()); | 123 | 11.2k | } | 124 | 62.3k | } |
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev Line | Count | Source | 118 | 4.49k | std::string PipelineXLocalState<SharedStateArg>::name_suffix() const { | 119 | 4.49k | if (_parent->nereids_id() == -1) { | 120 | 2 | return fmt::format("(id={})", _parent->node_id()); | 121 | 4.49k | } else { | 122 | 4.49k | return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id()); | 123 | 4.49k | } | 124 | 4.49k | } |
_ZNK5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev Line | Count | Source | 118 | 3 | std::string PipelineXLocalState<SharedStateArg>::name_suffix() const { | 119 | 3 | if (_parent->nereids_id() == -1) { | 120 | 3 | return fmt::format("(id={})", _parent->node_id()); | 121 | 3 | } else { | 122 | 0 | return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id()); | 123 | 0 | } | 124 | 3 | } |
_ZNK5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev Line | Count | Source | 118 | 4.42k | std::string PipelineXLocalState<SharedStateArg>::name_suffix() const { | 119 | 4.42k | if (_parent->nereids_id() == -1) { | 120 | 4.42k | return fmt::format("(id={})", _parent->node_id()); | 121 | 4.42k | } else { | 122 | 0 | return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id()); | 123 | 0 | } | 124 | 4.42k | } |
_ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev Line | Count | Source | 118 | 102 | std::string PipelineXLocalState<SharedStateArg>::name_suffix() const { | 119 | 102 | if (_parent->nereids_id() == -1) { | 120 | 102 | return fmt::format("(id={})", _parent->node_id()); | 121 | 102 | } else { | 122 | 0 | return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id()); | 123 | 0 | } | 124 | 102 | } |
_ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev Line | Count | Source | 118 | 12 | std::string PipelineXLocalState<SharedStateArg>::name_suffix() const { | 119 | 12 | if (_parent->nereids_id() == -1) { | 120 | 12 | return fmt::format("(id={})", _parent->node_id()); | 121 | 12 | } else { | 122 | 0 | return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id()); | 123 | 0 | } | 124 | 12 | } |
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev Line | Count | Source | 118 | 132k | std::string PipelineXLocalState<SharedStateArg>::name_suffix() const { | 119 | 132k | if (_parent->nereids_id() == -1) { | 120 | 132k | return fmt::format("(id={})", _parent->node_id()); | 121 | 132k | } else { | 122 | 4 | return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id()); | 123 | 4 | } | 124 | 132k | } |
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev |
125 | | |
126 | | template <typename SharedStateArg> |
127 | 330k | std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() { |
128 | 330k | if (_parent->nereids_id() == -1) { |
129 | 124k | return fmt::format("(id={})", _parent->node_id()); |
130 | 206k | } else { |
131 | 206k | return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id()); |
132 | 206k | } |
133 | 330k | } _ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev Line | Count | Source | 127 | 78.2k | std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() { | 128 | 78.2k | if (_parent->nereids_id() == -1) { | 129 | 0 | return fmt::format("(id={})", _parent->node_id()); | 130 | 78.2k | } else { | 131 | 78.2k | return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id()); | 132 | 78.2k | } | 133 | 78.2k | } |
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE11name_suffixB5cxx11Ev Line | Count | Source | 127 | 2 | std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() { | 128 | 2 | if (_parent->nereids_id() == -1) { | 129 | 1 | return fmt::format("(id={})", _parent->node_id()); | 130 | 1 | } else { | 131 | 1 | return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id()); | 132 | 1 | } | 133 | 2 | } |
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE11name_suffixB5cxx11Ev Line | Count | Source | 127 | 80.4k | std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() { | 128 | 80.4k | if (_parent->nereids_id() == -1) { | 129 | 9 | return fmt::format("(id={})", _parent->node_id()); | 130 | 80.3k | } else { | 131 | 80.3k | return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id()); | 132 | 80.3k | } | 133 | 80.4k | } |
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev Line | Count | Source | 127 | 17 | std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() { | 128 | 17 | if (_parent->nereids_id() == -1) { | 129 | 0 | return fmt::format("(id={})", _parent->node_id()); | 130 | 17 | } else { | 131 | 17 | return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id()); | 132 | 17 | } | 133 | 17 | } |
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev Line | Count | Source | 127 | 3.41k | std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() { | 128 | 3.41k | if (_parent->nereids_id() == -1) { | 129 | 0 | return fmt::format("(id={})", _parent->node_id()); | 130 | 3.41k | } else { | 131 | 3.41k | return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id()); | 132 | 3.41k | } | 133 | 3.41k | } |
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev Line | Count | Source | 127 | 67 | std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() { | 128 | 67 | if (_parent->nereids_id() == -1) { | 129 | 9 | return fmt::format("(id={})", _parent->node_id()); | 130 | 58 | } else { | 131 | 58 | return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id()); | 132 | 58 | } | 133 | 67 | } |
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev Line | Count | Source | 127 | 42.8k | std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() { | 128 | 42.8k | if (_parent->nereids_id() == -1) { | 129 | 27 | return fmt::format("(id={})", _parent->node_id()); | 130 | 42.8k | } else { | 131 | 42.8k | return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id()); | 132 | 42.8k | } | 133 | 42.8k | } |
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev _ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev Line | Count | Source | 127 | 72 | std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() { | 128 | 72 | if (_parent->nereids_id() == -1) { | 129 | 0 | return fmt::format("(id={})", _parent->node_id()); | 130 | 72 | } else { | 131 | 72 | return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id()); | 132 | 72 | } | 133 | 72 | } |
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev Line | Count | Source | 127 | 80 | std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() { | 128 | 80 | if (_parent->nereids_id() == -1) { | 129 | 80 | return fmt::format("(id={})", _parent->node_id()); | 130 | 80 | } else { | 131 | 0 | return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id()); | 132 | 0 | } | 133 | 80 | } |
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev Line | Count | Source | 127 | 1.30k | std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() { | 128 | 1.30k | if (_parent->nereids_id() == -1) { | 129 | 3 | return fmt::format("(id={})", _parent->node_id()); | 130 | 1.30k | } else { | 131 | 1.30k | return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id()); | 132 | 1.30k | } | 133 | 1.30k | } |
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev Line | Count | Source | 127 | 102 | std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() { | 128 | 102 | if (_parent->nereids_id() == -1) { | 129 | 102 | return fmt::format("(id={})", _parent->node_id()); | 130 | 102 | } else { | 131 | 0 | return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id()); | 132 | 0 | } | 133 | 102 | } |
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev _ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev Line | Count | Source | 127 | 27 | std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() { | 128 | 27 | if (_parent->nereids_id() == -1) { | 129 | 27 | return fmt::format("(id={})", _parent->node_id()); | 130 | 27 | } else { | 131 | 0 | return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id()); | 132 | 0 | } | 133 | 27 | } |
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev Line | Count | Source | 127 | 37.2k | std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() { | 128 | 37.2k | if (_parent->nereids_id() == -1) { | 129 | 37.2k | return fmt::format("(id={})", _parent->node_id()); | 130 | 37.2k | } else { | 131 | 0 | return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id()); | 132 | 0 | } | 133 | 37.2k | } |
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev Line | Count | Source | 127 | 86.8k | std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() { | 128 | 86.8k | if (_parent->nereids_id() == -1) { | 129 | 86.7k | return fmt::format("(id={})", _parent->node_id()); | 130 | 86.7k | } else { | 131 | 114 | return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id()); | 132 | 114 | } | 133 | 86.8k | } |
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev Line | Count | Source | 127 | 3 | std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() { | 128 | 3 | if (_parent->nereids_id() == -1) { | 129 | 3 | return fmt::format("(id={})", _parent->node_id()); | 130 | 3 | } else { | 131 | 0 | return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id()); | 132 | 0 | } | 133 | 3 | } |
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev |
134 | | |
135 | | template <typename SharedStateArg> |
136 | 25.7k | Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) { |
137 | 25.7k | if (_terminated) { |
138 | 0 | return Status::OK(); |
139 | 0 | } |
140 | 25.7k | _terminated = true; |
141 | 25.7k | return Status::OK(); |
142 | 25.7k | } _ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE Line | Count | Source | 136 | 24.0k | Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) { | 137 | 24.0k | if (_terminated) { | 138 | 0 | return Status::OK(); | 139 | 0 | } | 140 | 24.0k | _terminated = true; | 141 | 24.0k | return Status::OK(); | 142 | 24.0k | } |
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE _ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE Line | Count | Source | 136 | 118 | Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) { | 137 | 118 | if (_terminated) { | 138 | 0 | return Status::OK(); | 139 | 0 | } | 140 | 118 | _terminated = true; | 141 | 118 | return Status::OK(); | 142 | 118 | } |
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE _ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE Line | Count | Source | 136 | 4 | Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) { | 137 | 4 | if (_terminated) { | 138 | 0 | return Status::OK(); | 139 | 0 | } | 140 | 4 | _terminated = true; | 141 | 4 | return Status::OK(); | 142 | 4 | } |
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE Line | Count | Source | 136 | 4 | Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) { | 137 | 4 | if (_terminated) { | 138 | 0 | return Status::OK(); | 139 | 0 | } | 140 | 4 | _terminated = true; | 141 | 4 | return Status::OK(); | 142 | 4 | } |
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE Line | Count | Source | 136 | 1.36k | Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) { | 137 | 1.36k | if (_terminated) { | 138 | 0 | return Status::OK(); | 139 | 0 | } | 140 | 1.36k | _terminated = true; | 141 | 1.36k | return Status::OK(); | 142 | 1.36k | } |
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE _ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE Line | Count | Source | 136 | 100 | Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) { | 137 | 100 | if (_terminated) { | 138 | 0 | return Status::OK(); | 139 | 0 | } | 140 | 100 | _terminated = true; | 141 | 100 | return Status::OK(); | 142 | 100 | } |
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE _ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE Line | Count | Source | 136 | 128 | Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) { | 137 | 128 | if (_terminated) { | 138 | 0 | return Status::OK(); | 139 | 0 | } | 140 | 128 | _terminated = true; | 141 | 128 | return Status::OK(); | 142 | 128 | } |
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE |
143 | | |
144 | 196k | DataDistribution OperatorBase::required_data_distribution(RuntimeState* /*state*/) const { |
145 | 196k | return _child && _child->is_serial_operator() && !is_source() |
146 | 196k | ? DataDistribution(ExchangeType::PASSTHROUGH) |
147 | 196k | : DataDistribution(ExchangeType::NOOP); |
148 | 196k | } |
149 | | |
150 | 72.8k | const RowDescriptor& OperatorBase::row_desc() const { |
151 | 72.8k | return _child->row_desc(); |
152 | 72.8k | } |
153 | | |
154 | | template <typename SharedStateArg> |
155 | 20.2k | std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const { |
156 | 20.2k | fmt::memory_buffer debug_string_buffer; |
157 | 20.2k | fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level)); |
158 | 20.2k | return fmt::to_string(debug_string_buffer); |
159 | 20.2k | } Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei _ZNK5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei Line | Count | Source | 155 | 3 | std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const { | 156 | 3 | fmt::memory_buffer debug_string_buffer; | 157 | 3 | fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level)); | 158 | 3 | return fmt::to_string(debug_string_buffer); | 159 | 3 | } |
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei _ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei Line | Count | Source | 155 | 20.2k | std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const { | 156 | 20.2k | fmt::memory_buffer debug_string_buffer; | 157 | 20.2k | fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level)); | 158 | 20.2k | return fmt::to_string(debug_string_buffer); | 159 | 20.2k | } |
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE12debug_stringB5cxx11Ei Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE12debug_stringB5cxx11Ei Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE12debug_stringB5cxx11Ei Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE12debug_stringB5cxx11Ei Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE12debug_stringB5cxx11Ei Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei |
160 | | |
161 | | template <typename SharedStateArg> |
162 | 20.2k | std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const { |
163 | 20.2k | fmt::memory_buffer debug_string_buffer; |
164 | 20.2k | fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level)); |
165 | 20.2k | return fmt::to_string(debug_string_buffer); |
166 | 20.2k | } Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE12debug_stringB5cxx11Ei Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE12debug_stringB5cxx11Ei Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE12debug_stringB5cxx11Ei Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE12debug_stringB5cxx11Ei Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE12debug_stringB5cxx11Ei _ZNK5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei Line | Count | Source | 162 | 20.2k | std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const { | 163 | 20.2k | fmt::memory_buffer debug_string_buffer; | 164 | 20.2k | fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level)); | 165 | 20.2k | return fmt::to_string(debug_string_buffer); | 166 | 20.2k | } |
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei |
167 | | |
168 | 20.2k | std::string OperatorXBase::debug_string(int indentation_level) const { |
169 | 20.2k | fmt::memory_buffer debug_string_buffer; |
170 | 20.2k | fmt::format_to(debug_string_buffer, "{}{}: id={}, parallel_tasks={}, _is_serial_operator={}", |
171 | 20.2k | std::string(indentation_level * 2, ' '), _op_name, node_id(), _parallel_tasks, |
172 | 20.2k | _is_serial_operator); |
173 | 20.2k | return fmt::to_string(debug_string_buffer); |
174 | 20.2k | } |
175 | | |
176 | 20.2k | std::string OperatorXBase::debug_string(RuntimeState* state, int indentation_level) const { |
177 | 20.2k | return state->get_local_state(operator_id())->debug_string(indentation_level); |
178 | 20.2k | } |
179 | | |
180 | 179k | Status OperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) { |
181 | 179k | std::string node_name = print_plan_node_type(tnode.node_type); |
182 | 179k | _nereids_id = tnode.nereids_id; |
183 | 179k | if (!tnode.intermediate_output_tuple_id_list.empty()) { |
184 | 652 | if (!tnode.__isset.output_tuple_id) { |
185 | 0 | return Status::InternalError("no final output tuple id"); |
186 | 0 | } |
187 | 652 | if (tnode.intermediate_output_tuple_id_list.size() != |
188 | 652 | tnode.intermediate_projections_list.size()) { |
189 | 0 | return Status::InternalError( |
190 | 0 | "intermediate_output_tuple_id_list size:{} not match " |
191 | 0 | "intermediate_projections_list size:{}", |
192 | 0 | tnode.intermediate_output_tuple_id_list.size(), |
193 | 0 | tnode.intermediate_projections_list.size()); |
194 | 0 | } |
195 | 652 | } |
196 | 179k | auto substr = node_name.substr(0, node_name.find("_NODE")); |
197 | 179k | _op_name = substr + "_OPERATOR"; |
198 | | |
199 | 179k | if (tnode.__isset.vconjunct) { |
200 | 0 | return Status::InternalError("vconjunct is not supported yet"); |
201 | 179k | } else if (tnode.__isset.conjuncts) { |
202 | 187k | for (const auto& conjunct : tnode.conjuncts) { |
203 | 187k | VExprContextSPtr context; |
204 | 187k | RETURN_IF_ERROR(VExpr::create_expr_tree(conjunct, context)); |
205 | 187k | _conjuncts.emplace_back(context); |
206 | 187k | } |
207 | 53.8k | } |
208 | | |
209 | | // create the projections expr |
210 | 179k | if (tnode.__isset.projections) { |
211 | 98.5k | DCHECK(tnode.__isset.output_tuple_id); |
212 | 98.5k | RETURN_IF_ERROR(VExpr::create_expr_trees(tnode.projections, _projections)); |
213 | 98.5k | } |
214 | 179k | if (!tnode.intermediate_projections_list.empty()) { |
215 | 652 | DCHECK(tnode.__isset.projections) << "no final projections"; |
216 | 652 | _intermediate_projections.reserve(tnode.intermediate_projections_list.size()); |
217 | 2.97k | for (const auto& tnode_projections : tnode.intermediate_projections_list) { |
218 | 2.97k | VExprContextSPtrs projections; |
219 | 2.97k | RETURN_IF_ERROR(VExpr::create_expr_trees(tnode_projections, projections)); |
220 | 2.97k | _intermediate_projections.push_back(projections); |
221 | 2.97k | } |
222 | 652 | } |
223 | 179k | return Status::OK(); |
224 | 179k | } |
225 | | |
226 | 208k | Status OperatorXBase::prepare(RuntimeState* state) { |
227 | 208k | for (auto& conjunct : _conjuncts) { |
228 | 187k | RETURN_IF_ERROR(conjunct->prepare(state, intermediate_row_desc())); |
229 | 187k | } |
230 | 208k | if (state->enable_adjust_conjunct_order_by_cost()) { |
231 | 265k | std::ranges::sort(_conjuncts, [](const auto& a, const auto& b) { |
232 | 265k | return a->execute_cost() < b->execute_cost(); |
233 | 265k | }); |
234 | 159k | }; |
235 | | |
236 | 211k | for (int i = 0; i < _intermediate_projections.size(); i++) { |
237 | 2.97k | RETURN_IF_ERROR( |
238 | 2.97k | VExpr::prepare(_intermediate_projections[i], state, intermediate_row_desc(i))); |
239 | 2.97k | } |
240 | 208k | RETURN_IF_ERROR(VExpr::prepare(_projections, state, projections_row_desc())); |
241 | | |
242 | 208k | if (has_output_row_desc()) { |
243 | 98.5k | RETURN_IF_ERROR(VExpr::check_expr_output_type(_projections, *_output_row_descriptor)); |
244 | 98.5k | } |
245 | | |
246 | 208k | for (auto& conjunct : _conjuncts) { |
247 | 186k | RETURN_IF_ERROR(conjunct->open(state)); |
248 | 186k | } |
249 | 208k | RETURN_IF_ERROR(VExpr::open(_projections, state)); |
250 | 208k | for (auto& projections : _intermediate_projections) { |
251 | 2.97k | RETURN_IF_ERROR(VExpr::open(projections, state)); |
252 | 2.97k | } |
253 | 208k | if (_child && !is_source()) { |
254 | 32.5k | RETURN_IF_ERROR(_child->prepare(state)); |
255 | 32.5k | } |
256 | | |
257 | 208k | if (VExpr::contains_blockable_function(_conjuncts) || |
258 | 208k | VExpr::contains_blockable_function(_projections)) { |
259 | 0 | _blockable = true; |
260 | 0 | } |
261 | | |
262 | 208k | return Status::OK(); |
263 | 208k | } |
264 | | |
265 | 1.95k | Status OperatorXBase::terminate(RuntimeState* state) { |
266 | 1.95k | if (_child && !is_source()) { |
267 | 236 | RETURN_IF_ERROR(_child->terminate(state)); |
268 | 236 | } |
269 | 1.95k | auto result = state->get_local_state_result(operator_id()); |
270 | 1.95k | if (!result) { |
271 | 0 | return result.error(); |
272 | 0 | } |
273 | 1.95k | return result.value()->terminate(state); |
274 | 1.95k | } |
275 | | |
276 | 901k | Status OperatorXBase::close(RuntimeState* state) { |
277 | 901k | if (_child && !is_source()) { |
278 | 62.5k | RETURN_IF_ERROR(_child->close(state)); |
279 | 62.5k | } |
280 | 901k | auto result = state->get_local_state_result(operator_id()); |
281 | 901k | if (!result) { |
282 | 0 | return result.error(); |
283 | 0 | } |
284 | 901k | return result.value()->close(state); |
285 | 901k | } |
286 | | |
287 | 35.3k | void PipelineXLocalStateBase::clear_origin_block() { |
288 | 35.3k | _origin_block.clear_column_data(_parent->intermediate_row_desc().num_materialized_slots()); |
289 | 35.3k | } |
290 | | |
291 | 62.7k | Status PipelineXLocalStateBase::filter_block(const VExprContextSPtrs& expr_contexts, Block* block) { |
292 | 62.7k | RETURN_IF_ERROR(VExprContext::filter_block(expr_contexts, block, block->columns())); |
293 | | |
294 | 62.7k | _estimate_memory_usage += VExprContext::get_memory_usage(expr_contexts); |
295 | 62.7k | return Status::OK(); |
296 | 62.7k | } |
297 | | |
298 | 0 | bool PipelineXLocalStateBase::is_blockable() const { |
299 | 0 | return std::any_of(_projections.begin(), _projections.end(), |
300 | 0 | [&](VExprContextSPtr expr) -> bool { return expr->is_blockable(); }); |
301 | 0 | } |
302 | | |
303 | | Status OperatorXBase::do_projections(RuntimeState* state, Block* origin_block, |
304 | 35.3k | Block* output_block) const { |
305 | 35.3k | auto* local_state = state->get_local_state(operator_id()); |
306 | 35.3k | SCOPED_TIMER(local_state->exec_time_counter()); |
307 | 35.3k | SCOPED_TIMER(local_state->_projection_timer); |
308 | 35.3k | const size_t rows = origin_block->rows(); |
309 | 35.3k | if (rows == 0) { |
310 | 15.6k | return Status::OK(); |
311 | 15.6k | } |
312 | 19.6k | Block input_block = *origin_block; |
313 | | |
314 | 19.6k | size_t bytes_usage = 0; |
315 | 19.6k | ColumnsWithTypeAndName new_columns; |
316 | 19.6k | for (const auto& projections : local_state->_intermediate_projections) { |
317 | 242 | if (projections.empty()) { |
318 | 0 | return Status::InternalError("meet empty intermediate projection, node id: {}", |
319 | 0 | node_id()); |
320 | 0 | } |
321 | 242 | new_columns.resize(projections.size()); |
322 | 2.43k | for (int i = 0; i < projections.size(); i++) { |
323 | 2.18k | RETURN_IF_ERROR(projections[i]->execute(&input_block, new_columns[i])); |
324 | 2.18k | if (new_columns[i].column->size() != rows) { |
325 | 0 | return Status::InternalError( |
326 | 0 | "intermediate projection result column size {} not equal input rows {}, " |
327 | 0 | "expr: {}", |
328 | 0 | new_columns[i].column->size(), rows, |
329 | 0 | projections[i]->root()->debug_string()); |
330 | 0 | } |
331 | 2.18k | } |
332 | 242 | Block tmp_block {new_columns}; |
333 | 242 | bytes_usage += tmp_block.allocated_bytes(); |
334 | 242 | input_block.swap(tmp_block); |
335 | 242 | } |
336 | | |
337 | 19.6k | if (input_block.rows() != rows) { |
338 | 0 | return Status::InternalError( |
339 | 0 | "after intermediate projections input block rows {} not equal origin rows {}, " |
340 | 0 | "input_block: {}", |
341 | 0 | input_block.rows(), rows, input_block.dump_structure()); |
342 | 0 | } |
343 | 107k | auto insert_column_datas = [&](auto& to, ColumnPtr& from, size_t rows) { |
344 | 107k | if (to->is_nullable() && !from->is_nullable()) { |
345 | 0 | if (_keep_origin || !from->is_exclusive()) { |
346 | 0 | auto& null_column = reinterpret_cast<ColumnNullable&>(*to); |
347 | 0 | null_column.get_nested_column().insert_range_from(*from, 0, rows); |
348 | 0 | null_column.get_null_map_column().get_data().resize_fill(rows, 0); |
349 | 0 | bytes_usage += null_column.allocated_bytes(); |
350 | 0 | } else { |
351 | 0 | to = make_nullable(from, false)->assume_mutable(); |
352 | 0 | } |
353 | 107k | } else { |
354 | 107k | if (_keep_origin || !from->is_exclusive()) { |
355 | 106k | to->insert_range_from(*from, 0, rows); |
356 | 106k | bytes_usage += from->allocated_bytes(); |
357 | 106k | } else { |
358 | 1.45k | to = from->assume_mutable(); |
359 | 1.45k | } |
360 | 107k | } |
361 | 107k | }; |
362 | | |
363 | 19.6k | MutableBlock mutable_block = |
364 | 19.6k | VectorizedUtils::build_mutable_mem_reuse_block(output_block, *_output_row_descriptor); |
365 | 19.6k | if (rows != 0) { |
366 | 19.6k | auto& mutable_columns = mutable_block.mutable_columns(); |
367 | 19.6k | DCHECK_EQ(mutable_columns.size(), local_state->_projections.size()) << debug_string(); |
368 | 127k | for (int i = 0; i < mutable_columns.size(); ++i) { |
369 | 107k | ColumnPtr column_ptr; |
370 | 107k | RETURN_IF_ERROR(local_state->_projections[i]->execute(&input_block, column_ptr)); |
371 | 107k | if (column_ptr->size() != rows) { |
372 | 0 | return Status::InternalError( |
373 | 0 | "projection result column size {} not equal input rows {}, expr: {}", |
374 | 0 | column_ptr->size(), rows, |
375 | 0 | local_state->_projections[i]->root()->debug_string()); |
376 | 0 | } |
377 | 107k | column_ptr = column_ptr->convert_to_full_column_if_const(); |
378 | 107k | bytes_usage += column_ptr->allocated_bytes(); |
379 | 107k | insert_column_datas(mutable_columns[i], column_ptr, rows); |
380 | 107k | } |
381 | 19.6k | DCHECK(mutable_block.rows() == rows); |
382 | 19.6k | output_block->set_columns(std::move(mutable_columns)); |
383 | 19.6k | } |
384 | | |
385 | 19.6k | local_state->_estimate_memory_usage += bytes_usage; |
386 | | |
387 | 19.6k | return Status::OK(); |
388 | 19.6k | } |
389 | | |
390 | 2.18M | Status OperatorXBase::get_block_after_projects(RuntimeState* state, Block* block, bool* eos) { |
391 | 2.18M | DBUG_EXECUTE_IF("Pipeline::return_empty_block", { |
392 | 2.18M | if (this->_op_name == "AGGREGATION_OPERATOR" || this->_op_name == "HASH_JOIN_OPERATOR" || |
393 | 2.18M | this->_op_name == "PARTITIONED_AGGREGATION_OPERATOR" || |
394 | 2.18M | this->_op_name == "PARTITIONED_HASH_JOIN_OPERATOR" || |
395 | 2.18M | this->_op_name == "CROSS_JOIN_OPERATOR" || this->_op_name == "SORT_OPERATOR") { |
396 | 2.18M | if (_debug_point_count++ % 2 == 0) { |
397 | 2.18M | return Status::OK(); |
398 | 2.18M | } |
399 | 2.18M | } |
400 | 2.18M | }); |
401 | | |
402 | 2.18M | Status status; |
403 | 2.18M | auto* local_state = state->get_local_state(operator_id()); |
404 | 2.18M | Defer defer([&]() { |
405 | 2.18M | if (status.ok()) { |
406 | 2.18M | local_state->update_output_block_counters(*block); |
407 | 2.18M | } |
408 | 2.18M | }); |
409 | 2.18M | if (_output_row_descriptor) { |
410 | 35.3k | local_state->clear_origin_block(); |
411 | 35.3k | status = get_block(state, &local_state->_origin_block, eos); |
412 | 35.3k | if (UNLIKELY(!status.ok())) { |
413 | 0 | return status; |
414 | 0 | } |
415 | 35.3k | status = do_projections(state, &local_state->_origin_block, block); |
416 | 35.3k | return status; |
417 | 35.3k | } |
418 | 2.14M | status = get_block(state, block, eos); |
419 | 2.14M | RETURN_IF_ERROR(block->check_type_and_column()); |
420 | 2.14M | return status; |
421 | 2.14M | } |
422 | | |
423 | 817k | void PipelineXLocalStateBase::reached_limit(Block* block, bool* eos) { |
424 | 817k | if (_parent->_limit != -1 and _num_rows_returned + block->rows() >= _parent->_limit) { |
425 | 2.98k | block->set_num_rows(_parent->_limit - _num_rows_returned); |
426 | 2.98k | *eos = true; |
427 | 2.98k | } |
428 | | |
429 | 817k | DBUG_EXECUTE_IF("Pipeline::reached_limit_early", { |
430 | 817k | auto op_name = to_lower(_parent->_op_name); |
431 | 817k | auto arg_op_name = dp->param<std::string>("op_name"); |
432 | 817k | arg_op_name = to_lower(arg_op_name); |
433 | | |
434 | 817k | if (op_name == arg_op_name) { |
435 | 817k | *eos = true; |
436 | 817k | } |
437 | 817k | }); |
438 | | |
439 | 817k | if (auto rows = block->rows()) { |
440 | 182k | _num_rows_returned += rows; |
441 | 182k | _state->get_query_ctx()->resource_ctx()->io_context()->update_process_rows(rows); |
442 | 182k | } |
443 | 817k | } |
444 | | |
445 | 25.7k | Status DataSinkOperatorXBase::terminate(RuntimeState* state) { |
446 | 25.7k | auto result = state->get_sink_local_state_result(); |
447 | 25.7k | if (!result) { |
448 | 0 | return result.error(); |
449 | 0 | } |
450 | 25.7k | return result.value()->terminate(state); |
451 | 25.7k | } |
452 | | |
453 | 20.2k | std::string DataSinkOperatorXBase::debug_string(int indentation_level) const { |
454 | 20.2k | fmt::memory_buffer debug_string_buffer; |
455 | | |
456 | 20.2k | fmt::format_to(debug_string_buffer, "{}{}: id={}, _is_serial_operator={}", |
457 | 20.2k | std::string(indentation_level * 2, ' '), _name, node_id(), _is_serial_operator); |
458 | 20.2k | return fmt::to_string(debug_string_buffer); |
459 | 20.2k | } |
460 | | |
461 | 20.2k | std::string DataSinkOperatorXBase::debug_string(RuntimeState* state, int indentation_level) const { |
462 | 20.2k | return state->get_sink_local_state()->debug_string(indentation_level); |
463 | 20.2k | } |
464 | | |
465 | 114k | Status DataSinkOperatorXBase::init(const TDataSink& tsink) { |
466 | 114k | std::string op_name = "UNKNOWN_SINK"; |
467 | 114k | auto it = _TDataSinkType_VALUES_TO_NAMES.find(tsink.type); |
468 | | |
469 | 114k | if (it != _TDataSinkType_VALUES_TO_NAMES.end()) { |
470 | 114k | op_name = it->second; |
471 | 114k | } |
472 | 114k | _name = op_name + "_OPERATOR"; |
473 | 114k | return Status::OK(); |
474 | 114k | } |
475 | | |
476 | 109k | Status DataSinkOperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) { |
477 | 109k | std::string op_name = print_plan_node_type(tnode.node_type); |
478 | 109k | _nereids_id = tnode.nereids_id; |
479 | 109k | auto substr = op_name.substr(0, op_name.find("_NODE")); |
480 | 109k | _name = substr + "_SINK_OPERATOR"; |
481 | 109k | return Status::OK(); |
482 | 109k | } |
483 | | |
484 | | template <typename LocalStateType> |
485 | | Status DataSinkOperatorX<LocalStateType>::setup_local_state(RuntimeState* state, |
486 | 473k | LocalSinkStateInfo& info) { |
487 | 473k | auto local_state = LocalStateType::create_unique(this, state); |
488 | 473k | RETURN_IF_ERROR(local_state->init(state, info)); |
489 | 473k | state->emplace_sink_local_state(operator_id(), std::move(local_state)); |
490 | 473k | return Status::OK(); |
491 | 473k | } _ZN5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE Line | Count | Source | 486 | 78.2k | LocalSinkStateInfo& info) { | 487 | 78.2k | auto local_state = LocalStateType::create_unique(this, state); | 488 | 78.2k | RETURN_IF_ERROR(local_state->init(state, info)); | 489 | 78.2k | state->emplace_sink_local_state(operator_id(), std::move(local_state)); | 490 | 78.2k | return Status::OK(); | 491 | 78.2k | } |
_ZN5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE Line | Count | Source | 486 | 70.3k | LocalSinkStateInfo& info) { | 487 | 70.3k | auto local_state = LocalStateType::create_unique(this, state); | 488 | 70.3k | RETURN_IF_ERROR(local_state->init(state, info)); | 489 | 70.3k | state->emplace_sink_local_state(operator_id(), std::move(local_state)); | 490 | 70.3k | return Status::OK(); | 491 | 70.3k | } |
_ZN5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE Line | Count | Source | 486 | 88 | LocalSinkStateInfo& info) { | 487 | 88 | auto local_state = LocalStateType::create_unique(this, state); | 488 | 88 | RETURN_IF_ERROR(local_state->init(state, info)); | 489 | 88 | state->emplace_sink_local_state(operator_id(), std::move(local_state)); | 490 | 88 | return Status::OK(); | 491 | 88 | } |
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE _ZN5doris17DataSinkOperatorXINS_24ResultFileSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE Line | Count | Source | 486 | 164 | LocalSinkStateInfo& info) { | 487 | 164 | auto local_state = LocalStateType::create_unique(this, state); | 488 | 164 | RETURN_IF_ERROR(local_state->init(state, info)); | 489 | 164 | state->emplace_sink_local_state(operator_id(), std::move(local_state)); | 490 | 164 | return Status::OK(); | 491 | 164 | } |
_ZN5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE Line | Count | Source | 486 | 1.16k | LocalSinkStateInfo& info) { | 487 | 1.16k | auto local_state = LocalStateType::create_unique(this, state); | 488 | 1.16k | RETURN_IF_ERROR(local_state->init(state, info)); | 489 | 1.16k | state->emplace_sink_local_state(operator_id(), std::move(local_state)); | 490 | 1.16k | return Status::OK(); | 491 | 1.16k | } |
_ZN5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE Line | Count | Source | 486 | 5.65k | LocalSinkStateInfo& info) { | 487 | 5.65k | auto local_state = LocalStateType::create_unique(this, state); | 488 | 5.65k | RETURN_IF_ERROR(local_state->init(state, info)); | 489 | 5.65k | state->emplace_sink_local_state(operator_id(), std::move(local_state)); | 490 | 5.65k | return Status::OK(); | 491 | 5.65k | } |
_ZN5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE Line | Count | Source | 486 | 5.14k | LocalSinkStateInfo& info) { | 487 | 5.14k | auto local_state = LocalStateType::create_unique(this, state); | 488 | 5.14k | RETURN_IF_ERROR(local_state->init(state, info)); | 489 | 5.14k | state->emplace_sink_local_state(operator_id(), std::move(local_state)); | 490 | 5.14k | return Status::OK(); | 491 | 5.14k | } |
_ZN5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE Line | Count | Source | 486 | 156 | LocalSinkStateInfo& info) { | 487 | 156 | auto local_state = LocalStateType::create_unique(this, state); | 488 | 156 | RETURN_IF_ERROR(local_state->init(state, info)); | 489 | 156 | state->emplace_sink_local_state(operator_id(), std::move(local_state)); | 490 | 156 | return Status::OK(); | 491 | 156 | } |
_ZN5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE Line | Count | Source | 486 | 3.38k | LocalSinkStateInfo& info) { | 487 | 3.38k | auto local_state = LocalStateType::create_unique(this, state); | 488 | 3.38k | RETURN_IF_ERROR(local_state->init(state, info)); | 489 | 3.38k | state->emplace_sink_local_state(operator_id(), std::move(local_state)); | 490 | 3.38k | return Status::OK(); | 491 | 3.38k | } |
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE _ZN5doris17DataSinkOperatorXINS_27IcebergDeleteSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE Line | Count | Source | 486 | 160 | LocalSinkStateInfo& info) { | 487 | 160 | auto local_state = LocalStateType::create_unique(this, state); | 488 | 160 | RETURN_IF_ERROR(local_state->init(state, info)); | 489 | 160 | state->emplace_sink_local_state(operator_id(), std::move(local_state)); | 490 | 160 | return Status::OK(); | 491 | 160 | } |
_ZN5doris17DataSinkOperatorXINS_26IcebergMergeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE Line | Count | Source | 486 | 640 | LocalSinkStateInfo& info) { | 487 | 640 | auto local_state = LocalStateType::create_unique(this, state); | 488 | 640 | RETURN_IF_ERROR(local_state->init(state, info)); | 489 | 640 | state->emplace_sink_local_state(operator_id(), std::move(local_state)); | 490 | 640 | return Status::OK(); | 491 | 640 | } |
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_21MCTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE _ZN5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE Line | Count | Source | 486 | 58 | LocalSinkStateInfo& info) { | 487 | 58 | auto local_state = LocalStateType::create_unique(this, state); | 488 | 58 | RETURN_IF_ERROR(local_state->init(state, info)); | 489 | 58 | state->emplace_sink_local_state(operator_id(), std::move(local_state)); | 490 | 58 | return Status::OK(); | 491 | 58 | } |
_ZN5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE Line | Count | Source | 486 | 80 | LocalSinkStateInfo& info) { | 487 | 80 | auto local_state = LocalStateType::create_unique(this, state); | 488 | 80 | RETURN_IF_ERROR(local_state->init(state, info)); | 489 | 80 | state->emplace_sink_local_state(operator_id(), std::move(local_state)); | 490 | 80 | return Status::OK(); | 491 | 80 | } |
_ZN5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE Line | Count | Source | 486 | 80.3k | LocalSinkStateInfo& info) { | 487 | 80.3k | auto local_state = LocalStateType::create_unique(this, state); | 488 | 80.3k | RETURN_IF_ERROR(local_state->init(state, info)); | 489 | 80.3k | state->emplace_sink_local_state(operator_id(), std::move(local_state)); | 490 | 80.3k | return Status::OK(); | 491 | 80.3k | } |
_ZN5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE Line | Count | Source | 486 | 17 | LocalSinkStateInfo& info) { | 487 | 17 | auto local_state = LocalStateType::create_unique(this, state); | 488 | 17 | RETURN_IF_ERROR(local_state->init(state, info)); | 489 | 17 | state->emplace_sink_local_state(operator_id(), std::move(local_state)); | 490 | 17 | return Status::OK(); | 491 | 17 | } |
_ZN5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE Line | Count | Source | 486 | 37.2k | LocalSinkStateInfo& info) { | 487 | 37.2k | auto local_state = LocalStateType::create_unique(this, state); | 488 | 37.2k | RETURN_IF_ERROR(local_state->init(state, info)); | 489 | 37.2k | state->emplace_sink_local_state(operator_id(), std::move(local_state)); | 490 | 37.2k | return Status::OK(); | 491 | 37.2k | } |
_ZN5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE Line | Count | Source | 486 | 42.8k | LocalSinkStateInfo& info) { | 487 | 42.8k | auto local_state = LocalStateType::create_unique(this, state); | 488 | 42.8k | RETURN_IF_ERROR(local_state->init(state, info)); | 489 | 42.8k | state->emplace_sink_local_state(operator_id(), std::move(local_state)); | 490 | 42.8k | return Status::OK(); | 491 | 42.8k | } |
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE _ZN5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE Line | Count | Source | 486 | 72 | LocalSinkStateInfo& info) { | 487 | 72 | auto local_state = LocalStateType::create_unique(this, state); | 488 | 72 | RETURN_IF_ERROR(local_state->init(state, info)); | 489 | 72 | state->emplace_sink_local_state(operator_id(), std::move(local_state)); | 490 | 72 | return Status::OK(); | 491 | 72 | } |
_ZN5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE Line | Count | Source | 486 | 141k | LocalSinkStateInfo& info) { | 487 | 141k | auto local_state = LocalStateType::create_unique(this, state); | 488 | 141k | RETURN_IF_ERROR(local_state->init(state, info)); | 489 | 141k | state->emplace_sink_local_state(operator_id(), std::move(local_state)); | 490 | 141k | return Status::OK(); | 491 | 141k | } |
_ZN5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE Line | Count | Source | 486 | 3.41k | LocalSinkStateInfo& info) { | 487 | 3.41k | auto local_state = LocalStateType::create_unique(this, state); | 488 | 3.41k | RETURN_IF_ERROR(local_state->init(state, info)); | 489 | 3.41k | state->emplace_sink_local_state(operator_id(), std::move(local_state)); | 490 | 3.41k | return Status::OK(); | 491 | 3.41k | } |
_ZN5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE Line | Count | Source | 486 | 1.30k | LocalSinkStateInfo& info) { | 487 | 1.30k | auto local_state = LocalStateType::create_unique(this, state); | 488 | 1.30k | RETURN_IF_ERROR(local_state->init(state, info)); | 489 | 1.30k | state->emplace_sink_local_state(operator_id(), std::move(local_state)); | 490 | 1.30k | return Status::OK(); | 491 | 1.30k | } |
_ZN5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE Line | Count | Source | 486 | 1.47k | LocalSinkStateInfo& info) { | 487 | 1.47k | auto local_state = LocalStateType::create_unique(this, state); | 488 | 1.47k | RETURN_IF_ERROR(local_state->init(state, info)); | 489 | 1.47k | state->emplace_sink_local_state(operator_id(), std::move(local_state)); | 490 | 1.47k | return Status::OK(); | 491 | 1.47k | } |
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE _ZN5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE Line | Count | Source | 486 | 1 | LocalSinkStateInfo& info) { | 487 | 1 | auto local_state = LocalStateType::create_unique(this, state); | 488 | 1 | RETURN_IF_ERROR(local_state->init(state, info)); | 489 | 1 | state->emplace_sink_local_state(operator_id(), std::move(local_state)); | 490 | 1 | return Status::OK(); | 491 | 1 | } |
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE _ZN5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE Line | Count | Source | 486 | 4 | LocalSinkStateInfo& info) { | 487 | 4 | auto local_state = LocalStateType::create_unique(this, state); | 488 | 4 | RETURN_IF_ERROR(local_state->init(state, info)); | 489 | 4 | state->emplace_sink_local_state(operator_id(), std::move(local_state)); | 490 | 4 | return Status::OK(); | 491 | 4 | } |
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE |
492 | | |
493 | | template <typename LocalStateType> |
494 | 428k | std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const { |
495 | | if constexpr (std::is_same_v<typename LocalStateType::SharedStateType, |
496 | 0 | LocalExchangeSharedState>) { |
497 | 0 | return nullptr; |
498 | | } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType, |
499 | 0 | MultiCastSharedState>) { |
500 | 0 | throw Exception(Status::FatalError("should not reach here!")); |
501 | 428k | } else { |
502 | 428k | auto ss = LocalStateType::SharedStateType::create_shared(); |
503 | 428k | ss->id = operator_id(); |
504 | 428k | for (auto& dest : dests_id()) { |
505 | 428k | ss->related_op_ids.insert(dest); |
506 | 428k | } |
507 | 428k | return ss; |
508 | 428k | } |
509 | 428k | } _ZNK5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE19create_shared_stateEv Line | Count | Source | 494 | 72.4k | std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const { | 495 | | if constexpr (std::is_same_v<typename LocalStateType::SharedStateType, | 496 | | LocalExchangeSharedState>) { | 497 | | return nullptr; | 498 | | } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType, | 499 | | MultiCastSharedState>) { | 500 | | throw Exception(Status::FatalError("should not reach here!")); | 501 | 72.4k | } else { | 502 | 72.4k | auto ss = LocalStateType::SharedStateType::create_shared(); | 503 | 72.4k | ss->id = operator_id(); | 504 | 72.4k | for (auto& dest : dests_id()) { | 505 | 72.4k | ss->related_op_ids.insert(dest); | 506 | 72.4k | } | 507 | 72.4k | return ss; | 508 | 72.4k | } | 509 | 72.4k | } |
_ZNK5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE19create_shared_stateEv Line | Count | Source | 494 | 70.3k | std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const { | 495 | | if constexpr (std::is_same_v<typename LocalStateType::SharedStateType, | 496 | | LocalExchangeSharedState>) { | 497 | | return nullptr; | 498 | | } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType, | 499 | | MultiCastSharedState>) { | 500 | | throw Exception(Status::FatalError("should not reach here!")); | 501 | 70.3k | } else { | 502 | 70.3k | auto ss = LocalStateType::SharedStateType::create_shared(); | 503 | 70.3k | ss->id = operator_id(); | 504 | 70.3k | for (auto& dest : dests_id()) { | 505 | 70.0k | ss->related_op_ids.insert(dest); | 506 | 70.0k | } | 507 | 70.3k | return ss; | 508 | 70.3k | } | 509 | 70.3k | } |
_ZNK5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEE19create_shared_stateEv Line | Count | Source | 494 | 88 | std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const { | 495 | | if constexpr (std::is_same_v<typename LocalStateType::SharedStateType, | 496 | | LocalExchangeSharedState>) { | 497 | | return nullptr; | 498 | | } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType, | 499 | | MultiCastSharedState>) { | 500 | | throw Exception(Status::FatalError("should not reach here!")); | 501 | 88 | } else { | 502 | 88 | auto ss = LocalStateType::SharedStateType::create_shared(); | 503 | 88 | ss->id = operator_id(); | 504 | 88 | for (auto& dest : dests_id()) { | 505 | 88 | ss->related_op_ids.insert(dest); | 506 | 88 | } | 507 | 88 | return ss; | 508 | 88 | } | 509 | 88 | } |
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEE19create_shared_stateEv _ZNK5doris17DataSinkOperatorXINS_24ResultFileSinkLocalStateEE19create_shared_stateEv Line | Count | Source | 494 | 164 | std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const { | 495 | | if constexpr (std::is_same_v<typename LocalStateType::SharedStateType, | 496 | | LocalExchangeSharedState>) { | 497 | | return nullptr; | 498 | | } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType, | 499 | | MultiCastSharedState>) { | 500 | | throw Exception(Status::FatalError("should not reach here!")); | 501 | 164 | } else { | 502 | 164 | auto ss = LocalStateType::SharedStateType::create_shared(); | 503 | 164 | ss->id = operator_id(); | 504 | 164 | for (auto& dest : dests_id()) { | 505 | 164 | ss->related_op_ids.insert(dest); | 506 | 164 | } | 507 | 164 | return ss; | 508 | 164 | } | 509 | 164 | } |
_ZNK5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE19create_shared_stateEv Line | Count | Source | 494 | 1.16k | std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const { | 495 | | if constexpr (std::is_same_v<typename LocalStateType::SharedStateType, | 496 | | LocalExchangeSharedState>) { | 497 | | return nullptr; | 498 | | } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType, | 499 | | MultiCastSharedState>) { | 500 | | throw Exception(Status::FatalError("should not reach here!")); | 501 | 1.16k | } else { | 502 | 1.16k | auto ss = LocalStateType::SharedStateType::create_shared(); | 503 | 1.16k | ss->id = operator_id(); | 504 | 1.16k | for (auto& dest : dests_id()) { | 505 | 1.16k | ss->related_op_ids.insert(dest); | 506 | 1.16k | } | 507 | 1.16k | return ss; | 508 | 1.16k | } | 509 | 1.16k | } |
_ZNK5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE19create_shared_stateEv Line | Count | Source | 494 | 5.65k | std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const { | 495 | | if constexpr (std::is_same_v<typename LocalStateType::SharedStateType, | 496 | | LocalExchangeSharedState>) { | 497 | | return nullptr; | 498 | | } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType, | 499 | | MultiCastSharedState>) { | 500 | | throw Exception(Status::FatalError("should not reach here!")); | 501 | 5.65k | } else { | 502 | 5.65k | auto ss = LocalStateType::SharedStateType::create_shared(); | 503 | 5.65k | ss->id = operator_id(); | 504 | 5.65k | for (auto& dest : dests_id()) { | 505 | 5.65k | ss->related_op_ids.insert(dest); | 506 | 5.65k | } | 507 | 5.65k | return ss; | 508 | 5.65k | } | 509 | 5.65k | } |
_ZNK5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE19create_shared_stateEv Line | Count | Source | 494 | 5.15k | std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const { | 495 | | if constexpr (std::is_same_v<typename LocalStateType::SharedStateType, | 496 | | LocalExchangeSharedState>) { | 497 | | return nullptr; | 498 | | } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType, | 499 | | MultiCastSharedState>) { | 500 | | throw Exception(Status::FatalError("should not reach here!")); | 501 | 5.15k | } else { | 502 | 5.15k | auto ss = LocalStateType::SharedStateType::create_shared(); | 503 | 5.15k | ss->id = operator_id(); | 504 | 5.15k | for (auto& dest : dests_id()) { | 505 | 5.14k | ss->related_op_ids.insert(dest); | 506 | 5.14k | } | 507 | 5.15k | return ss; | 508 | 5.15k | } | 509 | 5.15k | } |
_ZNK5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE19create_shared_stateEv Line | Count | Source | 494 | 156 | std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const { | 495 | | if constexpr (std::is_same_v<typename LocalStateType::SharedStateType, | 496 | | LocalExchangeSharedState>) { | 497 | | return nullptr; | 498 | | } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType, | 499 | | MultiCastSharedState>) { | 500 | | throw Exception(Status::FatalError("should not reach here!")); | 501 | 156 | } else { | 502 | 156 | auto ss = LocalStateType::SharedStateType::create_shared(); | 503 | 156 | ss->id = operator_id(); | 504 | 156 | for (auto& dest : dests_id()) { | 505 | 156 | ss->related_op_ids.insert(dest); | 506 | 156 | } | 507 | 156 | return ss; | 508 | 156 | } | 509 | 156 | } |
_ZNK5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE19create_shared_stateEv Line | Count | Source | 494 | 3.38k | std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const { | 495 | | if constexpr (std::is_same_v<typename LocalStateType::SharedStateType, | 496 | | LocalExchangeSharedState>) { | 497 | | return nullptr; | 498 | | } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType, | 499 | | MultiCastSharedState>) { | 500 | | throw Exception(Status::FatalError("should not reach here!")); | 501 | 3.38k | } else { | 502 | 3.38k | auto ss = LocalStateType::SharedStateType::create_shared(); | 503 | 3.38k | ss->id = operator_id(); | 504 | 3.38k | for (auto& dest : dests_id()) { | 505 | 3.38k | ss->related_op_ids.insert(dest); | 506 | 3.38k | } | 507 | 3.38k | return ss; | 508 | 3.38k | } | 509 | 3.38k | } |
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEE19create_shared_stateEv _ZNK5doris17DataSinkOperatorXINS_27IcebergDeleteSinkLocalStateEE19create_shared_stateEv Line | Count | Source | 494 | 160 | std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const { | 495 | | if constexpr (std::is_same_v<typename LocalStateType::SharedStateType, | 496 | | LocalExchangeSharedState>) { | 497 | | return nullptr; | 498 | | } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType, | 499 | | MultiCastSharedState>) { | 500 | | throw Exception(Status::FatalError("should not reach here!")); | 501 | 160 | } else { | 502 | 160 | auto ss = LocalStateType::SharedStateType::create_shared(); | 503 | 160 | ss->id = operator_id(); | 504 | 160 | for (auto& dest : dests_id()) { | 505 | 160 | ss->related_op_ids.insert(dest); | 506 | 160 | } | 507 | 160 | return ss; | 508 | 160 | } | 509 | 160 | } |
_ZNK5doris17DataSinkOperatorXINS_26IcebergMergeSinkLocalStateEE19create_shared_stateEv Line | Count | Source | 494 | 640 | std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const { | 495 | | if constexpr (std::is_same_v<typename LocalStateType::SharedStateType, | 496 | | LocalExchangeSharedState>) { | 497 | | return nullptr; | 498 | | } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType, | 499 | | MultiCastSharedState>) { | 500 | | throw Exception(Status::FatalError("should not reach here!")); | 501 | 640 | } else { | 502 | 640 | auto ss = LocalStateType::SharedStateType::create_shared(); | 503 | 640 | ss->id = operator_id(); | 504 | 640 | for (auto& dest : dests_id()) { | 505 | 640 | ss->related_op_ids.insert(dest); | 506 | 640 | } | 507 | 640 | return ss; | 508 | 640 | } | 509 | 640 | } |
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_21MCTableSinkLocalStateEE19create_shared_stateEv _ZNK5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEE19create_shared_stateEv Line | Count | Source | 494 | 67 | std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const { | 495 | | if constexpr (std::is_same_v<typename LocalStateType::SharedStateType, | 496 | | LocalExchangeSharedState>) { | 497 | | return nullptr; | 498 | | } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType, | 499 | | MultiCastSharedState>) { | 500 | | throw Exception(Status::FatalError("should not reach here!")); | 501 | 67 | } else { | 502 | 67 | auto ss = LocalStateType::SharedStateType::create_shared(); | 503 | 67 | ss->id = operator_id(); | 504 | 67 | for (auto& dest : dests_id()) { | 505 | 67 | ss->related_op_ids.insert(dest); | 506 | 67 | } | 507 | 67 | return ss; | 508 | 67 | } | 509 | 67 | } |
_ZNK5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE19create_shared_stateEv Line | Count | Source | 494 | 80 | std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const { | 495 | | if constexpr (std::is_same_v<typename LocalStateType::SharedStateType, | 496 | | LocalExchangeSharedState>) { | 497 | | return nullptr; | 498 | | } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType, | 499 | | MultiCastSharedState>) { | 500 | | throw Exception(Status::FatalError("should not reach here!")); | 501 | 80 | } else { | 502 | 80 | auto ss = LocalStateType::SharedStateType::create_shared(); | 503 | 80 | ss->id = operator_id(); | 504 | 80 | for (auto& dest : dests_id()) { | 505 | 80 | ss->related_op_ids.insert(dest); | 506 | 80 | } | 507 | 80 | return ss; | 508 | 80 | } | 509 | 80 | } |
_ZNK5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE19create_shared_stateEv Line | Count | Source | 494 | 80.4k | std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const { | 495 | | if constexpr (std::is_same_v<typename LocalStateType::SharedStateType, | 496 | | LocalExchangeSharedState>) { | 497 | | return nullptr; | 498 | | } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType, | 499 | | MultiCastSharedState>) { | 500 | | throw Exception(Status::FatalError("should not reach here!")); | 501 | 80.4k | } else { | 502 | 80.4k | auto ss = LocalStateType::SharedStateType::create_shared(); | 503 | 80.4k | ss->id = operator_id(); | 504 | 80.4k | for (auto& dest : dests_id()) { | 505 | 80.4k | ss->related_op_ids.insert(dest); | 506 | 80.4k | } | 507 | 80.4k | return ss; | 508 | 80.4k | } | 509 | 80.4k | } |
_ZNK5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE19create_shared_stateEv Line | Count | Source | 494 | 19 | std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const { | 495 | | if constexpr (std::is_same_v<typename LocalStateType::SharedStateType, | 496 | | LocalExchangeSharedState>) { | 497 | | return nullptr; | 498 | | } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType, | 499 | | MultiCastSharedState>) { | 500 | | throw Exception(Status::FatalError("should not reach here!")); | 501 | 19 | } else { | 502 | 19 | auto ss = LocalStateType::SharedStateType::create_shared(); | 503 | 19 | ss->id = operator_id(); | 504 | 19 | for (auto& dest : dests_id()) { | 505 | 19 | ss->related_op_ids.insert(dest); | 506 | 19 | } | 507 | 19 | return ss; | 508 | 19 | } | 509 | 19 | } |
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE19create_shared_stateEv _ZNK5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE19create_shared_stateEv Line | Count | Source | 494 | 42.8k | std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const { | 495 | | if constexpr (std::is_same_v<typename LocalStateType::SharedStateType, | 496 | | LocalExchangeSharedState>) { | 497 | | return nullptr; | 498 | | } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType, | 499 | | MultiCastSharedState>) { | 500 | | throw Exception(Status::FatalError("should not reach here!")); | 501 | 42.8k | } else { | 502 | 42.8k | auto ss = LocalStateType::SharedStateType::create_shared(); | 503 | 42.8k | ss->id = operator_id(); | 504 | 42.8k | for (auto& dest : dests_id()) { | 505 | 42.8k | ss->related_op_ids.insert(dest); | 506 | 42.8k | } | 507 | 42.8k | return ss; | 508 | 42.8k | } | 509 | 42.8k | } |
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE19create_shared_stateEv _ZNK5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE19create_shared_stateEv Line | Count | Source | 494 | 71 | std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const { | 495 | | if constexpr (std::is_same_v<typename LocalStateType::SharedStateType, | 496 | | LocalExchangeSharedState>) { | 497 | | return nullptr; | 498 | | } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType, | 499 | | MultiCastSharedState>) { | 500 | | throw Exception(Status::FatalError("should not reach here!")); | 501 | 71 | } else { | 502 | 71 | auto ss = LocalStateType::SharedStateType::create_shared(); | 503 | 71 | ss->id = operator_id(); | 504 | 71 | for (auto& dest : dests_id()) { | 505 | 71 | ss->related_op_ids.insert(dest); | 506 | 71 | } | 507 | 71 | return ss; | 508 | 71 | } | 509 | 71 | } |
_ZNK5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE19create_shared_stateEv Line | Count | Source | 494 | 141k | std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const { | 495 | | if constexpr (std::is_same_v<typename LocalStateType::SharedStateType, | 496 | | LocalExchangeSharedState>) { | 497 | | return nullptr; | 498 | | } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType, | 499 | | MultiCastSharedState>) { | 500 | | throw Exception(Status::FatalError("should not reach here!")); | 501 | 141k | } else { | 502 | 141k | auto ss = LocalStateType::SharedStateType::create_shared(); | 503 | 141k | ss->id = operator_id(); | 504 | 141k | for (auto& dest : dests_id()) { | 505 | 141k | ss->related_op_ids.insert(dest); | 506 | 141k | } | 507 | 141k | return ss; | 508 | 141k | } | 509 | 141k | } |
_ZNK5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE19create_shared_stateEv Line | Count | Source | 494 | 3.41k | std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const { | 495 | | if constexpr (std::is_same_v<typename LocalStateType::SharedStateType, | 496 | | LocalExchangeSharedState>) { | 497 | | return nullptr; | 498 | | } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType, | 499 | | MultiCastSharedState>) { | 500 | | throw Exception(Status::FatalError("should not reach here!")); | 501 | 3.41k | } else { | 502 | 3.41k | auto ss = LocalStateType::SharedStateType::create_shared(); | 503 | 3.41k | ss->id = operator_id(); | 504 | 3.41k | for (auto& dest : dests_id()) { | 505 | 3.41k | ss->related_op_ids.insert(dest); | 506 | 3.41k | } | 507 | 3.41k | return ss; | 508 | 3.41k | } | 509 | 3.41k | } |
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE19create_shared_stateEv Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE19create_shared_stateEv _ZNK5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE19create_shared_stateEv Line | Count | Source | 494 | 102 | std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const { | 495 | | if constexpr (std::is_same_v<typename LocalStateType::SharedStateType, | 496 | | LocalExchangeSharedState>) { | 497 | | return nullptr; | 498 | | } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType, | 499 | | MultiCastSharedState>) { | 500 | | throw Exception(Status::FatalError("should not reach here!")); | 501 | 102 | } else { | 502 | 102 | auto ss = LocalStateType::SharedStateType::create_shared(); | 503 | 102 | ss->id = operator_id(); | 504 | 102 | for (auto& dest : dests_id()) { | 505 | 102 | ss->related_op_ids.insert(dest); | 506 | 102 | } | 507 | 102 | return ss; | 508 | 102 | } | 509 | 102 | } |
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE19create_shared_stateEv Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE19create_shared_stateEv _ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE19create_shared_stateEv Line | Count | Source | 494 | 7 | std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const { | 495 | | if constexpr (std::is_same_v<typename LocalStateType::SharedStateType, | 496 | | LocalExchangeSharedState>) { | 497 | | return nullptr; | 498 | | } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType, | 499 | | MultiCastSharedState>) { | 500 | | throw Exception(Status::FatalError("should not reach here!")); | 501 | 7 | } else { | 502 | 7 | auto ss = LocalStateType::SharedStateType::create_shared(); | 503 | 7 | ss->id = operator_id(); | 504 | 7 | for (auto& dest : dests_id()) { | 505 | 7 | ss->related_op_ids.insert(dest); | 506 | 7 | } | 507 | 7 | return ss; | 508 | 7 | } | 509 | 7 | } |
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE19create_shared_stateEv Line | Count | Source | 494 | 5 | std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const { | 495 | | if constexpr (std::is_same_v<typename LocalStateType::SharedStateType, | 496 | | LocalExchangeSharedState>) { | 497 | | return nullptr; | 498 | | } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType, | 499 | | MultiCastSharedState>) { | 500 | | throw Exception(Status::FatalError("should not reach here!")); | 501 | 5 | } else { | 502 | 5 | auto ss = LocalStateType::SharedStateType::create_shared(); | 503 | 5 | ss->id = operator_id(); | 504 | 5 | for (auto& dest : dests_id()) { | 505 | 5 | ss->related_op_ids.insert(dest); | 506 | 5 | } | 507 | 5 | return ss; | 508 | 5 | } | 509 | 5 | } |
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE19create_shared_stateEv Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE19create_shared_stateEv Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE19create_shared_stateEv _ZNK5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE19create_shared_stateEv Line | Count | Source | 494 | 4 | std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const { | 495 | | if constexpr (std::is_same_v<typename LocalStateType::SharedStateType, | 496 | | LocalExchangeSharedState>) { | 497 | | return nullptr; | 498 | | } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType, | 499 | | MultiCastSharedState>) { | 500 | | throw Exception(Status::FatalError("should not reach here!")); | 501 | 4 | } else { | 502 | 4 | auto ss = LocalStateType::SharedStateType::create_shared(); | 503 | 4 | ss->id = operator_id(); | 504 | 4 | for (auto& dest : dests_id()) { | 505 | 4 | ss->related_op_ids.insert(dest); | 506 | 4 | } | 507 | 4 | return ss; | 508 | 4 | } | 509 | 4 | } |
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE19create_shared_stateEv Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE19create_shared_stateEv |
510 | | |
511 | | template <typename LocalStateType> |
512 | 445k | Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) { |
513 | 445k | auto local_state = LocalStateType::create_unique(state, this); |
514 | 445k | RETURN_IF_ERROR(local_state->init(state, info)); |
515 | 445k | state->emplace_local_state(operator_id(), std::move(local_state)); |
516 | 445k | return Status::OK(); |
517 | 445k | } _ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE Line | Count | Source | 512 | 30.2k | Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) { | 513 | 30.2k | auto local_state = LocalStateType::create_unique(state, this); | 514 | 30.2k | RETURN_IF_ERROR(local_state->init(state, info)); | 515 | 30.2k | state->emplace_local_state(operator_id(), std::move(local_state)); | 516 | 30.2k | return Status::OK(); | 517 | 30.2k | } |
_ZN5doris9OperatorXINS_18OlapScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE Line | Count | Source | 512 | 55.3k | Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) { | 513 | 55.3k | auto local_state = LocalStateType::create_unique(state, this); | 514 | 55.3k | RETURN_IF_ERROR(local_state->init(state, info)); | 515 | 55.3k | state->emplace_local_state(operator_id(), std::move(local_state)); | 516 | 55.3k | return Status::OK(); | 517 | 55.3k | } |
Unexecuted instantiation: _ZN5doris9OperatorXINS_21GroupCommitLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE Unexecuted instantiation: _ZN5doris9OperatorXINS_18JDBCScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE _ZN5doris9OperatorXINS_18FileScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE Line | Count | Source | 512 | 28.7k | Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) { | 513 | 28.7k | auto local_state = LocalStateType::create_unique(state, this); | 514 | 28.7k | RETURN_IF_ERROR(local_state->init(state, info)); | 515 | 28.7k | state->emplace_local_state(operator_id(), std::move(local_state)); | 516 | 28.7k | return Status::OK(); | 517 | 28.7k | } |
_ZN5doris9OperatorXINS_18AnalyticLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE Line | Count | Source | 512 | 58 | Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) { | 513 | 58 | auto local_state = LocalStateType::create_unique(state, this); | 514 | 58 | RETURN_IF_ERROR(local_state->init(state, info)); | 515 | 58 | state->emplace_local_state(operator_id(), std::move(local_state)); | 516 | 58 | return Status::OK(); | 517 | 58 | } |
_ZN5doris9OperatorXINS_14SortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE Line | Count | Source | 512 | 497 | Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) { | 513 | 497 | auto local_state = LocalStateType::create_unique(state, this); | 514 | 497 | RETURN_IF_ERROR(local_state->init(state, info)); | 515 | 497 | state->emplace_local_state(operator_id(), std::move(local_state)); | 516 | 497 | return Status::OK(); | 517 | 497 | } |
_ZN5doris9OperatorXINS_19SpillSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE Line | Count | Source | 512 | 11 | Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) { | 513 | 11 | auto local_state = LocalStateType::create_unique(state, this); | 514 | 11 | RETURN_IF_ERROR(local_state->init(state, info)); | 515 | 11 | state->emplace_local_state(operator_id(), std::move(local_state)); | 516 | 11 | return Status::OK(); | 517 | 11 | } |
_ZN5doris9OperatorXINS_24LocalMergeSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE Line | Count | Source | 512 | 79.8k | Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) { | 513 | 79.8k | auto local_state = LocalStateType::create_unique(state, this); | 514 | 79.8k | RETURN_IF_ERROR(local_state->init(state, info)); | 515 | 79.8k | state->emplace_local_state(operator_id(), std::move(local_state)); | 516 | 79.8k | return Status::OK(); | 517 | 79.8k | } |
_ZN5doris9OperatorXINS_13AggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE Line | Count | Source | 512 | 42.8k | Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) { | 513 | 42.8k | auto local_state = LocalStateType::create_unique(state, this); | 514 | 42.8k | RETURN_IF_ERROR(local_state->init(state, info)); | 515 | 42.8k | state->emplace_local_state(operator_id(), std::move(local_state)); | 516 | 42.8k | return Status::OK(); | 517 | 42.8k | } |
Unexecuted instantiation: _ZN5doris9OperatorXINS_21BucketedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE _ZN5doris9OperatorXINS_24PartitionedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE Line | Count | Source | 512 | 62 | Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) { | 513 | 62 | auto local_state = LocalStateType::create_unique(state, this); | 514 | 62 | RETURN_IF_ERROR(local_state->init(state, info)); | 515 | 62 | state->emplace_local_state(operator_id(), std::move(local_state)); | 516 | 62 | return Status::OK(); | 517 | 62 | } |
_ZN5doris9OperatorXINS_23TableFunctionLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE Line | Count | Source | 512 | 37 | Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) { | 513 | 37 | auto local_state = LocalStateType::create_unique(state, this); | 514 | 37 | RETURN_IF_ERROR(local_state->init(state, info)); | 515 | 37 | state->emplace_local_state(operator_id(), std::move(local_state)); | 516 | 37 | return Status::OK(); | 517 | 37 | } |
_ZN5doris9OperatorXINS_18ExchangeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE Line | Count | Source | 512 | 50.1k | Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) { | 513 | 50.1k | auto local_state = LocalStateType::create_unique(state, this); | 514 | 50.1k | RETURN_IF_ERROR(local_state->init(state, info)); | 515 | 50.1k | state->emplace_local_state(operator_id(), std::move(local_state)); | 516 | 50.1k | return Status::OK(); | 517 | 50.1k | } |
Unexecuted instantiation: _ZN5doris9OperatorXINS_16RepeatLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE _ZN5doris9OperatorXINS_29NestedLoopJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE Line | Count | Source | 512 | 3.41k | Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) { | 513 | 3.41k | auto local_state = LocalStateType::create_unique(state, this); | 514 | 3.41k | RETURN_IF_ERROR(local_state->init(state, info)); | 515 | 3.41k | state->emplace_local_state(operator_id(), std::move(local_state)); | 516 | 3.41k | return Status::OK(); | 517 | 3.41k | } |
_ZN5doris9OperatorXINS_23AssertNumRowsLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE Line | Count | Source | 512 | 203 | Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) { | 513 | 203 | auto local_state = LocalStateType::create_unique(state, this); | 514 | 203 | RETURN_IF_ERROR(local_state->init(state, info)); | 515 | 203 | state->emplace_local_state(operator_id(), std::move(local_state)); | 516 | 203 | return Status::OK(); | 517 | 203 | } |
_ZN5doris9OperatorXINS_18EmptySetLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE Line | Count | Source | 512 | 99 | Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) { | 513 | 99 | auto local_state = LocalStateType::create_unique(state, this); | 514 | 99 | RETURN_IF_ERROR(local_state->init(state, info)); | 515 | 99 | state->emplace_local_state(operator_id(), std::move(local_state)); | 516 | 99 | return Status::OK(); | 517 | 99 | } |
_ZN5doris9OperatorXINS_21UnionSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE Line | Count | Source | 512 | 4.49k | Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) { | 513 | 4.49k | auto local_state = LocalStateType::create_unique(state, this); | 514 | 4.49k | RETURN_IF_ERROR(local_state->init(state, info)); | 515 | 4.49k | state->emplace_local_state(operator_id(), std::move(local_state)); | 516 | 4.49k | return Status::OK(); | 517 | 4.49k | } |
_ZN5doris9OperatorXINS_35MultiCastDataStreamSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE Line | Count | Source | 512 | 4.42k | Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) { | 513 | 4.42k | auto local_state = LocalStateType::create_unique(state, this); | 514 | 4.42k | RETURN_IF_ERROR(local_state->init(state, info)); | 515 | 4.42k | state->emplace_local_state(operator_id(), std::move(local_state)); | 516 | 4.42k | return Status::OK(); | 517 | 4.42k | } |
Unexecuted instantiation: _ZN5doris9OperatorXINS_29PartitionSortSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE Unexecuted instantiation: _ZN5doris9OperatorXINS_19SetSourceLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE Unexecuted instantiation: _ZN5doris9OperatorXINS_19SetSourceLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE _ZN5doris9OperatorXINS_17DataGenLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE Line | Count | Source | 512 | 197 | Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) { | 513 | 197 | auto local_state = LocalStateType::create_unique(state, this); | 514 | 197 | RETURN_IF_ERROR(local_state->init(state, info)); | 515 | 197 | state->emplace_local_state(operator_id(), std::move(local_state)); | 516 | 197 | return Status::OK(); | 517 | 197 | } |
_ZN5doris9OperatorXINS_20SchemaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE Line | Count | Source | 512 | 500 | Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) { | 513 | 500 | auto local_state = LocalStateType::create_unique(state, this); | 514 | 500 | RETURN_IF_ERROR(local_state->init(state, info)); | 515 | 500 | state->emplace_local_state(operator_id(), std::move(local_state)); | 516 | 500 | return Status::OK(); | 517 | 500 | } |
_ZN5doris9OperatorXINS_18MetaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE Line | Count | Source | 512 | 1.79k | Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) { | 513 | 1.79k | auto local_state = LocalStateType::create_unique(state, this); | 514 | 1.79k | RETURN_IF_ERROR(local_state->init(state, info)); | 515 | 1.79k | state->emplace_local_state(operator_id(), std::move(local_state)); | 516 | 1.79k | return Status::OK(); | 517 | 1.79k | } |
_ZN5doris9OperatorXINS_29LocalExchangeSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE Line | Count | Source | 512 | 132k | Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) { | 513 | 132k | auto local_state = LocalStateType::create_unique(state, this); | 514 | 132k | RETURN_IF_ERROR(local_state->init(state, info)); | 515 | 132k | state->emplace_local_state(operator_id(), std::move(local_state)); | 516 | 132k | return Status::OK(); | 517 | 132k | } |
Unexecuted instantiation: _ZN5doris9OperatorXINS_34PartitionedHashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE Unexecuted instantiation: _ZN5doris9OperatorXINS_21CacheSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE Unexecuted instantiation: _ZN5doris9OperatorXINS_22RecCTESourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE Unexecuted instantiation: _ZN5doris9OperatorXINS_20RecCTEScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE _ZN5doris9OperatorXINS_25MaterializationLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE Line | Count | Source | 512 | 934 | Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) { | 513 | 934 | auto local_state = LocalStateType::create_unique(state, this); | 514 | 934 | RETURN_IF_ERROR(local_state->init(state, info)); | 515 | 934 | state->emplace_local_state(operator_id(), std::move(local_state)); | 516 | 934 | return Status::OK(); | 517 | 934 | } |
_ZN5doris9OperatorXINS_16SelectLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE Line | Count | Source | 512 | 1.48k | Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) { | 513 | 1.48k | auto local_state = LocalStateType::create_unique(state, this); | 514 | 1.48k | RETURN_IF_ERROR(local_state->init(state, info)); | 515 | 1.48k | state->emplace_local_state(operator_id(), std::move(local_state)); | 516 | 1.48k | return Status::OK(); | 517 | 1.48k | } |
_ZN5doris9OperatorXINS_22StreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE Line | Count | Source | 512 | 6.66k | Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) { | 513 | 6.66k | auto local_state = LocalStateType::create_unique(state, this); | 514 | 6.66k | RETURN_IF_ERROR(local_state->init(state, info)); | 515 | 6.66k | state->emplace_local_state(operator_id(), std::move(local_state)); | 516 | 6.66k | return Status::OK(); | 517 | 6.66k | } |
_ZN5doris9OperatorXINS_30DistinctStreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE Line | Count | Source | 512 | 288 | Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) { | 513 | 288 | auto local_state = LocalStateType::create_unique(state, this); | 514 | 288 | RETURN_IF_ERROR(local_state->init(state, info)); | 515 | 288 | state->emplace_local_state(operator_id(), std::move(local_state)); | 516 | 288 | return Status::OK(); | 517 | 288 | } |
|
518 | | |
519 | | PipelineXSinkLocalStateBase::PipelineXSinkLocalStateBase(DataSinkOperatorXBase* parent, |
520 | | RuntimeState* state) |
521 | 474k | : _parent(parent), _state(state) {} |
522 | | |
523 | | PipelineXLocalStateBase::PipelineXLocalStateBase(RuntimeState* state, OperatorXBase* parent) |
524 | 445k | : _num_rows_returned(0), |
525 | 445k | _rows_returned_counter(nullptr), |
526 | 445k | _parent(parent), |
527 | 445k | _state(state), |
528 | 445k | _budget(state->batch_size(), state->preferred_block_size_bytes()) {} |
529 | | |
530 | | template <typename SharedStateArg> |
531 | 445k | Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) { |
532 | 445k | _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix())); |
533 | 445k | _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS)); |
534 | 445k | _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS)); |
535 | 445k | _operator_profile->set_metadata(_parent->node_id()); |
536 | | // indent is false so that source operator will have same |
537 | | // indentation_level with its parent operator. |
538 | 445k | info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false); |
539 | 445k | _operator_profile->add_child(_common_profile.get(), true); |
540 | 445k | _operator_profile->add_child(_custom_profile.get(), true); |
541 | 445k | constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>; |
542 | 445k | if constexpr (!is_fake_shared) { |
543 | 298k | if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) { |
544 | 138k | _shared_state = info.shared_state_map.at(_parent->operator_id()) |
545 | 138k | .first.get() |
546 | 138k | ->template cast<SharedStateArg>(); |
547 | | |
548 | 138k | _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get(); |
549 | 138k | _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL( |
550 | 138k | _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1); |
551 | 160k | } else if (info.shared_state) { |
552 | 156k | if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) { |
553 | 0 | DCHECK(false); |
554 | 0 | } |
555 | | // For UnionSourceOperator without children, there is no shared state. |
556 | 156k | _shared_state = info.shared_state->template cast<SharedStateArg>(); |
557 | | |
558 | 156k | _dependency = _shared_state->create_source_dependency( |
559 | 156k | _parent->operator_id(), _parent->node_id(), _parent->get_name()); |
560 | 156k | _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL( |
561 | 156k | _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1); |
562 | 156k | } else { |
563 | 3.84k | if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) { |
564 | 0 | DCHECK(false); |
565 | 0 | } |
566 | 3.84k | } |
567 | 298k | } |
568 | | |
569 | 445k | if (must_set_shared_state() && _shared_state == nullptr) { |
570 | 0 | return Status::InternalError("must set shared state, in {}", _parent->get_name()); |
571 | 0 | } |
572 | | |
573 | 445k | _rows_returned_counter = |
574 | 445k | ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1); |
575 | 445k | _blocks_returned_counter = |
576 | 445k | ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1); |
577 | 445k | _output_block_bytes_counter = |
578 | 445k | ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1); |
579 | 445k | _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL( |
580 | 445k | _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1); |
581 | 445k | _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL( |
582 | 445k | _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1); |
583 | 445k | _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2); |
584 | 445k | _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2); |
585 | 445k | _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2); |
586 | 445k | _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2); |
587 | 445k | _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1); |
588 | 445k | _memory_used_counter = |
589 | 445k | _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1); |
590 | 445k | _common_profile->add_info_string("IsColocate", |
591 | 445k | std::to_string(_parent->is_colocated_operator())); |
592 | 445k | _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator())); |
593 | 445k | _common_profile->add_info_string("FollowedByShuffledOperator", |
594 | 445k | std::to_string(_parent->followed_by_shuffled_operator())); |
595 | 445k | return Status::OK(); |
596 | 445k | } _ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE Line | Count | Source | 531 | 30.2k | Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) { | 532 | 30.2k | _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix())); | 533 | 30.2k | _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS)); | 534 | 30.2k | _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS)); | 535 | 30.2k | _operator_profile->set_metadata(_parent->node_id()); | 536 | | // indent is false so that source operator will have same | 537 | | // indentation_level with its parent operator. | 538 | 30.2k | info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false); | 539 | 30.2k | _operator_profile->add_child(_common_profile.get(), true); | 540 | 30.2k | _operator_profile->add_child(_custom_profile.get(), true); | 541 | 30.2k | constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>; | 542 | 30.2k | if constexpr (!is_fake_shared) { | 543 | 30.2k | if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) { | 544 | 5.78k | _shared_state = info.shared_state_map.at(_parent->operator_id()) | 545 | 5.78k | .first.get() | 546 | 5.78k | ->template cast<SharedStateArg>(); | 547 | | | 548 | 5.78k | _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get(); | 549 | 5.78k | _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL( | 550 | 5.78k | _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1); | 551 | 24.4k | } else if (info.shared_state) { | 552 | | if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) { | 553 | | DCHECK(false); | 554 | | } | 555 | | // For UnionSourceOperator without children, there is no shared state. | 556 | 24.4k | _shared_state = info.shared_state->template cast<SharedStateArg>(); | 557 | | | 558 | 24.4k | _dependency = _shared_state->create_source_dependency( | 559 | 24.4k | _parent->operator_id(), _parent->node_id(), _parent->get_name()); | 560 | 24.4k | _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL( | 561 | 24.4k | _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1); | 562 | 24.4k | } else { | 563 | | if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) { | 564 | | DCHECK(false); | 565 | | } | 566 | 0 | } | 567 | 30.2k | } | 568 | | | 569 | 30.2k | if (must_set_shared_state() && _shared_state == nullptr) { | 570 | 0 | return Status::InternalError("must set shared state, in {}", _parent->get_name()); | 571 | 0 | } | 572 | | | 573 | 30.2k | _rows_returned_counter = | 574 | 30.2k | ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1); | 575 | 30.2k | _blocks_returned_counter = | 576 | 30.2k | ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1); | 577 | 30.2k | _output_block_bytes_counter = | 578 | 30.2k | ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1); | 579 | 30.2k | _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL( | 580 | 30.2k | _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1); | 581 | 30.2k | _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL( | 582 | 30.2k | _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1); | 583 | 30.2k | _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2); | 584 | 30.2k | _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2); | 585 | 30.2k | _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2); | 586 | 30.2k | _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2); | 587 | 30.2k | _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1); | 588 | 30.2k | _memory_used_counter = | 589 | 30.2k | _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1); | 590 | 30.2k | _common_profile->add_info_string("IsColocate", | 591 | 30.2k | std::to_string(_parent->is_colocated_operator())); | 592 | 30.2k | _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator())); | 593 | 30.2k | _common_profile->add_info_string("FollowedByShuffledOperator", | 594 | 30.2k | std::to_string(_parent->followed_by_shuffled_operator())); | 595 | 30.2k | return Status::OK(); | 596 | 30.2k | } |
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE Line | Count | Source | 531 | 1 | Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) { | 532 | 1 | _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix())); | 533 | 1 | _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS)); | 534 | 1 | _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS)); | 535 | 1 | _operator_profile->set_metadata(_parent->node_id()); | 536 | | // indent is false so that source operator will have same | 537 | | // indentation_level with its parent operator. | 538 | 1 | info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false); | 539 | 1 | _operator_profile->add_child(_common_profile.get(), true); | 540 | 1 | _operator_profile->add_child(_custom_profile.get(), true); | 541 | 1 | constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>; | 542 | 1 | if constexpr (!is_fake_shared) { | 543 | 1 | if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) { | 544 | 0 | _shared_state = info.shared_state_map.at(_parent->operator_id()) | 545 | 0 | .first.get() | 546 | 0 | ->template cast<SharedStateArg>(); | 547 | |
| 548 | 0 | _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get(); | 549 | 0 | _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL( | 550 | 0 | _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1); | 551 | 1 | } else if (info.shared_state) { | 552 | | if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) { | 553 | | DCHECK(false); | 554 | | } | 555 | | // For UnionSourceOperator without children, there is no shared state. | 556 | 1 | _shared_state = info.shared_state->template cast<SharedStateArg>(); | 557 | | | 558 | 1 | _dependency = _shared_state->create_source_dependency( | 559 | 1 | _parent->operator_id(), _parent->node_id(), _parent->get_name()); | 560 | 1 | _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL( | 561 | 1 | _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1); | 562 | 1 | } else { | 563 | | if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) { | 564 | | DCHECK(false); | 565 | | } | 566 | 0 | } | 567 | 1 | } | 568 | | | 569 | 1 | if (must_set_shared_state() && _shared_state == nullptr) { | 570 | 0 | return Status::InternalError("must set shared state, in {}", _parent->get_name()); | 571 | 0 | } | 572 | | | 573 | 1 | _rows_returned_counter = | 574 | 1 | ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1); | 575 | 1 | _blocks_returned_counter = | 576 | 1 | ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1); | 577 | 1 | _output_block_bytes_counter = | 578 | 1 | ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1); | 579 | 1 | _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL( | 580 | 1 | _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1); | 581 | 1 | _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL( | 582 | 1 | _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1); | 583 | 1 | _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2); | 584 | 1 | _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2); | 585 | 1 | _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2); | 586 | 1 | _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2); | 587 | 1 | _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1); | 588 | 1 | _memory_used_counter = | 589 | 1 | _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1); | 590 | 1 | _common_profile->add_info_string("IsColocate", | 591 | 1 | std::to_string(_parent->is_colocated_operator())); | 592 | 1 | _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator())); | 593 | 1 | _common_profile->add_info_string("FollowedByShuffledOperator", | 594 | 1 | std::to_string(_parent->followed_by_shuffled_operator())); | 595 | 1 | return Status::OK(); | 596 | 1 | } |
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE Line | Count | Source | 531 | 80.4k | Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) { | 532 | 80.4k | _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix())); | 533 | 80.4k | _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS)); | 534 | 80.4k | _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS)); | 535 | 80.4k | _operator_profile->set_metadata(_parent->node_id()); | 536 | | // indent is false so that source operator will have same | 537 | | // indentation_level with its parent operator. | 538 | 80.4k | info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false); | 539 | 80.4k | _operator_profile->add_child(_common_profile.get(), true); | 540 | 80.4k | _operator_profile->add_child(_custom_profile.get(), true); | 541 | 80.4k | constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>; | 542 | 80.4k | if constexpr (!is_fake_shared) { | 543 | 80.4k | if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) { | 544 | 0 | _shared_state = info.shared_state_map.at(_parent->operator_id()) | 545 | 0 | .first.get() | 546 | 0 | ->template cast<SharedStateArg>(); | 547 | |
| 548 | 0 | _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get(); | 549 | 0 | _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL( | 550 | 0 | _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1); | 551 | 80.4k | } else if (info.shared_state) { | 552 | | if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) { | 553 | | DCHECK(false); | 554 | | } | 555 | | // For UnionSourceOperator without children, there is no shared state. | 556 | 80.4k | _shared_state = info.shared_state->template cast<SharedStateArg>(); | 557 | | | 558 | 80.4k | _dependency = _shared_state->create_source_dependency( | 559 | 80.4k | _parent->operator_id(), _parent->node_id(), _parent->get_name()); | 560 | 80.4k | _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL( | 561 | 80.4k | _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1); | 562 | 80.4k | } else { | 563 | | if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) { | 564 | | DCHECK(false); | 565 | | } | 566 | 2 | } | 567 | 80.4k | } | 568 | | | 569 | 80.4k | if (must_set_shared_state() && _shared_state == nullptr) { | 570 | 0 | return Status::InternalError("must set shared state, in {}", _parent->get_name()); | 571 | 0 | } | 572 | | | 573 | 80.4k | _rows_returned_counter = | 574 | 80.4k | ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1); | 575 | 80.4k | _blocks_returned_counter = | 576 | 80.4k | ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1); | 577 | 80.4k | _output_block_bytes_counter = | 578 | 80.4k | ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1); | 579 | 80.4k | _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL( | 580 | 80.4k | _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1); | 581 | 80.4k | _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL( | 582 | 80.4k | _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1); | 583 | 80.4k | _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2); | 584 | 80.4k | _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2); | 585 | 80.4k | _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2); | 586 | 80.4k | _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2); | 587 | 80.4k | _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1); | 588 | 80.4k | _memory_used_counter = | 589 | 80.4k | _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1); | 590 | 80.4k | _common_profile->add_info_string("IsColocate", | 591 | 80.4k | std::to_string(_parent->is_colocated_operator())); | 592 | 80.4k | _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator())); | 593 | 80.4k | _common_profile->add_info_string("FollowedByShuffledOperator", | 594 | 80.4k | std::to_string(_parent->followed_by_shuffled_operator())); | 595 | 80.4k | return Status::OK(); | 596 | 80.4k | } |
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE Line | Count | Source | 531 | 11 | Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) { | 532 | 11 | _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix())); | 533 | 11 | _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS)); | 534 | 11 | _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS)); | 535 | 11 | _operator_profile->set_metadata(_parent->node_id()); | 536 | | // indent is false so that source operator will have same | 537 | | // indentation_level with its parent operator. | 538 | 11 | info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false); | 539 | 11 | _operator_profile->add_child(_common_profile.get(), true); | 540 | 11 | _operator_profile->add_child(_custom_profile.get(), true); | 541 | 11 | constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>; | 542 | 11 | if constexpr (!is_fake_shared) { | 543 | 11 | if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) { | 544 | 0 | _shared_state = info.shared_state_map.at(_parent->operator_id()) | 545 | 0 | .first.get() | 546 | 0 | ->template cast<SharedStateArg>(); | 547 | |
| 548 | 0 | _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get(); | 549 | 0 | _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL( | 550 | 0 | _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1); | 551 | 11 | } else if (info.shared_state) { | 552 | | if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) { | 553 | | DCHECK(false); | 554 | | } | 555 | | // For UnionSourceOperator without children, there is no shared state. | 556 | 11 | _shared_state = info.shared_state->template cast<SharedStateArg>(); | 557 | | | 558 | 11 | _dependency = _shared_state->create_source_dependency( | 559 | 11 | _parent->operator_id(), _parent->node_id(), _parent->get_name()); | 560 | 11 | _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL( | 561 | 11 | _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1); | 562 | 11 | } else { | 563 | | if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) { | 564 | | DCHECK(false); | 565 | | } | 566 | 0 | } | 567 | 11 | } | 568 | | | 569 | 11 | if (must_set_shared_state() && _shared_state == nullptr) { | 570 | 0 | return Status::InternalError("must set shared state, in {}", _parent->get_name()); | 571 | 0 | } | 572 | | | 573 | 11 | _rows_returned_counter = | 574 | 11 | ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1); | 575 | 11 | _blocks_returned_counter = | 576 | 11 | ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1); | 577 | 11 | _output_block_bytes_counter = | 578 | 11 | ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1); | 579 | 11 | _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL( | 580 | 11 | _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1); | 581 | 11 | _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL( | 582 | 11 | _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1); | 583 | 11 | _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2); | 584 | 11 | _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2); | 585 | 11 | _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2); | 586 | 11 | _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2); | 587 | 11 | _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1); | 588 | 11 | _memory_used_counter = | 589 | 11 | _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1); | 590 | 11 | _common_profile->add_info_string("IsColocate", | 591 | 11 | std::to_string(_parent->is_colocated_operator())); | 592 | 11 | _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator())); | 593 | 11 | _common_profile->add_info_string("FollowedByShuffledOperator", | 594 | 11 | std::to_string(_parent->followed_by_shuffled_operator())); | 595 | 11 | return Status::OK(); | 596 | 11 | } |
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE Line | Count | Source | 531 | 3.41k | Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) { | 532 | 3.41k | _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix())); | 533 | 3.41k | _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS)); | 534 | 3.41k | _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS)); | 535 | 3.41k | _operator_profile->set_metadata(_parent->node_id()); | 536 | | // indent is false so that source operator will have same | 537 | | // indentation_level with its parent operator. | 538 | 3.41k | info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false); | 539 | 3.41k | _operator_profile->add_child(_common_profile.get(), true); | 540 | 3.41k | _operator_profile->add_child(_custom_profile.get(), true); | 541 | 3.41k | constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>; | 542 | 3.41k | if constexpr (!is_fake_shared) { | 543 | 3.41k | if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) { | 544 | 0 | _shared_state = info.shared_state_map.at(_parent->operator_id()) | 545 | 0 | .first.get() | 546 | 0 | ->template cast<SharedStateArg>(); | 547 | |
| 548 | 0 | _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get(); | 549 | 0 | _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL( | 550 | 0 | _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1); | 551 | 3.41k | } else if (info.shared_state) { | 552 | | if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) { | 553 | | DCHECK(false); | 554 | | } | 555 | | // For UnionSourceOperator without children, there is no shared state. | 556 | 3.41k | _shared_state = info.shared_state->template cast<SharedStateArg>(); | 557 | | | 558 | 3.41k | _dependency = _shared_state->create_source_dependency( | 559 | 3.41k | _parent->operator_id(), _parent->node_id(), _parent->get_name()); | 560 | 3.41k | _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL( | 561 | 3.41k | _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1); | 562 | 3.41k | } else { | 563 | | if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) { | 564 | | DCHECK(false); | 565 | | } | 566 | 0 | } | 567 | 3.41k | } | 568 | | | 569 | 3.41k | if (must_set_shared_state() && _shared_state == nullptr) { | 570 | 0 | return Status::InternalError("must set shared state, in {}", _parent->get_name()); | 571 | 0 | } | 572 | | | 573 | 3.41k | _rows_returned_counter = | 574 | 3.41k | ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1); | 575 | 3.41k | _blocks_returned_counter = | 576 | 3.41k | ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1); | 577 | 3.41k | _output_block_bytes_counter = | 578 | 3.41k | ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1); | 579 | 3.41k | _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL( | 580 | 3.41k | _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1); | 581 | 3.41k | _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL( | 582 | 3.41k | _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1); | 583 | 3.41k | _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2); | 584 | 3.41k | _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2); | 585 | 3.41k | _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2); | 586 | 3.41k | _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2); | 587 | 3.41k | _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1); | 588 | 3.41k | _memory_used_counter = | 589 | 3.41k | _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1); | 590 | 3.41k | _common_profile->add_info_string("IsColocate", | 591 | 3.41k | std::to_string(_parent->is_colocated_operator())); | 592 | 3.41k | _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator())); | 593 | 3.41k | _common_profile->add_info_string("FollowedByShuffledOperator", | 594 | 3.41k | std::to_string(_parent->followed_by_shuffled_operator())); | 595 | 3.41k | return Status::OK(); | 596 | 3.41k | } |
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE Line | Count | Source | 531 | 67 | Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) { | 532 | 67 | _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix())); | 533 | 67 | _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS)); | 534 | 67 | _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS)); | 535 | 67 | _operator_profile->set_metadata(_parent->node_id()); | 536 | | // indent is false so that source operator will have same | 537 | | // indentation_level with its parent operator. | 538 | 67 | info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false); | 539 | 67 | _operator_profile->add_child(_common_profile.get(), true); | 540 | 67 | _operator_profile->add_child(_custom_profile.get(), true); | 541 | 67 | constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>; | 542 | 67 | if constexpr (!is_fake_shared) { | 543 | 67 | if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) { | 544 | 0 | _shared_state = info.shared_state_map.at(_parent->operator_id()) | 545 | 0 | .first.get() | 546 | 0 | ->template cast<SharedStateArg>(); | 547 | |
| 548 | 0 | _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get(); | 549 | 0 | _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL( | 550 | 0 | _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1); | 551 | 67 | } else if (info.shared_state) { | 552 | | if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) { | 553 | | DCHECK(false); | 554 | | } | 555 | | // For UnionSourceOperator without children, there is no shared state. | 556 | 67 | _shared_state = info.shared_state->template cast<SharedStateArg>(); | 557 | | | 558 | 67 | _dependency = _shared_state->create_source_dependency( | 559 | 67 | _parent->operator_id(), _parent->node_id(), _parent->get_name()); | 560 | 67 | _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL( | 561 | 67 | _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1); | 562 | 67 | } else { | 563 | | if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) { | 564 | | DCHECK(false); | 565 | | } | 566 | 0 | } | 567 | 67 | } | 568 | | | 569 | 67 | if (must_set_shared_state() && _shared_state == nullptr) { | 570 | 0 | return Status::InternalError("must set shared state, in {}", _parent->get_name()); | 571 | 0 | } | 572 | | | 573 | 67 | _rows_returned_counter = | 574 | 67 | ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1); | 575 | 67 | _blocks_returned_counter = | 576 | 67 | ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1); | 577 | 67 | _output_block_bytes_counter = | 578 | 67 | ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1); | 579 | 67 | _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL( | 580 | 67 | _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1); | 581 | 67 | _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL( | 582 | 67 | _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1); | 583 | 67 | _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2); | 584 | 67 | _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2); | 585 | 67 | _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2); | 586 | 67 | _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2); | 587 | 67 | _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1); | 588 | 67 | _memory_used_counter = | 589 | 67 | _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1); | 590 | 67 | _common_profile->add_info_string("IsColocate", | 591 | 67 | std::to_string(_parent->is_colocated_operator())); | 592 | 67 | _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator())); | 593 | 67 | _common_profile->add_info_string("FollowedByShuffledOperator", | 594 | 67 | std::to_string(_parent->followed_by_shuffled_operator())); | 595 | 67 | return Status::OK(); | 596 | 67 | } |
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE Line | Count | Source | 531 | 42.8k | Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) { | 532 | 42.8k | _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix())); | 533 | 42.8k | _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS)); | 534 | 42.8k | _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS)); | 535 | 42.8k | _operator_profile->set_metadata(_parent->node_id()); | 536 | | // indent is false so that source operator will have same | 537 | | // indentation_level with its parent operator. | 538 | 42.8k | info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false); | 539 | 42.8k | _operator_profile->add_child(_common_profile.get(), true); | 540 | 42.8k | _operator_profile->add_child(_custom_profile.get(), true); | 541 | 42.8k | constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>; | 542 | 42.8k | if constexpr (!is_fake_shared) { | 543 | 42.8k | if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) { | 544 | 0 | _shared_state = info.shared_state_map.at(_parent->operator_id()) | 545 | 0 | .first.get() | 546 | 0 | ->template cast<SharedStateArg>(); | 547 | |
| 548 | 0 | _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get(); | 549 | 0 | _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL( | 550 | 0 | _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1); | 551 | 42.8k | } else if (info.shared_state) { | 552 | | if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) { | 553 | | DCHECK(false); | 554 | | } | 555 | | // For UnionSourceOperator without children, there is no shared state. | 556 | 42.8k | _shared_state = info.shared_state->template cast<SharedStateArg>(); | 557 | | | 558 | 42.8k | _dependency = _shared_state->create_source_dependency( | 559 | 42.8k | _parent->operator_id(), _parent->node_id(), _parent->get_name()); | 560 | 42.8k | _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL( | 561 | 42.8k | _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1); | 562 | 18.4E | } else { | 563 | | if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) { | 564 | | DCHECK(false); | 565 | | } | 566 | 18.4E | } | 567 | 42.8k | } | 568 | | | 569 | 42.8k | if (must_set_shared_state() && _shared_state == nullptr) { | 570 | 0 | return Status::InternalError("must set shared state, in {}", _parent->get_name()); | 571 | 0 | } | 572 | | | 573 | 42.8k | _rows_returned_counter = | 574 | 42.8k | ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1); | 575 | 42.8k | _blocks_returned_counter = | 576 | 42.8k | ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1); | 577 | 42.8k | _output_block_bytes_counter = | 578 | 42.8k | ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1); | 579 | 42.8k | _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL( | 580 | 42.8k | _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1); | 581 | 42.8k | _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL( | 582 | 42.8k | _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1); | 583 | 42.8k | _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2); | 584 | 42.8k | _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2); | 585 | 42.8k | _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2); | 586 | 42.8k | _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2); | 587 | 42.8k | _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1); | 588 | 42.8k | _memory_used_counter = | 589 | 42.8k | _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1); | 590 | 42.8k | _common_profile->add_info_string("IsColocate", | 591 | 42.8k | std::to_string(_parent->is_colocated_operator())); | 592 | 42.8k | _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator())); | 593 | 42.8k | _common_profile->add_info_string("FollowedByShuffledOperator", | 594 | 42.8k | std::to_string(_parent->followed_by_shuffled_operator())); | 595 | 42.8k | return Status::OK(); | 596 | 42.8k | } |
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE _ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE Line | Count | Source | 531 | 62 | Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) { | 532 | 62 | _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix())); | 533 | 62 | _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS)); | 534 | 62 | _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS)); | 535 | 62 | _operator_profile->set_metadata(_parent->node_id()); | 536 | | // indent is false so that source operator will have same | 537 | | // indentation_level with its parent operator. | 538 | 62 | info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false); | 539 | 62 | _operator_profile->add_child(_common_profile.get(), true); | 540 | 62 | _operator_profile->add_child(_custom_profile.get(), true); | 541 | 62 | constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>; | 542 | 62 | if constexpr (!is_fake_shared) { | 543 | 62 | if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) { | 544 | 0 | _shared_state = info.shared_state_map.at(_parent->operator_id()) | 545 | 0 | .first.get() | 546 | 0 | ->template cast<SharedStateArg>(); | 547 | |
| 548 | 0 | _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get(); | 549 | 0 | _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL( | 550 | 0 | _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1); | 551 | 62 | } else if (info.shared_state) { | 552 | | if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) { | 553 | | DCHECK(false); | 554 | | } | 555 | | // For UnionSourceOperator without children, there is no shared state. | 556 | 62 | _shared_state = info.shared_state->template cast<SharedStateArg>(); | 557 | | | 558 | 62 | _dependency = _shared_state->create_source_dependency( | 559 | 62 | _parent->operator_id(), _parent->node_id(), _parent->get_name()); | 560 | 62 | _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL( | 561 | 62 | _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1); | 562 | 62 | } else { | 563 | | if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) { | 564 | | DCHECK(false); | 565 | | } | 566 | 0 | } | 567 | 62 | } | 568 | | | 569 | 62 | if (must_set_shared_state() && _shared_state == nullptr) { | 570 | 0 | return Status::InternalError("must set shared state, in {}", _parent->get_name()); | 571 | 0 | } | 572 | | | 573 | 62 | _rows_returned_counter = | 574 | 62 | ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1); | 575 | 62 | _blocks_returned_counter = | 576 | 62 | ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1); | 577 | 62 | _output_block_bytes_counter = | 578 | 62 | ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1); | 579 | 62 | _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL( | 580 | 62 | _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1); | 581 | 62 | _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL( | 582 | 62 | _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1); | 583 | 62 | _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2); | 584 | 62 | _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2); | 585 | 62 | _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2); | 586 | 62 | _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2); | 587 | 62 | _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1); | 588 | 62 | _memory_used_counter = | 589 | 62 | _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1); | 590 | 62 | _common_profile->add_info_string("IsColocate", | 591 | 62 | std::to_string(_parent->is_colocated_operator())); | 592 | 62 | _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator())); | 593 | 62 | _common_profile->add_info_string("FollowedByShuffledOperator", | 594 | 62 | std::to_string(_parent->followed_by_shuffled_operator())); | 595 | 62 | return Status::OK(); | 596 | 62 | } |
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE Line | Count | Source | 531 | 146k | Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) { | 532 | 146k | _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix())); | 533 | 146k | _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS)); | 534 | 146k | _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS)); | 535 | 146k | _operator_profile->set_metadata(_parent->node_id()); | 536 | | // indent is false so that source operator will have same | 537 | | // indentation_level with its parent operator. | 538 | 146k | info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false); | 539 | 146k | _operator_profile->add_child(_common_profile.get(), true); | 540 | 146k | _operator_profile->add_child(_custom_profile.get(), true); | 541 | 146k | constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>; | 542 | | if constexpr (!is_fake_shared) { | 543 | | if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) { | 544 | | _shared_state = info.shared_state_map.at(_parent->operator_id()) | 545 | | .first.get() | 546 | | ->template cast<SharedStateArg>(); | 547 | | | 548 | | _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get(); | 549 | | _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL( | 550 | | _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1); | 551 | | } else if (info.shared_state) { | 552 | | if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) { | 553 | | DCHECK(false); | 554 | | } | 555 | | // For UnionSourceOperator without children, there is no shared state. | 556 | | _shared_state = info.shared_state->template cast<SharedStateArg>(); | 557 | | | 558 | | _dependency = _shared_state->create_source_dependency( | 559 | | _parent->operator_id(), _parent->node_id(), _parent->get_name()); | 560 | | _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL( | 561 | | _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1); | 562 | | } else { | 563 | | if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) { | 564 | | DCHECK(false); | 565 | | } | 566 | | } | 567 | | } | 568 | | | 569 | 146k | if (must_set_shared_state() && _shared_state == nullptr) { | 570 | 0 | return Status::InternalError("must set shared state, in {}", _parent->get_name()); | 571 | 0 | } | 572 | | | 573 | 146k | _rows_returned_counter = | 574 | 146k | ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1); | 575 | 146k | _blocks_returned_counter = | 576 | 146k | ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1); | 577 | 146k | _output_block_bytes_counter = | 578 | 146k | ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1); | 579 | 146k | _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL( | 580 | 146k | _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1); | 581 | 146k | _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL( | 582 | 146k | _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1); | 583 | 146k | _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2); | 584 | 146k | _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2); | 585 | 146k | _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2); | 586 | 146k | _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2); | 587 | 146k | _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1); | 588 | 146k | _memory_used_counter = | 589 | 146k | _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1); | 590 | 146k | _common_profile->add_info_string("IsColocate", | 591 | 146k | std::to_string(_parent->is_colocated_operator())); | 592 | 146k | _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator())); | 593 | 146k | _common_profile->add_info_string("FollowedByShuffledOperator", | 594 | 146k | std::to_string(_parent->followed_by_shuffled_operator())); | 595 | 146k | return Status::OK(); | 596 | 146k | } |
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE Line | Count | Source | 531 | 4.49k | Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) { | 532 | 4.49k | _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix())); | 533 | 4.49k | _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS)); | 534 | 4.49k | _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS)); | 535 | 4.49k | _operator_profile->set_metadata(_parent->node_id()); | 536 | | // indent is false so that source operator will have same | 537 | | // indentation_level with its parent operator. | 538 | 4.49k | info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false); | 539 | 4.49k | _operator_profile->add_child(_common_profile.get(), true); | 540 | 4.49k | _operator_profile->add_child(_custom_profile.get(), true); | 541 | 4.49k | constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>; | 542 | 4.49k | if constexpr (!is_fake_shared) { | 543 | 4.49k | if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) { | 544 | 0 | _shared_state = info.shared_state_map.at(_parent->operator_id()) | 545 | 0 | .first.get() | 546 | 0 | ->template cast<SharedStateArg>(); | 547 | |
| 548 | 0 | _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get(); | 549 | 0 | _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL( | 550 | 0 | _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1); | 551 | 4.49k | } else if (info.shared_state) { | 552 | | if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) { | 553 | | DCHECK(false); | 554 | | } | 555 | | // For UnionSourceOperator without children, there is no shared state. | 556 | 635 | _shared_state = info.shared_state->template cast<SharedStateArg>(); | 557 | | | 558 | 635 | _dependency = _shared_state->create_source_dependency( | 559 | 635 | _parent->operator_id(), _parent->node_id(), _parent->get_name()); | 560 | 635 | _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL( | 561 | 635 | _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1); | 562 | 3.86k | } else { | 563 | | if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) { | 564 | | DCHECK(false); | 565 | | } | 566 | 3.86k | } | 567 | 4.49k | } | 568 | | | 569 | 4.49k | if (must_set_shared_state() && _shared_state == nullptr) { | 570 | 0 | return Status::InternalError("must set shared state, in {}", _parent->get_name()); | 571 | 0 | } | 572 | | | 573 | 4.49k | _rows_returned_counter = | 574 | 4.49k | ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1); | 575 | 4.49k | _blocks_returned_counter = | 576 | 4.49k | ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1); | 577 | 4.49k | _output_block_bytes_counter = | 578 | 4.49k | ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1); | 579 | 4.49k | _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL( | 580 | 4.49k | _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1); | 581 | 4.49k | _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL( | 582 | 4.49k | _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1); | 583 | 4.49k | _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2); | 584 | 4.49k | _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2); | 585 | 4.49k | _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2); | 586 | 4.49k | _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2); | 587 | 4.49k | _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1); | 588 | 4.49k | _memory_used_counter = | 589 | 4.49k | _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1); | 590 | 4.49k | _common_profile->add_info_string("IsColocate", | 591 | 4.49k | std::to_string(_parent->is_colocated_operator())); | 592 | 4.49k | _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator())); | 593 | 4.49k | _common_profile->add_info_string("FollowedByShuffledOperator", | 594 | 4.49k | std::to_string(_parent->followed_by_shuffled_operator())); | 595 | 4.49k | return Status::OK(); | 596 | 4.49k | } |
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE Line | Count | Source | 531 | 3 | Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) { | 532 | 3 | _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix())); | 533 | 3 | _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS)); | 534 | 3 | _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS)); | 535 | 3 | _operator_profile->set_metadata(_parent->node_id()); | 536 | | // indent is false so that source operator will have same | 537 | | // indentation_level with its parent operator. | 538 | 3 | info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false); | 539 | 3 | _operator_profile->add_child(_common_profile.get(), true); | 540 | 3 | _operator_profile->add_child(_custom_profile.get(), true); | 541 | 3 | constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>; | 542 | 3 | if constexpr (!is_fake_shared) { | 543 | 3 | if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) { | 544 | 0 | _shared_state = info.shared_state_map.at(_parent->operator_id()) | 545 | 0 | .first.get() | 546 | 0 | ->template cast<SharedStateArg>(); | 547 | |
| 548 | 0 | _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get(); | 549 | 0 | _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL( | 550 | 0 | _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1); | 551 | 3 | } else if (info.shared_state) { | 552 | | if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) { | 553 | | DCHECK(false); | 554 | | } | 555 | | // For UnionSourceOperator without children, there is no shared state. | 556 | 3 | _shared_state = info.shared_state->template cast<SharedStateArg>(); | 557 | | | 558 | 3 | _dependency = _shared_state->create_source_dependency( | 559 | 3 | _parent->operator_id(), _parent->node_id(), _parent->get_name()); | 560 | 3 | _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL( | 561 | 3 | _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1); | 562 | 3 | } else { | 563 | | if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) { | 564 | | DCHECK(false); | 565 | | } | 566 | 0 | } | 567 | 3 | } | 568 | | | 569 | 3 | if (must_set_shared_state() && _shared_state == nullptr) { | 570 | 0 | return Status::InternalError("must set shared state, in {}", _parent->get_name()); | 571 | 0 | } | 572 | | | 573 | 3 | _rows_returned_counter = | 574 | 3 | ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1); | 575 | 3 | _blocks_returned_counter = | 576 | 3 | ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1); | 577 | 3 | _output_block_bytes_counter = | 578 | 3 | ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1); | 579 | 3 | _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL( | 580 | 3 | _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1); | 581 | 3 | _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL( | 582 | 3 | _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1); | 583 | 3 | _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2); | 584 | 3 | _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2); | 585 | 3 | _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2); | 586 | 3 | _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2); | 587 | 3 | _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1); | 588 | 3 | _memory_used_counter = | 589 | 3 | _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1); | 590 | 3 | _common_profile->add_info_string("IsColocate", | 591 | 3 | std::to_string(_parent->is_colocated_operator())); | 592 | 3 | _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator())); | 593 | 3 | _common_profile->add_info_string("FollowedByShuffledOperator", | 594 | 3 | std::to_string(_parent->followed_by_shuffled_operator())); | 595 | 3 | return Status::OK(); | 596 | 3 | } |
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE Line | Count | Source | 531 | 4.42k | Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) { | 532 | 4.42k | _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix())); | 533 | 4.42k | _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS)); | 534 | 4.42k | _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS)); | 535 | 4.42k | _operator_profile->set_metadata(_parent->node_id()); | 536 | | // indent is false so that source operator will have same | 537 | | // indentation_level with its parent operator. | 538 | 4.42k | info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false); | 539 | 4.42k | _operator_profile->add_child(_common_profile.get(), true); | 540 | 4.42k | _operator_profile->add_child(_custom_profile.get(), true); | 541 | 4.42k | constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>; | 542 | 4.42k | if constexpr (!is_fake_shared) { | 543 | 4.42k | if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) { | 544 | 0 | _shared_state = info.shared_state_map.at(_parent->operator_id()) | 545 | 0 | .first.get() | 546 | 0 | ->template cast<SharedStateArg>(); | 547 | |
| 548 | 0 | _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get(); | 549 | 0 | _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL( | 550 | 0 | _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1); | 551 | 4.42k | } else if (info.shared_state) { | 552 | | if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) { | 553 | | DCHECK(false); | 554 | | } | 555 | | // For UnionSourceOperator without children, there is no shared state. | 556 | 4.42k | _shared_state = info.shared_state->template cast<SharedStateArg>(); | 557 | | | 558 | 4.42k | _dependency = _shared_state->create_source_dependency( | 559 | 4.42k | _parent->operator_id(), _parent->node_id(), _parent->get_name()); | 560 | 4.42k | _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL( | 561 | 4.42k | _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1); | 562 | 4.42k | } else { | 563 | | if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) { | 564 | | DCHECK(false); | 565 | | } | 566 | 0 | } | 567 | 4.42k | } | 568 | | | 569 | 4.42k | if (must_set_shared_state() && _shared_state == nullptr) { | 570 | 0 | return Status::InternalError("must set shared state, in {}", _parent->get_name()); | 571 | 0 | } | 572 | | | 573 | 4.42k | _rows_returned_counter = | 574 | 4.42k | ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1); | 575 | 4.42k | _blocks_returned_counter = | 576 | 4.42k | ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1); | 577 | 4.42k | _output_block_bytes_counter = | 578 | 4.42k | ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1); | 579 | 4.42k | _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL( | 580 | 4.42k | _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1); | 581 | 4.42k | _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL( | 582 | 4.42k | _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1); | 583 | 4.42k | _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2); | 584 | 4.42k | _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2); | 585 | 4.42k | _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2); | 586 | 4.42k | _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2); | 587 | 4.42k | _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1); | 588 | 4.42k | _memory_used_counter = | 589 | 4.42k | _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1); | 590 | 4.42k | _common_profile->add_info_string("IsColocate", | 591 | 4.42k | std::to_string(_parent->is_colocated_operator())); | 592 | 4.42k | _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator())); | 593 | 4.42k | _common_profile->add_info_string("FollowedByShuffledOperator", | 594 | 4.42k | std::to_string(_parent->followed_by_shuffled_operator())); | 595 | 4.42k | return Status::OK(); | 596 | 4.42k | } |
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE Line | Count | Source | 531 | 102 | Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) { | 532 | 102 | _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix())); | 533 | 102 | _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS)); | 534 | 102 | _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS)); | 535 | 102 | _operator_profile->set_metadata(_parent->node_id()); | 536 | | // indent is false so that source operator will have same | 537 | | // indentation_level with its parent operator. | 538 | 102 | info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false); | 539 | 102 | _operator_profile->add_child(_common_profile.get(), true); | 540 | 102 | _operator_profile->add_child(_custom_profile.get(), true); | 541 | 102 | constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>; | 542 | 102 | if constexpr (!is_fake_shared) { | 543 | 102 | if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) { | 544 | 0 | _shared_state = info.shared_state_map.at(_parent->operator_id()) | 545 | 0 | .first.get() | 546 | 0 | ->template cast<SharedStateArg>(); | 547 | |
| 548 | 0 | _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get(); | 549 | 0 | _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL( | 550 | 0 | _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1); | 551 | 102 | } else if (info.shared_state) { | 552 | | if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) { | 553 | | DCHECK(false); | 554 | | } | 555 | | // For UnionSourceOperator without children, there is no shared state. | 556 | 102 | _shared_state = info.shared_state->template cast<SharedStateArg>(); | 557 | | | 558 | 102 | _dependency = _shared_state->create_source_dependency( | 559 | 102 | _parent->operator_id(), _parent->node_id(), _parent->get_name()); | 560 | 102 | _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL( | 561 | 102 | _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1); | 562 | 102 | } else { | 563 | | if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) { | 564 | | DCHECK(false); | 565 | | } | 566 | 0 | } | 567 | 102 | } | 568 | | | 569 | 102 | if (must_set_shared_state() && _shared_state == nullptr) { | 570 | 0 | return Status::InternalError("must set shared state, in {}", _parent->get_name()); | 571 | 0 | } | 572 | | | 573 | 102 | _rows_returned_counter = | 574 | 102 | ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1); | 575 | 102 | _blocks_returned_counter = | 576 | 102 | ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1); | 577 | 102 | _output_block_bytes_counter = | 578 | 102 | ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1); | 579 | 102 | _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL( | 580 | 102 | _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1); | 581 | 102 | _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL( | 582 | 102 | _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1); | 583 | 102 | _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2); | 584 | 102 | _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2); | 585 | 102 | _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2); | 586 | 102 | _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2); | 587 | 102 | _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1); | 588 | 102 | _memory_used_counter = | 589 | 102 | _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1); | 590 | 102 | _common_profile->add_info_string("IsColocate", | 591 | 102 | std::to_string(_parent->is_colocated_operator())); | 592 | 102 | _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator())); | 593 | 102 | _common_profile->add_info_string("FollowedByShuffledOperator", | 594 | 102 | std::to_string(_parent->followed_by_shuffled_operator())); | 595 | 102 | return Status::OK(); | 596 | 102 | } |
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE Line | Count | Source | 531 | 12 | Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) { | 532 | 12 | _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix())); | 533 | 12 | _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS)); | 534 | 12 | _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS)); | 535 | 12 | _operator_profile->set_metadata(_parent->node_id()); | 536 | | // indent is false so that source operator will have same | 537 | | // indentation_level with its parent operator. | 538 | 12 | info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false); | 539 | 12 | _operator_profile->add_child(_common_profile.get(), true); | 540 | 12 | _operator_profile->add_child(_custom_profile.get(), true); | 541 | 12 | constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>; | 542 | 12 | if constexpr (!is_fake_shared) { | 543 | 12 | if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) { | 544 | 0 | _shared_state = info.shared_state_map.at(_parent->operator_id()) | 545 | 0 | .first.get() | 546 | 0 | ->template cast<SharedStateArg>(); | 547 | |
| 548 | 0 | _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get(); | 549 | 0 | _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL( | 550 | 0 | _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1); | 551 | 12 | } else if (info.shared_state) { | 552 | | if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) { | 553 | | DCHECK(false); | 554 | | } | 555 | | // For UnionSourceOperator without children, there is no shared state. | 556 | 12 | _shared_state = info.shared_state->template cast<SharedStateArg>(); | 557 | | | 558 | 12 | _dependency = _shared_state->create_source_dependency( | 559 | 12 | _parent->operator_id(), _parent->node_id(), _parent->get_name()); | 560 | 12 | _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL( | 561 | 12 | _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1); | 562 | 12 | } else { | 563 | | if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) { | 564 | | DCHECK(false); | 565 | | } | 566 | 0 | } | 567 | 12 | } | 568 | | | 569 | 12 | if (must_set_shared_state() && _shared_state == nullptr) { | 570 | 0 | return Status::InternalError("must set shared state, in {}", _parent->get_name()); | 571 | 0 | } | 572 | | | 573 | 12 | _rows_returned_counter = | 574 | 12 | ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1); | 575 | 12 | _blocks_returned_counter = | 576 | 12 | ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1); | 577 | 12 | _output_block_bytes_counter = | 578 | 12 | ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1); | 579 | 12 | _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL( | 580 | 12 | _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1); | 581 | 12 | _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL( | 582 | 12 | _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1); | 583 | 12 | _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2); | 584 | 12 | _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2); | 585 | 12 | _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2); | 586 | 12 | _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2); | 587 | 12 | _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1); | 588 | 12 | _memory_used_counter = | 589 | 12 | _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1); | 590 | 12 | _common_profile->add_info_string("IsColocate", | 591 | 12 | std::to_string(_parent->is_colocated_operator())); | 592 | 12 | _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator())); | 593 | 12 | _common_profile->add_info_string("FollowedByShuffledOperator", | 594 | 12 | std::to_string(_parent->followed_by_shuffled_operator())); | 595 | 12 | return Status::OK(); | 596 | 12 | } |
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE Line | Count | Source | 531 | 132k | Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) { | 532 | 132k | _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix())); | 533 | 132k | _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS)); | 534 | 132k | _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS)); | 535 | 132k | _operator_profile->set_metadata(_parent->node_id()); | 536 | | // indent is false so that source operator will have same | 537 | | // indentation_level with its parent operator. | 538 | 132k | info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false); | 539 | 132k | _operator_profile->add_child(_common_profile.get(), true); | 540 | 132k | _operator_profile->add_child(_custom_profile.get(), true); | 541 | 132k | constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>; | 542 | 132k | if constexpr (!is_fake_shared) { | 543 | 132k | if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) { | 544 | 132k | _shared_state = info.shared_state_map.at(_parent->operator_id()) | 545 | 132k | .first.get() | 546 | 132k | ->template cast<SharedStateArg>(); | 547 | | | 548 | 132k | _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get(); | 549 | 132k | _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL( | 550 | 132k | _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1); | 551 | 132k | } else if (info.shared_state) { | 552 | 0 | if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) { | 553 | 0 | DCHECK(false); | 554 | 0 | } | 555 | | // For UnionSourceOperator without children, there is no shared state. | 556 | 0 | _shared_state = info.shared_state->template cast<SharedStateArg>(); | 557 | |
| 558 | 0 | _dependency = _shared_state->create_source_dependency( | 559 | 0 | _parent->operator_id(), _parent->node_id(), _parent->get_name()); | 560 | 0 | _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL( | 561 | 0 | _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1); | 562 | 0 | } else { | 563 | 0 | if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) { | 564 | 0 | DCHECK(false); | 565 | 0 | } | 566 | 0 | } | 567 | 132k | } | 568 | | | 569 | 132k | if (must_set_shared_state() && _shared_state == nullptr) { | 570 | 0 | return Status::InternalError("must set shared state, in {}", _parent->get_name()); | 571 | 0 | } | 572 | | | 573 | 132k | _rows_returned_counter = | 574 | 132k | ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1); | 575 | 132k | _blocks_returned_counter = | 576 | 132k | ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1); | 577 | 132k | _output_block_bytes_counter = | 578 | 132k | ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1); | 579 | 132k | _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL( | 580 | 132k | _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1); | 581 | 132k | _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL( | 582 | 132k | _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1); | 583 | 132k | _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2); | 584 | 132k | _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2); | 585 | 132k | _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2); | 586 | 132k | _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2); | 587 | 132k | _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1); | 588 | 132k | _memory_used_counter = | 589 | 132k | _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1); | 590 | 132k | _common_profile->add_info_string("IsColocate", | 591 | 132k | std::to_string(_parent->is_colocated_operator())); | 592 | 132k | _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator())); | 593 | 132k | _common_profile->add_info_string("FollowedByShuffledOperator", | 594 | 132k | std::to_string(_parent->followed_by_shuffled_operator())); | 595 | 132k | return Status::OK(); | 596 | 132k | } |
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE |
597 | | |
598 | | template <typename SharedStateArg> |
599 | 445k | Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) { |
600 | 445k | _conjuncts.resize(_parent->_conjuncts.size()); |
601 | 445k | _projections.resize(_parent->_projections.size()); |
602 | 643k | for (size_t i = 0; i < _conjuncts.size(); i++) { |
603 | 198k | RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i])); |
604 | 198k | } |
605 | 1.37M | for (size_t i = 0; i < _projections.size(); i++) { |
606 | 930k | RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i])); |
607 | 930k | } |
608 | 445k | _intermediate_projections.resize(_parent->_intermediate_projections.size()); |
609 | 448k | for (int i = 0; i < _parent->_intermediate_projections.size(); i++) { |
610 | 3.86k | _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size()); |
611 | 28.9k | for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) { |
612 | 25.1k | RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone( |
613 | 25.1k | state, _intermediate_projections[i][j])); |
614 | 25.1k | } |
615 | 3.86k | } |
616 | 445k | return Status::OK(); |
617 | 445k | } _ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4openEPNS_12RuntimeStateE Line | Count | Source | 599 | 30.2k | Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) { | 600 | 30.2k | _conjuncts.resize(_parent->_conjuncts.size()); | 601 | 30.2k | _projections.resize(_parent->_projections.size()); | 602 | 30.2k | for (size_t i = 0; i < _conjuncts.size(); i++) { | 603 | 0 | RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i])); | 604 | 0 | } | 605 | 112k | for (size_t i = 0; i < _projections.size(); i++) { | 606 | 82.6k | RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i])); | 607 | 82.6k | } | 608 | 30.2k | _intermediate_projections.resize(_parent->_intermediate_projections.size()); | 609 | 31.0k | for (int i = 0; i < _parent->_intermediate_projections.size(); i++) { | 610 | 792 | _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size()); | 611 | 9.95k | for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) { | 612 | 9.15k | RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone( | 613 | 9.15k | state, _intermediate_projections[i][j])); | 614 | 9.15k | } | 615 | 792 | } | 616 | 30.2k | return Status::OK(); | 617 | 30.2k | } |
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4openEPNS_12RuntimeStateE Line | Count | Source | 599 | 3 | Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) { | 600 | 3 | _conjuncts.resize(_parent->_conjuncts.size()); | 601 | 3 | _projections.resize(_parent->_projections.size()); | 602 | 3 | for (size_t i = 0; i < _conjuncts.size(); i++) { | 603 | 0 | RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i])); | 604 | 0 | } | 605 | 3 | for (size_t i = 0; i < _projections.size(); i++) { | 606 | 0 | RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i])); | 607 | 0 | } | 608 | 3 | _intermediate_projections.resize(_parent->_intermediate_projections.size()); | 609 | 3 | for (int i = 0; i < _parent->_intermediate_projections.size(); i++) { | 610 | 0 | _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size()); | 611 | 0 | for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) { | 612 | 0 | RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone( | 613 | 0 | state, _intermediate_projections[i][j])); | 614 | 0 | } | 615 | 0 | } | 616 | 3 | return Status::OK(); | 617 | 3 | } |
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4openEPNS_12RuntimeStateE Line | Count | Source | 599 | 80.2k | Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) { | 600 | 80.2k | _conjuncts.resize(_parent->_conjuncts.size()); | 601 | 80.2k | _projections.resize(_parent->_projections.size()); | 602 | 80.2k | for (size_t i = 0; i < _conjuncts.size(); i++) { | 603 | 0 | RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i])); | 604 | 0 | } | 605 | 80.3k | for (size_t i = 0; i < _projections.size(); i++) { | 606 | 72 | RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i])); | 607 | 72 | } | 608 | 80.2k | _intermediate_projections.resize(_parent->_intermediate_projections.size()); | 609 | 80.2k | for (int i = 0; i < _parent->_intermediate_projections.size(); i++) { | 610 | 0 | _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size()); | 611 | 0 | for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) { | 612 | 0 | RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone( | 613 | 0 | state, _intermediate_projections[i][j])); | 614 | 0 | } | 615 | 0 | } | 616 | 80.2k | return Status::OK(); | 617 | 80.2k | } |
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4openEPNS_12RuntimeStateE Line | Count | Source | 599 | 11 | Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) { | 600 | 11 | _conjuncts.resize(_parent->_conjuncts.size()); | 601 | 11 | _projections.resize(_parent->_projections.size()); | 602 | 11 | for (size_t i = 0; i < _conjuncts.size(); i++) { | 603 | 0 | RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i])); | 604 | 0 | } | 605 | 11 | for (size_t i = 0; i < _projections.size(); i++) { | 606 | 0 | RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i])); | 607 | 0 | } | 608 | 11 | _intermediate_projections.resize(_parent->_intermediate_projections.size()); | 609 | 11 | for (int i = 0; i < _parent->_intermediate_projections.size(); i++) { | 610 | 0 | _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size()); | 611 | 0 | for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) { | 612 | 0 | RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone( | 613 | 0 | state, _intermediate_projections[i][j])); | 614 | 0 | } | 615 | 0 | } | 616 | 11 | return Status::OK(); | 617 | 11 | } |
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4openEPNS_12RuntimeStateE Line | Count | Source | 599 | 3.41k | Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) { | 600 | 3.41k | _conjuncts.resize(_parent->_conjuncts.size()); | 601 | 3.41k | _projections.resize(_parent->_projections.size()); | 602 | 3.41k | for (size_t i = 0; i < _conjuncts.size(); i++) { | 603 | 0 | RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i])); | 604 | 0 | } | 605 | 30.2k | for (size_t i = 0; i < _projections.size(); i++) { | 606 | 26.8k | RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i])); | 607 | 26.8k | } | 608 | 3.41k | _intermediate_projections.resize(_parent->_intermediate_projections.size()); | 609 | 3.54k | for (int i = 0; i < _parent->_intermediate_projections.size(); i++) { | 610 | 128 | _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size()); | 611 | 766 | for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) { | 612 | 638 | RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone( | 613 | 638 | state, _intermediate_projections[i][j])); | 614 | 638 | } | 615 | 128 | } | 616 | 3.41k | return Status::OK(); | 617 | 3.41k | } |
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4openEPNS_12RuntimeStateE Line | Count | Source | 599 | 67 | Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) { | 600 | 67 | _conjuncts.resize(_parent->_conjuncts.size()); | 601 | 67 | _projections.resize(_parent->_projections.size()); | 602 | 67 | for (size_t i = 0; i < _conjuncts.size(); i++) { | 603 | 0 | RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i])); | 604 | 0 | } | 605 | 155 | for (size_t i = 0; i < _projections.size(); i++) { | 606 | 88 | RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i])); | 607 | 88 | } | 608 | 67 | _intermediate_projections.resize(_parent->_intermediate_projections.size()); | 609 | 67 | for (int i = 0; i < _parent->_intermediate_projections.size(); i++) { | 610 | 0 | _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size()); | 611 | 0 | for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) { | 612 | 0 | RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone( | 613 | 0 | state, _intermediate_projections[i][j])); | 614 | 0 | } | 615 | 0 | } | 616 | 67 | return Status::OK(); | 617 | 67 | } |
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4openEPNS_12RuntimeStateE Line | Count | Source | 599 | 42.8k | Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) { | 600 | 42.8k | _conjuncts.resize(_parent->_conjuncts.size()); | 601 | 42.8k | _projections.resize(_parent->_projections.size()); | 602 | 45.3k | for (size_t i = 0; i < _conjuncts.size(); i++) { | 603 | 2.49k | RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i])); | 604 | 2.49k | } | 605 | 89.2k | for (size_t i = 0; i < _projections.size(); i++) { | 606 | 46.4k | RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i])); | 607 | 46.4k | } | 608 | 42.8k | _intermediate_projections.resize(_parent->_intermediate_projections.size()); | 609 | 42.9k | for (int i = 0; i < _parent->_intermediate_projections.size(); i++) { | 610 | 114 | _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size()); | 611 | 840 | for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) { | 612 | 726 | RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone( | 613 | 726 | state, _intermediate_projections[i][j])); | 614 | 726 | } | 615 | 114 | } | 616 | 42.8k | return Status::OK(); | 617 | 42.8k | } |
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4openEPNS_12RuntimeStateE _ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4openEPNS_12RuntimeStateE Line | Count | Source | 599 | 66 | Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) { | 600 | 66 | _conjuncts.resize(_parent->_conjuncts.size()); | 601 | 66 | _projections.resize(_parent->_projections.size()); | 602 | 66 | for (size_t i = 0; i < _conjuncts.size(); i++) { | 603 | 0 | RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i])); | 604 | 0 | } | 605 | 130 | for (size_t i = 0; i < _projections.size(); i++) { | 606 | 64 | RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i])); | 607 | 64 | } | 608 | 66 | _intermediate_projections.resize(_parent->_intermediate_projections.size()); | 609 | 66 | for (int i = 0; i < _parent->_intermediate_projections.size(); i++) { | 610 | 0 | _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size()); | 611 | 0 | for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) { | 612 | 0 | RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone( | 613 | 0 | state, _intermediate_projections[i][j])); | 614 | 0 | } | 615 | 0 | } | 616 | 66 | return Status::OK(); | 617 | 66 | } |
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4openEPNS_12RuntimeStateE Line | Count | Source | 599 | 146k | Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) { | 600 | 146k | _conjuncts.resize(_parent->_conjuncts.size()); | 601 | 146k | _projections.resize(_parent->_projections.size()); | 602 | 339k | for (size_t i = 0; i < _conjuncts.size(); i++) { | 603 | 193k | RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i])); | 604 | 193k | } | 605 | 911k | for (size_t i = 0; i < _projections.size(); i++) { | 606 | 764k | RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i])); | 607 | 764k | } | 608 | 146k | _intermediate_projections.resize(_parent->_intermediate_projections.size()); | 609 | 149k | for (int i = 0; i < _parent->_intermediate_projections.size(); i++) { | 610 | 2.82k | _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size()); | 611 | 17.4k | for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) { | 612 | 14.5k | RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone( | 613 | 14.5k | state, _intermediate_projections[i][j])); | 614 | 14.5k | } | 615 | 2.82k | } | 616 | 146k | return Status::OK(); | 617 | 146k | } |
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4openEPNS_12RuntimeStateE Line | Count | Source | 599 | 4.49k | Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) { | 600 | 4.49k | _conjuncts.resize(_parent->_conjuncts.size()); | 601 | 4.49k | _projections.resize(_parent->_projections.size()); | 602 | 4.49k | for (size_t i = 0; i < _conjuncts.size(); i++) { | 603 | 0 | RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i])); | 604 | 0 | } | 605 | 13.7k | for (size_t i = 0; i < _projections.size(); i++) { | 606 | 9.20k | RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i])); | 607 | 9.20k | } | 608 | 4.49k | _intermediate_projections.resize(_parent->_intermediate_projections.size()); | 609 | 4.49k | for (int i = 0; i < _parent->_intermediate_projections.size(); i++) { | 610 | 0 | _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size()); | 611 | 0 | for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) { | 612 | 0 | RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone( | 613 | 0 | state, _intermediate_projections[i][j])); | 614 | 0 | } | 615 | 0 | } | 616 | 4.49k | return Status::OK(); | 617 | 4.49k | } |
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4openEPNS_12RuntimeStateE Line | Count | Source | 599 | 3 | Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) { | 600 | 3 | _conjuncts.resize(_parent->_conjuncts.size()); | 601 | 3 | _projections.resize(_parent->_projections.size()); | 602 | 3 | for (size_t i = 0; i < _conjuncts.size(); i++) { | 603 | 0 | RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i])); | 604 | 0 | } | 605 | 3 | for (size_t i = 0; i < _projections.size(); i++) { | 606 | 0 | RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i])); | 607 | 0 | } | 608 | 3 | _intermediate_projections.resize(_parent->_intermediate_projections.size()); | 609 | 3 | for (int i = 0; i < _parent->_intermediate_projections.size(); i++) { | 610 | 0 | _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size()); | 611 | 0 | for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) { | 612 | 0 | RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone( | 613 | 0 | state, _intermediate_projections[i][j])); | 614 | 0 | } | 615 | 0 | } | 616 | 3 | return Status::OK(); | 617 | 3 | } |
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4openEPNS_12RuntimeStateE Line | Count | Source | 599 | 4.41k | Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) { | 600 | 4.41k | _conjuncts.resize(_parent->_conjuncts.size()); | 601 | 4.41k | _projections.resize(_parent->_projections.size()); | 602 | 6.92k | for (size_t i = 0; i < _conjuncts.size(); i++) { | 603 | 2.50k | RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i])); | 604 | 2.50k | } | 605 | 4.41k | for (size_t i = 0; i < _projections.size(); i++) { | 606 | 0 | RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i])); | 607 | 0 | } | 608 | 4.41k | _intermediate_projections.resize(_parent->_intermediate_projections.size()); | 609 | 4.41k | for (int i = 0; i < _parent->_intermediate_projections.size(); i++) { | 610 | 0 | _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size()); | 611 | 0 | for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) { | 612 | 0 | RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone( | 613 | 0 | state, _intermediate_projections[i][j])); | 614 | 0 | } | 615 | 0 | } | 616 | 4.41k | return Status::OK(); | 617 | 4.41k | } |
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4openEPNS_12RuntimeStateE Line | Count | Source | 599 | 102 | Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) { | 600 | 102 | _conjuncts.resize(_parent->_conjuncts.size()); | 601 | 102 | _projections.resize(_parent->_projections.size()); | 602 | 102 | for (size_t i = 0; i < _conjuncts.size(); i++) { | 603 | 0 | RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i])); | 604 | 0 | } | 605 | 102 | for (size_t i = 0; i < _projections.size(); i++) { | 606 | 0 | RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i])); | 607 | 0 | } | 608 | 102 | _intermediate_projections.resize(_parent->_intermediate_projections.size()); | 609 | 102 | for (int i = 0; i < _parent->_intermediate_projections.size(); i++) { | 610 | 0 | _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size()); | 611 | 0 | for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) { | 612 | 0 | RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone( | 613 | 0 | state, _intermediate_projections[i][j])); | 614 | 0 | } | 615 | 0 | } | 616 | 102 | return Status::OK(); | 617 | 102 | } |
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4openEPNS_12RuntimeStateE Line | Count | Source | 599 | 12 | Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) { | 600 | 12 | _conjuncts.resize(_parent->_conjuncts.size()); | 601 | 12 | _projections.resize(_parent->_projections.size()); | 602 | 12 | for (size_t i = 0; i < _conjuncts.size(); i++) { | 603 | 0 | RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i])); | 604 | 0 | } | 605 | 12 | for (size_t i = 0; i < _projections.size(); i++) { | 606 | 0 | RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i])); | 607 | 0 | } | 608 | 12 | _intermediate_projections.resize(_parent->_intermediate_projections.size()); | 609 | 12 | for (int i = 0; i < _parent->_intermediate_projections.size(); i++) { | 610 | 0 | _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size()); | 611 | 0 | for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) { | 612 | 0 | RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone( | 613 | 0 | state, _intermediate_projections[i][j])); | 614 | 0 | } | 615 | 0 | } | 616 | 12 | return Status::OK(); | 617 | 12 | } |
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4openEPNS_12RuntimeStateE Line | Count | Source | 599 | 132k | Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) { | 600 | 132k | _conjuncts.resize(_parent->_conjuncts.size()); | 601 | 132k | _projections.resize(_parent->_projections.size()); | 602 | 132k | for (size_t i = 0; i < _conjuncts.size(); i++) { | 603 | 0 | RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i])); | 604 | 0 | } | 605 | 132k | for (size_t i = 0; i < _projections.size(); i++) { | 606 | 0 | RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i])); | 607 | 0 | } | 608 | 132k | _intermediate_projections.resize(_parent->_intermediate_projections.size()); | 609 | 132k | for (int i = 0; i < _parent->_intermediate_projections.size(); i++) { | 610 | 0 | _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size()); | 611 | 0 | for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) { | 612 | 0 | RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone( | 613 | 0 | state, _intermediate_projections[i][j])); | 614 | 0 | } | 615 | 0 | } | 616 | 132k | return Status::OK(); | 617 | 132k | } |
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4openEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4openEPNS_12RuntimeStateE |
618 | | |
619 | | template <typename SharedStateArg> |
620 | 1.95k | Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) { |
621 | 1.95k | if (_terminated) { |
622 | 0 | return Status::OK(); |
623 | 0 | } |
624 | 1.95k | _terminated = true; |
625 | 1.95k | return Status::OK(); |
626 | 1.95k | } _ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE Line | Count | Source | 620 | 88 | Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) { | 621 | 88 | if (_terminated) { | 622 | 0 | return Status::OK(); | 623 | 0 | } | 624 | 88 | _terminated = true; | 625 | 88 | return Status::OK(); | 626 | 88 | } |
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE _ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE Line | Count | Source | 620 | 2 | Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) { | 621 | 2 | if (_terminated) { | 622 | 0 | return Status::OK(); | 623 | 0 | } | 624 | 2 | _terminated = true; | 625 | 2 | return Status::OK(); | 626 | 2 | } |
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE _ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE Line | Count | Source | 620 | 20 | Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) { | 621 | 20 | if (_terminated) { | 622 | 0 | return Status::OK(); | 623 | 0 | } | 624 | 20 | _terminated = true; | 625 | 20 | return Status::OK(); | 626 | 20 | } |
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE _ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE Line | Count | Source | 620 | 6 | Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) { | 621 | 6 | if (_terminated) { | 622 | 0 | return Status::OK(); | 623 | 0 | } | 624 | 6 | _terminated = true; | 625 | 6 | return Status::OK(); | 626 | 6 | } |
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE _ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE Line | Count | Source | 620 | 1.44k | Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) { | 621 | 1.44k | if (_terminated) { | 622 | 0 | return Status::OK(); | 623 | 0 | } | 624 | 1.44k | _terminated = true; | 625 | 1.44k | return Status::OK(); | 626 | 1.44k | } |
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE _ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE Line | Count | Source | 620 | 388 | Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) { | 621 | 388 | if (_terminated) { | 622 | 0 | return Status::OK(); | 623 | 0 | } | 624 | 388 | _terminated = true; | 625 | 388 | return Status::OK(); | 626 | 388 | } |
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE |
627 | | |
628 | | template <typename SharedStateArg> |
629 | 528k | Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) { |
630 | 528k | if (_closed) { |
631 | 83.3k | return Status::OK(); |
632 | 83.3k | } |
633 | 444k | if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) { |
634 | 298k | COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time()); |
635 | 298k | } |
636 | 444k | _closed = true; |
637 | 444k | return Status::OK(); |
638 | 528k | } _ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateE Line | Count | Source | 629 | 30.1k | Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) { | 630 | 30.1k | if (_closed) { | 631 | 0 | return Status::OK(); | 632 | 0 | } | 633 | 30.1k | if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) { | 634 | 30.1k | COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time()); | 635 | 30.1k | } | 636 | 30.1k | _closed = true; | 637 | 30.1k | return Status::OK(); | 638 | 30.1k | } |
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateE Line | Count | Source | 629 | 3 | Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) { | 630 | 3 | if (_closed) { | 631 | 0 | return Status::OK(); | 632 | 0 | } | 633 | 3 | if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) { | 634 | 3 | COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time()); | 635 | 3 | } | 636 | 3 | _closed = true; | 637 | 3 | return Status::OK(); | 638 | 3 | } |
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateE Line | Count | Source | 629 | 159k | Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) { | 630 | 159k | if (_closed) { | 631 | 80.0k | return Status::OK(); | 632 | 80.0k | } | 633 | 79.8k | if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) { | 634 | 79.8k | COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time()); | 635 | 79.8k | } | 636 | 79.8k | _closed = true; | 637 | 79.8k | return Status::OK(); | 638 | 159k | } |
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateE Line | Count | Source | 629 | 11 | Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) { | 630 | 11 | if (_closed) { | 631 | 0 | return Status::OK(); | 632 | 0 | } | 633 | 11 | if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) { | 634 | 11 | COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time()); | 635 | 11 | } | 636 | 11 | _closed = true; | 637 | 11 | return Status::OK(); | 638 | 11 | } |
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateE Line | Count | Source | 629 | 3.41k | Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) { | 630 | 3.41k | if (_closed) { | 631 | 0 | return Status::OK(); | 632 | 0 | } | 633 | 3.41k | if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) { | 634 | 3.41k | COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time()); | 635 | 3.41k | } | 636 | 3.41k | _closed = true; | 637 | 3.41k | return Status::OK(); | 638 | 3.41k | } |
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateE Line | Count | Source | 629 | 113 | Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) { | 630 | 113 | if (_closed) { | 631 | 54 | return Status::OK(); | 632 | 54 | } | 633 | 59 | if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) { | 634 | 59 | COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time()); | 635 | 59 | } | 636 | 59 | _closed = true; | 637 | 59 | return Status::OK(); | 638 | 113 | } |
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateE Line | Count | Source | 629 | 42.7k | Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) { | 630 | 42.7k | if (_closed) { | 631 | 0 | return Status::OK(); | 632 | 0 | } | 633 | 42.7k | if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) { | 634 | 42.7k | COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time()); | 635 | 42.7k | } | 636 | 42.7k | _closed = true; | 637 | 42.7k | return Status::OK(); | 638 | 42.7k | } |
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateE _ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateE Line | Count | Source | 629 | 61 | Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) { | 630 | 61 | if (_closed) { | 631 | 0 | return Status::OK(); | 632 | 0 | } | 633 | 61 | if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) { | 634 | 61 | COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time()); | 635 | 61 | } | 636 | 61 | _closed = true; | 637 | 61 | return Status::OK(); | 638 | 61 | } |
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateE Line | Count | Source | 629 | 149k | Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) { | 630 | 149k | if (_closed) { | 631 | 3.27k | return Status::OK(); | 632 | 3.27k | } | 633 | | if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) { | 634 | | COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time()); | 635 | | } | 636 | 146k | _closed = true; | 637 | 146k | return Status::OK(); | 638 | 149k | } |
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateE Line | Count | Source | 629 | 4.49k | Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) { | 630 | 4.49k | if (_closed) { | 631 | 0 | return Status::OK(); | 632 | 0 | } | 633 | 4.49k | if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) { | 634 | 4.49k | COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time()); | 635 | 4.49k | } | 636 | 4.49k | _closed = true; | 637 | 4.49k | return Status::OK(); | 638 | 4.49k | } |
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateE _ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateE Line | Count | Source | 629 | 4.41k | Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) { | 630 | 4.41k | if (_closed) { | 631 | 0 | return Status::OK(); | 632 | 0 | } | 633 | 4.41k | if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) { | 634 | 4.41k | COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time()); | 635 | 4.41k | } | 636 | 4.41k | _closed = true; | 637 | 4.41k | return Status::OK(); | 638 | 4.41k | } |
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateE _ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateE Line | Count | Source | 629 | 132k | Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) { | 630 | 132k | if (_closed) { | 631 | 0 | return Status::OK(); | 632 | 0 | } | 633 | 132k | if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) { | 634 | 132k | COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time()); | 635 | 132k | } | 636 | 132k | _closed = true; | 637 | 132k | return Status::OK(); | 638 | 132k | } |
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateE Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateE |
639 | | |
640 | | template <typename SharedState> |
641 | 473k | Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) { |
642 | | // create profile |
643 | 473k | _operator_profile = |
644 | 473k | state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix())); |
645 | 473k | _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS)); |
646 | 473k | _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS)); |
647 | | |
648 | | // indentation is true |
649 | | // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask. |
650 | | // So we should set the indentation to true. |
651 | 473k | info.parent_profile->add_child(_operator_profile, /*indent=*/true); |
652 | 473k | _operator_profile->add_child(_common_profile, true); |
653 | 473k | _operator_profile->add_child(_custom_profile, true); |
654 | | |
655 | 473k | _operator_profile->set_metadata(_parent->node_id()); |
656 | 473k | _wait_for_finish_dependency_timer = |
657 | 473k | ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY); |
658 | 473k | constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>; |
659 | 473k | if constexpr (!is_fake_shared) { |
660 | 331k | if (info.shared_state_map.find(_parent->dests_id().front()) != |
661 | 331k | info.shared_state_map.end()) { |
662 | 43.0k | if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) { |
663 | 37.2k | DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1); |
664 | 37.2k | } |
665 | 43.0k | _dependency = info.shared_state_map.at(_parent->dests_id().front()) |
666 | 43.0k | .second[std::is_same_v<LocalExchangeSharedState, SharedState> |
667 | 43.0k | ? 0 |
668 | 43.0k | : info.task_idx] |
669 | 43.0k | .get(); |
670 | 43.0k | _shared_state = _dependency->shared_state()->template cast<SharedState>(); |
671 | 288k | } else { |
672 | 288k | if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) { |
673 | 6 | DCHECK(false); |
674 | 6 | } |
675 | 288k | _shared_state = info.shared_state->template cast<SharedState>(); |
676 | 288k | _dependency = _shared_state->create_sink_dependency( |
677 | 288k | _parent->dests_id().front(), _parent->node_id(), _parent->get_name()); |
678 | 288k | } |
679 | 331k | _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL( |
680 | 331k | _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1); |
681 | 331k | } |
682 | | |
683 | 473k | if (must_set_shared_state() && _shared_state == nullptr) { |
684 | 0 | return Status::InternalError("must set shared state, in {}", _parent->get_name()); |
685 | 0 | } |
686 | | |
687 | 473k | _rows_input_counter = |
688 | 473k | ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1); |
689 | 473k | _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2); |
690 | 473k | _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2); |
691 | 473k | _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2); |
692 | 473k | _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1); |
693 | 473k | _memory_used_counter = |
694 | 473k | _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1); |
695 | 473k | _common_profile->add_info_string("IsColocate", |
696 | 473k | std::to_string(_parent->is_colocated_operator())); |
697 | 473k | _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator())); |
698 | 473k | _common_profile->add_info_string("FollowedByShuffledOperator", |
699 | 473k | std::to_string(_parent->followed_by_shuffled_operator())); |
700 | 473k | return Status::OK(); |
701 | 473k | } _ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE Line | Count | Source | 641 | 78.2k | Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) { | 642 | | // create profile | 643 | 78.2k | _operator_profile = | 644 | 78.2k | state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix())); | 645 | 78.2k | _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS)); | 646 | 78.2k | _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS)); | 647 | | | 648 | | // indentation is true | 649 | | // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask. | 650 | | // So we should set the indentation to true. | 651 | 78.2k | info.parent_profile->add_child(_operator_profile, /*indent=*/true); | 652 | 78.2k | _operator_profile->add_child(_common_profile, true); | 653 | 78.2k | _operator_profile->add_child(_custom_profile, true); | 654 | | | 655 | 78.2k | _operator_profile->set_metadata(_parent->node_id()); | 656 | 78.2k | _wait_for_finish_dependency_timer = | 657 | 78.2k | ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY); | 658 | 78.2k | constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>; | 659 | 78.2k | if constexpr (!is_fake_shared) { | 660 | 78.2k | if (info.shared_state_map.find(_parent->dests_id().front()) != | 661 | 78.2k | info.shared_state_map.end()) { | 662 | | if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) { | 663 | | DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1); | 664 | | } | 665 | 5.78k | _dependency = info.shared_state_map.at(_parent->dests_id().front()) | 666 | 5.78k | .second[std::is_same_v<LocalExchangeSharedState, SharedState> | 667 | 5.78k | ? 0 | 668 | 5.78k | : info.task_idx] | 669 | 5.78k | .get(); | 670 | 5.78k | _shared_state = _dependency->shared_state()->template cast<SharedState>(); | 671 | 72.4k | } else { | 672 | | if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) { | 673 | | DCHECK(false); | 674 | | } | 675 | 72.4k | _shared_state = info.shared_state->template cast<SharedState>(); | 676 | 72.4k | _dependency = _shared_state->create_sink_dependency( | 677 | 72.4k | _parent->dests_id().front(), _parent->node_id(), _parent->get_name()); | 678 | 72.4k | } | 679 | 78.2k | _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL( | 680 | 78.2k | _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1); | 681 | 78.2k | } | 682 | | | 683 | 78.2k | if (must_set_shared_state() && _shared_state == nullptr) { | 684 | 0 | return Status::InternalError("must set shared state, in {}", _parent->get_name()); | 685 | 0 | } | 686 | | | 687 | 78.2k | _rows_input_counter = | 688 | 78.2k | ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1); | 689 | 78.2k | _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2); | 690 | 78.2k | _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2); | 691 | 78.2k | _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2); | 692 | 78.2k | _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1); | 693 | 78.2k | _memory_used_counter = | 694 | 78.2k | _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1); | 695 | 78.2k | _common_profile->add_info_string("IsColocate", | 696 | 78.2k | std::to_string(_parent->is_colocated_operator())); | 697 | 78.2k | _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator())); | 698 | 78.2k | _common_profile->add_info_string("FollowedByShuffledOperator", | 699 | 78.2k | std::to_string(_parent->followed_by_shuffled_operator())); | 700 | 78.2k | return Status::OK(); | 701 | 78.2k | } |
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE Line | Count | Source | 641 | 2 | Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) { | 642 | | // create profile | 643 | 2 | _operator_profile = | 644 | 2 | state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix())); | 645 | 2 | _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS)); | 646 | 2 | _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS)); | 647 | | | 648 | | // indentation is true | 649 | | // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask. | 650 | | // So we should set the indentation to true. | 651 | 2 | info.parent_profile->add_child(_operator_profile, /*indent=*/true); | 652 | 2 | _operator_profile->add_child(_common_profile, true); | 653 | 2 | _operator_profile->add_child(_custom_profile, true); | 654 | | | 655 | 2 | _operator_profile->set_metadata(_parent->node_id()); | 656 | 2 | _wait_for_finish_dependency_timer = | 657 | 2 | ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY); | 658 | 2 | constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>; | 659 | 2 | if constexpr (!is_fake_shared) { | 660 | 2 | if (info.shared_state_map.find(_parent->dests_id().front()) != | 661 | 2 | info.shared_state_map.end()) { | 662 | | if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) { | 663 | | DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1); | 664 | | } | 665 | 0 | _dependency = info.shared_state_map.at(_parent->dests_id().front()) | 666 | 0 | .second[std::is_same_v<LocalExchangeSharedState, SharedState> | 667 | 0 | ? 0 | 668 | 0 | : info.task_idx] | 669 | 0 | .get(); | 670 | 0 | _shared_state = _dependency->shared_state()->template cast<SharedState>(); | 671 | 2 | } else { | 672 | | if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) { | 673 | | DCHECK(false); | 674 | | } | 675 | 2 | _shared_state = info.shared_state->template cast<SharedState>(); | 676 | 2 | _dependency = _shared_state->create_sink_dependency( | 677 | 2 | _parent->dests_id().front(), _parent->node_id(), _parent->get_name()); | 678 | 2 | } | 679 | 2 | _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL( | 680 | 2 | _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1); | 681 | 2 | } | 682 | | | 683 | 2 | if (must_set_shared_state() && _shared_state == nullptr) { | 684 | 0 | return Status::InternalError("must set shared state, in {}", _parent->get_name()); | 685 | 0 | } | 686 | | | 687 | 2 | _rows_input_counter = | 688 | 2 | ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1); | 689 | 2 | _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2); | 690 | 2 | _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2); | 691 | 2 | _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2); | 692 | 2 | _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1); | 693 | 2 | _memory_used_counter = | 694 | 2 | _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1); | 695 | 2 | _common_profile->add_info_string("IsColocate", | 696 | 2 | std::to_string(_parent->is_colocated_operator())); | 697 | 2 | _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator())); | 698 | 2 | _common_profile->add_info_string("FollowedByShuffledOperator", | 699 | 2 | std::to_string(_parent->followed_by_shuffled_operator())); | 700 | 2 | return Status::OK(); | 701 | 2 | } |
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE Line | Count | Source | 641 | 80.4k | Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) { | 642 | | // create profile | 643 | 80.4k | _operator_profile = | 644 | 80.4k | state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix())); | 645 | 80.4k | _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS)); | 646 | 80.4k | _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS)); | 647 | | | 648 | | // indentation is true | 649 | | // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask. | 650 | | // So we should set the indentation to true. | 651 | 80.4k | info.parent_profile->add_child(_operator_profile, /*indent=*/true); | 652 | 80.4k | _operator_profile->add_child(_common_profile, true); | 653 | 80.4k | _operator_profile->add_child(_custom_profile, true); | 654 | | | 655 | 80.4k | _operator_profile->set_metadata(_parent->node_id()); | 656 | 80.4k | _wait_for_finish_dependency_timer = | 657 | 80.4k | ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY); | 658 | 80.4k | constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>; | 659 | 80.4k | if constexpr (!is_fake_shared) { | 660 | 80.4k | if (info.shared_state_map.find(_parent->dests_id().front()) != | 661 | 80.4k | info.shared_state_map.end()) { | 662 | | if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) { | 663 | | DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1); | 664 | | } | 665 | 0 | _dependency = info.shared_state_map.at(_parent->dests_id().front()) | 666 | 0 | .second[std::is_same_v<LocalExchangeSharedState, SharedState> | 667 | 0 | ? 0 | 668 | 0 | : info.task_idx] | 669 | 0 | .get(); | 670 | 0 | _shared_state = _dependency->shared_state()->template cast<SharedState>(); | 671 | 80.4k | } else { | 672 | | if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) { | 673 | | DCHECK(false); | 674 | | } | 675 | 80.4k | _shared_state = info.shared_state->template cast<SharedState>(); | 676 | 80.4k | _dependency = _shared_state->create_sink_dependency( | 677 | 80.4k | _parent->dests_id().front(), _parent->node_id(), _parent->get_name()); | 678 | 80.4k | } | 679 | 80.4k | _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL( | 680 | 80.4k | _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1); | 681 | 80.4k | } | 682 | | | 683 | 80.4k | if (must_set_shared_state() && _shared_state == nullptr) { | 684 | 0 | return Status::InternalError("must set shared state, in {}", _parent->get_name()); | 685 | 0 | } | 686 | | | 687 | 80.4k | _rows_input_counter = | 688 | 80.4k | ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1); | 689 | 80.4k | _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2); | 690 | 80.4k | _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2); | 691 | 80.4k | _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2); | 692 | 80.4k | _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1); | 693 | 80.4k | _memory_used_counter = | 694 | 80.4k | _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1); | 695 | 80.4k | _common_profile->add_info_string("IsColocate", | 696 | 80.4k | std::to_string(_parent->is_colocated_operator())); | 697 | 80.4k | _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator())); | 698 | 80.4k | _common_profile->add_info_string("FollowedByShuffledOperator", | 699 | 80.4k | std::to_string(_parent->followed_by_shuffled_operator())); | 700 | 80.4k | return Status::OK(); | 701 | 80.4k | } |
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE Line | Count | Source | 641 | 17 | Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) { | 642 | | // create profile | 643 | 17 | _operator_profile = | 644 | 17 | state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix())); | 645 | 17 | _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS)); | 646 | 17 | _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS)); | 647 | | | 648 | | // indentation is true | 649 | | // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask. | 650 | | // So we should set the indentation to true. | 651 | 17 | info.parent_profile->add_child(_operator_profile, /*indent=*/true); | 652 | 17 | _operator_profile->add_child(_common_profile, true); | 653 | 17 | _operator_profile->add_child(_custom_profile, true); | 654 | | | 655 | 17 | _operator_profile->set_metadata(_parent->node_id()); | 656 | 17 | _wait_for_finish_dependency_timer = | 657 | 17 | ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY); | 658 | 17 | constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>; | 659 | 17 | if constexpr (!is_fake_shared) { | 660 | 17 | if (info.shared_state_map.find(_parent->dests_id().front()) != | 661 | 17 | info.shared_state_map.end()) { | 662 | | if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) { | 663 | | DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1); | 664 | | } | 665 | 0 | _dependency = info.shared_state_map.at(_parent->dests_id().front()) | 666 | 0 | .second[std::is_same_v<LocalExchangeSharedState, SharedState> | 667 | 0 | ? 0 | 668 | 0 | : info.task_idx] | 669 | 0 | .get(); | 670 | 0 | _shared_state = _dependency->shared_state()->template cast<SharedState>(); | 671 | 17 | } else { | 672 | | if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) { | 673 | | DCHECK(false); | 674 | | } | 675 | 17 | _shared_state = info.shared_state->template cast<SharedState>(); | 676 | 17 | _dependency = _shared_state->create_sink_dependency( | 677 | 17 | _parent->dests_id().front(), _parent->node_id(), _parent->get_name()); | 678 | 17 | } | 679 | 17 | _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL( | 680 | 17 | _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1); | 681 | 17 | } | 682 | | | 683 | 17 | if (must_set_shared_state() && _shared_state == nullptr) { | 684 | 0 | return Status::InternalError("must set shared state, in {}", _parent->get_name()); | 685 | 0 | } | 686 | | | 687 | 17 | _rows_input_counter = | 688 | 17 | ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1); | 689 | 17 | _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2); | 690 | 17 | _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2); | 691 | 17 | _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2); | 692 | 17 | _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1); | 693 | 17 | _memory_used_counter = | 694 | 17 | _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1); | 695 | 17 | _common_profile->add_info_string("IsColocate", | 696 | 17 | std::to_string(_parent->is_colocated_operator())); | 697 | 17 | _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator())); | 698 | 17 | _common_profile->add_info_string("FollowedByShuffledOperator", | 699 | 17 | std::to_string(_parent->followed_by_shuffled_operator())); | 700 | 17 | return Status::OK(); | 701 | 17 | } |
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE Line | Count | Source | 641 | 3.41k | Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) { | 642 | | // create profile | 643 | 3.41k | _operator_profile = | 644 | 3.41k | state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix())); | 645 | 3.41k | _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS)); | 646 | 3.41k | _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS)); | 647 | | | 648 | | // indentation is true | 649 | | // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask. | 650 | | // So we should set the indentation to true. | 651 | 3.41k | info.parent_profile->add_child(_operator_profile, /*indent=*/true); | 652 | 3.41k | _operator_profile->add_child(_common_profile, true); | 653 | 3.41k | _operator_profile->add_child(_custom_profile, true); | 654 | | | 655 | 3.41k | _operator_profile->set_metadata(_parent->node_id()); | 656 | 3.41k | _wait_for_finish_dependency_timer = | 657 | 3.41k | ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY); | 658 | 3.41k | constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>; | 659 | 3.41k | if constexpr (!is_fake_shared) { | 660 | 3.41k | if (info.shared_state_map.find(_parent->dests_id().front()) != | 661 | 3.41k | info.shared_state_map.end()) { | 662 | | if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) { | 663 | | DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1); | 664 | | } | 665 | 0 | _dependency = info.shared_state_map.at(_parent->dests_id().front()) | 666 | 0 | .second[std::is_same_v<LocalExchangeSharedState, SharedState> | 667 | 0 | ? 0 | 668 | 0 | : info.task_idx] | 669 | 0 | .get(); | 670 | 0 | _shared_state = _dependency->shared_state()->template cast<SharedState>(); | 671 | 3.41k | } else { | 672 | | if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) { | 673 | | DCHECK(false); | 674 | | } | 675 | 3.41k | _shared_state = info.shared_state->template cast<SharedState>(); | 676 | 3.41k | _dependency = _shared_state->create_sink_dependency( | 677 | 3.41k | _parent->dests_id().front(), _parent->node_id(), _parent->get_name()); | 678 | 3.41k | } | 679 | 3.41k | _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL( | 680 | 3.41k | _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1); | 681 | 3.41k | } | 682 | | | 683 | 3.41k | if (must_set_shared_state() && _shared_state == nullptr) { | 684 | 0 | return Status::InternalError("must set shared state, in {}", _parent->get_name()); | 685 | 0 | } | 686 | | | 687 | 3.41k | _rows_input_counter = | 688 | 3.41k | ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1); | 689 | 3.41k | _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2); | 690 | 3.41k | _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2); | 691 | 3.41k | _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2); | 692 | 3.41k | _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1); | 693 | 3.41k | _memory_used_counter = | 694 | 3.41k | _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1); | 695 | 3.41k | _common_profile->add_info_string("IsColocate", | 696 | 3.41k | std::to_string(_parent->is_colocated_operator())); | 697 | 3.41k | _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator())); | 698 | 3.41k | _common_profile->add_info_string("FollowedByShuffledOperator", | 699 | 3.41k | std::to_string(_parent->followed_by_shuffled_operator())); | 700 | 3.41k | return Status::OK(); | 701 | 3.41k | } |
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE Line | Count | Source | 641 | 67 | Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) { | 642 | | // create profile | 643 | 67 | _operator_profile = | 644 | 67 | state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix())); | 645 | 67 | _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS)); | 646 | 67 | _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS)); | 647 | | | 648 | | // indentation is true | 649 | | // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask. | 650 | | // So we should set the indentation to true. | 651 | 67 | info.parent_profile->add_child(_operator_profile, /*indent=*/true); | 652 | 67 | _operator_profile->add_child(_common_profile, true); | 653 | 67 | _operator_profile->add_child(_custom_profile, true); | 654 | | | 655 | 67 | _operator_profile->set_metadata(_parent->node_id()); | 656 | 67 | _wait_for_finish_dependency_timer = | 657 | 67 | ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY); | 658 | 67 | constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>; | 659 | 67 | if constexpr (!is_fake_shared) { | 660 | 67 | if (info.shared_state_map.find(_parent->dests_id().front()) != | 661 | 67 | info.shared_state_map.end()) { | 662 | | if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) { | 663 | | DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1); | 664 | | } | 665 | 0 | _dependency = info.shared_state_map.at(_parent->dests_id().front()) | 666 | 0 | .second[std::is_same_v<LocalExchangeSharedState, SharedState> | 667 | 0 | ? 0 | 668 | 0 | : info.task_idx] | 669 | 0 | .get(); | 670 | 0 | _shared_state = _dependency->shared_state()->template cast<SharedState>(); | 671 | 67 | } else { | 672 | | if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) { | 673 | | DCHECK(false); | 674 | | } | 675 | 67 | _shared_state = info.shared_state->template cast<SharedState>(); | 676 | 67 | _dependency = _shared_state->create_sink_dependency( | 677 | 67 | _parent->dests_id().front(), _parent->node_id(), _parent->get_name()); | 678 | 67 | } | 679 | 67 | _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL( | 680 | 67 | _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1); | 681 | 67 | } | 682 | | | 683 | 67 | if (must_set_shared_state() && _shared_state == nullptr) { | 684 | 0 | return Status::InternalError("must set shared state, in {}", _parent->get_name()); | 685 | 0 | } | 686 | | | 687 | 67 | _rows_input_counter = | 688 | 67 | ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1); | 689 | 67 | _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2); | 690 | 67 | _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2); | 691 | 67 | _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2); | 692 | 67 | _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1); | 693 | 67 | _memory_used_counter = | 694 | 67 | _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1); | 695 | 67 | _common_profile->add_info_string("IsColocate", | 696 | 67 | std::to_string(_parent->is_colocated_operator())); | 697 | 67 | _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator())); | 698 | 67 | _common_profile->add_info_string("FollowedByShuffledOperator", | 699 | 67 | std::to_string(_parent->followed_by_shuffled_operator())); | 700 | 67 | return Status::OK(); | 701 | 67 | } |
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE Line | Count | Source | 641 | 42.8k | Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) { | 642 | | // create profile | 643 | 42.8k | _operator_profile = | 644 | 42.8k | state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix())); | 645 | 42.8k | _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS)); | 646 | 42.8k | _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS)); | 647 | | | 648 | | // indentation is true | 649 | | // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask. | 650 | | // So we should set the indentation to true. | 651 | 42.8k | info.parent_profile->add_child(_operator_profile, /*indent=*/true); | 652 | 42.8k | _operator_profile->add_child(_common_profile, true); | 653 | 42.8k | _operator_profile->add_child(_custom_profile, true); | 654 | | | 655 | 42.8k | _operator_profile->set_metadata(_parent->node_id()); | 656 | 42.8k | _wait_for_finish_dependency_timer = | 657 | 42.8k | ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY); | 658 | 42.8k | constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>; | 659 | 42.8k | if constexpr (!is_fake_shared) { | 660 | 42.8k | if (info.shared_state_map.find(_parent->dests_id().front()) != | 661 | 42.8k | info.shared_state_map.end()) { | 662 | | if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) { | 663 | | DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1); | 664 | | } | 665 | 0 | _dependency = info.shared_state_map.at(_parent->dests_id().front()) | 666 | 0 | .second[std::is_same_v<LocalExchangeSharedState, SharedState> | 667 | 0 | ? 0 | 668 | 0 | : info.task_idx] | 669 | 0 | .get(); | 670 | 0 | _shared_state = _dependency->shared_state()->template cast<SharedState>(); | 671 | 42.8k | } else { | 672 | | if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) { | 673 | | DCHECK(false); | 674 | | } | 675 | 42.8k | _shared_state = info.shared_state->template cast<SharedState>(); | 676 | 42.8k | _dependency = _shared_state->create_sink_dependency( | 677 | 42.8k | _parent->dests_id().front(), _parent->node_id(), _parent->get_name()); | 678 | 42.8k | } | 679 | 42.8k | _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL( | 680 | 42.8k | _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1); | 681 | 42.8k | } | 682 | | | 683 | 42.8k | if (must_set_shared_state() && _shared_state == nullptr) { | 684 | 0 | return Status::InternalError("must set shared state, in {}", _parent->get_name()); | 685 | 0 | } | 686 | | | 687 | 42.8k | _rows_input_counter = | 688 | 42.8k | ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1); | 689 | 42.8k | _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2); | 690 | 42.8k | _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2); | 691 | 42.8k | _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2); | 692 | 42.8k | _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1); | 693 | 42.8k | _memory_used_counter = | 694 | 42.8k | _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1); | 695 | 42.8k | _common_profile->add_info_string("IsColocate", | 696 | 42.8k | std::to_string(_parent->is_colocated_operator())); | 697 | 42.8k | _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator())); | 698 | 42.8k | _common_profile->add_info_string("FollowedByShuffledOperator", | 699 | 42.8k | std::to_string(_parent->followed_by_shuffled_operator())); | 700 | 42.8k | return Status::OK(); | 701 | 42.8k | } |
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE _ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE Line | Count | Source | 641 | 72 | Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) { | 642 | | // create profile | 643 | 72 | _operator_profile = | 644 | 72 | state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix())); | 645 | 72 | _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS)); | 646 | 72 | _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS)); | 647 | | | 648 | | // indentation is true | 649 | | // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask. | 650 | | // So we should set the indentation to true. | 651 | 72 | info.parent_profile->add_child(_operator_profile, /*indent=*/true); | 652 | 72 | _operator_profile->add_child(_common_profile, true); | 653 | 72 | _operator_profile->add_child(_custom_profile, true); | 654 | | | 655 | 72 | _operator_profile->set_metadata(_parent->node_id()); | 656 | 72 | _wait_for_finish_dependency_timer = | 657 | 72 | ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY); | 658 | 72 | constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>; | 659 | 72 | if constexpr (!is_fake_shared) { | 660 | 72 | if (info.shared_state_map.find(_parent->dests_id().front()) != | 661 | 72 | info.shared_state_map.end()) { | 662 | | if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) { | 663 | | DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1); | 664 | | } | 665 | 0 | _dependency = info.shared_state_map.at(_parent->dests_id().front()) | 666 | 0 | .second[std::is_same_v<LocalExchangeSharedState, SharedState> | 667 | 0 | ? 0 | 668 | 0 | : info.task_idx] | 669 | 0 | .get(); | 670 | 0 | _shared_state = _dependency->shared_state()->template cast<SharedState>(); | 671 | 72 | } else { | 672 | | if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) { | 673 | | DCHECK(false); | 674 | | } | 675 | 72 | _shared_state = info.shared_state->template cast<SharedState>(); | 676 | 72 | _dependency = _shared_state->create_sink_dependency( | 677 | 72 | _parent->dests_id().front(), _parent->node_id(), _parent->get_name()); | 678 | 72 | } | 679 | 72 | _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL( | 680 | 72 | _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1); | 681 | 72 | } | 682 | | | 683 | 72 | if (must_set_shared_state() && _shared_state == nullptr) { | 684 | 0 | return Status::InternalError("must set shared state, in {}", _parent->get_name()); | 685 | 0 | } | 686 | | | 687 | 72 | _rows_input_counter = | 688 | 72 | ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1); | 689 | 72 | _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2); | 690 | 72 | _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2); | 691 | 72 | _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2); | 692 | 72 | _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1); | 693 | 72 | _memory_used_counter = | 694 | 72 | _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1); | 695 | 72 | _common_profile->add_info_string("IsColocate", | 696 | 72 | std::to_string(_parent->is_colocated_operator())); | 697 | 72 | _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator())); | 698 | 72 | _common_profile->add_info_string("FollowedByShuffledOperator", | 699 | 72 | std::to_string(_parent->followed_by_shuffled_operator())); | 700 | 72 | return Status::OK(); | 701 | 72 | } |
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE Line | Count | Source | 641 | 141k | Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) { | 642 | | // create profile | 643 | 141k | _operator_profile = | 644 | 141k | state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix())); | 645 | 141k | _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS)); | 646 | 141k | _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS)); | 647 | | | 648 | | // indentation is true | 649 | | // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask. | 650 | | // So we should set the indentation to true. | 651 | 141k | info.parent_profile->add_child(_operator_profile, /*indent=*/true); | 652 | 141k | _operator_profile->add_child(_common_profile, true); | 653 | 141k | _operator_profile->add_child(_custom_profile, true); | 654 | | | 655 | 141k | _operator_profile->set_metadata(_parent->node_id()); | 656 | 141k | _wait_for_finish_dependency_timer = | 657 | 141k | ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY); | 658 | 141k | constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>; | 659 | | if constexpr (!is_fake_shared) { | 660 | | if (info.shared_state_map.find(_parent->dests_id().front()) != | 661 | | info.shared_state_map.end()) { | 662 | | if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) { | 663 | | DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1); | 664 | | } | 665 | | _dependency = info.shared_state_map.at(_parent->dests_id().front()) | 666 | | .second[std::is_same_v<LocalExchangeSharedState, SharedState> | 667 | | ? 0 | 668 | | : info.task_idx] | 669 | | .get(); | 670 | | _shared_state = _dependency->shared_state()->template cast<SharedState>(); | 671 | | } else { | 672 | | if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) { | 673 | | DCHECK(false); | 674 | | } | 675 | | _shared_state = info.shared_state->template cast<SharedState>(); | 676 | | _dependency = _shared_state->create_sink_dependency( | 677 | | _parent->dests_id().front(), _parent->node_id(), _parent->get_name()); | 678 | | } | 679 | | _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL( | 680 | | _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1); | 681 | | } | 682 | | | 683 | 141k | if (must_set_shared_state() && _shared_state == nullptr) { | 684 | 0 | return Status::InternalError("must set shared state, in {}", _parent->get_name()); | 685 | 0 | } | 686 | | | 687 | 141k | _rows_input_counter = | 688 | 141k | ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1); | 689 | 141k | _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2); | 690 | 141k | _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2); | 691 | 141k | _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2); | 692 | 141k | _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1); | 693 | 141k | _memory_used_counter = | 694 | 141k | _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1); | 695 | 141k | _common_profile->add_info_string("IsColocate", | 696 | 141k | std::to_string(_parent->is_colocated_operator())); | 697 | 141k | _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator())); | 698 | 141k | _common_profile->add_info_string("FollowedByShuffledOperator", | 699 | 141k | std::to_string(_parent->followed_by_shuffled_operator())); | 700 | 141k | return Status::OK(); | 701 | 141k | } |
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE Line | Count | Source | 641 | 1.30k | Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) { | 642 | | // create profile | 643 | 1.30k | _operator_profile = | 644 | 1.30k | state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix())); | 645 | 1.30k | _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS)); | 646 | 1.30k | _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS)); | 647 | | | 648 | | // indentation is true | 649 | | // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask. | 650 | | // So we should set the indentation to true. | 651 | 1.30k | info.parent_profile->add_child(_operator_profile, /*indent=*/true); | 652 | 1.30k | _operator_profile->add_child(_common_profile, true); | 653 | 1.30k | _operator_profile->add_child(_custom_profile, true); | 654 | | | 655 | 1.30k | _operator_profile->set_metadata(_parent->node_id()); | 656 | 1.30k | _wait_for_finish_dependency_timer = | 657 | 1.30k | ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY); | 658 | 1.30k | constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>; | 659 | 1.30k | if constexpr (!is_fake_shared) { | 660 | 1.30k | if (info.shared_state_map.find(_parent->dests_id().front()) != | 661 | 1.30k | info.shared_state_map.end()) { | 662 | | if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) { | 663 | | DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1); | 664 | | } | 665 | 0 | _dependency = info.shared_state_map.at(_parent->dests_id().front()) | 666 | 0 | .second[std::is_same_v<LocalExchangeSharedState, SharedState> | 667 | 0 | ? 0 | 668 | 0 | : info.task_idx] | 669 | 0 | .get(); | 670 | 0 | _shared_state = _dependency->shared_state()->template cast<SharedState>(); | 671 | 1.30k | } else { | 672 | | if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) { | 673 | | DCHECK(false); | 674 | | } | 675 | 1.30k | _shared_state = info.shared_state->template cast<SharedState>(); | 676 | 1.30k | _dependency = _shared_state->create_sink_dependency( | 677 | 1.30k | _parent->dests_id().front(), _parent->node_id(), _parent->get_name()); | 678 | 1.30k | } | 679 | 1.30k | _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL( | 680 | 1.30k | _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1); | 681 | 1.30k | } | 682 | | | 683 | 1.30k | if (must_set_shared_state() && _shared_state == nullptr) { | 684 | 0 | return Status::InternalError("must set shared state, in {}", _parent->get_name()); | 685 | 0 | } | 686 | | | 687 | 1.30k | _rows_input_counter = | 688 | 1.30k | ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1); | 689 | 1.30k | _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2); | 690 | 1.30k | _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2); | 691 | 1.30k | _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2); | 692 | 1.30k | _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1); | 693 | 1.30k | _memory_used_counter = | 694 | 1.30k | _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1); | 695 | 1.30k | _common_profile->add_info_string("IsColocate", | 696 | 1.30k | std::to_string(_parent->is_colocated_operator())); | 697 | 1.30k | _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator())); | 698 | 1.30k | _common_profile->add_info_string("FollowedByShuffledOperator", | 699 | 1.30k | std::to_string(_parent->followed_by_shuffled_operator())); | 700 | 1.30k | return Status::OK(); | 701 | 1.30k | } |
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE Line | Count | Source | 641 | 102 | Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) { | 642 | | // create profile | 643 | 102 | _operator_profile = | 644 | 102 | state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix())); | 645 | 102 | _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS)); | 646 | 102 | _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS)); | 647 | | | 648 | | // indentation is true | 649 | | // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask. | 650 | | // So we should set the indentation to true. | 651 | 102 | info.parent_profile->add_child(_operator_profile, /*indent=*/true); | 652 | 102 | _operator_profile->add_child(_common_profile, true); | 653 | 102 | _operator_profile->add_child(_custom_profile, true); | 654 | | | 655 | 102 | _operator_profile->set_metadata(_parent->node_id()); | 656 | 102 | _wait_for_finish_dependency_timer = | 657 | 102 | ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY); | 658 | 102 | constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>; | 659 | 102 | if constexpr (!is_fake_shared) { | 660 | 102 | if (info.shared_state_map.find(_parent->dests_id().front()) != | 661 | 102 | info.shared_state_map.end()) { | 662 | | if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) { | 663 | | DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1); | 664 | | } | 665 | 0 | _dependency = info.shared_state_map.at(_parent->dests_id().front()) | 666 | 0 | .second[std::is_same_v<LocalExchangeSharedState, SharedState> | 667 | 0 | ? 0 | 668 | 0 | : info.task_idx] | 669 | 0 | .get(); | 670 | 0 | _shared_state = _dependency->shared_state()->template cast<SharedState>(); | 671 | 102 | } else { | 672 | | if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) { | 673 | | DCHECK(false); | 674 | | } | 675 | 102 | _shared_state = info.shared_state->template cast<SharedState>(); | 676 | 102 | _dependency = _shared_state->create_sink_dependency( | 677 | 102 | _parent->dests_id().front(), _parent->node_id(), _parent->get_name()); | 678 | 102 | } | 679 | 102 | _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL( | 680 | 102 | _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1); | 681 | 102 | } | 682 | | | 683 | 102 | if (must_set_shared_state() && _shared_state == nullptr) { | 684 | 0 | return Status::InternalError("must set shared state, in {}", _parent->get_name()); | 685 | 0 | } | 686 | | | 687 | 102 | _rows_input_counter = | 688 | 102 | ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1); | 689 | 102 | _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2); | 690 | 102 | _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2); | 691 | 102 | _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2); | 692 | 102 | _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1); | 693 | 102 | _memory_used_counter = | 694 | 102 | _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1); | 695 | 102 | _common_profile->add_info_string("IsColocate", | 696 | 102 | std::to_string(_parent->is_colocated_operator())); | 697 | 102 | _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator())); | 698 | 102 | _common_profile->add_info_string("FollowedByShuffledOperator", | 699 | 102 | std::to_string(_parent->followed_by_shuffled_operator())); | 700 | 102 | return Status::OK(); | 701 | 102 | } |
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE Line | Count | Source | 641 | 1.47k | Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) { | 642 | | // create profile | 643 | 1.47k | _operator_profile = | 644 | 1.47k | state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix())); | 645 | 1.47k | _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS)); | 646 | 1.47k | _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS)); | 647 | | | 648 | | // indentation is true | 649 | | // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask. | 650 | | // So we should set the indentation to true. | 651 | 1.47k | info.parent_profile->add_child(_operator_profile, /*indent=*/true); | 652 | 1.47k | _operator_profile->add_child(_common_profile, true); | 653 | 1.47k | _operator_profile->add_child(_custom_profile, true); | 654 | | | 655 | 1.47k | _operator_profile->set_metadata(_parent->node_id()); | 656 | 1.47k | _wait_for_finish_dependency_timer = | 657 | 1.47k | ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY); | 658 | 1.47k | constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>; | 659 | 1.47k | if constexpr (!is_fake_shared) { | 660 | 1.47k | if (info.shared_state_map.find(_parent->dests_id().front()) != | 661 | 1.47k | info.shared_state_map.end()) { | 662 | | if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) { | 663 | | DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1); | 664 | | } | 665 | 0 | _dependency = info.shared_state_map.at(_parent->dests_id().front()) | 666 | 0 | .second[std::is_same_v<LocalExchangeSharedState, SharedState> | 667 | 0 | ? 0 | 668 | 0 | : info.task_idx] | 669 | 0 | .get(); | 670 | 0 | _shared_state = _dependency->shared_state()->template cast<SharedState>(); | 671 | 1.47k | } else { | 672 | | if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) { | 673 | | DCHECK(false); | 674 | | } | 675 | 1.47k | _shared_state = info.shared_state->template cast<SharedState>(); | 676 | 1.47k | _dependency = _shared_state->create_sink_dependency( | 677 | 1.47k | _parent->dests_id().front(), _parent->node_id(), _parent->get_name()); | 678 | 1.47k | } | 679 | 1.47k | _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL( | 680 | 1.47k | _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1); | 681 | 1.47k | } | 682 | | | 683 | 1.47k | if (must_set_shared_state() && _shared_state == nullptr) { | 684 | 0 | return Status::InternalError("must set shared state, in {}", _parent->get_name()); | 685 | 0 | } | 686 | | | 687 | 1.47k | _rows_input_counter = | 688 | 1.47k | ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1); | 689 | 1.47k | _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2); | 690 | 1.47k | _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2); | 691 | 1.47k | _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2); | 692 | 1.47k | _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1); | 693 | 1.47k | _memory_used_counter = | 694 | 1.47k | _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1); | 695 | 1.47k | _common_profile->add_info_string("IsColocate", | 696 | 1.47k | std::to_string(_parent->is_colocated_operator())); | 697 | 1.47k | _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator())); | 698 | 1.47k | _common_profile->add_info_string("FollowedByShuffledOperator", | 699 | 1.47k | std::to_string(_parent->followed_by_shuffled_operator())); | 700 | 1.47k | return Status::OK(); | 701 | 1.47k | } |
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE Line | Count | Source | 641 | 27 | Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) { | 642 | | // create profile | 643 | 27 | _operator_profile = | 644 | 27 | state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix())); | 645 | 27 | _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS)); | 646 | 27 | _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS)); | 647 | | | 648 | | // indentation is true | 649 | | // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask. | 650 | | // So we should set the indentation to true. | 651 | 27 | info.parent_profile->add_child(_operator_profile, /*indent=*/true); | 652 | 27 | _operator_profile->add_child(_common_profile, true); | 653 | 27 | _operator_profile->add_child(_custom_profile, true); | 654 | | | 655 | 27 | _operator_profile->set_metadata(_parent->node_id()); | 656 | 27 | _wait_for_finish_dependency_timer = | 657 | 27 | ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY); | 658 | 27 | constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>; | 659 | 27 | if constexpr (!is_fake_shared) { | 660 | 27 | if (info.shared_state_map.find(_parent->dests_id().front()) != | 661 | 27 | info.shared_state_map.end()) { | 662 | | if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) { | 663 | | DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1); | 664 | | } | 665 | 0 | _dependency = info.shared_state_map.at(_parent->dests_id().front()) | 666 | 0 | .second[std::is_same_v<LocalExchangeSharedState, SharedState> | 667 | 0 | ? 0 | 668 | 0 | : info.task_idx] | 669 | 0 | .get(); | 670 | 0 | _shared_state = _dependency->shared_state()->template cast<SharedState>(); | 671 | 27 | } else { | 672 | | if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) { | 673 | | DCHECK(false); | 674 | | } | 675 | 27 | _shared_state = info.shared_state->template cast<SharedState>(); | 676 | 27 | _dependency = _shared_state->create_sink_dependency( | 677 | 27 | _parent->dests_id().front(), _parent->node_id(), _parent->get_name()); | 678 | 27 | } | 679 | 27 | _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL( | 680 | 27 | _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1); | 681 | 27 | } | 682 | | | 683 | 27 | if (must_set_shared_state() && _shared_state == nullptr) { | 684 | 0 | return Status::InternalError("must set shared state, in {}", _parent->get_name()); | 685 | 0 | } | 686 | | | 687 | 27 | _rows_input_counter = | 688 | 27 | ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1); | 689 | 27 | _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2); | 690 | 27 | _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2); | 691 | 27 | _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2); | 692 | 27 | _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1); | 693 | 27 | _memory_used_counter = | 694 | 27 | _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1); | 695 | 27 | _common_profile->add_info_string("IsColocate", | 696 | 27 | std::to_string(_parent->is_colocated_operator())); | 697 | 27 | _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator())); | 698 | 27 | _common_profile->add_info_string("FollowedByShuffledOperator", | 699 | 27 | std::to_string(_parent->followed_by_shuffled_operator())); | 700 | 27 | return Status::OK(); | 701 | 27 | } |
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE Line | Count | Source | 641 | 37.2k | Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) { | 642 | | // create profile | 643 | 37.2k | _operator_profile = | 644 | 37.2k | state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix())); | 645 | 37.2k | _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS)); | 646 | 37.2k | _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS)); | 647 | | | 648 | | // indentation is true | 649 | | // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask. | 650 | | // So we should set the indentation to true. | 651 | 37.2k | info.parent_profile->add_child(_operator_profile, /*indent=*/true); | 652 | 37.2k | _operator_profile->add_child(_common_profile, true); | 653 | 37.2k | _operator_profile->add_child(_custom_profile, true); | 654 | | | 655 | 37.2k | _operator_profile->set_metadata(_parent->node_id()); | 656 | 37.2k | _wait_for_finish_dependency_timer = | 657 | 37.2k | ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY); | 658 | 37.2k | constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>; | 659 | 37.2k | if constexpr (!is_fake_shared) { | 660 | 37.2k | if (info.shared_state_map.find(_parent->dests_id().front()) != | 661 | 37.2k | info.shared_state_map.end()) { | 662 | 37.2k | if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) { | 663 | 37.2k | DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1); | 664 | 37.2k | } | 665 | 37.2k | _dependency = info.shared_state_map.at(_parent->dests_id().front()) | 666 | 37.2k | .second[std::is_same_v<LocalExchangeSharedState, SharedState> | 667 | 37.2k | ? 0 | 668 | 18.4E | : info.task_idx] | 669 | 37.2k | .get(); | 670 | 37.2k | _shared_state = _dependency->shared_state()->template cast<SharedState>(); | 671 | 37.2k | } else { | 672 | 6 | if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) { | 673 | 6 | DCHECK(false); | 674 | 6 | } | 675 | 6 | _shared_state = info.shared_state->template cast<SharedState>(); | 676 | 6 | _dependency = _shared_state->create_sink_dependency( | 677 | 6 | _parent->dests_id().front(), _parent->node_id(), _parent->get_name()); | 678 | 6 | } | 679 | 37.2k | _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL( | 680 | 37.2k | _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1); | 681 | 37.2k | } | 682 | | | 683 | 37.2k | if (must_set_shared_state() && _shared_state == nullptr) { | 684 | 0 | return Status::InternalError("must set shared state, in {}", _parent->get_name()); | 685 | 0 | } | 686 | | | 687 | 37.2k | _rows_input_counter = | 688 | 37.2k | ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1); | 689 | 37.2k | _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2); | 690 | 37.2k | _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2); | 691 | 37.2k | _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2); | 692 | 37.2k | _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1); | 693 | 37.2k | _memory_used_counter = | 694 | 37.2k | _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1); | 695 | 37.2k | _common_profile->add_info_string("IsColocate", | 696 | 37.2k | std::to_string(_parent->is_colocated_operator())); | 697 | 37.2k | _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator())); | 698 | 37.2k | _common_profile->add_info_string("FollowedByShuffledOperator", | 699 | 37.2k | std::to_string(_parent->followed_by_shuffled_operator())); | 700 | 37.2k | return Status::OK(); | 701 | 37.2k | } |
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE Line | Count | Source | 641 | 86.5k | Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) { | 642 | | // create profile | 643 | 86.5k | _operator_profile = | 644 | 86.5k | state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix())); | 645 | 86.5k | _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS)); | 646 | 86.5k | _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS)); | 647 | | | 648 | | // indentation is true | 649 | | // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask. | 650 | | // So we should set the indentation to true. | 651 | 86.5k | info.parent_profile->add_child(_operator_profile, /*indent=*/true); | 652 | 86.5k | _operator_profile->add_child(_common_profile, true); | 653 | 86.5k | _operator_profile->add_child(_custom_profile, true); | 654 | | | 655 | 86.5k | _operator_profile->set_metadata(_parent->node_id()); | 656 | 86.5k | _wait_for_finish_dependency_timer = | 657 | 86.5k | ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY); | 658 | 86.5k | constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>; | 659 | 86.5k | if constexpr (!is_fake_shared) { | 660 | 86.5k | if (info.shared_state_map.find(_parent->dests_id().front()) != | 661 | 86.5k | info.shared_state_map.end()) { | 662 | | if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) { | 663 | | DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1); | 664 | | } | 665 | 0 | _dependency = info.shared_state_map.at(_parent->dests_id().front()) | 666 | 0 | .second[std::is_same_v<LocalExchangeSharedState, SharedState> | 667 | 0 | ? 0 | 668 | 0 | : info.task_idx] | 669 | 0 | .get(); | 670 | 0 | _shared_state = _dependency->shared_state()->template cast<SharedState>(); | 671 | 86.5k | } else { | 672 | | if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) { | 673 | | DCHECK(false); | 674 | | } | 675 | 86.5k | _shared_state = info.shared_state->template cast<SharedState>(); | 676 | 86.5k | _dependency = _shared_state->create_sink_dependency( | 677 | 86.5k | _parent->dests_id().front(), _parent->node_id(), _parent->get_name()); | 678 | 86.5k | } | 679 | 86.5k | _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL( | 680 | 86.5k | _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1); | 681 | 86.5k | } | 682 | | | 683 | 86.7k | if (must_set_shared_state() && _shared_state == nullptr) { | 684 | 0 | return Status::InternalError("must set shared state, in {}", _parent->get_name()); | 685 | 0 | } | 686 | | | 687 | 86.5k | _rows_input_counter = | 688 | 86.5k | ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1); | 689 | 86.5k | _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2); | 690 | 86.5k | _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2); | 691 | 86.5k | _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2); | 692 | 86.5k | _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1); | 693 | 86.5k | _memory_used_counter = | 694 | 86.5k | _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1); | 695 | 86.5k | _common_profile->add_info_string("IsColocate", | 696 | 86.5k | std::to_string(_parent->is_colocated_operator())); | 697 | 86.5k | _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator())); | 698 | 86.5k | _common_profile->add_info_string("FollowedByShuffledOperator", | 699 | 86.5k | std::to_string(_parent->followed_by_shuffled_operator())); | 700 | 86.5k | return Status::OK(); | 701 | 86.5k | } |
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE Line | Count | Source | 641 | 3 | Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) { | 642 | | // create profile | 643 | 3 | _operator_profile = | 644 | 3 | state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix())); | 645 | 3 | _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS)); | 646 | 3 | _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS)); | 647 | | | 648 | | // indentation is true | 649 | | // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask. | 650 | | // So we should set the indentation to true. | 651 | 3 | info.parent_profile->add_child(_operator_profile, /*indent=*/true); | 652 | 3 | _operator_profile->add_child(_common_profile, true); | 653 | 3 | _operator_profile->add_child(_custom_profile, true); | 654 | | | 655 | 3 | _operator_profile->set_metadata(_parent->node_id()); | 656 | 3 | _wait_for_finish_dependency_timer = | 657 | 3 | ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY); | 658 | 3 | constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>; | 659 | 3 | if constexpr (!is_fake_shared) { | 660 | 3 | if (info.shared_state_map.find(_parent->dests_id().front()) != | 661 | 3 | info.shared_state_map.end()) { | 662 | | if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) { | 663 | | DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1); | 664 | | } | 665 | 0 | _dependency = info.shared_state_map.at(_parent->dests_id().front()) | 666 | 0 | .second[std::is_same_v<LocalExchangeSharedState, SharedState> | 667 | 0 | ? 0 | 668 | 0 | : info.task_idx] | 669 | 0 | .get(); | 670 | 0 | _shared_state = _dependency->shared_state()->template cast<SharedState>(); | 671 | 3 | } else { | 672 | | if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) { | 673 | | DCHECK(false); | 674 | | } | 675 | 3 | _shared_state = info.shared_state->template cast<SharedState>(); | 676 | 3 | _dependency = _shared_state->create_sink_dependency( | 677 | 3 | _parent->dests_id().front(), _parent->node_id(), _parent->get_name()); | 678 | 3 | } | 679 | 3 | _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL( | 680 | 3 | _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1); | 681 | 3 | } | 682 | | | 683 | 3 | if (must_set_shared_state() && _shared_state == nullptr) { | 684 | 0 | return Status::InternalError("must set shared state, in {}", _parent->get_name()); | 685 | 0 | } | 686 | | | 687 | 3 | _rows_input_counter = | 688 | 3 | ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1); | 689 | 3 | _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2); | 690 | 3 | _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2); | 691 | 3 | _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2); | 692 | 3 | _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1); | 693 | 3 | _memory_used_counter = | 694 | 3 | _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1); | 695 | 3 | _common_profile->add_info_string("IsColocate", | 696 | 3 | std::to_string(_parent->is_colocated_operator())); | 697 | 3 | _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator())); | 698 | 3 | _common_profile->add_info_string("FollowedByShuffledOperator", | 699 | 3 | std::to_string(_parent->followed_by_shuffled_operator())); | 700 | 3 | return Status::OK(); | 701 | 3 | } |
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE |
702 | | |
703 | | template <typename SharedState> |
704 | 473k | Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) { |
705 | 473k | if (_closed) { |
706 | 2 | return Status::OK(); |
707 | 2 | } |
708 | 473k | if constexpr (!std::is_same_v<SharedState, FakeSharedState>) { |
709 | 331k | COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time()); |
710 | 331k | } |
711 | 473k | _closed = true; |
712 | 473k | return Status::OK(); |
713 | 473k | } _ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE Line | Count | Source | 704 | 78.2k | Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) { | 705 | 78.2k | if (_closed) { | 706 | 0 | return Status::OK(); | 707 | 0 | } | 708 | 78.2k | if constexpr (!std::is_same_v<SharedState, FakeSharedState>) { | 709 | 78.2k | COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time()); | 710 | 78.2k | } | 711 | 78.2k | _closed = true; | 712 | 78.2k | return Status::OK(); | 713 | 78.2k | } |
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE Line | Count | Source | 704 | 1 | Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) { | 705 | 1 | if (_closed) { | 706 | 0 | return Status::OK(); | 707 | 0 | } | 708 | 1 | if constexpr (!std::is_same_v<SharedState, FakeSharedState>) { | 709 | 1 | COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time()); | 710 | 1 | } | 711 | 1 | _closed = true; | 712 | 1 | return Status::OK(); | 713 | 1 | } |
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE Line | Count | Source | 704 | 80.2k | Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) { | 705 | 80.2k | if (_closed) { | 706 | 0 | return Status::OK(); | 707 | 0 | } | 708 | 80.2k | if constexpr (!std::is_same_v<SharedState, FakeSharedState>) { | 709 | 80.2k | COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time()); | 710 | 80.2k | } | 711 | 80.2k | _closed = true; | 712 | 80.2k | return Status::OK(); | 713 | 80.2k | } |
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE Line | Count | Source | 704 | 9 | Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) { | 705 | 9 | if (_closed) { | 706 | 2 | return Status::OK(); | 707 | 2 | } | 708 | 7 | if constexpr (!std::is_same_v<SharedState, FakeSharedState>) { | 709 | 7 | COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time()); | 710 | 7 | } | 711 | 7 | _closed = true; | 712 | 7 | return Status::OK(); | 713 | 9 | } |
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE Line | Count | Source | 704 | 3.41k | Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) { | 705 | 3.41k | if (_closed) { | 706 | 0 | return Status::OK(); | 707 | 0 | } | 708 | 3.41k | if constexpr (!std::is_same_v<SharedState, FakeSharedState>) { | 709 | 3.41k | COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time()); | 710 | 3.41k | } | 711 | 3.41k | _closed = true; | 712 | 3.41k | return Status::OK(); | 713 | 3.41k | } |
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE Line | Count | Source | 704 | 59 | Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) { | 705 | 59 | if (_closed) { | 706 | 0 | return Status::OK(); | 707 | 0 | } | 708 | 59 | if constexpr (!std::is_same_v<SharedState, FakeSharedState>) { | 709 | 59 | COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time()); | 710 | 59 | } | 711 | 59 | _closed = true; | 712 | 59 | return Status::OK(); | 713 | 59 | } |
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE Line | Count | Source | 704 | 42.7k | Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) { | 705 | 42.7k | if (_closed) { | 706 | 0 | return Status::OK(); | 707 | 0 | } | 708 | 42.7k | if constexpr (!std::is_same_v<SharedState, FakeSharedState>) { | 709 | 42.7k | COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time()); | 710 | 42.7k | } | 711 | 42.7k | _closed = true; | 712 | 42.7k | return Status::OK(); | 713 | 42.7k | } |
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE _ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE Line | Count | Source | 704 | 61 | Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) { | 705 | 61 | if (_closed) { | 706 | 0 | return Status::OK(); | 707 | 0 | } | 708 | 61 | if constexpr (!std::is_same_v<SharedState, FakeSharedState>) { | 709 | 61 | COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time()); | 710 | 61 | } | 711 | 61 | _closed = true; | 712 | 61 | return Status::OK(); | 713 | 61 | } |
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE Line | Count | Source | 704 | 141k | Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) { | 705 | 141k | if (_closed) { | 706 | 0 | return Status::OK(); | 707 | 0 | } | 708 | | if constexpr (!std::is_same_v<SharedState, FakeSharedState>) { | 709 | | COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time()); | 710 | | } | 711 | 141k | _closed = true; | 712 | 141k | return Status::OK(); | 713 | 141k | } |
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE Line | Count | Source | 704 | 1.30k | Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) { | 705 | 1.30k | if (_closed) { | 706 | 0 | return Status::OK(); | 707 | 0 | } | 708 | 1.30k | if constexpr (!std::is_same_v<SharedState, FakeSharedState>) { | 709 | 1.30k | COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time()); | 710 | 1.30k | } | 711 | 1.30k | _closed = true; | 712 | 1.30k | return Status::OK(); | 713 | 1.30k | } |
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE _ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE Line | Count | Source | 704 | 1.47k | Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) { | 705 | 1.47k | if (_closed) { | 706 | 0 | return Status::OK(); | 707 | 0 | } | 708 | 1.47k | if constexpr (!std::is_same_v<SharedState, FakeSharedState>) { | 709 | 1.47k | COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time()); | 710 | 1.47k | } | 711 | 1.47k | _closed = true; | 712 | 1.47k | return Status::OK(); | 713 | 1.47k | } |
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE _ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE Line | Count | Source | 704 | 37.2k | Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) { | 705 | 37.2k | if (_closed) { | 706 | 0 | return Status::OK(); | 707 | 0 | } | 708 | 37.2k | if constexpr (!std::is_same_v<SharedState, FakeSharedState>) { | 709 | 37.2k | COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time()); | 710 | 37.2k | } | 711 | 37.2k | _closed = true; | 712 | 37.2k | return Status::OK(); | 713 | 37.2k | } |
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE Line | Count | Source | 704 | 86.9k | Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) { | 705 | 86.9k | if (_closed) { | 706 | 0 | return Status::OK(); | 707 | 0 | } | 708 | 86.9k | if constexpr (!std::is_same_v<SharedState, FakeSharedState>) { | 709 | 86.9k | COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time()); | 710 | 86.9k | } | 711 | 86.9k | _closed = true; | 712 | 86.9k | return Status::OK(); | 713 | 86.9k | } |
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE |
714 | | |
715 | | template <typename LocalStateType> |
716 | 4.44k | Status StreamingOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) { |
717 | 4.44k | RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos)); |
718 | 4.43k | return pull(state, block, eos); |
719 | 4.44k | } _ZN5doris18StreamingOperatorXINS_23AssertNumRowsLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb Line | Count | Source | 716 | 404 | Status StreamingOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) { | 717 | 404 | RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos)); | 718 | 404 | return pull(state, block, eos); | 719 | 404 | } |
_ZN5doris18StreamingOperatorXINS_16SelectLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb Line | Count | Source | 716 | 4.03k | Status StreamingOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) { | 717 | 4.03k | RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos)); | 718 | 4.03k | return pull(state, block, eos); | 719 | 4.03k | } |
|
720 | | |
721 | | template <typename LocalStateType> |
722 | 37.3k | Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) { |
723 | 37.3k | auto& local_state = get_local_state(state); |
724 | 37.3k | if (need_more_input_data(state)) { |
725 | 37.0k | local_state._child_block->clear_column_data( |
726 | 37.0k | OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots()); |
727 | 37.0k | RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects( |
728 | 37.0k | state, local_state._child_block.get(), &local_state._child_eos)); |
729 | 37.0k | *eos = local_state._child_eos; |
730 | 37.0k | if (local_state._child_block->rows() == 0 && !local_state._child_eos) { |
731 | 4.81k | return Status::OK(); |
732 | 4.81k | } |
733 | 32.2k | { |
734 | 32.2k | SCOPED_TIMER(local_state.exec_time_counter()); |
735 | 32.2k | RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos)); |
736 | 32.2k | } |
737 | 32.2k | } |
738 | | |
739 | 32.4k | if (!need_more_input_data(state)) { |
740 | 23.1k | SCOPED_TIMER(local_state.exec_time_counter()); |
741 | 23.1k | bool new_eos = false; |
742 | 23.1k | RETURN_IF_ERROR(pull(state, block, &new_eos)); |
743 | 23.1k | if (new_eos) { |
744 | 17.4k | *eos = true; |
745 | 17.4k | } else if (!need_more_input_data(state)) { |
746 | 146 | *eos = false; |
747 | 146 | } |
748 | 23.1k | } |
749 | 32.4k | return Status::OK(); |
750 | 32.4k | } _ZN5doris17StatefulOperatorXINS_23HashJoinProbeLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb Line | Count | Source | 722 | 10.7k | Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) { | 723 | 10.7k | auto& local_state = get_local_state(state); | 724 | 10.7k | if (need_more_input_data(state)) { | 725 | 10.5k | local_state._child_block->clear_column_data( | 726 | 10.5k | OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots()); | 727 | 10.5k | RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects( | 728 | 10.5k | state, local_state._child_block.get(), &local_state._child_eos)); | 729 | 10.5k | *eos = local_state._child_eos; | 730 | 10.5k | if (local_state._child_block->rows() == 0 && !local_state._child_eos) { | 731 | 1.49k | return Status::OK(); | 732 | 1.49k | } | 733 | 9.08k | { | 734 | 9.08k | SCOPED_TIMER(local_state.exec_time_counter()); | 735 | 9.08k | RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos)); | 736 | 9.08k | } | 737 | 9.08k | } | 738 | | | 739 | 9.26k | if (!need_more_input_data(state)) { | 740 | 9.26k | SCOPED_TIMER(local_state.exec_time_counter()); | 741 | 9.26k | bool new_eos = false; | 742 | 9.26k | RETURN_IF_ERROR(pull(state, block, &new_eos)); | 743 | 9.26k | if (new_eos) { | 744 | 6.22k | *eos = true; | 745 | 6.22k | } else if (!need_more_input_data(state)) { | 746 | 92 | *eos = false; | 747 | 92 | } | 748 | 9.26k | } | 749 | 9.25k | return Status::OK(); | 750 | 9.25k | } |
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_34PartitionedHashJoinProbeLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_16RepeatLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb _ZN5doris17StatefulOperatorXINS_25MaterializationLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb Line | Count | Source | 722 | 2.92k | Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) { | 723 | 2.92k | auto& local_state = get_local_state(state); | 724 | 2.92k | if (need_more_input_data(state)) { | 725 | 2.92k | local_state._child_block->clear_column_data( | 726 | 2.92k | OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots()); | 727 | 2.92k | RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects( | 728 | 2.92k | state, local_state._child_block.get(), &local_state._child_eos)); | 729 | 2.92k | *eos = local_state._child_eos; | 730 | 2.92k | if (local_state._child_block->rows() == 0 && !local_state._child_eos) { | 731 | 932 | return Status::OK(); | 732 | 932 | } | 733 | 1.99k | { | 734 | 1.99k | SCOPED_TIMER(local_state.exec_time_counter()); | 735 | 1.99k | RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos)); | 736 | 1.99k | } | 737 | 1.99k | } | 738 | | | 739 | 1.99k | if (!need_more_input_data(state)) { | 740 | 1.99k | SCOPED_TIMER(local_state.exec_time_counter()); | 741 | 1.99k | bool new_eos = false; | 742 | 1.99k | RETURN_IF_ERROR(pull(state, block, &new_eos)); | 743 | 1.99k | if (new_eos) { | 744 | 934 | *eos = true; | 745 | 1.06k | } else if (!need_more_input_data(state)) { | 746 | 0 | *eos = false; | 747 | 0 | } | 748 | 1.99k | } | 749 | 1.99k | return Status::OK(); | 750 | 1.99k | } |
_ZN5doris17StatefulOperatorXINS_22StreamingAggLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb Line | Count | Source | 722 | 16.9k | Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) { | 723 | 16.9k | auto& local_state = get_local_state(state); | 724 | 16.9k | if (need_more_input_data(state)) { | 725 | 16.9k | local_state._child_block->clear_column_data( | 726 | 16.9k | OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots()); | 727 | 16.9k | RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects( | 728 | 16.9k | state, local_state._child_block.get(), &local_state._child_eos)); | 729 | 16.9k | *eos = local_state._child_eos; | 730 | 16.9k | if (local_state._child_block->rows() == 0 && !local_state._child_eos) { | 731 | 884 | return Status::OK(); | 732 | 884 | } | 733 | 16.0k | { | 734 | 16.0k | SCOPED_TIMER(local_state.exec_time_counter()); | 735 | 16.0k | RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos)); | 736 | 16.0k | } | 737 | 16.0k | } | 738 | | | 739 | 16.1k | if (!need_more_input_data(state)) { | 740 | 6.83k | SCOPED_TIMER(local_state.exec_time_counter()); | 741 | 6.83k | bool new_eos = false; | 742 | 6.83k | RETURN_IF_ERROR(pull(state, block, &new_eos)); | 743 | 6.83k | if (new_eos) { | 744 | 6.58k | *eos = true; | 745 | 6.58k | } else if (!need_more_input_data(state)) { | 746 | 54 | *eos = false; | 747 | 54 | } | 748 | 6.83k | } | 749 | 16.1k | return Status::OK(); | 750 | 16.1k | } |
_ZN5doris17StatefulOperatorXINS_30DistinctStreamingAggLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb Line | Count | Source | 722 | 446 | Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) { | 723 | 446 | auto& local_state = get_local_state(state); | 724 | 446 | if (need_more_input_data(state)) { | 725 | 444 | local_state._child_block->clear_column_data( | 726 | 444 | OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots()); | 727 | 444 | RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects( | 728 | 444 | state, local_state._child_block.get(), &local_state._child_eos)); | 729 | 444 | *eos = local_state._child_eos; | 730 | 444 | if (local_state._child_block->rows() == 0 && !local_state._child_eos) { | 731 | 30 | return Status::OK(); | 732 | 30 | } | 733 | 414 | { | 734 | 414 | SCOPED_TIMER(local_state.exec_time_counter()); | 735 | 414 | RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos)); | 736 | 414 | } | 737 | 414 | } | 738 | | | 739 | 416 | if (!need_more_input_data(state)) { | 740 | 290 | SCOPED_TIMER(local_state.exec_time_counter()); | 741 | 290 | bool new_eos = false; | 742 | 290 | RETURN_IF_ERROR(pull(state, block, &new_eos)); | 743 | 290 | if (new_eos) { | 744 | 288 | *eos = true; | 745 | 288 | } else if (!need_more_input_data(state)) { | 746 | 0 | *eos = false; | 747 | 0 | } | 748 | 290 | } | 749 | 416 | return Status::OK(); | 750 | 416 | } |
_ZN5doris17StatefulOperatorXINS_29NestedLoopJoinProbeLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb Line | Count | Source | 722 | 6.16k | Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) { | 723 | 6.16k | auto& local_state = get_local_state(state); | 724 | 6.16k | if (need_more_input_data(state)) { | 725 | 6.16k | local_state._child_block->clear_column_data( | 726 | 6.16k | OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots()); | 727 | 6.16k | RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects( | 728 | 6.16k | state, local_state._child_block.get(), &local_state._child_eos)); | 729 | 6.16k | *eos = local_state._child_eos; | 730 | 6.16k | if (local_state._child_block->rows() == 0 && !local_state._child_eos) { | 731 | 1.47k | return Status::OK(); | 732 | 1.47k | } | 733 | 4.68k | { | 734 | 4.68k | SCOPED_TIMER(local_state.exec_time_counter()); | 735 | 4.68k | RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos)); | 736 | 4.68k | } | 737 | 4.68k | } | 738 | | | 739 | 4.68k | if (!need_more_input_data(state)) { | 740 | 4.68k | SCOPED_TIMER(local_state.exec_time_counter()); | 741 | 4.68k | bool new_eos = false; | 742 | 4.68k | RETURN_IF_ERROR(pull(state, block, &new_eos)); | 743 | 4.68k | if (new_eos) { | 744 | 3.40k | *eos = true; | 745 | 3.40k | } else if (!need_more_input_data(state)) { | 746 | 0 | *eos = false; | 747 | 0 | } | 748 | 4.68k | } | 749 | 4.68k | return Status::OK(); | 750 | 4.68k | } |
_ZN5doris17StatefulOperatorXINS_23TableFunctionLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb Line | Count | Source | 722 | 36 | Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) { | 723 | 36 | auto& local_state = get_local_state(state); | 724 | 36 | if (need_more_input_data(state)) { | 725 | 36 | local_state._child_block->clear_column_data( | 726 | 36 | OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots()); | 727 | 36 | RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects( | 728 | 36 | state, local_state._child_block.get(), &local_state._child_eos)); | 729 | 36 | *eos = local_state._child_eos; | 730 | 36 | if (local_state._child_block->rows() == 0 && !local_state._child_eos) { | 731 | 0 | return Status::OK(); | 732 | 0 | } | 733 | 36 | { | 734 | 36 | SCOPED_TIMER(local_state.exec_time_counter()); | 735 | 36 | RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos)); | 736 | 36 | } | 737 | 36 | } | 738 | | | 739 | 36 | if (!need_more_input_data(state)) { | 740 | 36 | SCOPED_TIMER(local_state.exec_time_counter()); | 741 | 36 | bool new_eos = false; | 742 | 36 | RETURN_IF_ERROR(pull(state, block, &new_eos)); | 743 | 36 | if (new_eos) { | 744 | 28 | *eos = true; | 745 | 28 | } else if (!need_more_input_data(state)) { | 746 | 0 | *eos = false; | 747 | 0 | } | 748 | 36 | } | 749 | 36 | return Status::OK(); | 750 | 36 | } |
|
751 | | |
752 | | template <typename Writer, typename Parent> |
753 | | requires(std::is_base_of_v<AsyncResultWriter, Writer>) |
754 | 16.5k | Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) { |
755 | 16.5k | RETURN_IF_ERROR(Base::init(state, info)); |
756 | 16.5k | _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(), |
757 | 16.5k | "AsyncWriterDependency", true); |
758 | 16.5k | _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency, |
759 | 16.5k | _finish_dependency)); |
760 | | |
761 | 16.5k | _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL( |
762 | 16.5k | common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1); |
763 | 16.5k | return Status::OK(); |
764 | 16.5k | } _ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE Line | Count | Source | 754 | 164 | Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) { | 755 | 164 | RETURN_IF_ERROR(Base::init(state, info)); | 756 | 164 | _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(), | 757 | 164 | "AsyncWriterDependency", true); | 758 | 164 | _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency, | 759 | 164 | _finish_dependency)); | 760 | | | 761 | 164 | _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL( | 762 | 164 | common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1); | 763 | 164 | return Status::OK(); | 764 | 164 | } |
_ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE Line | Count | Source | 754 | 88 | Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) { | 755 | 88 | RETURN_IF_ERROR(Base::init(state, info)); | 756 | 88 | _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(), | 757 | 88 | "AsyncWriterDependency", true); | 758 | 88 | _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency, | 759 | 88 | _finish_dependency)); | 760 | | | 761 | 88 | _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL( | 762 | 88 | common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1); | 763 | 88 | return Status::OK(); | 764 | 88 | } |
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE Line | Count | Source | 754 | 1.16k | Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) { | 755 | 1.16k | RETURN_IF_ERROR(Base::init(state, info)); | 756 | 1.16k | _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(), | 757 | 1.16k | "AsyncWriterDependency", true); | 758 | 1.16k | _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency, | 759 | 1.16k | _finish_dependency)); | 760 | | | 761 | 1.16k | _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL( | 762 | 1.16k | common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1); | 763 | 1.16k | return Status::OK(); | 764 | 1.16k | } |
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE Line | Count | Source | 754 | 5.65k | Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) { | 755 | 5.65k | RETURN_IF_ERROR(Base::init(state, info)); | 756 | 5.65k | _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(), | 757 | 5.65k | "AsyncWriterDependency", true); | 758 | 5.65k | _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency, | 759 | 5.65k | _finish_dependency)); | 760 | | | 761 | 5.65k | _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL( | 762 | 5.65k | common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1); | 763 | 5.65k | return Status::OK(); | 764 | 5.65k | } |
_ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE Line | Count | Source | 754 | 5.14k | Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) { | 755 | 5.14k | RETURN_IF_ERROR(Base::init(state, info)); | 756 | 5.14k | _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(), | 757 | 5.14k | "AsyncWriterDependency", true); | 758 | 5.14k | _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency, | 759 | 5.14k | _finish_dependency)); | 760 | | | 761 | 5.14k | _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL( | 762 | 5.14k | common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1); | 763 | 5.14k | return Status::OK(); | 764 | 5.14k | } |
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE Line | Count | Source | 754 | 3.38k | Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) { | 755 | 3.38k | RETURN_IF_ERROR(Base::init(state, info)); | 756 | 3.38k | _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(), | 757 | 3.38k | "AsyncWriterDependency", true); | 758 | 3.38k | _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency, | 759 | 3.38k | _finish_dependency)); | 760 | | | 761 | 3.38k | _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL( | 762 | 3.38k | common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1); | 763 | 3.38k | return Status::OK(); | 764 | 3.38k | } |
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE _ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE Line | Count | Source | 754 | 160 | Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) { | 755 | 160 | RETURN_IF_ERROR(Base::init(state, info)); | 756 | 160 | _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(), | 757 | 160 | "AsyncWriterDependency", true); | 758 | 160 | _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency, | 759 | 160 | _finish_dependency)); | 760 | | | 761 | 160 | _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL( | 762 | 160 | common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1); | 763 | 160 | return Status::OK(); | 764 | 160 | } |
_ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE Line | Count | Source | 754 | 640 | Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) { | 755 | 640 | RETURN_IF_ERROR(Base::init(state, info)); | 756 | 640 | _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(), | 757 | 640 | "AsyncWriterDependency", true); | 758 | 640 | _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency, | 759 | 640 | _finish_dependency)); | 760 | | | 761 | 640 | _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL( | 762 | 640 | common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1); | 763 | 640 | return Status::OK(); | 764 | 640 | } |
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE _ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE Line | Count | Source | 754 | 156 | Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) { | 755 | 156 | RETURN_IF_ERROR(Base::init(state, info)); | 756 | 156 | _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(), | 757 | 156 | "AsyncWriterDependency", true); | 758 | 156 | _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency, | 759 | 156 | _finish_dependency)); | 760 | | | 761 | 156 | _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL( | 762 | 156 | common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1); | 763 | 156 | return Status::OK(); | 764 | 156 | } |
|
765 | | |
766 | | template <typename Writer, typename Parent> |
767 | | requires(std::is_base_of_v<AsyncResultWriter, Writer>) |
768 | 16.5k | Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) { |
769 | 16.5k | RETURN_IF_ERROR(Base::open(state)); |
770 | 16.5k | _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size()); |
771 | 225k | for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) { |
772 | 209k | RETURN_IF_ERROR( |
773 | 209k | _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i])); |
774 | 209k | } |
775 | 16.5k | RETURN_IF_ERROR(_writer->start_writer(state, operator_profile())); |
776 | 16.5k | return Status::OK(); |
777 | 16.5k | } _ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4openEPNS_12RuntimeStateE Line | Count | Source | 768 | 164 | Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) { | 769 | 164 | RETURN_IF_ERROR(Base::open(state)); | 770 | 164 | _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size()); | 771 | 942 | for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) { | 772 | 778 | RETURN_IF_ERROR( | 773 | 778 | _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i])); | 774 | 778 | } | 775 | 164 | RETURN_IF_ERROR(_writer->start_writer(state, operator_profile())); | 776 | 164 | return Status::OK(); | 777 | 164 | } |
_ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4openEPNS_12RuntimeStateE Line | Count | Source | 768 | 88 | Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) { | 769 | 88 | RETURN_IF_ERROR(Base::open(state)); | 770 | 88 | _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size()); | 771 | 412 | for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) { | 772 | 324 | RETURN_IF_ERROR( | 773 | 324 | _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i])); | 774 | 324 | } | 775 | 88 | RETURN_IF_ERROR(_writer->start_writer(state, operator_profile())); | 776 | 88 | return Status::OK(); | 777 | 88 | } |
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4openEPNS_12RuntimeStateE Line | Count | Source | 768 | 1.15k | Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) { | 769 | 1.15k | RETURN_IF_ERROR(Base::open(state)); | 770 | 1.15k | _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size()); | 771 | 3.94k | for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) { | 772 | 2.78k | RETURN_IF_ERROR( | 773 | 2.78k | _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i])); | 774 | 2.78k | } | 775 | 1.15k | RETURN_IF_ERROR(_writer->start_writer(state, operator_profile())); | 776 | 1.15k | return Status::OK(); | 777 | 1.15k | } |
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4openEPNS_12RuntimeStateE Line | Count | Source | 768 | 5.64k | Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) { | 769 | 5.64k | RETURN_IF_ERROR(Base::open(state)); | 770 | 5.64k | _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size()); | 771 | 39.4k | for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) { | 772 | 33.8k | RETURN_IF_ERROR( | 773 | 33.8k | _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i])); | 774 | 33.8k | } | 775 | 5.64k | RETURN_IF_ERROR(_writer->start_writer(state, operator_profile())); | 776 | 5.64k | return Status::OK(); | 777 | 5.64k | } |
_ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4openEPNS_12RuntimeStateE Line | Count | Source | 768 | 5.14k | Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) { | 769 | 5.14k | RETURN_IF_ERROR(Base::open(state)); | 770 | 5.14k | _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size()); | 771 | 133k | for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) { | 772 | 128k | RETURN_IF_ERROR( | 773 | 128k | _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i])); | 774 | 128k | } | 775 | 5.14k | RETURN_IF_ERROR(_writer->start_writer(state, operator_profile())); | 776 | 5.14k | return Status::OK(); | 777 | 5.14k | } |
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4openEPNS_12RuntimeStateE Line | Count | Source | 768 | 3.38k | Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) { | 769 | 3.38k | RETURN_IF_ERROR(Base::open(state)); | 770 | 3.38k | _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size()); | 771 | 41.8k | for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) { | 772 | 38.5k | RETURN_IF_ERROR( | 773 | 38.5k | _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i])); | 774 | 38.5k | } | 775 | 3.38k | RETURN_IF_ERROR(_writer->start_writer(state, operator_profile())); | 776 | 3.38k | return Status::OK(); | 777 | 3.38k | } |
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4openEPNS_12RuntimeStateE _ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4openEPNS_12RuntimeStateE Line | Count | Source | 768 | 160 | Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) { | 769 | 160 | RETURN_IF_ERROR(Base::open(state)); | 770 | 160 | _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size()); | 771 | 478 | for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) { | 772 | 318 | RETURN_IF_ERROR( | 773 | 318 | _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i])); | 774 | 318 | } | 775 | 160 | RETURN_IF_ERROR(_writer->start_writer(state, operator_profile())); | 776 | 160 | return Status::OK(); | 777 | 160 | } |
_ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4openEPNS_12RuntimeStateE Line | Count | Source | 768 | 638 | Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) { | 769 | 638 | RETURN_IF_ERROR(Base::open(state)); | 770 | 638 | _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size()); | 771 | 4.38k | for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) { | 772 | 3.74k | RETURN_IF_ERROR( | 773 | 3.74k | _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i])); | 774 | 3.74k | } | 775 | 638 | RETURN_IF_ERROR(_writer->start_writer(state, operator_profile())); | 776 | 638 | return Status::OK(); | 777 | 638 | } |
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4openEPNS_12RuntimeStateE _ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4openEPNS_12RuntimeStateE Line | Count | Source | 768 | 156 | Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) { | 769 | 156 | RETURN_IF_ERROR(Base::open(state)); | 770 | 156 | _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size()); | 771 | 786 | for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) { | 772 | 630 | RETURN_IF_ERROR( | 773 | 630 | _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i])); | 774 | 630 | } | 775 | 156 | RETURN_IF_ERROR(_writer->start_writer(state, operator_profile())); | 776 | 156 | return Status::OK(); | 777 | 156 | } |
|
778 | | |
779 | | template <typename Writer, typename Parent> |
780 | | requires(std::is_base_of_v<AsyncResultWriter, Writer>) |
781 | 23.4k | Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) { |
782 | 23.4k | return _writer->sink(block, eos); |
783 | 23.4k | } _ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb Line | Count | Source | 781 | 824 | Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) { | 782 | 824 | return _writer->sink(block, eos); | 783 | 824 | } |
_ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb Line | Count | Source | 781 | 112 | Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) { | 782 | 112 | return _writer->sink(block, eos); | 783 | 112 | } |
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb Line | Count | Source | 781 | 1.72k | Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) { | 782 | 1.72k | return _writer->sink(block, eos); | 783 | 1.72k | } |
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb Line | Count | Source | 781 | 6.66k | Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) { | 782 | 6.66k | return _writer->sink(block, eos); | 783 | 6.66k | } |
_ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb Line | Count | Source | 781 | 7.50k | Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) { | 782 | 7.50k | return _writer->sink(block, eos); | 783 | 7.50k | } |
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb Line | Count | Source | 781 | 5.33k | Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) { | 782 | 5.33k | return _writer->sink(block, eos); | 783 | 5.33k | } |
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb _ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb Line | Count | Source | 781 | 180 | Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) { | 782 | 180 | return _writer->sink(block, eos); | 783 | 180 | } |
_ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb Line | Count | Source | 781 | 790 | Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) { | 782 | 790 | return _writer->sink(block, eos); | 783 | 790 | } |
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb _ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb Line | Count | Source | 781 | 310 | Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) { | 782 | 310 | return _writer->sink(block, eos); | 783 | 310 | } |
|
784 | | |
785 | | template <typename Writer, typename Parent> |
786 | | requires(std::is_base_of_v<AsyncResultWriter, Writer>) |
787 | 16.5k | Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) { |
788 | 16.5k | if (_closed) { |
789 | 0 | return Status::OK(); |
790 | 0 | } |
791 | 16.5k | COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time()); |
792 | 16.5k | COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time()); |
793 | | // if the init failed, the _writer may be nullptr. so here need check |
794 | 16.5k | if (_writer) { |
795 | 16.5k | Status st = _writer->get_writer_status(); |
796 | 16.5k | if (exec_status.ok()) { |
797 | 16.4k | _writer->force_close(state->is_cancelled() ? state->cancel_reason() |
798 | 16.4k | : Status::Cancelled("force close")); |
799 | 16.4k | } else { |
800 | 70 | _writer->force_close(exec_status); |
801 | 70 | } |
802 | | // If there is an error in process_block thread, then we should get the writer |
803 | | // status before call force_close. For example, the thread may failed in commit |
804 | | // transaction. |
805 | 16.5k | RETURN_IF_ERROR(st); |
806 | 16.5k | } |
807 | 16.5k | return Base::close(state, exec_status); |
808 | 16.5k | } _ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE Line | Count | Source | 787 | 164 | Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) { | 788 | 164 | if (_closed) { | 789 | 0 | return Status::OK(); | 790 | 0 | } | 791 | 164 | COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time()); | 792 | 164 | COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time()); | 793 | | // if the init failed, the _writer may be nullptr. so here need check | 794 | 164 | if (_writer) { | 795 | 164 | Status st = _writer->get_writer_status(); | 796 | 164 | if (exec_status.ok()) { | 797 | 164 | _writer->force_close(state->is_cancelled() ? state->cancel_reason() | 798 | 164 | : Status::Cancelled("force close")); | 799 | 164 | } else { | 800 | 0 | _writer->force_close(exec_status); | 801 | 0 | } | 802 | | // If there is an error in process_block thread, then we should get the writer | 803 | | // status before call force_close. For example, the thread may failed in commit | 804 | | // transaction. | 805 | 164 | RETURN_IF_ERROR(st); | 806 | 164 | } | 807 | 164 | return Base::close(state, exec_status); | 808 | 164 | } |
_ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE Line | Count | Source | 787 | 88 | Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) { | 788 | 88 | if (_closed) { | 789 | 0 | return Status::OK(); | 790 | 0 | } | 791 | 88 | COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time()); | 792 | 88 | COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time()); | 793 | | // if the init failed, the _writer may be nullptr. so here need check | 794 | 88 | if (_writer) { | 795 | 88 | Status st = _writer->get_writer_status(); | 796 | 88 | if (exec_status.ok()) { | 797 | 88 | _writer->force_close(state->is_cancelled() ? state->cancel_reason() | 798 | 88 | : Status::Cancelled("force close")); | 799 | 88 | } else { | 800 | 0 | _writer->force_close(exec_status); | 801 | 0 | } | 802 | | // If there is an error in process_block thread, then we should get the writer | 803 | | // status before call force_close. For example, the thread may failed in commit | 804 | | // transaction. | 805 | 88 | RETURN_IF_ERROR(st); | 806 | 88 | } | 807 | 80 | return Base::close(state, exec_status); | 808 | 88 | } |
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE Line | Count | Source | 787 | 1.16k | Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) { | 788 | 1.16k | if (_closed) { | 789 | 0 | return Status::OK(); | 790 | 0 | } | 791 | 1.16k | COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time()); | 792 | 1.16k | COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time()); | 793 | | // if the init failed, the _writer may be nullptr. so here need check | 794 | 1.16k | if (_writer) { | 795 | 1.16k | Status st = _writer->get_writer_status(); | 796 | 1.16k | if (exec_status.ok()) { | 797 | 1.16k | _writer->force_close(state->is_cancelled() ? state->cancel_reason() | 798 | 1.16k | : Status::Cancelled("force close")); | 799 | 1.16k | } else { | 800 | 0 | _writer->force_close(exec_status); | 801 | 0 | } | 802 | | // If there is an error in process_block thread, then we should get the writer | 803 | | // status before call force_close. For example, the thread may failed in commit | 804 | | // transaction. | 805 | 1.16k | RETURN_IF_ERROR(st); | 806 | 1.16k | } | 807 | 1.16k | return Base::close(state, exec_status); | 808 | 1.16k | } |
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE Line | Count | Source | 787 | 5.65k | Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) { | 788 | 5.65k | if (_closed) { | 789 | 0 | return Status::OK(); | 790 | 0 | } | 791 | 5.65k | COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time()); | 792 | 5.65k | COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time()); | 793 | | // if the init failed, the _writer may be nullptr. so here need check | 794 | 5.65k | if (_writer) { | 795 | 5.65k | Status st = _writer->get_writer_status(); | 796 | 5.65k | if (exec_status.ok()) { | 797 | 5.59k | _writer->force_close(state->is_cancelled() ? state->cancel_reason() | 798 | 5.59k | : Status::Cancelled("force close")); | 799 | 5.59k | } else { | 800 | 68 | _writer->force_close(exec_status); | 801 | 68 | } | 802 | | // If there is an error in process_block thread, then we should get the writer | 803 | | // status before call force_close. For example, the thread may failed in commit | 804 | | // transaction. | 805 | 5.65k | RETURN_IF_ERROR(st); | 806 | 5.65k | } | 807 | 5.65k | return Base::close(state, exec_status); | 808 | 5.65k | } |
_ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE Line | Count | Source | 787 | 5.14k | Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) { | 788 | 5.14k | if (_closed) { | 789 | 0 | return Status::OK(); | 790 | 0 | } | 791 | 5.14k | COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time()); | 792 | 5.14k | COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time()); | 793 | | // if the init failed, the _writer may be nullptr. so here need check | 794 | 5.14k | if (_writer) { | 795 | 5.14k | Status st = _writer->get_writer_status(); | 796 | 5.14k | if (exec_status.ok()) { | 797 | 5.14k | _writer->force_close(state->is_cancelled() ? state->cancel_reason() | 798 | 5.14k | : Status::Cancelled("force close")); | 799 | 5.14k | } else { | 800 | 0 | _writer->force_close(exec_status); | 801 | 0 | } | 802 | | // If there is an error in process_block thread, then we should get the writer | 803 | | // status before call force_close. For example, the thread may failed in commit | 804 | | // transaction. | 805 | 5.14k | RETURN_IF_ERROR(st); | 806 | 5.14k | } | 807 | 5.14k | return Base::close(state, exec_status); | 808 | 5.14k | } |
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE Line | Count | Source | 787 | 3.38k | Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) { | 788 | 3.38k | if (_closed) { | 789 | 0 | return Status::OK(); | 790 | 0 | } | 791 | 3.38k | COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time()); | 792 | 3.38k | COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time()); | 793 | | // if the init failed, the _writer may be nullptr. so here need check | 794 | 3.38k | if (_writer) { | 795 | 3.38k | Status st = _writer->get_writer_status(); | 796 | 3.38k | if (exec_status.ok()) { | 797 | 3.38k | _writer->force_close(state->is_cancelled() ? state->cancel_reason() | 798 | 3.38k | : Status::Cancelled("force close")); | 799 | 3.38k | } else { | 800 | 0 | _writer->force_close(exec_status); | 801 | 0 | } | 802 | | // If there is an error in process_block thread, then we should get the writer | 803 | | // status before call force_close. For example, the thread may failed in commit | 804 | | // transaction. | 805 | 3.38k | RETURN_IF_ERROR(st); | 806 | 3.38k | } | 807 | 3.38k | return Base::close(state, exec_status); | 808 | 3.38k | } |
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE _ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE Line | Count | Source | 787 | 160 | Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) { | 788 | 160 | if (_closed) { | 789 | 0 | return Status::OK(); | 790 | 0 | } | 791 | 160 | COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time()); | 792 | 160 | COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time()); | 793 | | // if the init failed, the _writer may be nullptr. so here need check | 794 | 160 | if (_writer) { | 795 | 160 | Status st = _writer->get_writer_status(); | 796 | 160 | if (exec_status.ok()) { | 797 | 160 | _writer->force_close(state->is_cancelled() ? state->cancel_reason() | 798 | 160 | : Status::Cancelled("force close")); | 799 | 160 | } else { | 800 | 0 | _writer->force_close(exec_status); | 801 | 0 | } | 802 | | // If there is an error in process_block thread, then we should get the writer | 803 | | // status before call force_close. For example, the thread may failed in commit | 804 | | // transaction. | 805 | 160 | RETURN_IF_ERROR(st); | 806 | 160 | } | 807 | 160 | return Base::close(state, exec_status); | 808 | 160 | } |
_ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE Line | Count | Source | 787 | 640 | Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) { | 788 | 640 | if (_closed) { | 789 | 0 | return Status::OK(); | 790 | 0 | } | 791 | 640 | COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time()); | 792 | 640 | COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time()); | 793 | | // if the init failed, the _writer may be nullptr. so here need check | 794 | 640 | if (_writer) { | 795 | 640 | Status st = _writer->get_writer_status(); | 796 | 640 | if (exec_status.ok()) { | 797 | 638 | _writer->force_close(state->is_cancelled() ? state->cancel_reason() | 798 | 638 | : Status::Cancelled("force close")); | 799 | 638 | } else { | 800 | 2 | _writer->force_close(exec_status); | 801 | 2 | } | 802 | | // If there is an error in process_block thread, then we should get the writer | 803 | | // status before call force_close. For example, the thread may failed in commit | 804 | | // transaction. | 805 | 640 | RETURN_IF_ERROR(st); | 806 | 640 | } | 807 | 640 | return Base::close(state, exec_status); | 808 | 640 | } |
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE _ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE Line | Count | Source | 787 | 156 | Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) { | 788 | 156 | if (_closed) { | 789 | 0 | return Status::OK(); | 790 | 0 | } | 791 | 156 | COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time()); | 792 | 156 | COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time()); | 793 | | // if the init failed, the _writer may be nullptr. so here need check | 794 | 156 | if (_writer) { | 795 | 156 | Status st = _writer->get_writer_status(); | 796 | 156 | if (exec_status.ok()) { | 797 | 156 | _writer->force_close(state->is_cancelled() ? state->cancel_reason() | 798 | 156 | : Status::Cancelled("force close")); | 799 | 156 | } else { | 800 | 0 | _writer->force_close(exec_status); | 801 | 0 | } | 802 | | // If there is an error in process_block thread, then we should get the writer | 803 | | // status before call force_close. For example, the thread may failed in commit | 804 | | // transaction. | 805 | 156 | RETURN_IF_ERROR(st); | 806 | 156 | } | 807 | 156 | return Base::close(state, exec_status); | 808 | 156 | } |
|
809 | | |
810 | | #define DECLARE_OPERATOR(LOCAL_STATE) template class DataSinkOperatorX<LOCAL_STATE>; |
811 | | DECLARE_OPERATOR(HashJoinBuildSinkLocalState) |
812 | | DECLARE_OPERATOR(ResultSinkLocalState) |
813 | | DECLARE_OPERATOR(JdbcTableSinkLocalState) |
814 | | DECLARE_OPERATOR(MemoryScratchSinkLocalState) |
815 | | DECLARE_OPERATOR(ResultFileSinkLocalState) |
816 | | DECLARE_OPERATOR(OlapTableSinkLocalState) |
817 | | DECLARE_OPERATOR(OlapTableSinkV2LocalState) |
818 | | DECLARE_OPERATOR(HiveTableSinkLocalState) |
819 | | DECLARE_OPERATOR(TVFTableSinkLocalState) |
820 | | DECLARE_OPERATOR(IcebergTableSinkLocalState) |
821 | | DECLARE_OPERATOR(SpillIcebergTableSinkLocalState) |
822 | | DECLARE_OPERATOR(IcebergDeleteSinkLocalState) |
823 | | DECLARE_OPERATOR(IcebergMergeSinkLocalState) |
824 | | DECLARE_OPERATOR(MCTableSinkLocalState) |
825 | | DECLARE_OPERATOR(AnalyticSinkLocalState) |
826 | | DECLARE_OPERATOR(BlackholeSinkLocalState) |
827 | | DECLARE_OPERATOR(SortSinkLocalState) |
828 | | DECLARE_OPERATOR(SpillSortSinkLocalState) |
829 | | DECLARE_OPERATOR(LocalExchangeSinkLocalState) |
830 | | DECLARE_OPERATOR(AggSinkLocalState) |
831 | | DECLARE_OPERATOR(BucketedAggSinkLocalState) |
832 | | DECLARE_OPERATOR(PartitionedAggSinkLocalState) |
833 | | DECLARE_OPERATOR(ExchangeSinkLocalState) |
834 | | DECLARE_OPERATOR(NestedLoopJoinBuildSinkLocalState) |
835 | | DECLARE_OPERATOR(UnionSinkLocalState) |
836 | | DECLARE_OPERATOR(MultiCastDataStreamSinkLocalState) |
837 | | DECLARE_OPERATOR(PartitionSortSinkLocalState) |
838 | | DECLARE_OPERATOR(SetProbeSinkLocalState<true>) |
839 | | DECLARE_OPERATOR(SetProbeSinkLocalState<false>) |
840 | | DECLARE_OPERATOR(SetSinkLocalState<true>) |
841 | | DECLARE_OPERATOR(SetSinkLocalState<false>) |
842 | | DECLARE_OPERATOR(PartitionedHashJoinSinkLocalState) |
843 | | DECLARE_OPERATOR(GroupCommitBlockSinkLocalState) |
844 | | DECLARE_OPERATOR(CacheSinkLocalState) |
845 | | DECLARE_OPERATOR(DictSinkLocalState) |
846 | | DECLARE_OPERATOR(RecCTESinkLocalState) |
847 | | DECLARE_OPERATOR(RecCTEAnchorSinkLocalState) |
848 | | |
849 | | #undef DECLARE_OPERATOR |
850 | | |
851 | | #define DECLARE_OPERATOR(LOCAL_STATE) template class OperatorX<LOCAL_STATE>; |
852 | | DECLARE_OPERATOR(HashJoinProbeLocalState) |
853 | | DECLARE_OPERATOR(OlapScanLocalState) |
854 | | DECLARE_OPERATOR(GroupCommitLocalState) |
855 | | DECLARE_OPERATOR(JDBCScanLocalState) |
856 | | DECLARE_OPERATOR(FileScanLocalState) |
857 | | DECLARE_OPERATOR(AnalyticLocalState) |
858 | | DECLARE_OPERATOR(SortLocalState) |
859 | | DECLARE_OPERATOR(SpillSortLocalState) |
860 | | DECLARE_OPERATOR(LocalMergeSortLocalState) |
861 | | DECLARE_OPERATOR(AggLocalState) |
862 | | DECLARE_OPERATOR(BucketedAggLocalState) |
863 | | DECLARE_OPERATOR(PartitionedAggLocalState) |
864 | | DECLARE_OPERATOR(TableFunctionLocalState) |
865 | | DECLARE_OPERATOR(ExchangeLocalState) |
866 | | DECLARE_OPERATOR(RepeatLocalState) |
867 | | DECLARE_OPERATOR(NestedLoopJoinProbeLocalState) |
868 | | DECLARE_OPERATOR(AssertNumRowsLocalState) |
869 | | DECLARE_OPERATOR(EmptySetLocalState) |
870 | | DECLARE_OPERATOR(UnionSourceLocalState) |
871 | | DECLARE_OPERATOR(MultiCastDataStreamSourceLocalState) |
872 | | DECLARE_OPERATOR(PartitionSortSourceLocalState) |
873 | | DECLARE_OPERATOR(SetSourceLocalState<true>) |
874 | | DECLARE_OPERATOR(SetSourceLocalState<false>) |
875 | | DECLARE_OPERATOR(DataGenLocalState) |
876 | | DECLARE_OPERATOR(SchemaScanLocalState) |
877 | | DECLARE_OPERATOR(MetaScanLocalState) |
878 | | DECLARE_OPERATOR(LocalExchangeSourceLocalState) |
879 | | DECLARE_OPERATOR(PartitionedHashJoinProbeLocalState) |
880 | | DECLARE_OPERATOR(CacheSourceLocalState) |
881 | | DECLARE_OPERATOR(RecCTESourceLocalState) |
882 | | DECLARE_OPERATOR(RecCTEScanLocalState) |
883 | | |
884 | | #ifdef BE_TEST |
885 | | DECLARE_OPERATOR(MockLocalState) |
886 | | DECLARE_OPERATOR(MockScanLocalState) |
887 | | #endif |
888 | | #undef DECLARE_OPERATOR |
889 | | |
890 | | template class StreamingOperatorX<AssertNumRowsLocalState>; |
891 | | template class StreamingOperatorX<SelectLocalState>; |
892 | | |
893 | | template class StatefulOperatorX<HashJoinProbeLocalState>; |
894 | | template class StatefulOperatorX<PartitionedHashJoinProbeLocalState>; |
895 | | template class StatefulOperatorX<RepeatLocalState>; |
896 | | template class StatefulOperatorX<MaterializationLocalState>; |
897 | | template class StatefulOperatorX<StreamingAggLocalState>; |
898 | | template class StatefulOperatorX<DistinctStreamingAggLocalState>; |
899 | | template class StatefulOperatorX<NestedLoopJoinProbeLocalState>; |
900 | | template class StatefulOperatorX<TableFunctionLocalState>; |
901 | | |
902 | | template class PipelineXSinkLocalState<HashJoinSharedState>; |
903 | | template class PipelineXSinkLocalState<PartitionedHashJoinSharedState>; |
904 | | template class PipelineXSinkLocalState<SortSharedState>; |
905 | | template class PipelineXSinkLocalState<SpillSortSharedState>; |
906 | | template class PipelineXSinkLocalState<NestedLoopJoinSharedState>; |
907 | | template class PipelineXSinkLocalState<AnalyticSharedState>; |
908 | | template class PipelineXSinkLocalState<AggSharedState>; |
909 | | template class PipelineXSinkLocalState<BucketedAggSharedState>; |
910 | | template class PipelineXSinkLocalState<PartitionedAggSharedState>; |
911 | | template class PipelineXSinkLocalState<FakeSharedState>; |
912 | | template class PipelineXSinkLocalState<UnionSharedState>; |
913 | | template class PipelineXSinkLocalState<PartitionSortNodeSharedState>; |
914 | | template class PipelineXSinkLocalState<MultiCastSharedState>; |
915 | | template class PipelineXSinkLocalState<SetSharedState>; |
916 | | template class PipelineXSinkLocalState<LocalExchangeSharedState>; |
917 | | template class PipelineXSinkLocalState<BasicSharedState>; |
918 | | template class PipelineXSinkLocalState<DataQueueSharedState>; |
919 | | template class PipelineXSinkLocalState<RecCTESharedState>; |
920 | | |
921 | | template class PipelineXLocalState<HashJoinSharedState>; |
922 | | template class PipelineXLocalState<PartitionedHashJoinSharedState>; |
923 | | template class PipelineXLocalState<SortSharedState>; |
924 | | template class PipelineXLocalState<SpillSortSharedState>; |
925 | | template class PipelineXLocalState<NestedLoopJoinSharedState>; |
926 | | template class PipelineXLocalState<AnalyticSharedState>; |
927 | | template class PipelineXLocalState<AggSharedState>; |
928 | | template class PipelineXLocalState<BucketedAggSharedState>; |
929 | | template class PipelineXLocalState<PartitionedAggSharedState>; |
930 | | template class PipelineXLocalState<FakeSharedState>; |
931 | | template class PipelineXLocalState<UnionSharedState>; |
932 | | template class PipelineXLocalState<DataQueueSharedState>; |
933 | | template class PipelineXLocalState<MultiCastSharedState>; |
934 | | template class PipelineXLocalState<PartitionSortNodeSharedState>; |
935 | | template class PipelineXLocalState<SetSharedState>; |
936 | | template class PipelineXLocalState<LocalExchangeSharedState>; |
937 | | template class PipelineXLocalState<BasicSharedState>; |
938 | | template class PipelineXLocalState<RecCTESharedState>; |
939 | | |
940 | | template class AsyncWriterSink<doris::VFileResultWriter, ResultFileSinkOperatorX>; |
941 | | template class AsyncWriterSink<doris::VJdbcTableWriter, JdbcTableSinkOperatorX>; |
942 | | template class AsyncWriterSink<doris::VTabletWriter, OlapTableSinkOperatorX>; |
943 | | template class AsyncWriterSink<doris::VTabletWriterV2, OlapTableSinkV2OperatorX>; |
944 | | template class AsyncWriterSink<doris::VHiveTableWriter, HiveTableSinkOperatorX>; |
945 | | template class AsyncWriterSink<doris::VIcebergTableWriter, IcebergTableSinkOperatorX>; |
946 | | template class AsyncWriterSink<doris::VIcebergTableWriter, SpillIcebergTableSinkOperatorX>; |
947 | | template class AsyncWriterSink<doris::VIcebergDeleteSink, IcebergDeleteSinkOperatorX>; |
948 | | template class AsyncWriterSink<doris::VIcebergMergeSink, IcebergMergeSinkOperatorX>; |
949 | | template class AsyncWriterSink<doris::VMCTableWriter, MCTableSinkOperatorX>; |
950 | | template class AsyncWriterSink<doris::VTVFTableWriter, TVFTableSinkOperatorX>; |
951 | | |
952 | | #ifdef BE_TEST |
953 | | template class OperatorX<DummyOperatorLocalState>; |
954 | | template class DataSinkOperatorX<DummySinkLocalState>; |
955 | | #endif |
956 | | |
957 | | } // namespace doris |