Coverage Report

Created: 2026-10-28 18:55

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
be/src/exec/operator/operator.cpp
Line
Count
Source
1
// Licensed to the Apache Software Foundation (ASF) under one
2
// or more contributor license agreements.  See the NOTICE file
3
// distributed with this work for additional information
4
// regarding copyright ownership.  The ASF licenses this file
5
// to you under the Apache License, Version 2.0 (the
6
// "License"); you may not use this file except in compliance
7
// with the License.  You may obtain a copy of the License at
8
//
9
//   http://www.apache.org/licenses/LICENSE-2.0
10
//
11
// Unless required by applicable law or agreed to in writing,
12
// software distributed under the License is distributed on an
13
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
// KIND, either express or implied.  See the License for the
15
// specific language governing permissions and limitations
16
// under the License.
17
18
#include "exec/operator/operator.h"
19
20
#include <algorithm>
21
22
#include "common/status.h"
23
#include "exec/common/util.hpp"
24
#include "exec/exchange/local_exchange_sink_operator.h"
25
#include "exec/exchange/local_exchange_source_operator.h"
26
#include "exec/operator/aggregation_sink_operator.h"
27
#include "exec/operator/aggregation_source_operator.h"
28
#include "exec/operator/analytic_sink_operator.h"
29
#include "exec/operator/analytic_source_operator.h"
30
#include "exec/operator/assert_num_rows_operator.h"
31
#include "exec/operator/blackhole_sink_operator.h"
32
#include "exec/operator/bucketed_aggregation_sink_operator.h"
33
#include "exec/operator/bucketed_aggregation_source_operator.h"
34
#include "exec/operator/cache_sink_operator.h"
35
#include "exec/operator/cache_source_operator.h"
36
#include "exec/operator/datagen_operator.h"
37
#include "exec/operator/dict_sink_operator.h"
38
#include "exec/operator/distinct_streaming_aggregation_operator.h"
39
#include "exec/operator/empty_set_operator.h"
40
#include "exec/operator/exchange_sink_operator.h"
41
#include "exec/operator/exchange_source_operator.h"
42
#include "exec/operator/file_scan_operator.h"
43
#include "exec/operator/group_commit_block_sink_operator.h"
44
#include "exec/operator/group_commit_scan_operator.h"
45
#include "exec/operator/hashjoin_build_sink.h"
46
#include "exec/operator/hashjoin_probe_operator.h"
47
#include "exec/operator/hive_table_sink_operator.h"
48
#include "exec/operator/iceberg_delete_sink_operator.h"
49
#include "exec/operator/iceberg_merge_sink_operator.h"
50
#include "exec/operator/iceberg_table_sink_operator.h"
51
#include "exec/operator/jdbc_scan_operator.h"
52
#include "exec/operator/jdbc_table_sink_operator.h"
53
#include "exec/operator/local_merge_sort_source_operator.h"
54
#include "exec/operator/materialization_opertor.h"
55
#include "exec/operator/maxcompute_table_sink_operator.h"
56
#include "exec/operator/memory_scratch_sink_operator.h"
57
#include "exec/operator/meta_scan_operator.h"
58
#include "exec/operator/mock_operator.h"
59
#include "exec/operator/mock_scan_operator.h"
60
#include "exec/operator/multi_cast_data_stream_sink.h"
61
#include "exec/operator/multi_cast_data_stream_source.h"
62
#include "exec/operator/nested_loop_join_build_operator.h"
63
#include "exec/operator/nested_loop_join_probe_operator.h"
64
#include "exec/operator/olap_scan_operator.h"
65
#include "exec/operator/olap_table_sink_operator.h"
66
#include "exec/operator/olap_table_sink_v2_operator.h"
67
#include "exec/operator/paimon_table_sink_operator.h"
68
#include "exec/operator/partition_sort_sink_operator.h"
69
#include "exec/operator/partition_sort_source_operator.h"
70
#include "exec/operator/partitioned_aggregation_sink_operator.h"
71
#include "exec/operator/partitioned_aggregation_source_operator.h"
72
#include "exec/operator/partitioned_hash_join_probe_operator.h"
73
#include "exec/operator/partitioned_hash_join_sink_operator.h"
74
#include "exec/operator/rec_cte_anchor_sink_operator.h"
75
#include "exec/operator/rec_cte_scan_operator.h"
76
#include "exec/operator/rec_cte_sink_operator.h"
77
#include "exec/operator/rec_cte_source_operator.h"
78
#include "exec/operator/repeat_operator.h"
79
#include "exec/operator/result_file_sink_operator.h"
80
#include "exec/operator/result_sink_operator.h"
81
#include "exec/operator/schema_scan_operator.h"
82
#include "exec/operator/select_operator.h"
83
#include "exec/operator/set_probe_sink_operator.h"
84
#include "exec/operator/set_sink_operator.h"
85
#include "exec/operator/set_source_operator.h"
86
#include "exec/operator/sort_sink_operator.h"
87
#include "exec/operator/sort_source_operator.h"
88
#include "exec/operator/spill_iceberg_table_sink_operator.h"
89
#include "exec/operator/spill_sort_sink_operator.h"
90
#include "exec/operator/spill_sort_source_operator.h"
91
#include "exec/operator/streaming_aggregation_operator.h"
92
#include "exec/operator/table_function_operator.h"
93
#include "exec/operator/tvf_table_sink_operator.h"
94
#include "exec/operator/union_sink_operator.h"
95
#include "exec/operator/union_source_operator.h"
96
#include "exec/pipeline/dependency.h"
97
#include "exec/pipeline/pipeline.h"
98
#include "exprs/vexpr.h"
99
#include "exprs/vexpr_context.h"
100
#include "runtime/runtime_profile.h"
101
#include "runtime/runtime_profile_counter_names.h"
102
#include "util/debug_util.h"
103
#include "util/string_util.h"
104
105
namespace doris {
106
class RowDescriptor;
107
class RuntimeState;
108
} // namespace doris
109
110
namespace doris {
111
112
0
Status OperatorBase::close(RuntimeState* state) {
113
0
    if (_is_closed) {
114
0
        return Status::OK();
115
0
    }
116
0
    _is_closed = true;
117
0
    return Status::OK();
118
0
}
119
120
template <typename SharedStateArg>
121
1.82M
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
1.82M
    if (_parent->nereids_id() == -1) {
123
958k
        return fmt::format("(id={})", _parent->node_id());
124
958k
    } else {
125
868k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
868k
    }
127
1.82M
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
68.2k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
68.2k
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
68.2k
    } else {
125
68.2k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
68.2k
    }
127
68.2k
}
_ZNK5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
1
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
1
    if (_parent->nereids_id() == -1) {
123
1
        return fmt::format("(id={})", _parent->node_id());
124
1
    } else {
125
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
0
    }
127
1
}
_ZNK5doris19PipelineXLocalStateINS_15SortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
236k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
236k
    if (_parent->nereids_id() == -1) {
123
12
        return fmt::format("(id={})", _parent->node_id());
124
236k
    } else {
125
236k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
236k
    }
127
236k
}
_ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
152
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
152
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
152
    } else {
125
152
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
152
    }
127
152
}
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
5.20k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
5.20k
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
5.20k
    } else {
125
5.20k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
5.20k
    }
127
5.20k
}
_ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
9.16k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
9.16k
    if (_parent->nereids_id() == -1) {
123
59
        return fmt::format("(id={})", _parent->node_id());
124
9.10k
    } else {
125
9.10k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
9.10k
    }
127
9.16k
}
_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
63.5k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
63.5k
    if (_parent->nereids_id() == -1) {
123
2
        return fmt::format("(id={})", _parent->node_id());
124
63.5k
    } else {
125
63.5k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
63.5k
    }
127
63.5k
}
_ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
118
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
118
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
118
    } else {
125
118
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
118
    }
127
118
}
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
609k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
609k
    if (_parent->nereids_id() == -1) {
123
291k
        return fmt::format("(id={})", _parent->node_id());
124
318k
    } else {
125
318k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
318k
    }
127
609k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
55.2k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
55.2k
    if (_parent->nereids_id() == -1) {
123
2
        return fmt::format("(id={})", _parent->node_id());
124
55.2k
    } else {
125
55.2k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
55.2k
    }
127
55.2k
}
_ZNK5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
26
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
26
    if (_parent->nereids_id() == -1) {
123
26
        return fmt::format("(id={})", _parent->node_id());
124
26
    } else {
125
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
0
    }
127
26
}
_ZNK5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
4.21k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
4.21k
    if (_parent->nereids_id() == -1) {
123
4.20k
        return fmt::format("(id={})", _parent->node_id());
124
4.20k
    } else {
125
2
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
2
    }
127
4.21k
}
_ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
494
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
494
    if (_parent->nereids_id() == -1) {
123
102
        return fmt::format("(id={})", _parent->node_id());
124
392
    } else {
125
392
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
392
    }
127
494
}
_ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
5.26k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
5.26k
    if (_parent->nereids_id() == -1) {
123
13
        return fmt::format("(id={})", _parent->node_id());
124
5.25k
    } else {
125
5.25k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
5.25k
    }
127
5.26k
}
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
660k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
662k
    if (_parent->nereids_id() == -1) {
123
662k
        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
660k
}
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.24M
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
1.24M
    if (_parent->nereids_id() == -1) {
132
695k
        return fmt::format("(id={})", _parent->node_id());
133
695k
    } else {
134
550k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
550k
    }
136
1.24M
}
_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
2
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
2
    if (_parent->nereids_id() == -1) {
132
1
        return fmt::format("(id={})", _parent->node_id());
133
1
    } else {
134
1
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
1
    }
136
2
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
239k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
239k
    if (_parent->nereids_id() == -1) {
132
9
        return fmt::format("(id={})", _parent->node_id());
133
239k
    } else {
134
239k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
239k
    }
136
239k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
159
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
159
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
159
    } else {
134
159
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
159
    }
136
159
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
5.23k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
5.23k
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
5.23k
    } else {
134
5.23k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
5.23k
    }
136
5.23k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
9.19k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
9.19k
    if (_parent->nereids_id() == -1) {
132
59
        return fmt::format("(id={})", _parent->node_id());
133
9.13k
    } else {
134
9.13k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
9.13k
    }
136
9.19k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
108k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
108k
    if (_parent->nereids_id() == -1) {
132
29
        return fmt::format("(id={})", _parent->node_id());
133
108k
    } else {
134
108k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
108k
    }
136
108k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
63.1k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
63.1k
    if (_parent->nereids_id() == -1) {
132
4
        return fmt::format("(id={})", _parent->node_id());
133
63.1k
    } else {
134
63.1k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
63.1k
    }
136
63.1k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
128
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
128
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
128
    } else {
134
128
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
128
    }
136
128
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
28
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
28
    if (_parent->nereids_id() == -1) {
132
28
        return fmt::format("(id={})", _parent->node_id());
133
28
    } else {
134
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
0
    }
136
28
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
8.86k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
8.86k
    if (_parent->nereids_id() == -1) {
132
3
        return fmt::format("(id={})", _parent->node_id());
133
8.86k
    } else {
134
8.86k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
8.86k
    }
136
8.86k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
492
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
492
    if (_parent->nereids_id() == -1) {
132
102
        return fmt::format("(id={})", _parent->node_id());
133
390
    } else {
134
390
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
390
    }
136
492
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
13.0k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
13.0k
    if (_parent->nereids_id() == -1) {
132
13.0k
        return fmt::format("(id={})", _parent->node_id());
133
13.0k
    } else {
134
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
0
    }
136
13.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
262k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
263k
    if (_parent->nereids_id() == -1) {
132
263k
        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
262k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
417k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
417k
    if (_parent->nereids_id() == -1) {
132
417k
        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
417k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
25
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
25
    if (_parent->nereids_id() == -1) {
132
25
        return fmt::format("(id={})", _parent->node_id());
133
25
    } else {
134
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
0
    }
136
25
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
338
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
338
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
338
    } else {
134
338
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
338
    }
136
338
}
137
138
template <typename SharedStateArg>
139
31.7k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
31.7k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
31.7k
    _terminated = true;
144
31.7k
    return Status::OK();
145
31.7k
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
24.0k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
24.0k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
24.0k
    _terminated = true;
144
24.0k
    return Status::OK();
145
24.0k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
2.43k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
2.43k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
2.43k
    _terminated = true;
144
2.43k
    return Status::OK();
145
2.43k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_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_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
10
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
10
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
10
    _terminated = true;
144
10
    return Status::OK();
145
10
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
1.88k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
1.88k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
1.88k
    _terminated = true;
144
1.88k
    return Status::OK();
145
1.88k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
1.82k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
1.82k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
1.82k
    _terminated = true;
144
1.82k
    return Status::OK();
145
1.82k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
626
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
626
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
626
    _terminated = true;
144
626
    return Status::OK();
145
626
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
363
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
363
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
363
    _terminated = true;
144
363
    return Status::OK();
145
363
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
11
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
11
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
11
    _terminated = true;
144
11
    return Status::OK();
145
11
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
70
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
70
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
70
    _terminated = true;
144
70
    return Status::OK();
145
70
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
5
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
5
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
5
    _terminated = true;
144
5
    return Status::OK();
145
5
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
381
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
381
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
381
    _terminated = true;
144
381
    return Status::OK();
145
381
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
128
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
128
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
128
    _terminated = true;
144
128
    return Status::OK();
145
128
}
146
147
318k
DataDistribution OperatorBase::required_data_distribution(RuntimeState* /*state*/) const {
148
318k
    return _child && _child->is_serial_operator() && !is_source()
149
318k
                   ? DataDistribution(TLocalPartitionType::PASSTHROUGH)
150
318k
                   : DataDistribution(TLocalPartitionType::NOOP);
151
318k
}
152
153
24.7k
bool OperatorBase::child_breaks_local_key_distribution(RuntimeState* state) const {
154
24.7k
    if (!_child) {
155
24.0k
        return false;
156
24.0k
    }
157
757
    if (_child->is_serial_operator()) {
158
39
        return true;
159
39
    }
160
718
    const auto child_distribution = _child->required_data_distribution(state);
161
718
    return child_distribution.need_local_exchange() &&
162
718
           !is_shuffled_exchange(child_distribution.distribution_type);
163
757
}
164
165
template <typename SharedStateArg>
166
17.4k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
17.4k
    fmt::memory_buffer debug_string_buffer;
