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