Coverage Report

Created: 2026-06-05 05:33

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