168
17.4k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
17.4k
    return fmt::to_string(debug_string_buffer);
170
17.4k
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
160
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
160
    fmt::memory_buffer debug_string_buffer;
168
160
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
160
    return fmt::to_string(debug_string_buffer);
170
160
}
_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
160
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
160
    fmt::memory_buffer debug_string_buffer;
168
160
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
160
    return fmt::to_string(debug_string_buffer);
170
160
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
490
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
490
    fmt::memory_buffer debug_string_buffer;
168
490
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
490
    return fmt::to_string(debug_string_buffer);
170
490
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
15.2k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
15.2k
    fmt::memory_buffer debug_string_buffer;
168
15.2k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
15.2k
    return fmt::to_string(debug_string_buffer);
170
15.2k
}
_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
1.44k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
1.44k
    fmt::memory_buffer debug_string_buffer;
168
1.44k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
1.44k
    return fmt::to_string(debug_string_buffer);
170
1.44k
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
171
172
template <typename SharedStateArg>
173
16.9k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
16.9k
    fmt::memory_buffer debug_string_buffer;
175
16.9k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
16.9k
    return fmt::to_string(debug_string_buffer);
177
16.9k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
160
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
160
    fmt::memory_buffer debug_string_buffer;
175
160
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
160
    return fmt::to_string(debug_string_buffer);
177
160
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
490
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
490
    fmt::memory_buffer debug_string_buffer;
175
490
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
490
    return fmt::to_string(debug_string_buffer);
177
490
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
640
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
640
    fmt::memory_buffer debug_string_buffer;
175
640
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
640
    return fmt::to_string(debug_string_buffer);
177
640
}
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
840
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
840
    fmt::memory_buffer debug_string_buffer;
175
840
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
840
    return fmt::to_string(debug_string_buffer);
177
840
}
_ZNK5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
14.8k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
14.8k
    fmt::memory_buffer debug_string_buffer;
175
14.8k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
14.8k
    return fmt::to_string(debug_string_buffer);
177
14.8k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
178
179
17.4k
std::string OperatorXBase::debug_string(int indentation_level) const {
180
17.4k
    fmt::memory_buffer debug_string_buffer;
181
17.4k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, parallel_tasks={}, _is_serial_operator={}",
182
17.4k
                   std::string(indentation_level * 2, ' '), _op_name, node_id(), _parallel_tasks,
183
17.4k
                   _is_serial_operator);
184
17.4k
    return fmt::to_string(debug_string_buffer);
185
17.4k
}
186
187
17.4k
std::string OperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
188
17.4k
    return state->get_local_state(operator_id())->debug_string(indentation_level);
189
17.4k
}
190
191
704k
Status OperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
192
704k
    std::string node_name = print_plan_node_type(tnode.node_type);
193
704k
    _nereids_id = tnode.nereids_id;
194
704k
    if (!tnode.intermediate_output_tuple_id_list.empty()) {
195
6.79k
        if (!has_projection()) {
196
0
            return Status::InternalError("no final output tuple id");
197
0
        }
198
6.79k
        if (tnode.intermediate_output_tuple_id_list.size() !=
199
6.79k
            tnode.intermediate_projections_list.size()) {
200
0
            return Status::InternalError(
201
0
                    "intermediate_output_tuple_id_list size:{} not match "
202
0
                    "intermediate_projections_list size:{}",
203
0
                    tnode.intermediate_output_tuple_id_list.size(),
204
0
                    tnode.intermediate_projections_list.size());
205
0
        }
206
6.79k
    }
207
704k
    auto substr = node_name.substr(0, node_name.find("_NODE"));
208
704k
    _op_name = substr + "_OPERATOR";
209
210
704k
    if (tnode.__isset.vconjunct) {
211
0
        return Status::InternalError("vconjunct is not supported yet");
212
704k
    } else if (tnode.__isset.conjuncts) {
213
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
704k
    if (tnode.__isset.projections) {
222
275k
        RETURN_IF_ERROR(VExpr::create_expr_trees(tnode.projections, _projection->projections));
223
275k
    }
224
704k
    if (!tnode.intermediate_projections_list.empty()) {
225
18.4E
        DCHECK(has_projection()) << "no final projections";
226
6.79k
        _projection->intermediate_projections.reserve(tnode.intermediate_projections_list.size());
227
12.2k
        for (const auto& tnode_projections : tnode.intermediate_projections_list) {
228
12.2k
            VExprContextSPtrs projections;
229
12.2k
            RETURN_IF_ERROR(VExpr::create_expr_trees(tnode_projections, projections));
230
12.2k
            _projection->intermediate_projections.push_back(projections);
231
12.2k
        }
232
6.79k
    }
233
704k
    return Status::OK();
234
704k
}
235
236
731k
Status OperatorXBase::prepare(RuntimeState* state) {
237
731k
    for (auto& conjunct : _conjuncts) {
238
283k
        RETURN_IF_ERROR(conjunct->prepare(state, operator_row_desc_before_projection()));
239
283k
    }
240
731k
    if (state->enable_adjust_conjunct_order_by_cost()) {
241
681k
        std::ranges::stable_sort(_conjuncts, [](const auto& a, const auto& b) {
242
347k
            return a->execute_cost() < b->execute_cost();
243
347k
        });
244
681k
    };
245
246
731k
    if (has_projection()) {
247
275k
        auto& projection = *_projection;
248
287k
        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
275k
        const auto& final_projection_input_row_desc =
256
275k
                projection.intermediate_output_row_descriptors.empty()
257
275k
                        ? operator_row_desc_before_projection()
258
275k
                        : projection.intermediate_output_row_descriptors.back();
259
275k
        RETURN_IF_ERROR(
260
275k
                VExpr::prepare(projection.projections, state, final_projection_input_row_desc));
261
275k
        RETURN_IF_ERROR(VExpr::check_expr_output_type(projection.projections,
262
275k
                                                      projection.output_row_descriptor));
263
275k
    }
264
265
731k
    for (auto& conjunct : _conjuncts) {
266
283k
        RETURN_IF_ERROR(conjunct->open(state));
267
283k
    }
268
731k
    if (has_projection()) {
269
275k
        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
731k
    if (_child && !is_source()) {
275
99.4k
        RETURN_IF_ERROR(_child->prepare(state));
276
99.4k
    }
277
278
731k
    if (VExpr::contains_blockable_function(_conjuncts) ||
279
732k
        (has_projection() && VExpr::contains_blockable_function(_projection->projections))) {
280
0
        _blockable = true;
281
0
    }
282
283
731k
    return Status::OK();
284
731k
}
285
286
8.43k
Status OperatorXBase::terminate(RuntimeState* state) {
287
8.43k
    if (_child && !is_source()) {
288
665
        RETURN_IF_ERROR(_child->terminate(state));
289
665
    }
290
8.43k
    auto result = state->get_local_state_result(operator_id());
291
8.43k
    if (!result) {
292
0
        return result.error();
293
0
    }
294
8.43k
    return result.value()->terminate(state);
295
8.43k
}
296
297
4.90M
Status OperatorXBase::close(RuntimeState* state) {
298
4.90M
    if (_child && !is_source()) {
299
758k
        RETURN_IF_ERROR(_child->close(state));
300
758k
    }
301
4.90M
    auto result = state->get_local_state_result(operator_id());
302
4.90M
    if (!result) {
303
0
        return result.error();
304
0
    }
305
4.90M
    return result.value()->close(state);
306
4.90M
}
307
308
288k
void PipelineXLocalStateBase::clear_origin_block() {
309
288k
    _origin_block.clear_column_data(_parent->operator_row_desc_before_projection().num_slots());
310
288k
}
311
312
730k
Status PipelineXLocalStateBase::filter_block(const VExprContextSPtrs& expr_contexts, Block* block) {
313
730k
    RETURN_IF_ERROR(VExprContext::filter_block(expr_contexts, block, block->columns()));
314
315
730k
    _estimate_memory_usage += VExprContext::get_memory_usage(expr_contexts);
316
730k
    return Status::OK();
317
730k
}
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
288k
                                     Block* output_block) const {
326
288k
    auto* local_state = state->get_local_state(operator_id());
327
288k
    SCOPED_TIMER(local_state->exec_time_counter());
328
288k
    SCOPED_TIMER(local_state->_projection_timer);
329
288k
    const size_t rows = origin_block->rows();
330
288k
    if (rows == 0) {
331
144k
        return Status::OK();
332
144k
    }
333
144k
    SCOPED_PEAK_MEM(&local_state->_estimate_memory_usage);
334
335
144k
    {
336
144k
        Block input_block = *origin_block;
337
338
144k
        ColumnsWithTypeAndName new_columns;
339
144k
        for (const auto& projections : local_state->_intermediate_projections) {
340
5.27k
            if (projections.empty()) {
341
0
                return Status::InternalError("meet empty intermediate projection, node id: {}",
342
0
                                             node_id());
343
0
            }
344
5.27k
            new_columns.resize(projections.size());
345
124k
            for (int i = 0; i < projections.size(); i++) {
346
119k
                RETURN_IF_ERROR(projections[i]->execute(&input_block, new_columns[i]));
347
119k
                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
119k
            }
355
5.26k
            Block tmp_block {new_columns};
356
5.26k
            input_block.swap(tmp_block);
357
5.26k
        }
358
359
144k
        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
144k
        auto scoped_mutable_block = VectorizedUtils::build_scoped_mutable_mem_reuse_block(
367
144k
                output_block, _projection->output_row_descriptor);
368
144k
        auto& mutable_columns = scoped_mutable_block.mutable_columns();
369
144k
        DCHECK_EQ(mutable_columns.size(), local_state->_projections.size()) << debug_string();
370
144k
        Columns shared_columns(mutable_columns.size());
371
372
820k
        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
237k
                mutable_columns[i] = IColumn::mutate(std::move(column_ptr));
387
438k
            } else {
388
438k
                shared_columns[i] = std::move(column_ptr);
389
438k
            }
390
676k
        }
391
392
144k
        scoped_mutable_block.restore();
393
820k
        for (int i = 0; i < shared_columns.size(); ++i) {
394
676k
            if (shared_columns[i]) {
395
438k
                output_block->replace_by_position(i, std::move(shared_columns[i]));
396
438k
            }
397
676k
        }
398
144k
    }
399
400
0
    origin_block->clear_column_data(
401
144k
            local_state->_parent->operator_row_desc_before_projection().num_slots());
402
144k
    DCHECK_EQ(output_block->rows(), rows);
403
404
144k
    return Status::OK();
405
144k
}
406
407
4.17M
Status OperatorXBase::get_block_after_projects(RuntimeState* state, Block* block, bool* eos) {
408
4.17M
    DBUG_EXECUTE_IF("Pipeline::return_empty_block", {
409
4.17M
        if (this->_op_name == "AGGREGATION_OPERATOR" || this->_op_name == "HASH_JOIN_OPERATOR" ||
410
4.17M
            this->_op_name == "PARTITIONED_AGGREGATION_OPERATOR" ||
411
4.17M
            this->_op_name == "PARTITIONED_HASH_JOIN_OPERATOR" ||
412
4.17M
            this->_op_name == "CROSS_JOIN_OPERATOR" || this->_op_name == "SORT_OPERATOR") {
413
4.17M
            if (_debug_point_count++ % 2 == 0) {
414
4.17M
                return Status::OK();
415
4.17M
            }
416
4.17M
        }
417
4.17M
    });
418
419
4.17M
    Status status;
420
4.17M
    auto* local_state = state->get_local_state(operator_id());
421
4.17M
    Defer defer([&]() {
422
4.17M
        if (status.ok()) {
423
4.17M
            local_state->update_output_block_counters(*block);
424
4.17M
        }
425
4.17M
    });
426
4.17M
    if (has_projection()) {
427
288k
        local_state->clear_origin_block();
428
288k
        status = get_block(state, &local_state->_origin_block, eos);
429
288k
        if (UNLIKELY(!status.ok())) {
430
45
            return status;
431
45
        }
432
288k
        status = do_projections(state, &local_state->_origin_block, block);
433
288k
        return status;
434
288k
    }
435
3.88M
    status = get_block(state, block, eos);
436
3.88M
    RETURN_IF_ERROR(block->check_type_and_column());
437
3.88M
    return status;
438
3.88M
}
439
440
2.80M
void PipelineXLocalStateBase::reached_limit(Block* block, bool* eos) {
441
2.80M
    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.80M
    DBUG_EXECUTE_IF("Pipeline::reached_limit_early", {
447
2.80M
        auto op_name = to_lower(_parent->_op_name);
448
2.80M
        auto arg_op_name = dp->param<std::string>("op_name");
449
2.80M
        arg_op_name = to_lower(arg_op_name);
450
451
2.80M
        if (op_name == arg_op_name) {
452
2.80M
            *eos = true;
453
2.80M
        }
454
2.80M
    });
455
456
2.80M
    if (auto rows = block->rows()) {
457
810k
        _num_rows_returned += rows;
458
810k
        _state->get_query_ctx()->resource_ctx()->io_context()->update_process_rows(rows);
459
810k
    }
460
2.80M
}
461
462
31.7k
Status DataSinkOperatorXBase::terminate(RuntimeState* state) {
463
31.7k
    auto result = state->get_sink_local_state_result();
464
31.7k
    if (!result) {
465
0
        return result.error();
466
0
    }
467
31.7k
    return result.value()->terminate(state);
468
31.7k
}
469
470
16.9k
std::string DataSinkOperatorXBase::debug_string(int indentation_level) const {
471
16.9k
    fmt::memory_buffer debug_string_buffer;
472
473
16.9k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, _is_serial_operator={}",
474
16.9k
                   std::string(indentation_level * 2, ' '), _name, node_id(), _is_serial_operator);
475
16.9k
    return fmt::to_string(debug_string_buffer);
476
16.9k
}
477
478
16.9k
std::string DataSinkOperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
479
16.9k
    return state->get_sink_local_state()->debug_string(indentation_level);
480
16.9k
}
481
482
364k
Status DataSinkOperatorXBase::init(const TDataSink& tsink) {
483
364k
    std::string op_name = "UNKNOWN_SINK";
484
364k
    auto it = _TDataSinkType_VALUES_TO_NAMES.find(tsink.type);
485
486
365k
    if (it != _TDataSinkType_VALUES_TO_NAMES.end()) {
487
365k
        op_name = it->second;
488
365k
    }
489
364k
    _name = op_name + "_OPERATOR";
490
364k
    return Status::OK();
491
364k
}
492
493
314k
Status DataSinkOperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
494
314k
    std::string op_name = print_plan_node_type(tnode.node_type);
495
314k
    _nereids_id = tnode.nereids_id;
496
314k
    auto substr = op_name.substr(0, op_name.find("_NODE"));
497
314k
    _name = substr + "_SINK_OPERATOR";
498
314k
    return Status::OK();
499
314k
}
500
501
template <typename LocalStateType>
502
Status DataSinkOperatorX<LocalStateType>::setup_local_state(RuntimeState* state,
503
1.79M
                                                            LocalSinkStateInfo& info) {
504
1.79M
    auto local_state = LocalStateType::create_unique(this, state);
505
1.79M
    RETURN_IF_ERROR(local_state->init(state, info));
506
1.79M
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
1.79M
    return Status::OK();
508
1.79M
}
_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
371k
                                                            LocalSinkStateInfo& info) {
504
371k
    auto local_state = LocalStateType::create_unique(this, state);
505
371k
    RETURN_IF_ERROR(local_state->init(state, info));
506
371k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
371k
    return Status::OK();
508
371k
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
3
                                                            LocalSinkStateInfo& info) {
504
3
    auto local_state = LocalStateType::create_unique(this, state);
505
3
    RETURN_IF_ERROR(local_state->init(state, info));
506
3
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
3
    return Status::OK();
508
3
}
_ZN5doris17DataSinkOperatorXINS_24ResultFileSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
370
                                                            LocalSinkStateInfo& info) {
504
370
    auto local_state = LocalStateType::create_unique(this, state);
505
370
    RETURN_IF_ERROR(local_state->init(state, info));
506
370
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
370
    return Status::OK();
508
370
}
_ZN5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
49.1k
                                                            LocalSinkStateInfo& info) {
504
49.1k
    auto local_state = LocalStateType::create_unique(this, state);
505
49.1k
    RETURN_IF_ERROR(local_state->init(state, info));
506
49.1k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
49.1k
    return Status::OK();
508
49.1k
}
_ZN5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2
                                                            LocalSinkStateInfo& info) {
504
2
    auto local_state = LocalStateType::create_unique(this, state);
505
2
    RETURN_IF_ERROR(local_state->init(state, info));
506
2
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2
    return Status::OK();
508
2
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
16
                                                            LocalSinkStateInfo& info) {
504
16
    auto local_state = LocalStateType::create_unique(this, state);
505
16
    RETURN_IF_ERROR(local_state->init(state, info));
506
16
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
16
    return Status::OK();
508
16
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_25PaimonTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_27IcebergDeleteSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_26IcebergMergeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_21MCTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
9.16k
                                                            LocalSinkStateInfo& info) {
504
9.16k
    auto local_state = LocalStateType::create_unique(this, state);
505
9.16k
    RETURN_IF_ERROR(local_state->init(state, info));
506
9.16k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
9.16k
    return Status::OK();
508
9.16k
}
_ZN5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
9
                                                            LocalSinkStateInfo& info) {
504
9
    auto local_state = LocalStateType::create_unique(this, state);
505
9
    RETURN_IF_ERROR(local_state->init(state, info));
506
9
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
9
    return Status::OK();
508
9
}
_ZN5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
241k
                                                            LocalSinkStateInfo& info) {
504
241k
    auto local_state = LocalStateType::create_unique(this, state);
505
241k
    RETURN_IF_ERROR(local_state->init(state, info));
506
241k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
241k
    return Status::OK();
508
241k
}
_ZN5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
159
                                                            LocalSinkStateInfo& info) {
504
159
    auto local_state = LocalStateType::create_unique(this, state);
505
159
    RETURN_IF_ERROR(local_state->init(state, info));
506
159
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
159
    return Status::OK();
508
159
}
_ZN5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
264k
                                                            LocalSinkStateInfo& info) {
504
264k
    auto local_state = LocalStateType::create_unique(this, state);
505
264k
    RETURN_IF_ERROR(local_state->init(state, info));
506
264k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
264k
    return Status::OK();
508
264k
}
_ZN5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
108k
                                                            LocalSinkStateInfo& info) {
504
108k
    auto local_state = LocalStateType::create_unique(this, state);
505
108k
    RETURN_IF_ERROR(local_state->init(state, info));
506
108k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
108k
    return Status::OK();
508
108k
}
_ZN5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
63.5k
                                                            LocalSinkStateInfo& info) {
504
63.5k
    auto local_state = LocalStateType::create_unique(this, state);
505
63.5k
    RETURN_IF_ERROR(local_state->init(state, info));
506
63.5k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
63.5k
    return Status::OK();
508
63.5k
}
_ZN5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
128
                                                            LocalSinkStateInfo& info) {
504
128
    auto local_state = LocalStateType::create_unique(this, state);
505
128
    RETURN_IF_ERROR(local_state->init(state, info));
506
128
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
128
    return Status::OK();
508
128
}
_ZN5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
542k
                                                            LocalSinkStateInfo& info) {
504
542k
    auto local_state = LocalStateType::create_unique(this, state);
505
542k
    RETURN_IF_ERROR(local_state->init(state, info));
506
542k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
542k
    return Status::OK();
508
542k
}
_ZN5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
5.24k
                                                            LocalSinkStateInfo& info) {
504
5.24k
    auto local_state = LocalStateType::create_unique(this, state);
505
5.24k
    RETURN_IF_ERROR(local_state->init(state, info));
506
5.24k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
5.24k
    return Status::OK();
508
5.24k
}
_ZN5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
8.87k
                                                            LocalSinkStateInfo& info) {
504
8.87k
    auto local_state = LocalStateType::create_unique(this, state);
505
8.87k
    RETURN_IF_ERROR(local_state->init(state, info));
506
8.87k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
8.87k
    return Status::OK();
508
8.87k
}
_ZN5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
1.75k
                                                            LocalSinkStateInfo& info) {
504
1.75k
    auto local_state = LocalStateType::create_unique(this, state);
505
1.75k
    RETURN_IF_ERROR(local_state->init(state, info));
506
1.75k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
1.75k
    return Status::OK();
508
1.75k
}
_ZN5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
393
                                                            LocalSinkStateInfo& info) {
504
393
    auto local_state = LocalStateType::create_unique(this, state);
505
393
    RETURN_IF_ERROR(local_state->init(state, info));
506
393
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
393
    return Status::OK();
508
393
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
5.01k
                                                            LocalSinkStateInfo& info) {
504
5.01k
    auto local_state = LocalStateType::create_unique(this, state);
505
5.01k
    RETURN_IF_ERROR(local_state->init(state, info));
506
5.01k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
5.01k
    return Status::OK();
508
5.01k
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.74k
                                                            LocalSinkStateInfo& info) {
504
2.74k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.74k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.74k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.74k
    return Status::OK();
508
2.74k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.69k
                                                            LocalSinkStateInfo& info) {
504
2.69k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.69k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.69k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.69k
    return Status::OK();
508
2.69k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.56k
                                                            LocalSinkStateInfo& info) {
504
2.56k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.56k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.56k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.56k
    return Status::OK();
508
2.56k
}
_ZN5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
1
                                                            LocalSinkStateInfo& info) {
504
1
    auto local_state = LocalStateType::create_unique(this, state);
505
1
    RETURN_IF_ERROR(local_state->init(state, info));
506
1
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
1
    return Status::OK();
508
1
}
_ZN5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
568
                                                            LocalSinkStateInfo& info) {
504
568
    auto local_state = LocalStateType::create_unique(this, state);
505
568
    RETURN_IF_ERROR(local_state->init(state, info));
506
568
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
568
    return Status::OK();
508
568
}
_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.42M
            ss->related_op_ids.insert(dest);
523
1.42M
        }
524
1.43M
        return ss;
525
1.43M
    }
526
1.43M
}
_ZNK5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
103k
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
103k
    } else {
519
103k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
103k
        ss->id = operator_id();
521
103k
        for (auto& dest : dests_id()) {
522
103k
            ss->related_op_ids.insert(dest);
523
103k
        }
524
103k
        return ss;
525
103k
    }
526
103k
}
_ZNK5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
371k
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
371k
    } else {
519
371k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
371k
        ss->id = operator_id();
521
371k
        for (auto& dest : dests_id()) {
522
368k
            ss->related_op_ids.insert(dest);
523
368k
        }
524
371k
        return ss;
525
371k
    }
526
371k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEE19create_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_24ResultFileSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
369
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
369
    } else {
519
369
        auto ss = LocalStateType::SharedStateType::create_shared();
520
369
        ss->id = operator_id();
521
369
        for (auto& dest : dests_id()) {
522
366
            ss->related_op_ids.insert(dest);
523
366
        }
524
369
        return ss;
525
369
    }
526
369
}
_ZNK5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
49.1k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
49.1k
    } else {
519
49.1k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
49.1k
        ss->id = operator_id();
521
49.1k
        for (auto& dest : dests_id()) {
522
49.1k
            ss->related_op_ids.insert(dest);
523
49.1k
        }
524
49.1k
        return ss;
525
49.1k
    }
526
49.1k
}
_ZNK5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE19create_shared_stateEv
Line
Count
Source
511
2
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
    } else {
519
2
        auto ss = LocalStateType::SharedStateType::create_shared();
520
2
        ss->id = operator_id();
521
2
        for (auto& dest : dests_id()) {
522
2
            ss->related_op_ids.insert(dest);
523
2
        }
524
2
        return ss;
525
2
    }
526
2
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
16
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
16
    } else {
519
16
        auto ss = LocalStateType::SharedStateType::create_shared();
520
16
        ss->id = operator_id();
521
16
        for (auto& dest : dests_id()) {
522
16
            ss->related_op_ids.insert(dest);
523
16
        }
524
16
        return ss;
525
16
    }
526
16
}
_ZNK5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
8
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
8
    } else {
519
8
        auto ss = LocalStateType::SharedStateType::create_shared();
520
8
        ss->id = operator_id();
521
8
        for (auto& dest : dests_id()) {
522
8
            ss->related_op_ids.insert(dest);
523
8
        }
524
8
        return ss;
525
8
    }
526
8
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_25PaimonTableSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
8
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
8
    } else {
519
8
        auto ss = LocalStateType::SharedStateType::create_shared();
520
8
        ss->id = operator_id();
521
8
        for (auto& dest : dests_id()) {
522
8
            ss->related_op_ids.insert(dest);
523
8
        }
524
8
        return ss;
525
8
    }
526
8
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27IcebergDeleteSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26IcebergMergeSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_21MCTableSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
9.20k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
9.20k
    } else {
519
9.20k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
9.20k
        ss->id = operator_id();
521
9.20k
        for (auto& dest : dests_id()) {
522
9.18k
            ss->related_op_ids.insert(dest);
523
9.18k
        }
524
9.20k
        return ss;
525
9.20k
    }
526
9.20k
}
_ZNK5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
9
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
9
    } else {
519
9
        auto ss = LocalStateType::SharedStateType::create_shared();
520
9
        ss->id = operator_id();
521
9
        for (auto& dest : dests_id()) {
522
9
            ss->related_op_ids.insert(dest);
523
9
        }
524
9
        return ss;
525
9
    }
526
9
}
_ZNK5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
241k
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
241k
    } else {
519
241k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
241k
        ss->id = operator_id();
521
241k
        for (auto& dest : dests_id()) {
522
240k
            ss->related_op_ids.insert(dest);
523
240k
        }
524
241k
        return ss;
525
241k
    }
526
241k
}
_ZNK5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
161
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
161
    } else {
519
161
        auto ss = LocalStateType::SharedStateType::create_shared();
520
161
        ss->id = operator_id();
521
161
        for (auto& dest : dests_id()) {
522
161
            ss->related_op_ids.insert(dest);
523
161
        }
524
161
        return ss;
525
161
    }
526
161
}
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
127
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
127
    } else {
519
127
        auto ss = LocalStateType::SharedStateType::create_shared();
520
127
        ss->id = operator_id();
521
127
        for (auto& dest : dests_id()) {
522
127
            ss->related_op_ids.insert(dest);
523
127
        }
524
127
        return ss;
525
127
    }
526
127
}
_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.24k
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.24k
    } else {
519
5.24k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
5.24k
        ss->id = operator_id();
521
5.24k
        for (auto& dest : dests_id()) {
522
5.23k
            ss->related_op_ids.insert(dest);
523
5.23k
        }
524
5.24k
        return ss;
525
5.24k
    }
526
5.24k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
495
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
495
    } else {
519
495
        auto ss = LocalStateType::SharedStateType::create_shared();
520
495
        ss->id = operator_id();
521
495
        for (auto& dest : dests_id()) {
522
494
            ss->related_op_ids.insert(dest);
523
494
        }
524
495
        return ss;
525
495
    }
526
495
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE19create_shared_stateEv
Line
Count
Source
511
2.69k
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.69k
    } else {
519
2.69k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
2.69k
        ss->id = operator_id();
521
2.69k
        for (auto& dest : dests_id()) {
522
2.67k
            ss->related_op_ids.insert(dest);
523
2.67k
        }
524
2.69k
        return ss;
525
2.69k
    }
526
2.69k
}
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE19create_shared_stateEv
Line
Count
Source
511
2.56k
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.56k
    } else {
519
2.56k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
2.56k
        ss->id = operator_id();
521
2.56k
        for (auto& dest : dests_id()) {
522
2.55k
            ss->related_op_ids.insert(dest);
523
2.55k
        }
524
2.56k
        return ss;
525
2.56k
    }
526
2.56k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
570
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
570
    } else {
519
570
        auto ss = LocalStateType::SharedStateType::create_shared();
520
570
        ss->id = operator_id();
521
570
        for (auto& dest : dests_id()) {
522
561
            ss->related_op_ids.insert(dest);
523
561
        }
524
570
        return ss;
525
570
    }
526
570
}
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.09M
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.09M
    auto local_state = LocalStateType::create_unique(state, this);
531
2.09M
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.09M
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.09M
    return Status::OK();
534
2.09M
}
_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
256k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
256k
    auto local_state = LocalStateType::create_unique(state, this);
531
256k
    RETURN_IF_ERROR(local_state->init(state, info));
532
256k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
256k
    return Status::OK();
534
256k
}
_ZN5doris9OperatorXINS_21GroupCommitLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
146
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
146
    auto local_state = LocalStateType::create_unique(state, this);
531
146
    RETURN_IF_ERROR(local_state->init(state, info));
532
146
    state->emplace_local_state(operator_id(), std::move(local_state));
533
146
    return Status::OK();
534
146
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_18JDBCScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_18FileScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
3.24k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
3.24k
    auto local_state = LocalStateType::create_unique(state, this);
531
3.24k
    RETURN_IF_ERROR(local_state->init(state, info));
532
3.24k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
3.24k
    return Status::OK();
534
3.24k
}
_ZN5doris9OperatorXINS_18AnalyticLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
9.12k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
9.12k
    auto local_state = LocalStateType::create_unique(state, this);
531
9.12k
    RETURN_IF_ERROR(local_state->init(state, info));
532
9.12k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
9.12k
    return Status::OK();
534
9.12k
}
_ZN5doris9OperatorXINS_14SortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
8.31k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
8.31k
    auto local_state = LocalStateType::create_unique(state, this);
531
8.31k
    RETURN_IF_ERROR(local_state->init(state, info));
532
8.31k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
8.31k
    return Status::OK();
534
8.31k
}
_ZN5doris9OperatorXINS_19SpillSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
152
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
152
    auto local_state = LocalStateType::create_unique(state, this);
531
152
    RETURN_IF_ERROR(local_state->init(state, info));
532
152
    state->emplace_local_state(operator_id(), std::move(local_state));
533
152
    return Status::OK();
534
152
}
_ZN5doris9OperatorXINS_24LocalMergeSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
231k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
231k
    auto local_state = LocalStateType::create_unique(state, this);
531
231k
    RETURN_IF_ERROR(local_state->init(state, info));
532
231k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
231k
    return Status::OK();
534
231k
}
_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
63.6k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
63.6k
    auto local_state = LocalStateType::create_unique(state, this);
531
63.6k
    RETURN_IF_ERROR(local_state->init(state, info));
532
63.6k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
63.6k
    return Status::OK();
534
63.6k
}
_ZN5doris9OperatorXINS_24PartitionedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
118
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
118
    auto local_state = LocalStateType::create_unique(state, this);
531
118
    RETURN_IF_ERROR(local_state->init(state, info));
532
118
    state->emplace_local_state(operator_id(), std::move(local_state));
533
118
    return Status::OK();
534
118
}
_ZN5doris9OperatorXINS_23TableFunctionLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
4.83k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
4.83k
    auto local_state = LocalStateType::create_unique(state, this);
531
4.83k
    RETURN_IF_ERROR(local_state->init(state, info));
532
4.83k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
4.83k
    return Status::OK();
534
4.83k
}
_ZN5doris9OperatorXINS_18ExchangeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
292k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
292k
    auto local_state = LocalStateType::create_unique(state, this);
531
292k
    RETURN_IF_ERROR(local_state->init(state, info));
532
292k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
292k
    return Status::OK();
534
292k
}
_ZN5doris9OperatorXINS_16RepeatLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.32k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.32k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.32k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.32k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.32k
    return Status::OK();
534
1.32k
}
_ZN5doris9OperatorXINS_29NestedLoopJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
5.21k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
5.21k
    auto local_state = LocalStateType::create_unique(state, this);
531
5.21k
    RETURN_IF_ERROR(local_state->init(state, info));
532
5.21k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
5.21k
    return Status::OK();
534
5.21k
}
_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.5k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
55.5k
    auto local_state = LocalStateType::create_unique(state, this);
531
55.5k
    RETURN_IF_ERROR(local_state->init(state, info));
532
55.5k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
55.5k
    return Status::OK();
534
55.5k
}
_ZN5doris9OperatorXINS_35MultiCastDataStreamSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
4.22k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
4.22k
    auto local_state = LocalStateType::create_unique(state, this);
531
4.22k
    RETURN_IF_ERROR(local_state->init(state, info));
532
4.22k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
4.22k
    return Status::OK();
534
4.22k
}
_ZN5doris9OperatorXINS_29PartitionSortSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
393
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
393
    auto local_state = LocalStateType::create_unique(state, this);
531
393
    RETURN_IF_ERROR(local_state->init(state, info));
532
393
    state->emplace_local_state(operator_id(), std::move(local_state));
533
393
    return Status::OK();
534
393
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.69k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.69k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.69k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.69k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.69k
    return Status::OK();
534
2.69k
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb0EEEE17setup_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_17DataGenLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
609
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
609
    auto local_state = LocalStateType::create_unique(state, this);
531
609
    RETURN_IF_ERROR(local_state->init(state, info));
532
609
    state->emplace_local_state(operator_id(), std::move(local_state));
533
609
    return Status::OK();
534
609
}
_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.7k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
10.7k
    auto local_state = LocalStateType::create_unique(state, this);
531
10.7k
    RETURN_IF_ERROR(local_state->init(state, info));
532
10.7k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
10.7k
    return Status::OK();
534
10.7k
}
_ZN5doris9OperatorXINS_29LocalExchangeSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
666k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
666k
    auto local_state = LocalStateType::create_unique(state, this);
531
666k
    RETURN_IF_ERROR(local_state->init(state, info));
532
666k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
666k
    return Status::OK();
534
666k
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_34PartitionedHashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_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
800
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
800
    auto local_state = LocalStateType::create_unique(state, this);
531
800
    RETURN_IF_ERROR(local_state->init(state, info));
532
800
    state->emplace_local_state(operator_id(), std::move(local_state));
533
800
    return Status::OK();
534
800
}
_ZN5doris9OperatorXINS_16SelectLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
777
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
777
    auto local_state = LocalStateType::create_unique(state, this);
531
777
    RETURN_IF_ERROR(local_state->init(state, info));
532
777
    state->emplace_local_state(operator_id(), std::move(local_state));
533
777
    return Status::OK();
534
777
}
_ZN5doris9OperatorXINS_22StreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
8.25k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
8.25k
    auto local_state = LocalStateType::create_unique(state, this);
531
8.25k
    RETURN_IF_ERROR(local_state->init(state, info));
532
8.25k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
8.25k
    return Status::OK();
534
8.25k
}
_ZN5doris9OperatorXINS_30DistinctStreamingAggLocalStateEE17setup_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
}
535
536
PipelineXSinkLocalStateBase::PipelineXSinkLocalStateBase(DataSinkOperatorXBase* parent,
537
                                                         RuntimeState* state)
538
1.78M
        : _parent(parent), _state(state) {}
539
540
PipelineXLocalStateBase::PipelineXLocalStateBase(RuntimeState* state, OperatorXBase* parent)
541
2.09M
        : _num_rows_returned(0),
542
2.09M
          _rows_returned_counter(nullptr),
543
2.09M
          _parent(parent),
544
2.09M
          _state(state),
545
2.09M
          _budget(state->batch_size(), state->preferred_block_size_bytes()) {}
546
547
template <typename SharedStateArg>
548
2.09M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
2.09M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
2.09M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
2.09M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
2.09M
    _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.09M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
2.09M
    _operator_profile->add_child(_common_profile.get(), true);
557
2.09M
    _operator_profile->add_child(_custom_profile.get(), true);
558
2.09M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
2.09M
    if constexpr (!is_fake_shared) {
560
1.23M
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
745k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
745k
                                    .first.get()
563
745k
                                    ->template cast<SharedStateArg>();
564
565
745k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
745k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
745k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
745k
        } else if (info.shared_state) {
569
430k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
0
                DCHECK(false);
571
0
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
430k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
430k
            _dependency = _shared_state->create_source_dependency(
576
430k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
430k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
430k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
430k
        } else {
580
54.1k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
145
                DCHECK(false);
582
145
            }
583
54.1k
        }
584
1.23M
    }
585
586
2.09M
    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.09M
    _rows_returned_counter =
591
2.09M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
2.09M
    _blocks_returned_counter =
593
2.09M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
2.09M
    _output_block_bytes_counter =
595
2.09M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
2.09M
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
2.09M
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
2.09M
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
2.09M
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
2.09M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
2.09M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
2.09M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
2.09M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
2.09M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
2.09M
    _memory_used_counter =
606
2.09M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
2.09M
    _common_profile->add_info_string("IsColocate",
608
2.09M
                                     std::to_string(_parent->is_colocated_operator()));
609
2.09M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
2.09M
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
2.09M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
2.09M
    return Status::OK();
613
2.09M
}
_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
12.9k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
12.9k
                                    .first.get()
563
12.9k
                                    ->template cast<SharedStateArg>();
564
565
12.9k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
12.9k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
12.9k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
55.7k
        } 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
55.6k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
55.6k
            _dependency = _shared_state->create_source_dependency(
576
55.6k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
55.6k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
55.6k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
55.6k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
90
        }
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
1
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
1
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
1
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
1
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
1
    _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
1
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
1
    _operator_profile->add_child(_common_profile.get(), true);
557
1
    _operator_profile->add_child(_custom_profile.get(), true);
558
1
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
1
    if constexpr (!is_fake_shared) {
560
1
        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
1
        } 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
1
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
1
            _dependency = _shared_state->create_source_dependency(
576
1
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
1
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
1
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
1
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
1
    }
585
586
1
    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
1
    _rows_returned_counter =
591
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
1
    _blocks_returned_counter =
593
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
1
    _output_block_bytes_counter =
595
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
1
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
1
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
1
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
1
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
1
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
1
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
1
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
1
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
1
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
1
    _memory_used_counter =
606
1
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
1
    _common_profile->add_info_string("IsColocate",
608
1
                                     std::to_string(_parent->is_colocated_operator()));
609
1
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
1
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
1
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
1
    return Status::OK();
613
1
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
240k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
240k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
240k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
240k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
240k
    _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
240k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
240k
    _operator_profile->add_child(_common_profile.get(), true);
557
240k
    _operator_profile->add_child(_custom_profile.get(), true);
558
240k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
240k
    if constexpr (!is_fake_shared) {
560
240k
        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
240k
        } 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
238k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
238k
            _dependency = _shared_state->create_source_dependency(
576
238k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
238k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
238k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
238k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
1.50k
        }
584
240k
    }
585
586
240k
    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
240k
    _rows_returned_counter =
591
240k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
240k
    _blocks_returned_counter =
593
240k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
240k
    _output_block_bytes_counter =
595
240k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
240k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
240k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
240k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
240k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
240k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
240k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
240k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
240k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
240k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
240k
    _memory_used_counter =
606
240k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
240k
    _common_profile->add_info_string("IsColocate",
608
240k
                                     std::to_string(_parent->is_colocated_operator()));
609
240k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
240k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
240k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
240k
    return Status::OK();
613
240k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
152
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
152
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
152
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
152
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
152
    _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
152
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
152
    _operator_profile->add_child(_common_profile.get(), true);
557
152
    _operator_profile->add_child(_custom_profile.get(), true);
558
152
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
152
    if constexpr (!is_fake_shared) {
560
152
        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
152
        } 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
152
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
152
            _dependency = _shared_state->create_source_dependency(
576
152
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
152
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
152
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
152
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
152
    }
585
586
152
    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
152
    _rows_returned_counter =
591
152
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
152
    _blocks_returned_counter =
593
152
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
152
    _output_block_bytes_counter =
595
152
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
152
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
152
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
152
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
152
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
152
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
152
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
152
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
152
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
152
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
152
    _memory_used_counter =
606
152
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
152
    _common_profile->add_info_string("IsColocate",
608
152
                                     std::to_string(_parent->is_colocated_operator()));
609
152
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
152
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
152
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
152
    return Status::OK();
613
152
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
5.24k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
5.24k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
5.24k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
5.24k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
5.24k
    _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.24k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
5.24k
    _operator_profile->add_child(_common_profile.get(), true);
557
5.24k
    _operator_profile->add_child(_custom_profile.get(), true);
558
5.24k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
5.24k
    if constexpr (!is_fake_shared) {
560
5.24k
        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.24k
        } 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.21k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
5.21k
            _dependency = _shared_state->create_source_dependency(
576
5.21k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
5.21k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
5.21k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
5.21k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
28
        }
584
5.24k
    }
585
586
5.24k
    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.24k
    _rows_returned_counter =
591
5.24k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
5.24k
    _blocks_returned_counter =
593
5.24k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
5.24k
    _output_block_bytes_counter =
595
5.24k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
5.24k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
5.24k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
5.24k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
5.24k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
5.24k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
5.24k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
5.24k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
5.24k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
5.24k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
5.24k
    _memory_used_counter =
606
5.24k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
5.24k
    _common_profile->add_info_string("IsColocate",
608
5.24k
                                     std::to_string(_parent->is_colocated_operator()));
609
5.24k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
5.24k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
5.24k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
5.24k
    return Status::OK();
613
5.24k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
9.21k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
9.21k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
9.21k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
9.21k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
9.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
9.21k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
9.21k
    _operator_profile->add_child(_common_profile.get(), true);
557
9.21k
    _operator_profile->add_child(_custom_profile.get(), true);
558
9.21k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
9.21k
    if constexpr (!is_fake_shared) {
560
9.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
9.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
9.20k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
9.20k
            _dependency = _shared_state->create_source_dependency(
576
9.20k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
9.20k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
9.20k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
9.20k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
17
        }
584
9.21k
    }
585
586
9.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
9.21k
    _rows_returned_counter =
591
9.21k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
9.21k
    _blocks_returned_counter =
593
9.21k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
9.21k
    _output_block_bytes_counter =
595
9.21k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
9.21k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
9.21k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
9.21k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
9.21k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
9.21k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
9.21k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
9.21k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
9.21k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
9.21k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
9.21k
    _memory_used_counter =
606
9.21k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
9.21k
    _common_profile->add_info_string("IsColocate",
608
9.21k
                                     std::to_string(_parent->is_colocated_operator()));
609
9.21k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
9.21k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
9.21k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
9.21k
    return Status::OK();
613
9.21k
}
_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
107k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
107k
            _dependency = _shared_state->create_source_dependency(
576
107k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
107k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
107k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
107k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
545
        }
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
63.6k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
63.6k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
63.6k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
63.6k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
63.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
63.6k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
63.6k
    _operator_profile->add_child(_common_profile.get(), true);
557
63.6k
    _operator_profile->add_child(_custom_profile.get(), true);
558
63.6k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
63.6k
    if constexpr (!is_fake_shared) {
560
63.6k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
63.6k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
63.6k
                                    .first.get()
563
63.6k
                                    ->template cast<SharedStateArg>();
564
565
63.6k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
63.6k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
63.6k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
18.4E
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
0
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
0
            _dependency = _shared_state->create_source_dependency(
576
0
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
18.4E
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
18.4E
        }
584
63.6k
    }
585
586
63.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
63.6k
    _rows_returned_counter =
591
63.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
63.6k
    _blocks_returned_counter =
593
63.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
63.6k
    _output_block_bytes_counter =
595
63.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
63.6k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
63.6k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
63.6k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
63.6k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
63.6k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
63.6k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
63.6k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
63.6k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
63.6k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
63.6k
    _memory_used_counter =
606
63.6k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
63.6k
    _common_profile->add_info_string("IsColocate",
608
63.6k
                                     std::to_string(_parent->is_colocated_operator()));
609
63.6k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
63.6k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
63.6k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
63.6k
    return Status::OK();
613
63.6k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
118
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
118
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
118
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
118
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
118
    _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
118
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
118
    _operator_profile->add_child(_common_profile.get(), true);
557
118
    _operator_profile->add_child(_custom_profile.get(), true);
558
118
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
118
    if constexpr (!is_fake_shared) {
560
118
        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
118
        } 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
118
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
118
            _dependency = _shared_state->create_source_dependency(
576
118
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
118
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
118
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
118
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
118
    }
585
586
118
    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
118
    _rows_returned_counter =
591
118
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
118
    _blocks_returned_counter =
593
118
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
118
    _output_block_bytes_counter =
595
118
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
118
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
118
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
118
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
118
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
118
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
118
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
118
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
118
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
118
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
118
    _memory_used_counter =
606
118
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
118
    _common_profile->add_info_string("IsColocate",
608
118
                                     std::to_string(_parent->is_colocated_operator()));
609
118
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
118
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
118
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
118
    return Status::OK();
613
118
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
869k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
869k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
869k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
869k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
869k
    _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
869k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
869k
    _operator_profile->add_child(_common_profile.get(), true);
557
869k
    _operator_profile->add_child(_custom_profile.get(), true);
558
869k
    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
869k
    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
869k
    _rows_returned_counter =
591
869k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
869k
    _blocks_returned_counter =
593
869k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
869k
    _output_block_bytes_counter =
595
869k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
869k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
869k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
869k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
869k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
869k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
869k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
869k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
869k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
869k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
869k
    _memory_used_counter =
606
869k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
869k
    _common_profile->add_info_string("IsColocate",
608
869k
                                     std::to_string(_parent->is_colocated_operator()));
609
869k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
869k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
869k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
869k
    return Status::OK();
613
869k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
55.6k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
55.6k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
55.6k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
55.6k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
55.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
55.6k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
55.6k
    _operator_profile->add_child(_common_profile.get(), true);
557
55.6k
    _operator_profile->add_child(_custom_profile.get(), true);
558
55.6k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
55.6k
    if constexpr (!is_fake_shared) {
560
55.6k
        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.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
3.86k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
3.86k
            _dependency = _shared_state->create_source_dependency(
576
3.86k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
3.86k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
3.86k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
51.7k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
51.7k
        }
584
55.6k
    }
585
586
55.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
55.6k
    _rows_returned_counter =
591
55.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
55.6k
    _blocks_returned_counter =
593
55.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
55.6k
    _output_block_bytes_counter =
595
55.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
55.6k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
55.6k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
55.6k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
55.6k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
55.6k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
55.6k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
55.6k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
55.6k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
55.6k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
55.6k
    _memory_used_counter =
606
55.6k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
55.6k
    _common_profile->add_info_string("IsColocate",
608
55.6k
                                     std::to_string(_parent->is_colocated_operator()));
609
55.6k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
55.6k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
55.6k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
55.6k
    return Status::OK();
613
55.6k
}
_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.24k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
4.24k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
4.24k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
4.24k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
4.24k
    _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.24k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
4.24k
    _operator_profile->add_child(_common_profile.get(), true);
557
4.24k
    _operator_profile->add_child(_custom_profile.get(), true);
558
4.24k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
4.24k
    if constexpr (!is_fake_shared) {
560
4.24k
        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.24k
        } 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.21k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
4.21k
            _dependency = _shared_state->create_source_dependency(
576
4.21k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
4.21k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
4.21k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
4.21k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
23
        }
584
4.24k
    }
585
586
4.24k
    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.24k
    _rows_returned_counter =
591
4.24k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
4.24k
    _blocks_returned_counter =
593
4.24k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
4.24k
    _output_block_bytes_counter =
595
4.24k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
4.24k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
4.24k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
4.24k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
4.24k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
4.24k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
4.24k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
4.24k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
4.24k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
4.24k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
4.24k
    _memory_used_counter =
606
4.24k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
4.24k
    _common_profile->add_info_string("IsColocate",
608
4.24k
                                     std::to_string(_parent->is_colocated_operator()));
609
4.24k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
4.24k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
4.24k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
4.24k
    return Status::OK();
613
4.24k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
495
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
495
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
495
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
495
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
495
    _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
495
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
495
    _operator_profile->add_child(_common_profile.get(), true);
557
495
    _operator_profile->add_child(_custom_profile.get(), true);
558
495
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
495
    if constexpr (!is_fake_shared) {
560
495
        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
495
        } 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
495
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
495
            _dependency = _shared_state->create_source_dependency(
576
495
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
495
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
495
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
495
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
495
    }
585
586
495
    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
495
    _rows_returned_counter =
591
495
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
495
    _blocks_returned_counter =
593
495
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
495
    _output_block_bytes_counter =
595
495
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
495
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
495
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
495
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
495
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
495
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
495
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
495
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
495
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
495
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
495
    _memory_used_counter =
606
495
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
495
    _common_profile->add_info_string("IsColocate",
608
495
                                     std::to_string(_parent->is_colocated_operator()));
609
495
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
495
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
495
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
495
    return Status::OK();
613
495
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
5.28k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
5.28k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
5.28k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
5.28k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
5.28k
    _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.28k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
5.28k
    _operator_profile->add_child(_common_profile.get(), true);
557
5.28k
    _operator_profile->add_child(_custom_profile.get(), true);
558
5.28k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
5.28k
    if constexpr (!is_fake_shared) {
560
5.28k
        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.28k
        } 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.27k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
5.27k
            _dependency = _shared_state->create_source_dependency(
576
5.27k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
5.27k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
5.27k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
5.27k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
10
        }
584
5.28k
    }
585
586
5.28k
    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.28k
    _rows_returned_counter =
591
5.28k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
5.28k
    _blocks_returned_counter =
593
5.28k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
5.28k
    _output_block_bytes_counter =
595
5.28k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
5.28k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
5.28k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
5.28k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
5.28k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
5.28k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
5.28k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
5.28k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
5.28k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
5.28k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
5.28k
    _memory_used_counter =
606
5.28k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
5.28k
    _common_profile->add_info_string("IsColocate",
608
5.28k
                                     std::to_string(_parent->is_colocated_operator()));
609
5.28k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
5.28k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
5.28k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
5.28k
    return Status::OK();
613
5.28k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
669k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
669k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
669k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
669k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
669k
    _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
669k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
669k
    _operator_profile->add_child(_common_profile.get(), true);
557
669k
    _operator_profile->add_child(_custom_profile.get(), true);
558
669k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
669k
    if constexpr (!is_fake_shared) {
560
669k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
668k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
668k
                                    .first.get()
563
668k
                                    ->template cast<SharedStateArg>();
564
565
668k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
668k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
668k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
668k
        } 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
145
        } else {
580
145
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
145
                DCHECK(false);
582
145
            }
583
145
        }
584
669k
    }
585
586
669k
    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
669k
    _rows_returned_counter =
591
669k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
669k
    _blocks_returned_counter =
593
669k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
669k
    _output_block_bytes_counter =
595
669k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
669k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
669k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
669k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
669k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
669k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
669k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
669k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
669k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
669k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
669k
    _memory_used_counter =
606
669k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
669k
    _common_profile->add_info_string("IsColocate",
608
669k
                                     std::to_string(_parent->is_colocated_operator()));
609
669k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
669k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
669k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
669k
    return Status::OK();
613
669k
}
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.11M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
2.11M
    _conjuncts.resize(_parent->_conjuncts.size());
618
2.42M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
315k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
315k
    }
621
2.11M
    if (_parent->has_projection()) {
622
395k
        const auto& projection = *_parent->_projection;
623
395k
        _projections.resize(projection.projections.size());
624
2.46M
        for (size_t i = 0; i < _projections.size(); i++) {
625
2.06M
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
2.06M
        }
627
395k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
419k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
24.5k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
486k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
462k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
462k
                        state, _intermediate_projections[i][j]));
633
462k
            }
634
24.5k
        }
635
395k
    }
636
2.11M
    return Status::OK();
637
2.11M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
68.6k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
68.6k
    _conjuncts.resize(_parent->_conjuncts.size());
618
70.3k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
1.63k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1.63k
    }
621
68.7k
    if (_parent->has_projection()) {
622
68.7k
        const auto& projection = *_parent->_projection;
623
68.7k
        _projections.resize(projection.projections.size());
624
374k
        for (size_t i = 0; i < _projections.size(); i++) {
625
305k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
305k
        }
627
68.7k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
79.4k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
10.7k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
405k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
394k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
394k
                        state, _intermediate_projections[i][j]));
633
394k
            }
634
10.7k
        }
635
68.7k
    }
636
68.6k
    return Status::OK();
637
68.6k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
3
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
3
    _conjuncts.resize(_parent->_conjuncts.size());
618
3
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
3
    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
3
    return Status::OK();
637
3
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
241k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
241k
    _conjuncts.resize(_parent->_conjuncts.size());
618
241k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
241k
    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
241k
    return Status::OK();
637
241k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
148
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
148
    _conjuncts.resize(_parent->_conjuncts.size());
618
148
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
148
    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
148
    return Status::OK();
637
148
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
5.23k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
5.23k
    _conjuncts.resize(_parent->_conjuncts.size());
618
5.31k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
76
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
76
    }
621
5.24k
    if (_parent->has_projection()) {
622
5.24k
        const auto& projection = *_parent->_projection;
623
5.24k
        _projections.resize(projection.projections.size());
624
22.2k
        for (size_t i = 0; i < _projections.size(); i++) {
625
16.9k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
16.9k
        }
627
5.24k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
5.31k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
66
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
550
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
484
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
484
                        state, _intermediate_projections[i][j]));
633
484
            }
634
66
        }
635
5.24k
    }
636
5.23k
    return Status::OK();
637
5.23k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
9.22k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
9.22k
    _conjuncts.resize(_parent->_conjuncts.size());
618
10.0k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
828
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
828
    }
621
9.22k
    if (_parent->has_projection()) {
622
4.98k
        const auto& projection = *_parent->_projection;
623
4.98k
        _projections.resize(projection.projections.size());
624
20.3k
        for (size_t i = 0; i < _projections.size(); i++) {
625
15.3k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
15.3k
        }
627
4.98k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
5.09k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
113
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
878
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
765
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
765
                        state, _intermediate_projections[i][j]));
633
765
            }
634
113
        }
635
4.98k
    }
636
9.22k
    return Status::OK();
637
9.22k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
108k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
108k
    _conjuncts.resize(_parent->_conjuncts.size());
618
109k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
1.40k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1.40k
    }
621
108k
    if (_parent->has_projection()) {
622
31.8k
        const auto& projection = *_parent->_projection;
623
31.8k
        _projections.resize(projection.projections.size());
624
292k
        for (size_t i = 0; i < _projections.size(); i++) {
625
260k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
260k
        }
627
31.8k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
32.6k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
723
            _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.90k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
3.90k
                        state, _intermediate_projections[i][j]));
633
3.90k
            }
634
723
        }
635
31.8k
    }
636
108k
    return Status::OK();
637
108k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
63.7k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
63.7k
    _conjuncts.resize(_parent->_conjuncts.size());
618
63.7k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
7
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
7
    }
621
63.7k
    if (_parent->has_projection()) {
622
390
        const auto& projection = *_parent->_projection;
623
390
        _projections.resize(projection.projections.size());
624
1.58k
        for (size_t i = 0; i < _projections.size(); i++) {
625
1.19k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
1.19k
        }
627
390
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
392
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
2
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
15
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
13
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
13
                        state, _intermediate_projections[i][j]));
633
13
            }
634
2
        }
635
390
    }
636
63.7k
    return Status::OK();
637
63.7k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
122
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
122
    _conjuncts.resize(_parent->_conjuncts.size());
618
122
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
122
    if (_parent->has_projection()) {
622
1
        const auto& projection = *_parent->_projection;
623
1
        _projections.resize(projection.projections.size());
624
3
        for (size_t i = 0; i < _projections.size(); i++) {
625
2
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
2
        }
627
1
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
1
        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
1
    }
636
122
    return Status::OK();
637
122
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
874k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
874k
    _conjuncts.resize(_parent->_conjuncts.size());
618
1.18M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
311k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
311k
    }
621
874k
    if (_parent->has_projection()) {
622
271k
        const auto& projection = *_parent->_projection;
623
271k
        _projections.resize(projection.projections.size());
624
1.63M
        for (size_t i = 0; i < _projections.size(); i++) {
625
1.36M
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
1.36M
        }
627
271k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
284k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
12.8k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
74.1k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
61.3k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
61.3k
                        state, _intermediate_projections[i][j]));
633
61.3k
            }
634
12.8k
        }
635
271k
    }
636
874k
    return Status::OK();
637
874k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
55.8k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
55.8k
    _conjuncts.resize(_parent->_conjuncts.size());
618
55.8k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
55.8k
    if (_parent->has_projection()) {
622
11.8k
        const auto& projection = *_parent->_projection;
623
11.8k
        _projections.resize(projection.projections.size());
624
115k
        for (size_t i = 0; i < _projections.size(); i++) {
625
103k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
103k
        }
627
11.8k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
11.9k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
56
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
934
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
878
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
878
                        state, _intermediate_projections[i][j]));
633
878
            }
634
56
        }
635
11.8k
    }
636
55.8k
    return Status::OK();
637
55.8k
}
_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.23k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
4.23k
    _conjuncts.resize(_parent->_conjuncts.size());
618
4.43k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
203
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
203
    }
621
4.23k
    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.23k
    return Status::OK();
637
4.23k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
494
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
494
    _conjuncts.resize(_parent->_conjuncts.size());
618
494
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
494
    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
494
    return Status::OK();
637
494
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
5.27k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
5.27k
    _conjuncts.resize(_parent->_conjuncts.size());
618
5.27k
    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.27k
    if (_parent->has_projection()) {
622
82
        const auto& projection = *_parent->_projection;
623
82
        _projections.resize(projection.projections.size());
624
275
        for (size_t i = 0; i < _projections.size(); i++) {
625
193
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
193
        }
627
82
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
82
        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
82
    }
636
5.27k
    return Status::OK();
637
5.27k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
672k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
672k
    _conjuncts.resize(_parent->_conjuncts.size());
618
672k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
672k
    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
672k
    return Status::OK();
637
672k
}
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
8.44k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
8.44k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
8.44k
    _terminated = true;
645
8.44k
    return Status::OK();
646
8.44k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
433
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
433
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
433
    _terminated = true;
645
433
    return Status::OK();
646
433
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
44
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
44
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
44
    _terminated = true;
645
44
    return Status::OK();
646
44
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
40
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
40
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
40
    _terminated = true;
645
40
    return Status::OK();
646
40
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
3
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
3
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
3
    _terminated = true;
645
3
    return Status::OK();
646
3
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
88
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
88
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
88
    _terminated = true;
645
88
    return Status::OK();
646
88
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
1
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
1
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
1
    _terminated = true;
645
1
    return Status::OK();
646
1
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
6.23k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
6.23k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
6.23k
    _terminated = true;
645
6.23k
    return Status::OK();
646
6.23k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
66
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
66
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
66
    _terminated = true;
645
66
    return Status::OK();
646
66
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
4
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
4
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
4
    _terminated = true;
645
4
    return Status::OK();
646
4
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
65
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
65
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
65
    _terminated = true;
645
65
    return Status::OK();
646
65
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
1.42k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
1.42k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
1.42k
    _terminated = true;
645
1.42k
    return Status::OK();
646
1.42k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
40
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
40
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
40
    _terminated = true;
645
40
    return Status::OK();
646
40
}
647
648
template <typename SharedStateArg>
649
2.37M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
2.37M
    if (_closed) {
651
261k
        return Status::OK();
652
261k
    }
653
2.11M
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
1.23M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
1.23M
    }
656
2.11M
    _closed = true;
657
2.11M
    return Status::OK();
658
2.37M
}
_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
4
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
4
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
4
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
4
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
4
    }
656
4
    _closed = true;
657
4
    return Status::OK();
658
4
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
480k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
480k
    if (_closed) {
651
239k
        return Status::OK();
652
239k
    }
653
240k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
240k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
240k
    }
656
240k
    _closed = true;
657
240k
    return Status::OK();
658
480k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
152
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
152
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
152
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
152
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
152
    }
656
152
    _closed = true;
657
152
    return Status::OK();
658
152
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
5.24k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
5.24k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
5.24k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
5.24k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
5.24k
    }
656
5.24k
    _closed = true;
657
5.24k
    return Status::OK();
658
5.24k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
9.16k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
9.16k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
9.16k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
9.16k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
9.16k
    }
656
9.16k
    _closed = true;
657
9.16k
    return Status::OK();
658
9.16k
}
_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
63.5k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
63.5k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
63.5k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
63.5k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
63.5k
    }
656
63.5k
    _closed = true;
657
63.5k
    return Status::OK();
658
63.5k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
117
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
117
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
117
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
117
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
117
    }
656
117
    _closed = true;
657
117
    return Status::OK();
658
117
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
891k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
891k
    if (_closed) {
651
15.6k
        return Status::OK();
652
15.6k
    }
653
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
    }
656
875k
    _closed = true;
657
875k
    return Status::OK();
658
891k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
55.9k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
55.9k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
55.9k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
55.9k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
55.9k
    }
656
55.9k
    _closed = true;
657
55.9k
    return Status::OK();
658
55.9k
}
_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.21k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
4.21k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
4.21k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
4.21k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
4.21k
    }
656
4.21k
    _closed = true;
657
4.21k
    return Status::OK();
658
4.21k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
784
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
784
    if (_closed) {
651
392
        return Status::OK();
652
392
    }
653
392
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
392
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
392
    }
656
392
    _closed = true;
657
392
    return Status::OK();
658
784
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
10.9k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
10.9k
    if (_closed) {
651
5.64k
        return Status::OK();
652
5.64k
    }
653
5.26k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
5.26k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
5.26k
    }
656
5.26k
    _closed = true;
657
5.26k
    return Status::OK();
658
10.9k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
672k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
672k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
672k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
672k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
672k
    }
656
672k
    _closed = true;
657
672k
    return Status::OK();
658
672k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
339
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
339
    if (_closed) {
651
179
        return Status::OK();
652
179
    }
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
339
}
659
660
template <typename SharedState>
661
1.79M
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
1.79M
    _operator_profile =
664
1.79M
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
1.79M
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
1.79M
    _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.79M
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
1.79M
    _operator_profile->add_child(_common_profile, true);
673
1.79M
    _operator_profile->add_child(_custom_profile, true);
674
675
1.79M
    _operator_profile->set_metadata(_parent->node_id());
676
1.79M
    _wait_for_finish_dependency_timer =
677
1.79M
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
1.79M
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
1.79M
    if constexpr (!is_fake_shared) {
680
1.25M
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
1.25M
            info.shared_state_map.end()) {
682
341k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
265k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
265k
            }
685
341k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
341k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
341k
                                                  ? 0
688
341k
                                                  : info.task_idx]
689
341k
                                  .get();
690
341k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
909k
        } else {
692
18.4E
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
18.4E
                DCHECK(false);
694
18.4E
            }
695
909k
            _shared_state = info.shared_state->template cast<SharedState>();
696
909k
            _dependency = _shared_state->create_sink_dependency(
697
909k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
909k
        }
699
1.25M
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
1.25M
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
1.25M
    }
702
703
1.79M
    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.79M
    _rows_input_counter =
708
1.79M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
1.79M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
1.79M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
1.79M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
1.79M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
1.79M
    _memory_used_counter =
714
1.79M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
1.79M
    _common_profile->add_info_string("IsColocate",
716
1.79M
                                     std::to_string(_parent->is_colocated_operator()));
717
1.79M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
1.79M
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
1.79M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
1.79M
    return Status::OK();
721
1.79M
}
_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
12.9k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
12.9k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
12.9k
                                                  ? 0
688
12.9k
                                                  : info.task_idx]
689
12.9k
                                  .get();
690
12.9k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
103k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
103k
            _shared_state = info.shared_state->template cast<SharedState>();
696
103k
            _dependency = _shared_state->create_sink_dependency(
697
103k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
103k
        }
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
2
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
2
    _operator_profile =
664
2
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
2
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
2
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
2
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
2
    _operator_profile->add_child(_common_profile, true);
673
2
    _operator_profile->add_child(_custom_profile, true);
674
675
2
    _operator_profile->set_metadata(_parent->node_id());
676
2
    _wait_for_finish_dependency_timer =
677
2
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
2
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
2
    if constexpr (!is_fake_shared) {
680
2
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
2
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
2
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
2
            _shared_state = info.shared_state->template cast<SharedState>();
696
2
            _dependency = _shared_state->create_sink_dependency(
697
2
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
2
        }
699
2
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
2
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
2
    }
702
703
2
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
2
    _rows_input_counter =
708
2
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
2
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
2
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
2
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
2
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
2
    _memory_used_counter =
714
2
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
2
    _common_profile->add_info_string("IsColocate",
716
2
                                     std::to_string(_parent->is_colocated_operator()));
717
2
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
2
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
2
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
2
    return Status::OK();
721
2
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
239k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
239k
    _operator_profile =
664
239k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
239k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
239k
    _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
239k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
239k
    _operator_profile->add_child(_common_profile, true);
673
239k
    _operator_profile->add_child(_custom_profile, true);
674
675
239k
    _operator_profile->set_metadata(_parent->node_id());
676
239k
    _wait_for_finish_dependency_timer =
677
239k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
239k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
239k
    if constexpr (!is_fake_shared) {
680
239k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
239k
            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
239k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
239k
            _shared_state = info.shared_state->template cast<SharedState>();
696
239k
            _dependency = _shared_state->create_sink_dependency(
697
239k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
239k
        }
699
239k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
239k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
239k
    }
702
703
239k
    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
239k
    _rows_input_counter =
708
239k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
239k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
239k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
239k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
239k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
239k
    _memory_used_counter =
714
239k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
239k
    _common_profile->add_info_string("IsColocate",
716
239k
                                     std::to_string(_parent->is_colocated_operator()));
717
239k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
239k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
239k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
239k
    return Status::OK();
721
239k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
159
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
159
    _operator_profile =
664
159
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
159
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
159
    _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
159
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
159
    _operator_profile->add_child(_common_profile, true);
673
159
    _operator_profile->add_child(_custom_profile, true);
674
675
159
    _operator_profile->set_metadata(_parent->node_id());
676
159
    _wait_for_finish_dependency_timer =
677
159
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
159
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
159
    if constexpr (!is_fake_shared) {
680
159
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
159
            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
159
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
159
            _shared_state = info.shared_state->template cast<SharedState>();
696
159
            _dependency = _shared_state->create_sink_dependency(
697
159
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
159
        }
699
159
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
159
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
159
    }
702
703
159
    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
159
    _rows_input_counter =
708
159
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
159
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
159
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
159
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
159
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
159
    _memory_used_counter =
714
159
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
159
    _common_profile->add_info_string("IsColocate",
716
159
                                     std::to_string(_parent->is_colocated_operator()));
717
159
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
159
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
159
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
159
    return Status::OK();
721
159
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
5.24k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
5.24k
    _operator_profile =
664
5.24k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
5.24k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
5.24k
    _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.24k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
5.24k
    _operator_profile->add_child(_common_profile, true);
673
5.24k
    _operator_profile->add_child(_custom_profile, true);
674
675
5.24k
    _operator_profile->set_metadata(_parent->node_id());
676
5.24k
    _wait_for_finish_dependency_timer =
677
5.24k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
5.24k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
5.24k
    if constexpr (!is_fake_shared) {
680
5.24k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
5.24k
            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.24k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
5.24k
            _shared_state = info.shared_state->template cast<SharedState>();
696
5.24k
            _dependency = _shared_state->create_sink_dependency(
697
5.24k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
5.24k
        }
699
5.24k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
5.24k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
5.24k
    }
702
703
5.24k
    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.24k
    _rows_input_counter =
708
5.24k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
5.24k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
5.24k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
5.24k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
5.24k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
5.24k
    _memory_used_counter =
714
5.24k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
5.24k
    _common_profile->add_info_string("IsColocate",
716
5.24k
                                     std::to_string(_parent->is_colocated_operator()));
717
5.24k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
5.24k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
5.24k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
5.24k
    return Status::OK();
721
5.24k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
9.20k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
9.20k
    _operator_profile =
664
9.20k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
9.20k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
9.20k
    _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.20k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
9.20k
    _operator_profile->add_child(_common_profile, true);
673
9.20k
    _operator_profile->add_child(_custom_profile, true);
674
675
9.20k
    _operator_profile->set_metadata(_parent->node_id());
676
9.20k
    _wait_for_finish_dependency_timer =
677
9.20k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
9.20k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
9.20k
    if constexpr (!is_fake_shared) {
680
9.20k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
9.20k
            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.20k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
9.20k
            _shared_state = info.shared_state->template cast<SharedState>();
696
9.20k
            _dependency = _shared_state->create_sink_dependency(
697
9.20k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
9.20k
        }
699
9.20k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
9.20k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
9.20k
    }
702
703
9.20k
    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.20k
    _rows_input_counter =
708
9.20k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
9.20k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
9.20k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
9.20k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
9.20k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
9.20k
    _memory_used_counter =
714
9.20k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
9.20k
    _common_profile->add_info_string("IsColocate",
716
9.20k
                                     std::to_string(_parent->is_colocated_operator()));
717
9.20k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
9.20k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
9.20k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
9.20k
    return Status::OK();
721
9.20k
}
_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
63.5k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
63.5k
    _operator_profile =
664
63.5k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
63.5k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
63.5k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
63.5k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
63.5k
    _operator_profile->add_child(_common_profile, true);
673
63.5k
    _operator_profile->add_child(_custom_profile, true);
674
675
63.5k
    _operator_profile->set_metadata(_parent->node_id());
676
63.5k
    _wait_for_finish_dependency_timer =
677
63.5k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
63.5k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
63.5k
    if constexpr (!is_fake_shared) {
680
63.5k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
63.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
63.6k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
63.6k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
63.6k
                                                  ? 0
688
63.6k
                                                  : info.task_idx]
689
63.6k
                                  .get();
690
63.6k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
18.4E
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
18.4E
            _shared_state = info.shared_state->template cast<SharedState>();
696
18.4E
            _dependency = _shared_state->create_sink_dependency(
697
18.4E
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
18.4E
        }
699
63.5k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
63.5k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
63.5k
    }
702
703
63.5k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
63.5k
    _rows_input_counter =
708
63.5k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
63.5k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
63.5k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
63.5k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
63.5k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
63.5k
    _memory_used_counter =
714
63.5k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
63.5k
    _common_profile->add_info_string("IsColocate",
716
63.5k
                                     std::to_string(_parent->is_colocated_operator()));
717
63.5k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
63.5k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
63.5k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
63.5k
    return Status::OK();
721
63.5k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
128
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
128
    _operator_profile =
664
128
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
128
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
128
    _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
128
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
128
    _operator_profile->add_child(_common_profile, true);
673
128
    _operator_profile->add_child(_custom_profile, true);
674
675
128
    _operator_profile->set_metadata(_parent->node_id());
676
128
    _wait_for_finish_dependency_timer =
677
128
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
128
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
128
    if constexpr (!is_fake_shared) {
680
128
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
128
            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
128
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
128
            _shared_state = info.shared_state->template cast<SharedState>();
696
128
            _dependency = _shared_state->create_sink_dependency(
697
128
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
128
        }
699
128
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
128
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
128
    }
702
703
128
    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
128
    _rows_input_counter =
708
128
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
128
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
128
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
128
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
128
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
128
    _memory_used_counter =
714
128
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
128
    _common_profile->add_info_string("IsColocate",
716
128
                                     std::to_string(_parent->is_colocated_operator()));
717
128
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
128
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
128
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
128
    return Status::OK();
721
128
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
542k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
542k
    _operator_profile =
664
542k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
542k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
542k
    _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
542k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
542k
    _operator_profile->add_child(_common_profile, true);
673
542k
    _operator_profile->add_child(_custom_profile, true);
674
675
542k
    _operator_profile->set_metadata(_parent->node_id());
676
542k
    _wait_for_finish_dependency_timer =
677
542k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
542k
    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
542k
    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
542k
    _rows_input_counter =
708
542k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
542k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
542k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
542k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
542k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
542k
    _memory_used_counter =
714
542k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
542k
    _common_profile->add_info_string("IsColocate",
716
542k
                                     std::to_string(_parent->is_colocated_operator()));
717
542k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
542k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
542k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
542k
    return Status::OK();
721
542k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
8.87k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
8.87k
    _operator_profile =
664
8.87k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
8.87k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
8.87k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
8.87k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
8.87k
    _operator_profile->add_child(_common_profile, true);
673
8.87k
    _operator_profile->add_child(_custom_profile, true);
674
675
8.87k
    _operator_profile->set_metadata(_parent->node_id());
676
8.87k
    _wait_for_finish_dependency_timer =
677
8.87k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
8.87k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
8.87k
    if constexpr (!is_fake_shared) {
680
8.87k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
8.87k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
8.87k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
8.87k
            _shared_state = info.shared_state->template cast<SharedState>();
696
8.87k
            _dependency = _shared_state->create_sink_dependency(
697
8.87k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
8.87k
        }
699
8.87k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
8.87k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
8.87k
    }
702
703
8.87k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
8.87k
    _rows_input_counter =
708
8.87k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
8.87k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
8.87k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
8.87k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
8.87k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
8.87k
    _memory_used_counter =
714
8.87k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
8.87k
    _common_profile->add_info_string("IsColocate",
716
8.87k
                                     std::to_string(_parent->is_colocated_operator()));
717
8.87k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
8.87k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
8.87k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
8.87k
    return Status::OK();
721
8.87k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
492
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
492
    _operator_profile =
664
492
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
492
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
492
    _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
492
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
492
    _operator_profile->add_child(_common_profile, true);
673
492
    _operator_profile->add_child(_custom_profile, true);
674
675
492
    _operator_profile->set_metadata(_parent->node_id());
676
492
    _wait_for_finish_dependency_timer =
677
492
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
492
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
492
    if constexpr (!is_fake_shared) {
680
492
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
492
            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
492
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
492
            _shared_state = info.shared_state->template cast<SharedState>();
696
492
            _dependency = _shared_state->create_sink_dependency(
697
492
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
492
        }
699
492
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
492
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
492
    }
702
703
492
    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
492
    _rows_input_counter =
708
492
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
492
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
492
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
492
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
492
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
492
    _memory_used_counter =
714
492
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
492
    _common_profile->add_info_string("IsColocate",
716
492
                                     std::to_string(_parent->is_colocated_operator()));
717
492
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
492
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
492
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
492
    return Status::OK();
721
492
}
_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
13.0k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
13.0k
    _operator_profile =
664
13.0k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
13.0k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
13.0k
    _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
13.0k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
13.0k
    _operator_profile->add_child(_common_profile, true);
673
13.0k
    _operator_profile->add_child(_custom_profile, true);
674
675
13.0k
    _operator_profile->set_metadata(_parent->node_id());
676
13.0k
    _wait_for_finish_dependency_timer =
677
13.0k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
13.0k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
13.0k
    if constexpr (!is_fake_shared) {
680
13.0k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
13.0k
            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
13.0k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
13.0k
            _shared_state = info.shared_state->template cast<SharedState>();
696
13.0k
            _dependency = _shared_state->create_sink_dependency(
697
13.0k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
13.0k
        }
699
13.0k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
13.0k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
13.0k
    }
702
703
13.0k
    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
13.0k
    _rows_input_counter =
708
13.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
13.0k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
13.0k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
13.0k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
13.0k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
13.0k
    _memory_used_counter =
714
13.0k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
13.0k
    _common_profile->add_info_string("IsColocate",
716
13.0k
                                     std::to_string(_parent->is_colocated_operator()));
717
13.0k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
13.0k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
13.0k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
13.0k
    return Status::OK();
721
13.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
263k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
263k
    _operator_profile =
664
263k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
263k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
263k
    _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
263k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
263k
    _operator_profile->add_child(_common_profile, true);
673
263k
    _operator_profile->add_child(_custom_profile, true);
674
675
263k
    _operator_profile->set_metadata(_parent->node_id());
676
263k
    _wait_for_finish_dependency_timer =
677
263k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
263k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
263k
    if constexpr (!is_fake_shared) {
680
263k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
265k
            info.shared_state_map.end()) {
682
265k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
265k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
265k
            }
685
265k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
265k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
265k
                                                  ? 0
688
265k
                                                  : info.task_idx]
689
265k
                                  .get();
690
265k
            _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
263k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
263k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
263k
    }
702
703
263k
    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
263k
    _rows_input_counter =
708
263k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
263k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
263k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
263k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
263k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
263k
    _memory_used_counter =
714
263k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
263k
    _common_profile->add_info_string("IsColocate",
716
263k
                                     std::to_string(_parent->is_colocated_operator()));
717
263k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
263k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
263k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
263k
    return Status::OK();
721
263k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
420k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
420k
    _operator_profile =
664
420k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
420k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
420k
    _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
420k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
420k
    _operator_profile->add_child(_common_profile, true);
673
420k
    _operator_profile->add_child(_custom_profile, true);
674
675
420k
    _operator_profile->set_metadata(_parent->node_id());
676
420k
    _wait_for_finish_dependency_timer =
677
420k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
420k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
420k
    if constexpr (!is_fake_shared) {
680
420k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
420k
            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
420k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
420k
            _shared_state = info.shared_state->template cast<SharedState>();
696
420k
            _dependency = _shared_state->create_sink_dependency(
697
420k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
420k
        }
699
420k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
420k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
420k
    }
702
703
420k
    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
420k
    _rows_input_counter =
708
420k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
420k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
420k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
420k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
420k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
420k
    _memory_used_counter =
714
420k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
420k
    _common_profile->add_info_string("IsColocate",
716
420k
                                     std::to_string(_parent->is_colocated_operator()));
717
420k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
420k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
420k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
420k
    return Status::OK();
721
420k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
25
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
25
    _operator_profile =
664
25
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
25
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
25
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
25
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
25
    _operator_profile->add_child(_common_profile, true);
673
25
    _operator_profile->add_child(_custom_profile, true);
674
675
25
    _operator_profile->set_metadata(_parent->node_id());
676
25
    _wait_for_finish_dependency_timer =
677
25
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
25
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
25
    if constexpr (!is_fake_shared) {
680
25
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
25
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
25
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
25
            _shared_state = info.shared_state->template cast<SharedState>();
696
25
            _dependency = _shared_state->create_sink_dependency(
697
25
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
25
        }
699
25
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
25
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
25
    }
702
703
25
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
25
    _rows_input_counter =
708
25
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
25
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
25
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
25
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
25
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
25
    _memory_used_counter =
714
25
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
25
    _common_profile->add_info_string("IsColocate",
716
25
                                     std::to_string(_parent->is_colocated_operator()));
717
25
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
25
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
25
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
25
    return Status::OK();
721
25
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
338
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
338
    _operator_profile =
664
338
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
338
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
338
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
338
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
338
    _operator_profile->add_child(_common_profile, true);
673
338
    _operator_profile->add_child(_custom_profile, true);
674
675
338
    _operator_profile->set_metadata(_parent->node_id());
676
338
    _wait_for_finish_dependency_timer =
677
338
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
338
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
338
    if constexpr (!is_fake_shared) {
680
338
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
338
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
338
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
338
            _shared_state = info.shared_state->template cast<SharedState>();
696
338
            _dependency = _shared_state->create_sink_dependency(
697
338
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
338
        }
699
338
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
338
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
338
    }
702
703
338
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
338
    _rows_input_counter =
708
338
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
338
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
338
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
338
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
338
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
338
    _memory_used_counter =
714
338
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
338
    _common_profile->add_info_string("IsColocate",
716
338
                                     std::to_string(_parent->is_colocated_operator()));
717
338
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
338
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
338
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
338
    return Status::OK();
721
338
}
722
723
template <typename SharedState>
724
1.79M
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
1.79M
    if (_closed) {
726
2
        return Status::OK();
727
2
    }
728
1.79M
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
1.25M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
1.25M
    }
731
1.79M
    _closed = true;
732
1.79M
    return Status::OK();
733
1.79M
}
_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
1
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
1
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
1
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
1
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
1
    }
731
1
    _closed = true;
732
1
    return Status::OK();
733
1
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
241k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
241k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
241k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
241k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
241k
    }
731
241k
    _closed = true;
732
241k
    return Status::OK();
733
241k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
150
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
150
    if (_closed) {
726
2
        return Status::OK();
727
2
    }
728
148
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
148
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
148
    }
731
148
    _closed = true;
732
148
    return Status::OK();
733
150
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
5.24k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
5.24k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
5.24k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
5.24k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
5.24k
    }
731
5.24k
    _closed = true;
732
5.24k
    return Status::OK();
733
5.24k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
9.15k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
9.15k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
9.15k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
9.15k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
9.15k
    }
731
9.15k
    _closed = true;
732
9.15k
    return Status::OK();
733
9.15k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
108k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
108k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
108k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
108k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
108k
    }
731
108k
    _closed = true;
732
108k
    return Status::OK();
733
108k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
63.5k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
63.5k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
63.5k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
63.5k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
63.5k
    }
731
63.5k
    _closed = true;
732
63.5k
    return Status::OK();
733
63.5k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
116
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
116
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
116
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
116
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
116
    }
731
116
    _closed = true;
732
116
    return Status::OK();
733
116
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
543k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
543k
    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
543k
    _closed = true;
732
543k
    return Status::OK();
733
543k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
8.88k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
8.88k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
8.88k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
8.88k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
8.88k
    }
731
8.88k
    _closed = true;
732
8.88k
    return Status::OK();
733
8.88k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
393
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
393
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
393
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
393
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
393
    }
731
393
    _closed = true;
732
393
    return Status::OK();
733
393
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
1.75k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
1.75k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
1.75k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
1.75k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
1.75k
    }
731
1.75k
    _closed = true;
732
1.75k
    return Status::OK();
733
1.75k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
13.0k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
13.0k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
13.0k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
13.0k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
13.0k
    }
731
13.0k
    _closed = true;
732
13.0k
    return Status::OK();
733
13.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
265k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
265k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
265k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
265k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
265k
    }
731
265k
    _closed = true;
732
265k
    return Status::OK();
733
265k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
421k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
421k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
421k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
421k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
421k
    }
731
421k
    _closed = true;
732
421k
    return Status::OK();
733
421k
}
_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.13k
                                                          bool* eos) {
738
1.13k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
1.13k
    return pull(state, block, eos);
740
1.13k
}
_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.09k
                                                          bool* eos) {
738
1.09k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
1.09k
    return pull(state, block, eos);
740
1.09k
}
741
742
template <typename LocalStateType>
743
Status StatefulOperatorX<LocalStateType>::get_block_impl(RuntimeState* state, Block* block,
744
523k
                                                         bool* eos) {
745
523k
    auto& local_state = get_local_state(state);
746
523k
    if (need_more_input_data(state)) {
747
490k
        local_state._child_block->clear_column_data(
748
490k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
490k
                        .num_slots());
750
490k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
490k
                state, local_state._child_block.get(), &local_state._child_eos));
752
490k
        *eos = local_state._child_eos;
753
490k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
66.2k
            return Status::OK();
755
66.2k
        }
756
424k
        {
757
424k
            SCOPED_TIMER(local_state.exec_time_counter());
758
424k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
424k
        }
760
424k
    }
761
762
457k
    if (!need_more_input_data(state)) {
763
430k
        SCOPED_TIMER(local_state.exec_time_counter());
764
430k
        bool new_eos = false;
765
430k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
430k
        if (new_eos) {
767
353k
            *eos = true;
768
353k
        } else if (!need_more_input_data(state)) {
769
26.0k
            *eos = false;
770
26.0k
        }
771
430k
    }
772
457k
    return Status::OK();
773
457k
}
_ZN5doris17StatefulOperatorXINS_23HashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
130k
                                                         bool* eos) {
745
130k
    auto& local_state = get_local_state(state);
746
130k
    if (need_more_input_data(state)) {
747
111k
        local_state._child_block->clear_column_data(
748
111k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
111k
                        .num_slots());
750
111k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
111k
                state, local_state._child_block.get(), &local_state._child_eos));
752
111k
        *eos = local_state._child_eos;
753
111k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
31.0k
            return Status::OK();
755
31.0k
        }
756
80.0k
        {
757
80.0k
            SCOPED_TIMER(local_state.exec_time_counter());
758
80.0k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
80.0k
        }
760
80.0k
    }
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
44.4k
            *eos = true;
768
55.6k
        } else if (!need_more_input_data(state)) {
769
12.0k
            *eos = false;
770
12.0k
        }
771
100k
    }
772
99.9k
    return Status::OK();
773
99.9k
}
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_34PartitionedHashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
_ZN5doris17StatefulOperatorXINS_16RepeatLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
4.01k
                                                         bool* eos) {
745
4.01k
    auto& local_state = get_local_state(state);
746
4.01k
    if (need_more_input_data(state)) {
747
2.16k
        local_state._child_block->clear_column_data(
748
2.16k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
2.16k
                        .num_slots());
750
2.16k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
2.16k
                state, local_state._child_block.get(), &local_state._child_eos));
752
2.16k
        *eos = local_state._child_eos;
753
2.16k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
253
            return Status::OK();
755
253
        }
756
1.90k
        {
757
1.90k
            SCOPED_TIMER(local_state.exec_time_counter());
758
1.90k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
1.90k
        }
760
1.90k
    }
761
762
3.77k
    if (!need_more_input_data(state)) {
763
3.77k
        SCOPED_TIMER(local_state.exec_time_counter());
764
3.77k
        bool new_eos = false;
765
3.77k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
3.77k
        if (new_eos) {
767
1.32k
            *eos = true;
768
2.45k
        } else if (!need_more_input_data(state)) {
769
1.85k
            *eos = false;
770
1.85k
        }
771
3.77k
    }
772
3.75k
    return Status::OK();
773
3.75k
}
_ZN5doris17StatefulOperatorXINS_25MaterializationLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
1.94k
                                                         bool* eos) {
745
1.94k
    auto& local_state = get_local_state(state);
746
1.94k
    if (need_more_input_data(state)) {
747
1.94k
        local_state._child_block->clear_column_data(
748
1.94k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
1.94k
                        .num_slots());
750
1.94k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
1.94k
                state, local_state._child_block.get(), &local_state._child_eos));
752
1.94k
        *eos = local_state._child_eos;
753
1.94k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
788
            return Status::OK();
755
788
        }
756
1.15k
        {
757
1.15k
            SCOPED_TIMER(local_state.exec_time_counter());
758
1.15k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
1.15k
        }
760
1.15k
    }
761
762
1.15k
    if (!need_more_input_data(state)) {
763
1.15k
        SCOPED_TIMER(local_state.exec_time_counter());
764
1.15k
        bool new_eos = false;
765
1.15k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
1.15k
        if (new_eos) {
767
800
            *eos = true;
768
800
        } else if (!need_more_input_data(state)) {
769
0
            *eos = false;
770
0
        }
771
1.15k
    }
772
1.15k
    return Status::OK();
773
1.15k
}
_ZN5doris17StatefulOperatorXINS_22StreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
14.2k
                                                         bool* eos) {
745
14.2k
    auto& local_state = get_local_state(state);
746
14.2k
    if (need_more_input_data(state)) {
747
14.2k
        local_state._child_block->clear_column_data(
748
14.2k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
14.2k
                        .num_slots());
750
14.2k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
14.2k
                state, local_state._child_block.get(), &local_state._child_eos));
752
14.2k
        *eos = local_state._child_eos;
753
14.2k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
1.92k
            return Status::OK();
755
1.92k
        }
756
12.3k
        {
757
12.3k
            SCOPED_TIMER(local_state.exec_time_counter());
758
12.3k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
12.3k
        }
760
12.3k
    }
761
762
12.3k
    if (!need_more_input_data(state)) {
763
8.33k
        SCOPED_TIMER(local_state.exec_time_counter());
764
8.33k
        bool new_eos = false;
765
8.33k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
8.33k
        if (new_eos) {
767
8.05k
            *eos = true;
768
8.05k
        } else if (!need_more_input_data(state)) {
769
5
            *eos = false;
770
5
        }
771
8.33k
    }
772
12.3k
    return Status::OK();
773
12.3k
}
_ZN5doris17StatefulOperatorXINS_30DistinctStreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
343k
                                                         bool* eos) {
745
343k
    auto& local_state = get_local_state(state);
746
344k
    if (need_more_input_data(state)) {
747
344k
        local_state._child_block->clear_column_data(
748
344k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
344k
                        .num_slots());
750
344k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
344k
                state, local_state._child_block.get(), &local_state._child_eos));
752
344k
        *eos = local_state._child_eos;
753
344k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
31.2k
            return Status::OK();
755
31.2k
        }
756
313k
        {
757
313k
            SCOPED_TIMER(local_state.exec_time_counter());
758
313k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
313k
        }
760
313k
    }
761
762
312k
    if (!need_more_input_data(state)) {
763
289k
        SCOPED_TIMER(local_state.exec_time_counter());
764
289k
        bool new_eos = false;
765
289k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
289k
        if (new_eos) {
767
289k
            *eos = true;
768
289k
        } else if (!need_more_input_data(state)) {
769
8
            *eos = false;
770
8
        }
771
289k
    }
772
312k
    return Status::OK();
773
312k
}
_ZN5doris17StatefulOperatorXINS_29NestedLoopJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
21.1k
                                                         bool* eos) {
745
21.1k
    auto& local_state = get_local_state(state);
746
21.1k
    if (need_more_input_data(state)) {
747
9.33k
        local_state._child_block->clear_column_data(
748
9.33k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
9.33k
                        .num_slots());
750
9.33k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
9.33k
                state, local_state._child_block.get(), &local_state._child_eos));
752
9.33k
        *eos = local_state._child_eos;
753
9.33k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
306
            return Status::OK();
755
306
        }
756
9.02k
        {
757
9.02k
            SCOPED_TIMER(local_state.exec_time_counter());
758
9.02k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
9.02k
        }
760
9.02k
    }
761
762
20.8k
    if (!need_more_input_data(state)) {
763
20.2k
        SCOPED_TIMER(local_state.exec_time_counter());
764
20.2k
        bool new_eos = false;
765
20.2k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
20.2k
        if (new_eos) {
767
5.22k
            *eos = true;
768
15.0k
        } else if (!need_more_input_data(state)) {
769
11.7k
            *eos = false;
770
11.7k
        }
771
20.2k
    }
772
20.8k
    return Status::OK();
773
20.8k
}
_ZN5doris17StatefulOperatorXINS_23TableFunctionLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
7.86k
                                                         bool* eos) {
745
7.86k
    auto& local_state = get_local_state(state);
746
7.86k
    if (need_more_input_data(state)) {
747
7.51k
        local_state._child_block->clear_column_data(
748
7.51k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
7.51k
                        .num_slots());
750
7.51k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
7.51k
                state, local_state._child_block.get(), &local_state._child_eos));
752
7.51k
        *eos = local_state._child_eos;
753
7.51k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
698
            return Status::OK();
755
698
        }
756
6.81k
        {
757
6.81k
            SCOPED_TIMER(local_state.exec_time_counter());
758
6.81k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
6.81k
        }
760
6.81k
    }
761
762
7.18k
    if (!need_more_input_data(state)) {
763
7.18k
        SCOPED_TIMER(local_state.exec_time_counter());
764
7.18k
        bool new_eos = false;
765
7.18k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
7.18k
        if (new_eos) {
767
4.83k
            *eos = true;
768
4.83k
        } else if (!need_more_input_data(state)) {
769
366
            *eos = false;
770
366
        }
771
7.18k
    }
772
7.15k
    return Status::OK();
773
7.15k
}
774
775
template <typename Writer, typename Parent>
776
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
777
49.2k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
49.2k
    RETURN_IF_ERROR(Base::init(state, info));
779
49.2k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
49.2k
                                                         "AsyncWriterDependency", true);
781
49.2k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
49.2k
                             _finish_dependency));
783
784
49.2k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
49.2k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
49.2k
    return Status::OK();
787
49.2k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
368
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
368
    RETURN_IF_ERROR(Base::init(state, info));
779
368
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
368
                                                         "AsyncWriterDependency", true);
781
368
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
368
                             _finish_dependency));
783
784
368
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
368
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
368
    return Status::OK();
787
368
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
48.8k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
48.8k
    RETURN_IF_ERROR(Base::init(state, info));
779
48.8k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
48.8k
                                                         "AsyncWriterDependency", true);
781
48.8k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
48.8k
                             _finish_dependency));
783
784
48.8k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
48.8k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
48.8k
    return Status::OK();
787
48.8k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
2
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
2
    RETURN_IF_ERROR(Base::init(state, info));
779
2
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
2
                                                         "AsyncWriterDependency", true);
781
2
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
2
                             _finish_dependency));
783
784
2
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
2
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
2
    return Status::OK();
787
2
}
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
49.7k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
49.7k
    RETURN_IF_ERROR(Base::open(state));
793
49.7k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
386k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
336k
        RETURN_IF_ERROR(
796
336k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
336k
    }
798
49.7k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
49.7k
    return Status::OK();
800
49.7k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
369
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
369
    RETURN_IF_ERROR(Base::open(state));
793
369
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
1.86k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
1.49k
        RETURN_IF_ERROR(
796
1.49k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
1.49k
    }
798
369
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
369
    return Status::OK();
800
369
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
49.3k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
49.3k
    RETURN_IF_ERROR(Base::open(state));
793
49.3k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
384k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
335k
        RETURN_IF_ERROR(
796
335k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
335k
    }
798
49.3k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
49.3k
    return Status::OK();
800
49.3k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
2
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
2
    RETURN_IF_ERROR(Base::open(state));
793
2
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
36
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
34
        RETURN_IF_ERROR(
796
34
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
34
    }
798
2
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
2
    return Status::OK();
800
2
}
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.1k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
65.1k
    return _writer->sink(block, eos);
806
65.1k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
1.22k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
1.22k
    return _writer->sink(block, eos);
806
1.22k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
63.8k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
63.8k
    return _writer->sink(block, eos);
806
63.8k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
2
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
2
    return _writer->sink(block, eos);
806
2
}
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
49.7k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
49.7k
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
49.7k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
49.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
49.7k
    if (_writer) {
818
49.7k
        Status st = _writer->get_writer_status();
819
49.7k
        if (exec_status.ok()) {
820
49.7k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
49.7k
                                                       : Status::Cancelled("force close"));
822
49.7k
        } else {
823
74
            _writer->force_close(exec_status);
824
74
        }
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
49.7k
        RETURN_IF_ERROR(st);
829
49.7k
    }
830
49.7k
    return Base::close(state, exec_status);
831
49.7k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
359
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
359
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
359
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
359
    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
359
    if (_writer) {
818
359
        Status st = _writer->get_writer_status();
819
359
        if (exec_status.ok()) {
820
359
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
359
                                                       : Status::Cancelled("force close"));
822
359
        } 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
359
        RETURN_IF_ERROR(st);
829
359
    }
830
359
    return Base::close(state, exec_status);
831
359
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
49.3k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
49.3k
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
49.3k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
49.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
49.4k
    if (_writer) {
818
49.4k
        Status st = _writer->get_writer_status();
819
49.4k
        if (exec_status.ok()) {
820
49.3k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
49.3k
                                                       : Status::Cancelled("force close"));
822
49.3k
        } else {
823
74
            _writer->force_close(exec_status);
824
74
        }
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
49.4k
        RETURN_IF_ERROR(st);
829
49.4k
    }
830
49.3k
    return Base::close(state, exec_status);
831
49.3k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
2
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
2
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
2
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
2
    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
2
    if (_writer) {
818
2
        Status st = _writer->get_writer_status();
819
2
        if (exec_status.ok()) {
820
2
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
2
                                                       : Status::Cancelled("force close"));
822
2
        } 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
2
        RETURN_IF_ERROR(st);
829
2
    }
830
2
    return Base::close(state, exec_status);
831
2
}
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