Coverage Report

Created: 2026-06-05 04:09

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.86M
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
1.86M
    if (_parent->nereids_id() == -1) {
120
973k
        return fmt::format("(id={})", _parent->node_id());
121
973k
    } else {
122
887k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
887k
    }
124
1.86M
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
61.2k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
61.2k
    if (_parent->nereids_id() == -1) {
120
0
        return fmt::format("(id={})", _parent->node_id());
121
61.2k
    } else {
122
61.2k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
61.2k
    }
124
61.2k
}
_ZNK5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
1
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
1
    if (_parent->nereids_id() == -1) {
120
1
        return fmt::format("(id={})", _parent->node_id());
121
1
    } else {
122
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
0
    }
124
1
}
_ZNK5doris19PipelineXLocalStateINS_15SortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
189k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
189k
    if (_parent->nereids_id() == -1) {
120
12
        return fmt::format("(id={})", _parent->node_id());
121
189k
    } else {
122
189k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
189k
    }
124
189k
}
_ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
26
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
26
    if (_parent->nereids_id() == -1) {
120
0
        return fmt::format("(id={})", _parent->node_id());
121
26
    } else {
122
26
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
26
    }
124
26
}
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
5.64k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
5.64k
    if (_parent->nereids_id() == -1) {
120
0
        return fmt::format("(id={})", _parent->node_id());
121
5.64k
    } else {
122
5.64k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
5.64k
    }
124
5.64k
}
_ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
7.14k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
7.14k
    if (_parent->nereids_id() == -1) {
120
9
        return fmt::format("(id={})", _parent->node_id());
121
7.13k
    } else {
122
7.13k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
7.13k
    }
124
7.14k
}
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
74.3k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
74.3k
    if (_parent->nereids_id() == -1) {
120
29
        return fmt::format("(id={})", _parent->node_id());
121
74.3k
    } else {
122
74.3k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
74.3k
    }
124
74.3k
}
_ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
353
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
353
    if (_parent->nereids_id() == -1) {
120
0
        return fmt::format("(id={})", _parent->node_id());
121
353
    } else {
122
353
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
353
    }
124
353
}
_ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
38
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
38
    if (_parent->nereids_id() == -1) {
120
0
        return fmt::format("(id={})", _parent->node_id());
121
38
    } else {
122
38
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
38
    }
124
38
}
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
832k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
832k
    if (_parent->nereids_id() == -1) {
120
340k
        return fmt::format("(id={})", _parent->node_id());
121
492k
    } else {
122
492k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
492k
    }
124
832k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
50.4k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
50.4k
    if (_parent->nereids_id() == -1) {
120
2
        return fmt::format("(id={})", _parent->node_id());
121
50.4k
    } else {
122
50.4k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
50.4k
    }
124
50.4k
}
_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.38k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
4.38k
    if (_parent->nereids_id() == -1) {
120
4.37k
        return fmt::format("(id={})", _parent->node_id());
121
4.37k
    } else {
122
6
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
6
    }
124
4.38k
}
_ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
355
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
355
    if (_parent->nereids_id() == -1) {
120
102
        return fmt::format("(id={})", _parent->node_id());
121
253
    } else {
122
253
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
253
    }
124
355
}
_ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
4.89k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
4.89k
    if (_parent->nereids_id() == -1) {
120
13
        return fmt::format("(id={})", _parent->node_id());
121
4.88k
    } else {
122
4.88k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
4.88k
    }
124
4.89k
}
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
629k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
629k
    if (_parent->nereids_id() == -1) {
120
628k
        return fmt::format("(id={})", _parent->node_id());
121
628k
    } else {
122
1.09k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
1.09k
    }
124
629k
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
_ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
151
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
151
    if (_parent->nereids_id() == -1) {
120
0
        return fmt::format("(id={})", _parent->node_id());
121
151
    } else {
122
151
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
151
    }
124
151
}
125
126
template <typename SharedStateArg>
127
1.06M
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
1.06M
    if (_parent->nereids_id() == -1) {
129
669k
        return fmt::format("(id={})", _parent->node_id());
130
669k
    } else {
131
395k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
395k
    }
133
1.06M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
109k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
109k
    if (_parent->nereids_id() == -1) {
129
0
        return fmt::format("(id={})", _parent->node_id());
130
109k
    } else {
131
109k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
109k
    }
133
109k
}
_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
191k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
191k
    if (_parent->nereids_id() == -1) {
129
9
        return fmt::format("(id={})", _parent->node_id());
130
191k
    } else {
131
191k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
191k
    }
133
191k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
32
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
32
    if (_parent->nereids_id() == -1) {
129
0
        return fmt::format("(id={})", _parent->node_id());
130
32
    } else {
131
32
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
32
    }
133
32
}
_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.16k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
7.16k
    if (_parent->nereids_id() == -1) {
129
9
        return fmt::format("(id={})", _parent->node_id());
130
7.15k
    } else {
131
7.15k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
7.15k
    }
133
7.16k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
74.5k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
74.5k
    if (_parent->nereids_id() == -1) {
129
29
        return fmt::format("(id={})", _parent->node_id());
130
74.5k
    } else {
131
74.5k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
74.5k
    }
133
74.5k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
278
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
278
    if (_parent->nereids_id() == -1) {
129
0
        return fmt::format("(id={})", _parent->node_id());
130
278
    } else {
131
278
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
278
    }
133
278
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
48
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
48
    if (_parent->nereids_id() == -1) {
129
0
        return fmt::format("(id={})", _parent->node_id());
130
48
    } else {
131
48
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
48
    }
133
48
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
51
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
51
    if (_parent->nereids_id() == -1) {
129
51
        return fmt::format("(id={})", _parent->node_id());
130
51
    } else {
131
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
0
    }
133
51
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
5.43k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
5.43k
    if (_parent->nereids_id() == -1) {
129
3
        return fmt::format("(id={})", _parent->node_id());
130
5.43k
    } else {
131
5.43k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
5.43k
    }
133
5.43k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
356
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
356
    if (_parent->nereids_id() == -1) {
129
102
        return fmt::format("(id={})", _parent->node_id());
130
254
    } else {
131
254
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
254
    }
133
356
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
12.0k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
12.0k
    if (_parent->nereids_id() == -1) {
129
12.0k
        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.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
243k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
243k
    if (_parent->nereids_id() == -1) {
129
243k
        return fmt::format("(id={})", _parent->node_id());
130
243k
    } else {
131
12
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
12
    }
133
243k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
413k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
413k
    if (_parent->nereids_id() == -1) {
129
413k
        return fmt::format("(id={})", _parent->node_id());
130
413k
    } else {
131
108
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
108
    }
133
413k
}
_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
301
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
301
    if (_parent->nereids_id() == -1) {
129
0
        return fmt::format("(id={})", _parent->node_id());
130
301
    } else {
131
301
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
301
    }
133
301
}
134
135
template <typename SharedStateArg>
136
26.7k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
26.7k
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
26.7k
    _terminated = true;
141
26.7k
    return Status::OK();
142
26.7k
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
24.0k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
24.0k
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
24.0k
    _terminated = true;
141
24.0k
    return Status::OK();
142
24.0k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
1.04k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
1.04k
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
1.04k
    _terminated = true;
141
1.04k
    return Status::OK();
142
1.04k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_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_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
703
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
703
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
703
    _terminated = true;
141
703
    return Status::OK();
142
703
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
4
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
4
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
4
    _terminated = true;
141
4
    return Status::OK();
142
4
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
597
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
597
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
597
    _terminated = true;
141
597
    return Status::OK();
142
597
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
12
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
12
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
12
    _terminated = true;
141
12
    return Status::OK();
142
12
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_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_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
31
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
31
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
31
    _terminated = true;
141
31
    return Status::OK();
142
31
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
157
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
157
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
157
    _terminated = true;
141
157
    return Status::OK();
142
157
}
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
582k
DataDistribution OperatorBase::required_data_distribution(RuntimeState* /*state*/) const {
145
582k
    return _child && _child->is_serial_operator() && !is_source()
146
582k
                   ? DataDistribution(ExchangeType::PASSTHROUGH)
147
582k
                   : DataDistribution(ExchangeType::NOOP);
148
582k
}
149
150
8.88k
bool OperatorBase::is_hash_shuffle(ExchangeType exchange_type) {
151
8.88k
    return exchange_type == ExchangeType::HASH_SHUFFLE ||
152
8.88k
           exchange_type == ExchangeType::BUCKET_HASH_SHUFFLE;
153
8.88k
}
154
155
87.9k
bool OperatorBase::child_breaks_local_key_distribution(RuntimeState* state) const {
156
87.9k
    if (!_child) {
157
29.6k
        return false;
158
29.6k
    }
159
58.3k
    if (_child->is_serial_operator()) {
160
48.5k
        return true;
161
48.5k
    }
162
9.76k
    const auto child_distribution = _child->required_data_distribution(state);
163
9.76k
    return child_distribution.need_local_exchange() &&
164
9.76k
           !is_hash_shuffle(child_distribution.distribution_type);
165
58.3k
}
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.5k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
21.5k
    fmt::memory_buffer debug_string_buffer;
174
21.5k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
21.5k
    return fmt::to_string(debug_string_buffer);
176
21.5k
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
172
18
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
18
    fmt::memory_buffer debug_string_buffer;
174
18
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
18
    return fmt::to_string(debug_string_buffer);
176
18
}
_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
8
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
8
    fmt::memory_buffer debug_string_buffer;
174
8
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
8
    return fmt::to_string(debug_string_buffer);
176
8
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
172
5
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
5
    fmt::memory_buffer debug_string_buffer;
174
5
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
5
    return fmt::to_string(debug_string_buffer);
176
5
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
172
13
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
13
    fmt::memory_buffer debug_string_buffer;
174
13
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
13
    return fmt::to_string(debug_string_buffer);
176
13
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
172
20.6k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
20.6k
    fmt::memory_buffer debug_string_buffer;
174
20.6k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
20.6k
    return fmt::to_string(debug_string_buffer);
176
20.6k
}
_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
853
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
853
    fmt::memory_buffer debug_string_buffer;
174
853
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
853
    return fmt::to_string(debug_string_buffer);
176
853
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
177
178
template <typename SharedStateArg>
179
21.5k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
180
21.5k
    fmt::memory_buffer debug_string_buffer;
181
21.5k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
182
21.5k
    return fmt::to_string(debug_string_buffer);
183
21.5k
}
_ZNK5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
179
4
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
180
4
    fmt::memory_buffer debug_string_buffer;
181
4
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
182
4
    return fmt::to_string(debug_string_buffer);
183
4
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
179
8
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
180
8
    fmt::memory_buffer debug_string_buffer;
181
8
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
182
8
    return fmt::to_string(debug_string_buffer);
183
8
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
179
4
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
180
4
    fmt::memory_buffer debug_string_buffer;
181
4
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
182
4
    return fmt::to_string(debug_string_buffer);
183
4
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
179
13
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
180
13
    fmt::memory_buffer debug_string_buffer;
181
13
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
182
13
    return fmt::to_string(debug_string_buffer);
183
13
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
179
857
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
180
857
    fmt::memory_buffer debug_string_buffer;
181
857
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
182
857
    return fmt::to_string(debug_string_buffer);
183
857
}
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
8
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
180
8
    fmt::memory_buffer debug_string_buffer;
181
8
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
182
8
    return fmt::to_string(debug_string_buffer);
183
8
}
_ZNK5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
179
20.6k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
180
20.6k
    fmt::memory_buffer debug_string_buffer;
181
20.6k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
182
20.6k
    return fmt::to_string(debug_string_buffer);
183
20.6k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
184
185
21.9k
std::string OperatorXBase::debug_string(int indentation_level) const {
186
21.9k
    fmt::memory_buffer debug_string_buffer;
187
21.9k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, parallel_tasks={}, _is_serial_operator={}",
188
21.9k
                   std::string(indentation_level * 2, ' '), _op_name, node_id(), _parallel_tasks,
189
21.9k
                   _is_serial_operator);
190
21.9k
    return fmt::to_string(debug_string_buffer);
191
21.9k
}
192
193
21.5k
std::string OperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
194
21.5k
    return state->get_local_state(operator_id())->debug_string(indentation_level);
195
21.5k
}
196
197
523k
Status OperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
198
523k
    std::string node_name = print_plan_node_type(tnode.node_type);
199
523k
    _nereids_id = tnode.nereids_id;
200
523k
    if (!tnode.intermediate_output_tuple_id_list.empty()) {
201
2.91k
        if (!tnode.__isset.output_tuple_id) {
202
0
            return Status::InternalError("no final output tuple id");
203
0
        }
204
2.91k
        if (tnode.intermediate_output_tuple_id_list.size() !=
205
2.91k
            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.91k
    }
213
523k
    auto substr = node_name.substr(0, node_name.find("_NODE"));
214
523k
    _op_name = substr + "_OPERATOR";
215
216
523k
    if (tnode.__isset.vconjunct) {
217
0
        return Status::InternalError("vconjunct is not supported yet");
218
523k
    } else if (tnode.__isset.conjuncts) {
219
249k
        for (const auto& conjunct : tnode.conjuncts) {
220
249k
            VExprContextSPtr context;
221
249k
            RETURN_IF_ERROR(VExpr::create_expr_tree(conjunct, context));
222
249k
            _conjuncts.emplace_back(context);
223
249k
        }
224
85.6k
    }
225
226
    // create the projections expr
227
523k
    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
523k
    if (!tnode.intermediate_projections_list.empty()) {
232
2.91k
        DCHECK(tnode.__isset.projections) << "no final projections";
233
2.91k
        _intermediate_projections.reserve(tnode.intermediate_projections_list.size());
234
3.83k
        for (const auto& tnode_projections : tnode.intermediate_projections_list) {
235
3.83k
            VExprContextSPtrs projections;
236
3.83k
            RETURN_IF_ERROR(VExpr::create_expr_trees(tnode_projections, projections));
237
3.83k
            _intermediate_projections.push_back(projections);
238
3.83k
        }
239
2.91k
    }
240
523k
    return Status::OK();
241
523k
}
242
243
549k
Status OperatorXBase::prepare(RuntimeState* state) {
244
549k
    for (auto& conjunct : _conjuncts) {
245
249k
        RETURN_IF_ERROR(conjunct->prepare(state, intermediate_row_desc()));
246
249k
    }
247
549k
    if (state->enable_adjust_conjunct_order_by_cost()) {
248
499k
        std::ranges::sort(_conjuncts, [](const auto& a, const auto& b) {
249
326k
            return a->execute_cost() < b->execute_cost();
250
326k
        });
251
499k
    };
252
253
553k
    for (int i = 0; i < _intermediate_projections.size(); i++) {
254
3.83k
        RETURN_IF_ERROR(
255
3.83k
                VExpr::prepare(_intermediate_projections[i], state, intermediate_row_desc(i)));
256
3.83k
    }
257
549k
    RETURN_IF_ERROR(VExpr::prepare(_projections, state, projections_row_desc()));
258
259
549k
    if (has_output_row_desc()) {
260
230k
        RETURN_IF_ERROR(VExpr::check_expr_output_type(_projections, *_output_row_descriptor));
261
230k
    }
262
263
549k
    for (auto& conjunct : _conjuncts) {
264
249k
        RETURN_IF_ERROR(conjunct->open(state));
265
249k
    }
266
549k
    RETURN_IF_ERROR(VExpr::open(_projections, state));
267
549k
    for (auto& projections : _intermediate_projections) {
268
3.83k
        RETURN_IF_ERROR(VExpr::open(projections, state));
269
3.83k
    }
270
549k
    if (_child && !is_source()) {
271
122k
        RETURN_IF_ERROR(_child->prepare(state));
272
122k
    }
273
274
549k
    if (VExpr::contains_blockable_function(_conjuncts) ||
275
549k
        VExpr::contains_blockable_function(_projections)) {
276
0
        _blockable = true;
277
0
    }
278
279
549k
    return Status::OK();
280
549k
}
281
282
3.25k
Status OperatorXBase::terminate(RuntimeState* state) {
283
3.25k
    if (_child && !is_source()) {
284
504
        RETURN_IF_ERROR(_child->terminate(state));
285
504
    }
286
3.25k
    auto result = state->get_local_state_result(operator_id());
287
3.25k
    if (!result) {
288
0
        return result.error();
289
0
    }
290
3.25k
    return result.value()->terminate(state);
291
3.25k
}
292
293
5.24M
Status OperatorXBase::close(RuntimeState* state) {
294
5.24M
    if (_child && !is_source()) {
295
1.10M
        RETURN_IF_ERROR(_child->close(state));
296
1.10M
    }
297
5.24M
    auto result = state->get_local_state_result(operator_id());
298
5.24M
    if (!result) {
299
0
        return result.error();
300
0
    }
301
5.24M
    return result.value()->close(state);
302
5.24M
}
303
304
238k
void PipelineXLocalStateBase::clear_origin_block() {
305
238k
    _origin_block.clear_column_data(_parent->intermediate_row_desc().num_materialized_slots());
306
238k
}
307
308
497k
Status PipelineXLocalStateBase::filter_block(const VExprContextSPtrs& expr_contexts, Block* block) {
309
497k
    RETURN_IF_ERROR(VExprContext::filter_block(expr_contexts, block, block->columns()));
310
311
497k
    _estimate_memory_usage += VExprContext::get_memory_usage(expr_contexts);
312
497k
    return Status::OK();
313
497k
}
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
238k
                                     Block* output_block) const {
322
238k
    auto* local_state = state->get_local_state(operator_id());
323
238k
    SCOPED_TIMER(local_state->exec_time_counter());
324
238k
    SCOPED_TIMER(local_state->_projection_timer);
325
238k
    const size_t rows = origin_block->rows();
326
238k
    if (rows == 0) {
327
125k
        return Status::OK();
328
125k
    }
329
113k
    Block input_block = *origin_block;
330
331
113k
    size_t bytes_usage = 0;
332
113k
    ColumnsWithTypeAndName new_columns;
333
113k
    for (const auto& projections : local_state->_intermediate_projections) {
334
858
        if (projections.empty()) {
335
0
            return Status::InternalError("meet empty intermediate projection, node id: {}",
336
0
                                         node_id());
337
0
        }
338
858
        new_columns.resize(projections.size());
339
5.80k
        for (int i = 0; i < projections.size(); i++) {
340
4.94k
            RETURN_IF_ERROR(projections[i]->execute(&input_block, new_columns[i]));
341
4.94k
            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
4.94k
        }
349
858
        Block tmp_block {new_columns};
350
858
        bytes_usage += tmp_block.allocated_bytes();
351
858
        input_block.swap(tmp_block);
352
858
    }
353
354
113k
    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
535k
    auto insert_column_datas = [&](auto& to, ColumnPtr& from, size_t rows) {
361
535k
        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
535k
        } else {
371
535k
            if (_keep_origin || !from->is_exclusive()) {
372
526k
                to->insert_range_from(*from, 0, rows);
373
526k
                bytes_usage += from->allocated_bytes();
374
526k
            } else {
375
9.60k
                to = from->assert_mutable();
376
9.60k
            }
377
535k
        }
378
535k
    };
379
380
113k
    auto scoped_mutable_block = VectorizedUtils::build_scoped_mutable_mem_reuse_block(
381
113k
            output_block, *_output_row_descriptor);
382
113k
    auto& mutable_block = scoped_mutable_block.mutable_block();
383
113k
    auto& mutable_columns = mutable_block.mutable_columns();
384
113k
    if (rows != 0) {
385
113k
        DCHECK_EQ(mutable_columns.size(), local_state->_projections.size()) << debug_string();
386
649k
        for (int i = 0; i < mutable_columns.size(); ++i) {
387
535k
            ColumnPtr column_ptr;
388
535k
            RETURN_IF_ERROR(local_state->_projections[i]->execute(&input_block, column_ptr));
389
535k
            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
535k
            column_ptr = column_ptr->convert_to_full_column_if_const();
396
535k
            bytes_usage += column_ptr->allocated_bytes();
397
535k
            insert_column_datas(mutable_columns[i], column_ptr, rows);
398
535k
        }
399
113k
        DCHECK(mutable_block.rows() == rows);
400
113k
    }
401
113k
    local_state->_estimate_memory_usage += bytes_usage;
402
403
113k
    return Status::OK();
404
113k
}
405
406
4.22M
Status OperatorXBase::get_block_after_projects(RuntimeState* state, Block* block, bool* eos) {
407
4.22M
    DBUG_EXECUTE_IF("Pipeline::return_empty_block", {
408
4.22M
        if (this->_op_name == "AGGREGATION_OPERATOR" || this->_op_name == "HASH_JOIN_OPERATOR" ||
409
4.22M
            this->_op_name == "PARTITIONED_AGGREGATION_OPERATOR" ||
410
4.22M
            this->_op_name == "PARTITIONED_HASH_JOIN_OPERATOR" ||
411
4.22M
            this->_op_name == "CROSS_JOIN_OPERATOR" || this->_op_name == "SORT_OPERATOR") {
412
4.22M
            if (_debug_point_count++ % 2 == 0) {
413
4.22M
                return Status::OK();
414
4.22M
            }
415
4.22M
        }
416
4.22M
    });
417
418
4.22M
    Status status;
419
4.22M
    auto* local_state = state->get_local_state(operator_id());
420
4.22M
    Defer defer([&]() {
421
4.22M
        if (status.ok()) {
422
4.22M
            local_state->update_output_block_counters(*block);
423
4.22M
        }
424
4.22M
    });
425
4.22M
    if (_output_row_descriptor) {
426
238k
        local_state->clear_origin_block();
427
238k
        status = get_block(state, &local_state->_origin_block, eos);
428
238k
        if (UNLIKELY(!status.ok())) {
429
19
            return status;
430
19
        }
431
238k
        status = do_projections(state, &local_state->_origin_block, block);
432
238k
        return status;
433
238k
    }
434
3.98M
    status = get_block(state, block, eos);
435
3.98M
    RETURN_IF_ERROR(block->check_type_and_column());
436
3.98M
    return status;
437
3.98M
}
438
439
2.30M
void PipelineXLocalStateBase::reached_limit(Block* block, bool* eos) {
440
2.30M
    if (_parent->_limit != -1 and _num_rows_returned + block->rows() >= _parent->_limit) {
441
3.88k
        block->set_num_rows(_parent->_limit - _num_rows_returned);
442
3.88k
        *eos = true;
443
3.88k
    }
444
445
2.30M
    DBUG_EXECUTE_IF("Pipeline::reached_limit_early", {
446
2.30M
        auto op_name = to_lower(_parent->_op_name);
447
2.30M
        auto arg_op_name = dp->param<std::string>("op_name");
448
2.30M
        arg_op_name = to_lower(arg_op_name);
449
450
2.30M
        if (op_name == arg_op_name) {
451
2.30M
            *eos = true;
452
2.30M
        }
453
2.30M
    });
454
455
2.30M
    if (auto rows = block->rows()) {
456
652k
        _num_rows_returned += rows;
457
652k
        _state->get_query_ctx()->resource_ctx()->io_context()->update_process_rows(rows);
458
652k
    }
459
2.30M
}
460
461
26.7k
Status DataSinkOperatorXBase::terminate(RuntimeState* state) {
462
26.7k
    auto result = state->get_sink_local_state_result();
463
26.7k
    if (!result) {
464
0
        return result.error();
465
0
    }
466
26.7k
    return result.value()->terminate(state);
467
26.7k
}
468
469
21.8k
std::string DataSinkOperatorXBase::debug_string(int indentation_level) const {
470
21.8k
    fmt::memory_buffer debug_string_buffer;
471
472
21.8k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, _is_serial_operator={}",
473
21.8k
                   std::string(indentation_level * 2, ' '), _name, node_id(), _is_serial_operator);
474
21.8k
    return fmt::to_string(debug_string_buffer);
475
21.8k
}
476
477
21.5k
std::string DataSinkOperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
478
21.5k
    return state->get_sink_local_state()->debug_string(indentation_level);
479
21.5k
}
480
481
324k
Status DataSinkOperatorXBase::init(const TDataSink& tsink) {
482
324k
    std::string op_name = "UNKNOWN_SINK";
483
324k
    auto it = _TDataSinkType_VALUES_TO_NAMES.find(tsink.type);
484
485
324k
    if (it != _TDataSinkType_VALUES_TO_NAMES.end()) {
486
324k
        op_name = it->second;
487
324k
    }
488
324k
    _name = op_name + "_OPERATOR";
489
324k
    return Status::OK();
490
324k
}
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.61M
                                                            LocalSinkStateInfo& info) {
503
1.61M
    auto local_state = LocalStateType::create_unique(this, state);
504
1.61M
    RETURN_IF_ERROR(local_state->init(state, info));
505
1.61M
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
1.61M
    return Status::OK();
507
1.61M
}
_ZN5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
109k
                                                            LocalSinkStateInfo& info) {
503
109k
    auto local_state = LocalStateType::create_unique(this, state);
504
109k
    RETURN_IF_ERROR(local_state->init(state, info));
505
109k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
109k
    return Status::OK();
507
109k
}
_ZN5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
372k
                                                            LocalSinkStateInfo& info) {
503
372k
    auto local_state = LocalStateType::create_unique(this, state);
504
372k
    RETURN_IF_ERROR(local_state->init(state, info));
505
372k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
372k
    return Status::OK();
507
372k
}
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
375
                                                            LocalSinkStateInfo& info) {
503
375
    auto local_state = LocalStateType::create_unique(this, state);
504
375
    RETURN_IF_ERROR(local_state->init(state, info));
505
375
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
375
    return Status::OK();
507
375
}
_ZN5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
40.4k
                                                            LocalSinkStateInfo& info) {
503
40.4k
    auto local_state = LocalStateType::create_unique(this, state);
504
40.4k
    RETURN_IF_ERROR(local_state->init(state, info));
505
40.4k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
40.4k
    return Status::OK();
507
40.4k
}
_ZN5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
6
                                                            LocalSinkStateInfo& info) {
503
6
    auto local_state = LocalStateType::create_unique(this, state);
504
6
    RETURN_IF_ERROR(local_state->init(state, info));
505
6
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
6
    return Status::OK();
507
6
}
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.15k
                                                            LocalSinkStateInfo& info) {
503
7.15k
    auto local_state = LocalStateType::create_unique(this, state);
504
7.15k
    RETURN_IF_ERROR(local_state->init(state, info));
505
7.15k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
7.15k
    return Status::OK();
507
7.15k
}
_ZN5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
48
                                                            LocalSinkStateInfo& info) {
503
48
    auto local_state = LocalStateType::create_unique(this, state);
504
48
    RETURN_IF_ERROR(local_state->init(state, info));
505
48
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
48
    return Status::OK();
507
48
}
_ZN5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
192k
                                                            LocalSinkStateInfo& info) {
503
192k
    auto local_state = LocalStateType::create_unique(this, state);
504
192k
    RETURN_IF_ERROR(local_state->init(state, info));
505
192k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
192k
    return Status::OK();
507
192k
}
_ZN5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
32
                                                            LocalSinkStateInfo& info) {
503
32
    auto local_state = LocalStateType::create_unique(this, state);
504
32
    RETURN_IF_ERROR(local_state->init(state, info));
505
32
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
32
    return Status::OK();
507
32
}
_ZN5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
243k
                                                            LocalSinkStateInfo& info) {
503
243k
    auto local_state = LocalStateType::create_unique(this, state);
504
243k
    RETURN_IF_ERROR(local_state->init(state, info));
505
243k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
243k
    return Status::OK();
507
243k
}
_ZN5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
74.6k
                                                            LocalSinkStateInfo& info) {
503
74.6k
    auto local_state = LocalStateType::create_unique(this, state);
504
74.6k
    RETURN_IF_ERROR(local_state->init(state, info));
505
74.6k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
74.6k
    return Status::OK();
507
74.6k
}
_ZN5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
280
                                                            LocalSinkStateInfo& info) {
503
280
    auto local_state = LocalStateType::create_unique(this, state);
504
280
    RETURN_IF_ERROR(local_state->init(state, info));
505
280
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
280
    return Status::OK();
507
280
}
_ZN5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
48
                                                            LocalSinkStateInfo& info) {
503
48
    auto local_state = LocalStateType::create_unique(this, state);
504
48
    RETURN_IF_ERROR(local_state->init(state, info));
505
48
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
48
    return Status::OK();
507
48
}
_ZN5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
543k
                                                            LocalSinkStateInfo& info) {
503
543k
    auto local_state = LocalStateType::create_unique(this, state);
504
543k
    RETURN_IF_ERROR(local_state->init(state, info));
505
543k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
543k
    return Status::OK();
507
543k
}
_ZN5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
5.69k
                                                            LocalSinkStateInfo& info) {
503
5.69k
    auto local_state = LocalStateType::create_unique(this, state);
504
5.69k
    RETURN_IF_ERROR(local_state->init(state, info));
505
5.69k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
5.69k
    return Status::OK();
507
5.69k
}
_ZN5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
5.42k
                                                            LocalSinkStateInfo& info) {
503
5.42k
    auto local_state = LocalStateType::create_unique(this, state);
504
5.42k
    RETURN_IF_ERROR(local_state->init(state, info));
505
5.42k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
5.42k
    return Status::OK();
507
5.42k
}
_ZN5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
1.91k
                                                            LocalSinkStateInfo& info) {
503
1.91k
    auto local_state = LocalStateType::create_unique(this, state);
504
1.91k
    RETURN_IF_ERROR(local_state->init(state, info));
505
1.91k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
1.91k
    return Status::OK();
507
1.91k
}
_ZN5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
254
                                                            LocalSinkStateInfo& info) {
503
254
    auto local_state = LocalStateType::create_unique(this, state);
504
254
    RETURN_IF_ERROR(local_state->init(state, info));
505
254
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
254
    return Status::OK();
507
254
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
4.61k
                                                            LocalSinkStateInfo& info) {
503
4.61k
    auto local_state = LocalStateType::create_unique(this, state);
504
4.61k
    RETURN_IF_ERROR(local_state->init(state, info));
505
4.61k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
4.61k
    return Status::OK();
507
4.61k
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
2.46k
                                                            LocalSinkStateInfo& info) {
503
2.46k
    auto local_state = LocalStateType::create_unique(this, state);
504
2.46k
    RETURN_IF_ERROR(local_state->init(state, info));
505
2.46k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
2.46k
    return Status::OK();
507
2.46k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
2.42k
                                                            LocalSinkStateInfo& info) {
503
2.42k
    auto local_state = LocalStateType::create_unique(this, state);
504
2.42k
    RETURN_IF_ERROR(local_state->init(state, info));
505
2.42k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
2.42k
    return Status::OK();
507
2.42k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
2.42k
                                                            LocalSinkStateInfo& info) {
503
2.42k
    auto local_state = LocalStateType::create_unique(this, state);
504
2.42k
    RETURN_IF_ERROR(local_state->init(state, info));
505
2.42k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
2.42k
    return Status::OK();
507
2.42k
}
_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
78
                                                            LocalSinkStateInfo& info) {
503
78
    auto local_state = LocalStateType::create_unique(this, state);
504
78
    RETURN_IF_ERROR(local_state->init(state, info));
505
78
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
78
    return Status::OK();
507
78
}
_ZN5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
151
                                                            LocalSinkStateInfo& info) {
503
151
    auto local_state = LocalStateType::create_unique(this, state);
504
151
    RETURN_IF_ERROR(local_state->init(state, info));
505
151
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
151
    return Status::OK();
507
151
}
_ZN5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
151
                                                            LocalSinkStateInfo& info) {
503
151
    auto local_state = LocalStateType::create_unique(this, state);
504
151
    RETURN_IF_ERROR(local_state->init(state, info));
505
151
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
151
    return Status::OK();
507
151
}
508
509
template <typename LocalStateType>
510
1.34M
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.34M
    } else {
518
1.34M
        auto ss = LocalStateType::SharedStateType::create_shared();
519
1.34M
        ss->id = operator_id();
520
1.34M
        for (auto& dest : dests_id()) {
521
1.33M
            ss->related_op_ids.insert(dest);
522
1.33M
        }
523
1.34M
        return ss;
524
1.34M
    }
525
1.34M
}
_ZNK5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
97.8k
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
97.8k
    } else {
518
97.8k
        auto ss = LocalStateType::SharedStateType::create_shared();
519
97.8k
        ss->id = operator_id();
520
97.8k
        for (auto& dest : dests_id()) {
521
97.6k
            ss->related_op_ids.insert(dest);
522
97.6k
        }
523
97.8k
        return ss;
524
97.8k
    }
525
97.8k
}
_ZNK5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
373k
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
373k
    } else {
518
373k
        auto ss = LocalStateType::SharedStateType::create_shared();
519
373k
        ss->id = operator_id();
520
373k
        for (auto& dest : dests_id()) {
521
373k
            ss->related_op_ids.insert(dest);
522
373k
        }
523
373k
        return ss;
524
373k
    }
525
373k
}
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
377
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
377
    } else {
518
377
        auto ss = LocalStateType::SharedStateType::create_shared();
519
377
        ss->id = operator_id();
520
378
        for (auto& dest : dests_id()) {
521
378
            ss->related_op_ids.insert(dest);
522
378
        }
523
377
        return ss;
524
377
    }
525
377
}
_ZNK5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
40.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
40.4k
    } else {
518
40.4k
        auto ss = LocalStateType::SharedStateType::create_shared();
519
40.4k
        ss->id = operator_id();
520
40.4k
        for (auto& dest : dests_id()) {
521
40.4k
            ss->related_op_ids.insert(dest);
522
40.4k
        }
523
40.4k
        return ss;
524
40.4k
    }
525
40.4k
}
_ZNK5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE19create_shared_stateEv
Line
Count
Source
510
6
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
6
    } else {
518
6
        auto ss = LocalStateType::SharedStateType::create_shared();
519
6
        ss->id = operator_id();
520
6
        for (auto& dest : dests_id()) {
521
6
            ss->related_op_ids.insert(dest);
522
6
        }
523
6
        return ss;
524
6
    }
525
6
}
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.18k
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.18k
    } else {
518
7.18k
        auto ss = LocalStateType::SharedStateType::create_shared();
519
7.18k
        ss->id = operator_id();
520
7.18k
        for (auto& dest : dests_id()) {
521
7.16k
            ss->related_op_ids.insert(dest);
522
7.16k
        }
523
7.18k
        return ss;
524
7.18k
    }
525
7.18k
}
_ZNK5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
48
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
48
    } else {
518
48
        auto ss = LocalStateType::SharedStateType::create_shared();
519
48
        ss->id = operator_id();
520
48
        for (auto& dest : dests_id()) {
521
48
            ss->related_op_ids.insert(dest);
522
48
        }
523
48
        return ss;
524
48
    }
525
48
}
_ZNK5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
192k
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
192k
    } else {
518
192k
        auto ss = LocalStateType::SharedStateType::create_shared();
519
192k
        ss->id = operator_id();
520
192k
        for (auto& dest : dests_id()) {
521
192k
            ss->related_op_ids.insert(dest);
522
192k
        }
523
192k
        return ss;
524
192k
    }
525
192k
}
_ZNK5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
34
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
34
    } else {
518
34
        auto ss = LocalStateType::SharedStateType::create_shared();
519
34
        ss->id = operator_id();
520
34
        for (auto& dest : dests_id()) {
521
34
            ss->related_op_ids.insert(dest);
522
34
        }
523
34
        return ss;
524
34
    }
525
34
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
74.8k
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
74.8k
    } else {
518
74.8k
        auto ss = LocalStateType::SharedStateType::create_shared();
519
74.8k
        ss->id = operator_id();
520
74.8k
        for (auto& dest : dests_id()) {
521
74.8k
            ss->related_op_ids.insert(dest);
522
74.8k
        }
523
74.8k
        return ss;
524
74.8k
    }
525
74.8k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
47
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
47
    } else {
518
47
        auto ss = LocalStateType::SharedStateType::create_shared();
519
47
        ss->id = operator_id();
520
47
        for (auto& dest : dests_id()) {
521
47
            ss->related_op_ids.insert(dest);
522
47
        }
523
47
        return ss;
524
47
    }
525
47
}
_ZNK5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
543k
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
543k
    } else {
518
543k
        auto ss = LocalStateType::SharedStateType::create_shared();
519
543k
        ss->id = operator_id();
520
543k
        for (auto& dest : dests_id()) {
521
541k
            ss->related_op_ids.insert(dest);
522
541k
        }
523
543k
        return ss;
524
543k
    }
525
543k
}
_ZNK5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
5.70k
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.70k
    } else {
518
5.70k
        auto ss = LocalStateType::SharedStateType::create_shared();
519
5.70k
        ss->id = operator_id();
520
5.70k
        for (auto& dest : dests_id()) {
521
5.70k
            ss->related_op_ids.insert(dest);
522
5.70k
        }
523
5.70k
        return ss;
524
5.70k
    }
525
5.70k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
356
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
356
    } else {
518
356
        auto ss = LocalStateType::SharedStateType::create_shared();
519
356
        ss->id = operator_id();
520
356
        for (auto& dest : dests_id()) {
521
356
            ss->related_op_ids.insert(dest);
522
356
        }
523
356
        return ss;
524
356
    }
525
356
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE19create_shared_stateEv
Line
Count
Source
510
2.42k
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.42k
    } else {
518
2.42k
        auto ss = LocalStateType::SharedStateType::create_shared();
519
2.42k
        ss->id = operator_id();
520
2.42k
        for (auto& dest : dests_id()) {
521
2.41k
            ss->related_op_ids.insert(dest);
522
2.41k
        }
523
2.42k
        return ss;
524
2.42k
    }
525
2.42k
}
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE19create_shared_stateEv
Line
Count
Source
510
2.42k
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.42k
    } else {
518
2.42k
        auto ss = LocalStateType::SharedStateType::create_shared();
519
2.42k
        ss->id = operator_id();
520
2.42k
        for (auto& dest : dests_id()) {
521
2.42k
            ss->related_op_ids.insert(dest);
522
2.42k
        }
523
2.42k
        return ss;
524
2.42k
    }
525
2.42k
}
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
78
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
78
    } else {
518
78
        auto ss = LocalStateType::SharedStateType::create_shared();
519
78
        ss->id = operator_id();
520
78
        for (auto& dest : dests_id()) {
521
77
            ss->related_op_ids.insert(dest);
522
77
        }
523
78
        return ss;
524
78
    }
525
78
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE19create_shared_stateEv
526
527
template <typename LocalStateType>
528
2.09M
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
2.09M
    auto local_state = LocalStateType::create_unique(state, this);
530
2.09M
    RETURN_IF_ERROR(local_state->init(state, info));
531
2.09M
    state->emplace_local_state(operator_id(), std::move(local_state));
532
2.09M
    return Status::OK();
533
2.09M
}
_ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
61.3k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
61.3k
    auto local_state = LocalStateType::create_unique(state, this);
530
61.3k
    RETURN_IF_ERROR(local_state->init(state, info));
531
61.3k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
61.3k
    return Status::OK();
533
61.3k
}
_ZN5doris9OperatorXINS_18OlapScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
217k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
217k
    auto local_state = LocalStateType::create_unique(state, this);
530
217k
    RETURN_IF_ERROR(local_state->init(state, info));
531
217k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
217k
    return Status::OK();
533
217k
}
_ZN5doris9OperatorXINS_21GroupCommitLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
78
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
78
    auto local_state = LocalStateType::create_unique(state, this);
530
78
    RETURN_IF_ERROR(local_state->init(state, info));
531
78
    state->emplace_local_state(operator_id(), std::move(local_state));
532
78
    return Status::OK();
533
78
}
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.14k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
7.14k
    auto local_state = LocalStateType::create_unique(state, this);
530
7.14k
    RETURN_IF_ERROR(local_state->init(state, info));
531
7.14k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
7.14k
    return Status::OK();
533
7.14k
}
_ZN5doris9OperatorXINS_14SortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
7.24k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
7.24k
    auto local_state = LocalStateType::create_unique(state, this);
530
7.24k
    RETURN_IF_ERROR(local_state->init(state, info));
531
7.24k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
7.24k
    return Status::OK();
533
7.24k
}
_ZN5doris9OperatorXINS_19SpillSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
26
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
26
    auto local_state = LocalStateType::create_unique(state, this);
530
26
    RETURN_IF_ERROR(local_state->init(state, info));
531
26
    state->emplace_local_state(operator_id(), std::move(local_state));
532
26
    return Status::OK();
533
26
}
_ZN5doris9OperatorXINS_24LocalMergeSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
183k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
183k
    auto local_state = LocalStateType::create_unique(state, this);
530
183k
    RETURN_IF_ERROR(local_state->init(state, info));
531
183k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
183k
    return Status::OK();
533
183k
}
_ZN5doris9OperatorXINS_13AggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
74.4k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
74.4k
    auto local_state = LocalStateType::create_unique(state, this);
530
74.4k
    RETURN_IF_ERROR(local_state->init(state, info));
531
74.4k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
74.4k
    return Status::OK();
533
74.4k
}
_ZN5doris9OperatorXINS_21BucketedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
350
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
350
    auto local_state = LocalStateType::create_unique(state, this);
530
350
    RETURN_IF_ERROR(local_state->init(state, info));
531
350
    state->emplace_local_state(operator_id(), std::move(local_state));
532
350
    return Status::OK();
533
350
}
_ZN5doris9OperatorXINS_24PartitionedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
38
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
38
    auto local_state = LocalStateType::create_unique(state, this);
530
38
    RETURN_IF_ERROR(local_state->init(state, info));
531
38
    state->emplace_local_state(operator_id(), std::move(local_state));
532
38
    return Status::OK();
533
38
}
_ZN5doris9OperatorXINS_23TableFunctionLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
3.84k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
3.84k
    auto local_state = LocalStateType::create_unique(state, this);
530
3.84k
    RETURN_IF_ERROR(local_state->init(state, info));
531
3.84k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
3.84k
    return Status::OK();
533
3.84k
}
_ZN5doris9OperatorXINS_18ExchangeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
341k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
341k
    auto local_state = LocalStateType::create_unique(state, this);
530
341k
    RETURN_IF_ERROR(local_state->init(state, info));
531
341k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
341k
    return Status::OK();
533
341k
}
_ZN5doris9OperatorXINS_16RepeatLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
1.08k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
1.08k
    auto local_state = LocalStateType::create_unique(state, this);
530
1.08k
    RETURN_IF_ERROR(local_state->init(state, info));
531
1.08k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
1.08k
    return Status::OK();
533
1.08k
}
_ZN5doris9OperatorXINS_29NestedLoopJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
5.68k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
5.68k
    auto local_state = LocalStateType::create_unique(state, this);
530
5.68k
    RETURN_IF_ERROR(local_state->init(state, info));
531
5.68k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
5.68k
    return Status::OK();
533
5.68k
}
_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.43k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
1.43k
    auto local_state = LocalStateType::create_unique(state, this);
530
1.43k
    RETURN_IF_ERROR(local_state->init(state, info));
531
1.43k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
1.43k
    return Status::OK();
533
1.43k
}
_ZN5doris9OperatorXINS_21UnionSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
50.6k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
50.6k
    auto local_state = LocalStateType::create_unique(state, this);
530
50.6k
    RETURN_IF_ERROR(local_state->init(state, info));
531
50.6k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
50.6k
    return Status::OK();
533
50.6k
}
_ZN5doris9OperatorXINS_35MultiCastDataStreamSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
4.38k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
4.38k
    auto local_state = LocalStateType::create_unique(state, this);
530
4.38k
    RETURN_IF_ERROR(local_state->init(state, info));
531
4.38k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
4.38k
    return Status::OK();
533
4.38k
}
_ZN5doris9OperatorXINS_29PartitionSortSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
252
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
252
    auto local_state = LocalStateType::create_unique(state, this);
530
252
    RETURN_IF_ERROR(local_state->init(state, info));
531
252
    state->emplace_local_state(operator_id(), std::move(local_state));
532
252
    return Status::OK();
533
252
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
2.44k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
2.44k
    auto local_state = LocalStateType::create_unique(state, this);
530
2.44k
    RETURN_IF_ERROR(local_state->init(state, info));
531
2.44k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
2.44k
    return Status::OK();
533
2.44k
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
2.44k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
2.44k
    auto local_state = LocalStateType::create_unique(state, this);
530
2.44k
    RETURN_IF_ERROR(local_state->init(state, info));
531
2.44k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
2.44k
    return Status::OK();
533
2.44k
}
_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.92k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
4.92k
    auto local_state = LocalStateType::create_unique(state, this);
530
4.92k
    RETURN_IF_ERROR(local_state->init(state, info));
531
4.92k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
4.92k
    return Status::OK();
533
4.92k
}
_ZN5doris9OperatorXINS_29LocalExchangeSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
634k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
634k
    auto local_state = LocalStateType::create_unique(state, this);
530
634k
    RETURN_IF_ERROR(local_state->init(state, info));
531
634k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
634k
    return Status::OK();
533
634k
}
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
655
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
655
    auto local_state = LocalStateType::create_unique(state, this);
530
655
    RETURN_IF_ERROR(local_state->init(state, info));
531
655
    state->emplace_local_state(operator_id(), std::move(local_state));
532
655
    return Status::OK();
533
655
}
_ZN5doris9OperatorXINS_16SelectLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
729
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
729
    auto local_state = LocalStateType::create_unique(state, this);
530
729
    RETURN_IF_ERROR(local_state->init(state, info));
531
729
    state->emplace_local_state(operator_id(), std::move(local_state));
532
729
    return Status::OK();
533
729
}
_ZN5doris9OperatorXINS_22StreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
4.78k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
4.78k
    auto local_state = LocalStateType::create_unique(state, this);
530
4.78k
    RETURN_IF_ERROR(local_state->init(state, info));
531
4.78k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
4.78k
    return Status::OK();
533
4.78k
}
_ZN5doris9OperatorXINS_30DistinctStreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
475k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
475k
    auto local_state = LocalStateType::create_unique(state, this);
530
475k
    RETURN_IF_ERROR(local_state->init(state, info));
531
475k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
475k
    return Status::OK();
533
475k
}
534
535
PipelineXSinkLocalStateBase::PipelineXSinkLocalStateBase(DataSinkOperatorXBase* parent,
536
                                                         RuntimeState* state)
537
1.61M
        : _parent(parent), _state(state) {}
538
539
PipelineXLocalStateBase::PipelineXLocalStateBase(RuntimeState* state, OperatorXBase* parent)
540
2.08M
        : _num_rows_returned(0),
541
2.08M
          _rows_returned_counter(nullptr),
542
2.08M
          _parent(parent),
543
2.08M
          _state(state),
544
2.08M
          _budget(state->batch_size(), state->preferred_block_size_bytes()) {}
545
546
template <typename SharedStateArg>
547
2.09M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
2.09M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
2.09M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
2.09M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
2.09M
    _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
2.09M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
2.09M
    _operator_profile->add_child(_common_profile.get(), true);
556
2.09M
    _operator_profile->add_child(_custom_profile.get(), true);
557
2.09M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
2.09M
    if constexpr (!is_fake_shared) {
559
1.04M
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
560
640k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
561
640k
                                    .first.get()
562
640k
                                    ->template cast<SharedStateArg>();
563
564
640k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
565
640k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
566
640k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
567
640k
        } else if (info.shared_state) {
568
331k
            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
331k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
331k
            _dependency = _shared_state->create_source_dependency(
575
331k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
331k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
331k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
331k
        } else {
579
69.1k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
9.40k
                DCHECK(false);
581
9.40k
            }
582
69.1k
        }
583
1.04M
    }
584
585
2.09M
    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
2.09M
    _rows_returned_counter =
590
2.09M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
2.09M
    _blocks_returned_counter =
592
2.09M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
2.09M
    _output_block_bytes_counter =
594
2.09M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
2.09M
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
2.09M
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
2.09M
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
2.09M
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
2.09M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
2.09M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
2.09M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
2.09M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
2.09M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
2.09M
    _memory_used_counter =
605
2.09M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
2.09M
    _common_profile->add_info_string("IsColocate",
607
2.09M
                                     std::to_string(_parent->is_colocated_operator()));
608
2.09M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
2.09M
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
2.09M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
2.09M
    return Status::OK();
612
2.09M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
61.4k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
61.4k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
61.4k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
61.4k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
61.4k
    _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
61.4k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
61.4k
    _operator_profile->add_child(_common_profile.get(), true);
556
61.4k
    _operator_profile->add_child(_custom_profile.get(), true);
557
61.4k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
61.4k
    if constexpr (!is_fake_shared) {
559
61.4k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
560
11.6k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
561
11.6k
                                    .first.get()
562
11.6k
                                    ->template cast<SharedStateArg>();
563
564
11.6k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
565
11.6k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
566
11.6k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
567
49.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
49.2k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
49.2k
            _dependency = _shared_state->create_source_dependency(
575
49.2k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
49.2k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
49.2k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
49.2k
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
636
        }
583
61.4k
    }
584
585
61.4k
    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
61.4k
    _rows_returned_counter =
590
61.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
61.4k
    _blocks_returned_counter =
592
61.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
61.4k
    _output_block_bytes_counter =
594
61.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
61.4k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
61.4k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
61.4k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
61.4k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
61.4k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
61.4k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
61.4k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
61.4k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
61.4k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
61.4k
    _memory_used_counter =
605
61.4k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
61.4k
    _common_profile->add_info_string("IsColocate",
607
61.4k
                                     std::to_string(_parent->is_colocated_operator()));
608
61.4k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
61.4k
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
61.4k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
61.4k
    return Status::OK();
612
61.4k
}
_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
192k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
192k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
192k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
192k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
192k
    _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
192k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
192k
    _operator_profile->add_child(_common_profile.get(), true);
556
192k
    _operator_profile->add_child(_custom_profile.get(), true);
557
192k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
192k
    if constexpr (!is_fake_shared) {
559
192k
        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
192k
        } 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
183k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
183k
            _dependency = _shared_state->create_source_dependency(
575
183k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
183k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
183k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
183k
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
9.19k
        }
583
192k
    }
584
585
192k
    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
192k
    _rows_returned_counter =
590
192k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
192k
    _blocks_returned_counter =
592
192k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
192k
    _output_block_bytes_counter =
594
192k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
192k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
192k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
192k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
192k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
192k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
192k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
192k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
192k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
192k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
192k
    _memory_used_counter =
605
192k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
192k
    _common_profile->add_info_string("IsColocate",
607
192k
                                     std::to_string(_parent->is_colocated_operator()));
608
192k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
192k
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
192k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
192k
    return Status::OK();
612
192k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
26
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
26
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
26
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
26
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
26
    _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
26
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
26
    _operator_profile->add_child(_common_profile.get(), true);
556
26
    _operator_profile->add_child(_custom_profile.get(), true);
557
26
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
26
    if constexpr (!is_fake_shared) {
559
26
        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
26
        } 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
26
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
26
            _dependency = _shared_state->create_source_dependency(
575
26
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
26
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
26
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
26
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
0
        }
583
26
    }
584
585
26
    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
26
    _rows_returned_counter =
590
26
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
26
    _blocks_returned_counter =
592
26
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
26
    _output_block_bytes_counter =
594
26
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
26
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
26
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
26
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
26
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
26
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
26
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
26
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
26
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
26
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
26
    _memory_used_counter =
605
26
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
26
    _common_profile->add_info_string("IsColocate",
607
26
                                     std::to_string(_parent->is_colocated_operator()));
608
26
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
26
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
26
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
26
    return Status::OK();
612
26
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
5.68k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
5.68k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
5.68k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
5.68k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
5.68k
    _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.68k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
5.68k
    _operator_profile->add_child(_common_profile.get(), true);
556
5.68k
    _operator_profile->add_child(_custom_profile.get(), true);
557
5.68k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
5.68k
    if constexpr (!is_fake_shared) {
559
5.68k
        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.68k
        } 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.62k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
5.62k
            _dependency = _shared_state->create_source_dependency(
575
5.62k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
5.62k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
5.62k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
5.62k
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
62
        }
583
5.68k
    }
584
585
5.68k
    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.68k
    _rows_returned_counter =
590
5.68k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
5.68k
    _blocks_returned_counter =
592
5.68k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
5.68k
    _output_block_bytes_counter =
594
5.68k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
5.68k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
5.68k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
5.68k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
5.68k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
5.68k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
5.68k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
5.68k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
5.68k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
5.68k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
5.68k
    _memory_used_counter =
605
5.68k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
5.68k
    _common_profile->add_info_string("IsColocate",
607
5.68k
                                     std::to_string(_parent->is_colocated_operator()));
608
5.68k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
5.68k
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
5.68k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
5.68k
    return Status::OK();
612
5.68k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
7.17k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
7.17k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
7.17k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
7.17k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
7.17k
    _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.17k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
7.17k
    _operator_profile->add_child(_common_profile.get(), true);
556
7.17k
    _operator_profile->add_child(_custom_profile.get(), true);
557
7.17k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
7.17k
    if constexpr (!is_fake_shared) {
559
7.17k
        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.17k
        } 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.11k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
7.11k
            _dependency = _shared_state->create_source_dependency(
575
7.11k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
7.11k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
7.11k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
7.11k
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
67
        }
583
7.17k
    }
584
585
7.17k
    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.17k
    _rows_returned_counter =
590
7.17k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
7.17k
    _blocks_returned_counter =
592
7.17k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
7.17k
    _output_block_bytes_counter =
594
7.17k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
7.17k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
7.17k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
7.17k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
7.17k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
7.17k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
7.17k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
7.17k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
7.17k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
7.17k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
7.17k
    _memory_used_counter =
605
7.17k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
7.17k
    _common_profile->add_info_string("IsColocate",
607
7.17k
                                     std::to_string(_parent->is_colocated_operator()));
608
7.17k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
7.17k
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
7.17k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
7.17k
    return Status::OK();
612
7.17k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
74.7k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
74.7k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
74.7k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
74.7k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
74.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
74.7k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
74.7k
    _operator_profile->add_child(_common_profile.get(), true);
556
74.7k
    _operator_profile->add_child(_custom_profile.get(), true);
557
74.7k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
74.7k
    if constexpr (!is_fake_shared) {
559
74.7k
        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
74.7k
        } 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.0k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
73.0k
            _dependency = _shared_state->create_source_dependency(
575
73.0k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
73.0k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
73.0k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
73.0k
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
1.65k
        }
583
74.7k
    }
584
585
74.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
74.7k
    _rows_returned_counter =
590
74.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
74.7k
    _blocks_returned_counter =
592
74.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
74.7k
    _output_block_bytes_counter =
594
74.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
74.7k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
74.7k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
74.7k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
74.7k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
74.7k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
74.7k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
74.7k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
74.7k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
74.7k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
74.7k
    _memory_used_counter =
605
74.7k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
74.7k
    _common_profile->add_info_string("IsColocate",
607
74.7k
                                     std::to_string(_parent->is_colocated_operator()));
608
74.7k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
74.7k
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
74.7k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
74.7k
    return Status::OK();
612
74.7k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
355
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
355
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
355
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
355
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
355
    _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
355
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
355
    _operator_profile->add_child(_common_profile.get(), true);
556
355
    _operator_profile->add_child(_custom_profile.get(), true);
557
355
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
355
    if constexpr (!is_fake_shared) {
559
355
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
560
352
            _shared_state = info.shared_state_map.at(_parent->operator_id())
561
352
                                    .first.get()
562
352
                                    ->template cast<SharedStateArg>();
563
564
352
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
565
352
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
566
352
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
567
352
        } 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
3
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
3
        }
583
355
    }
584
585
355
    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
355
    _rows_returned_counter =
590
355
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
355
    _blocks_returned_counter =
592
355
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
355
    _output_block_bytes_counter =
594
355
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
355
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
355
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
355
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
355
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
355
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
355
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
355
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
355
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
355
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
355
    _memory_used_counter =
605
355
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
355
    _common_profile->add_info_string("IsColocate",
607
355
                                     std::to_string(_parent->is_colocated_operator()));
608
355
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
355
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
355
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
355
    return Status::OK();
612
355
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
38
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
38
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
38
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
38
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
38
    _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
38
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
38
    _operator_profile->add_child(_common_profile.get(), true);
556
38
    _operator_profile->add_child(_custom_profile.get(), true);
557
38
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
38
    if constexpr (!is_fake_shared) {
559
38
        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
38
        } 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
38
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
38
            _dependency = _shared_state->create_source_dependency(
575
38
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
38
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
38
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
38
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
0
        }
583
38
    }
584
585
38
    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
38
    _rows_returned_counter =
590
38
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
38
    _blocks_returned_counter =
592
38
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
38
    _output_block_bytes_counter =
594
38
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
38
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
38
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
38
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
38
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
38
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
38
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
38
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
38
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
38
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
38
    _memory_used_counter =
605
38
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
38
    _common_profile->add_info_string("IsColocate",
607
38
                                     std::to_string(_parent->is_colocated_operator()));
608
38
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
38
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
38
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
38
    return Status::OK();
612
38
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
1.05M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
1.05M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
1.05M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
1.05M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
1.05M
    _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.05M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
1.05M
    _operator_profile->add_child(_common_profile.get(), true);
556
1.05M
    _operator_profile->add_child(_custom_profile.get(), true);
557
1.05M
    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
1.05M
    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.05M
    _rows_returned_counter =
590
1.05M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
1.05M
    _blocks_returned_counter =
592
1.05M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
1.05M
    _output_block_bytes_counter =
594
1.05M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
1.05M
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
1.05M
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
1.05M
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
1.05M
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
1.05M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
1.05M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
1.05M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
1.05M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
1.05M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
1.05M
    _memory_used_counter =
605
1.05M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
1.05M
    _common_profile->add_info_string("IsColocate",
607
1.05M
                                     std::to_string(_parent->is_colocated_operator()));
608
1.05M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
1.05M
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
1.05M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
1.05M
    return Status::OK();
612
1.05M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
50.6k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
50.6k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
50.6k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
50.6k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
50.6k
    _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.6k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
50.6k
    _operator_profile->add_child(_common_profile.get(), true);
556
50.6k
    _operator_profile->add_child(_custom_profile.get(), true);
557
50.6k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
50.6k
    if constexpr (!is_fake_shared) {
559
50.6k
        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.6k
        } 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
2.55k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
2.55k
            _dependency = _shared_state->create_source_dependency(
575
2.55k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
2.55k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
2.55k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
48.0k
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
48.0k
        }
583
50.6k
    }
584
585
50.6k
    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.6k
    _rows_returned_counter =
590
50.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
50.6k
    _blocks_returned_counter =
592
50.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
50.6k
    _output_block_bytes_counter =
594
50.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
50.6k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
50.6k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
50.6k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
50.6k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
50.6k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
50.6k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
50.6k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
50.6k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
50.6k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
50.6k
    _memory_used_counter =
605
50.6k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
50.6k
    _common_profile->add_info_string("IsColocate",
607
50.6k
                                     std::to_string(_parent->is_colocated_operator()));
608
50.6k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
50.6k
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
50.6k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
50.6k
    return Status::OK();
612
50.6k
}
_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.38k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
4.38k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
4.38k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
4.38k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
4.38k
    _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.38k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
4.38k
    _operator_profile->add_child(_common_profile.get(), true);
556
4.38k
    _operator_profile->add_child(_custom_profile.get(), true);
557
4.38k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
4.38k
    if constexpr (!is_fake_shared) {
559
4.38k
        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.38k
        } 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.37k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
4.37k
            _dependency = _shared_state->create_source_dependency(
575
4.37k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
4.37k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
4.37k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
4.37k
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
9
        }
583
4.38k
    }
584
585
4.38k
    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.38k
    _rows_returned_counter =
590
4.38k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
4.38k
    _blocks_returned_counter =
592
4.38k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
4.38k
    _output_block_bytes_counter =
594
4.38k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
4.38k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
4.38k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
4.38k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
4.38k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
4.38k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
4.38k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
4.38k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
4.38k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
4.38k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
4.38k
    _memory_used_counter =
605
4.38k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
4.38k
    _common_profile->add_info_string("IsColocate",
607
4.38k
                                     std::to_string(_parent->is_colocated_operator()));
608
4.38k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
4.38k
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
4.38k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
4.38k
    return Status::OK();
612
4.38k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
356
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
356
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
356
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
356
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
356
    _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
356
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
356
    _operator_profile->add_child(_common_profile.get(), true);
556
356
    _operator_profile->add_child(_custom_profile.get(), true);
557
356
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
356
    if constexpr (!is_fake_shared) {
559
356
        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
356
        } 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
354
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
354
            _dependency = _shared_state->create_source_dependency(
575
354
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
354
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
354
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
354
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
2
        }
583
356
    }
584
585
356
    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
356
    _rows_returned_counter =
590
356
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
356
    _blocks_returned_counter =
592
356
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
356
    _output_block_bytes_counter =
594
356
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
356
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
356
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
356
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
356
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
356
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
356
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
356
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
356
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
356
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
356
    _memory_used_counter =
605
356
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
356
    _common_profile->add_info_string("IsColocate",
607
356
                                     std::to_string(_parent->is_colocated_operator()));
608
356
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
356
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
356
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
356
    return Status::OK();
612
356
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
4.90k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
4.90k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
4.90k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
4.90k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
4.90k
    _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.90k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
4.90k
    _operator_profile->add_child(_common_profile.get(), true);
556
4.90k
    _operator_profile->add_child(_custom_profile.get(), true);
557
4.90k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
4.90k
    if constexpr (!is_fake_shared) {
559
4.90k
        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.90k
        } 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.88k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
4.88k
            _dependency = _shared_state->create_source_dependency(
575
4.88k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
4.88k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
4.88k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
4.88k
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
20
        }
583
4.90k
    }
584
585
4.90k
    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.90k
    _rows_returned_counter =
590
4.90k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
4.90k
    _blocks_returned_counter =
592
4.90k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
4.90k
    _output_block_bytes_counter =
594
4.90k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
4.90k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
4.90k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
4.90k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
4.90k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
4.90k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
4.90k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
4.90k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
4.90k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
4.90k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
4.90k
    _memory_used_counter =
605
4.90k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
4.90k
    _common_profile->add_info_string("IsColocate",
607
4.90k
                                     std::to_string(_parent->is_colocated_operator()));
608
4.90k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
4.90k
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
4.90k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
4.90k
    return Status::OK();
612
4.90k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
638k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
638k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
638k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
638k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
638k
    _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
638k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
638k
    _operator_profile->add_child(_common_profile.get(), true);
556
638k
    _operator_profile->add_child(_custom_profile.get(), true);
557
638k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
638k
    if constexpr (!is_fake_shared) {
559
638k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
560
628k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
561
628k
                                    .first.get()
562
628k
                                    ->template cast<SharedStateArg>();
563
564
628k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
565
628k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
566
628k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
567
628k
        } 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
9.40k
        } else {
579
9.40k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
9.40k
                DCHECK(false);
581
9.40k
            }
582
9.40k
        }
583
638k
    }
584
585
638k
    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
638k
    _rows_returned_counter =
590
638k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
638k
    _blocks_returned_counter =
592
638k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
638k
    _output_block_bytes_counter =
594
638k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
638k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
638k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
638k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
638k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
638k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
638k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
638k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
638k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
638k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
638k
    _memory_used_counter =
605
638k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
638k
    _common_profile->add_info_string("IsColocate",
607
638k
                                     std::to_string(_parent->is_colocated_operator()));
608
638k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
638k
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
638k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
638k
    return Status::OK();
612
638k
}
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
151
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
151
            _dependency = _shared_state->create_source_dependency(
575
151
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
151
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
151
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
151
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
0
        }
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
2.10M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
2.10M
    _conjuncts.resize(_parent->_conjuncts.size());
617
2.10M
    _projections.resize(_parent->_projections.size());
618
2.38M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
275k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
275k
    }
621
3.87M
    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
2.10M
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
2.11M
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
626
5.68k
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
627
36.2k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
628
30.5k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
629
30.5k
                    state, _intermediate_projections[i][j]));
630
30.5k
        }
631
5.68k
    }
632
2.10M
    return Status::OK();
633
2.10M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
61.5k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
61.5k
    _conjuncts.resize(_parent->_conjuncts.size());
617
61.5k
    _projections.resize(_parent->_projections.size());
618
62.8k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
1.23k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1.23k
    }
621
329k
    for (size_t i = 0; i < _projections.size(); i++) {
622
267k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
267k
    }
624
61.5k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
62.0k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
626
492
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
627
4.46k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
628
3.96k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
629
3.96k
                    state, _intermediate_projections[i][j]));
630
3.96k
        }
631
492
    }
632
61.5k
    return Status::OK();
633
61.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
193k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
193k
    _conjuncts.resize(_parent->_conjuncts.size());
617
193k
    _projections.resize(_parent->_projections.size());
618
193k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
193k
    for (size_t i = 0; i < _projections.size(); i++) {
622
283
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
283
    }
624
193k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
193k
    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
193k
    return Status::OK();
633
193k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
26
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
26
    _conjuncts.resize(_parent->_conjuncts.size());
617
26
    _projections.resize(_parent->_projections.size());
618
26
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
26
    for (size_t i = 0; i < _projections.size(); i++) {
622
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
0
    }
624
26
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
26
    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
26
    return Status::OK();
633
26
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
5.70k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
5.70k
    _conjuncts.resize(_parent->_conjuncts.size());
617
5.70k
    _projections.resize(_parent->_projections.size());
618
5.81k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
105
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
105
    }
621
27.2k
    for (size_t i = 0; i < _projections.size(); i++) {
622
21.5k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
21.5k
    }
624
5.70k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
5.72k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
626
16
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
627
158
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
628
142
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
629
142
                    state, _intermediate_projections[i][j]));
630
142
        }
631
16
    }
632
5.70k
    return Status::OK();
633
5.70k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
7.18k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
7.18k
    _conjuncts.resize(_parent->_conjuncts.size());
617
7.18k
    _projections.resize(_parent->_projections.size());
618
7.91k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
730
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
730
    }
621
19.9k
    for (size_t i = 0; i < _projections.size(); i++) {
622
12.7k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
12.7k
    }
624
7.18k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
7.26k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
626
85
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
627
646
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
628
561
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
629
561
                    state, _intermediate_projections[i][j]));
630
561
        }
631
85
    }
632
7.18k
    return Status::OK();
633
7.18k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
74.8k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
74.8k
    _conjuncts.resize(_parent->_conjuncts.size());
617
74.8k
    _projections.resize(_parent->_projections.size());
618
75.9k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
1.04k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1.04k
    }
621
275k
    for (size_t i = 0; i < _projections.size(); i++) {
622
200k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
200k
    }
624
74.8k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
75.0k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
626
174
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
627
1.30k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
628
1.13k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
629
1.13k
                    state, _intermediate_projections[i][j]));
630
1.13k
        }
631
174
    }
632
74.8k
    return Status::OK();
633
74.8k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
355
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
355
    _conjuncts.resize(_parent->_conjuncts.size());
617
355
    _projections.resize(_parent->_projections.size());
618
373
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
18
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
18
    }
621
1.64k
    for (size_t i = 0; i < _projections.size(); i++) {
622
1.29k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
1.29k
    }
624
355
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
355
    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
355
    return Status::OK();
633
355
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
42
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
42
    _conjuncts.resize(_parent->_conjuncts.size());
617
42
    _projections.resize(_parent->_projections.size());
618
42
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
84
    for (size_t i = 0; i < _projections.size(); i++) {
622
42
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
42
    }
624
42
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
42
    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
42
    return Status::OK();
633
42
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
1.06M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
1.06M
    _conjuncts.resize(_parent->_conjuncts.size());
617
1.06M
    _projections.resize(_parent->_projections.size());
618
1.33M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
271k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
271k
    }
621
2.23M
    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
1.06M
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
1.06M
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
626
4.91k
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
627
29.6k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
628
24.7k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
629
24.7k
                    state, _intermediate_projections[i][j]));
630
24.7k
        }
631
4.91k
    }
632
1.06M
    return Status::OK();
633
1.06M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
50.8k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
50.8k
    _conjuncts.resize(_parent->_conjuncts.size());
617
50.8k
    _projections.resize(_parent->_projections.size());
618
50.8k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
134k
    for (size_t i = 0; i < _projections.size(); i++) {
622
83.5k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
83.5k
    }
624
50.8k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
50.8k
    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.8k
    return Status::OK();
633
50.8k
}
_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.38k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
4.38k
    _conjuncts.resize(_parent->_conjuncts.size());
617
4.38k
    _projections.resize(_parent->_projections.size());
618
4.93k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
552
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
552
    }
621
4.38k
    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.38k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
4.38k
    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.38k
    return Status::OK();
633
4.38k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
356
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
356
    _conjuncts.resize(_parent->_conjuncts.size());
617
356
    _projections.resize(_parent->_projections.size());
618
356
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
356
    for (size_t i = 0; i < _projections.size(); i++) {
622
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
0
    }
624
356
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
356
    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
356
    return Status::OK();
633
356
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
4.90k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
4.90k
    _conjuncts.resize(_parent->_conjuncts.size());
617
4.90k
    _projections.resize(_parent->_projections.size());
618
4.90k
    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.90k
    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.90k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
4.90k
    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.90k
    return Status::OK();
633
4.90k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
640k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
640k
    _conjuncts.resize(_parent->_conjuncts.size());
617
640k
    _projections.resize(_parent->_projections.size());
618
640k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
640k
    for (size_t i = 0; i < _projections.size(); i++) {
622
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
0
    }
624
640k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
640k
    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
640k
    return Status::OK();
633
640k
}
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
3.25k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
637
3.25k
    if (_terminated) {
638
0
        return Status::OK();
639
0
    }
640
3.25k
    _terminated = true;
641
3.25k
    return Status::OK();
642
3.25k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
636
153
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
637
153
    if (_terminated) {
638
0
        return Status::OK();
639
0
    }
640
153
    _terminated = true;
641
153
    return Status::OK();
642
153
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
636
36
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
637
36
    if (_terminated) {
638
0
        return Status::OK();
639
0
    }
640
36
    _terminated = true;
641
36
    return Status::OK();
642
36
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
636
18
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
637
18
    if (_terminated) {
638
0
        return Status::OK();
639
0
    }
640
18
    _terminated = true;
641
18
    return Status::OK();
642
18
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
636
204
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
637
204
    if (_terminated) {
638
0
        return Status::OK();
639
0
    }
640
204
    _terminated = true;
641
204
    return Status::OK();
642
204
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
636
2.25k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
637
2.25k
    if (_terminated) {
638
0
        return Status::OK();
639
0
    }
640
2.25k
    _terminated = true;
641
2.25k
    return Status::OK();
642
2.25k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
636
10
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
637
10
    if (_terminated) {
638
0
        return Status::OK();
639
0
    }
640
10
    _terminated = true;
641
10
    return Status::OK();
642
10
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
636
2
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
637
2
    if (_terminated) {
638
0
        return Status::OK();
639
0
    }
640
2
    _terminated = true;
641
2
    return Status::OK();
642
2
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
636
1
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
637
1
    if (_terminated) {
638
0
        return Status::OK();
639
0
    }
640
1
    _terminated = true;
641
1
    return Status::OK();
642
1
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
636
555
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
637
555
    if (_terminated) {
638
0
        return Status::OK();
639
0
    }
640
555
    _terminated = true;
641
555
    return Status::OK();
642
555
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
636
19
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
637
19
    if (_terminated) {
638
0
        return Status::OK();
639
0
    }
640
19
    _terminated = true;
641
19
    return Status::OK();
642
19
}
643
644
template <typename SharedStateArg>
645
2.32M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
2.32M
    if (_closed) {
647
218k
        return Status::OK();
648
218k
    }
649
2.10M
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
1.04M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
1.04M
    }
652
2.10M
    _closed = true;
653
2.10M
    return Status::OK();
654
2.32M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
61.4k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
61.4k
    if (_closed) {
647
0
        return Status::OK();
648
0
    }
649
61.4k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
61.4k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
61.4k
    }
652
61.4k
    _closed = true;
653
61.4k
    return Status::OK();
654
61.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
383k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
383k
    if (_closed) {
647
192k
        return Status::OK();
648
192k
    }
649
191k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
191k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
191k
    }
652
191k
    _closed = true;
653
191k
    return Status::OK();
654
383k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
26
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
26
    if (_closed) {
647
0
        return Status::OK();
648
0
    }
649
26
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
26
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
26
    }
652
26
    _closed = true;
653
26
    return Status::OK();
654
26
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
5.70k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
5.70k
    if (_closed) {
647
0
        return Status::OK();
648
0
    }
649
5.70k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
5.70k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
5.70k
    }
652
5.70k
    _closed = true;
653
5.70k
    return Status::OK();
654
5.70k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
14.5k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
14.5k
    if (_closed) {
647
7.35k
        return Status::OK();
648
7.35k
    }
649
7.16k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
7.16k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
7.16k
    }
652
7.16k
    _closed = true;
653
7.16k
    return Status::OK();
654
14.5k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
74.7k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
74.7k
    if (_closed) {
647
0
        return Status::OK();
648
0
    }
649
74.7k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
74.7k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
74.7k
    }
652
74.7k
    _closed = true;
653
74.7k
    return Status::OK();
654
74.7k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
355
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
355
    if (_closed) {
647
0
        return Status::OK();
648
0
    }
649
355
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
355
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
355
    }
652
355
    _closed = true;
653
355
    return Status::OK();
654
355
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
37
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
37
    if (_closed) {
647
0
        return Status::OK();
648
0
    }
649
37
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
37
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
37
    }
652
37
    _closed = true;
653
37
    return Status::OK();
654
37
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
1.07M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
1.07M
    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
1.06M
    _closed = true;
653
1.06M
    return Status::OK();
654
1.07M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
50.8k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
50.8k
    if (_closed) {
647
0
        return Status::OK();
648
0
    }
649
50.8k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
50.8k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
50.8k
    }
652
50.8k
    _closed = true;
653
50.8k
    return Status::OK();
654
50.8k
}
_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.37k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
4.37k
    if (_closed) {
647
0
        return Status::OK();
648
0
    }
649
4.37k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
4.37k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
4.37k
    }
652
4.37k
    _closed = true;
653
4.37k
    return Status::OK();
654
4.37k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
507
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
507
    if (_closed) {
647
253
        return Status::OK();
648
253
    }
649
254
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
254
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
254
    }
652
254
    _closed = true;
653
254
    return Status::OK();
654
507
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
9.85k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
9.85k
    if (_closed) {
647
4.96k
        return Status::OK();
648
4.96k
    }
649
4.89k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
4.89k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
4.89k
    }
652
4.89k
    _closed = true;
653
4.89k
    return Status::OK();
654
9.85k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
641k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
641k
    if (_closed) {
647
0
        return Status::OK();
648
0
    }
649
641k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
641k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
641k
    }
652
641k
    _closed = true;
653
641k
    return Status::OK();
654
641k
}
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.61M
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
1.61M
    _operator_profile =
660
1.61M
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
1.61M
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
1.61M
    _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.61M
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
1.61M
    _operator_profile->add_child(_common_profile, true);
669
1.61M
    _operator_profile->add_child(_custom_profile, true);
670
671
1.61M
    _operator_profile->set_metadata(_parent->node_id());
672
1.61M
    _wait_for_finish_dependency_timer =
673
1.61M
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
1.61M
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
1.61M
    if constexpr (!is_fake_shared) {
676
1.06M
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
1.06M
            info.shared_state_map.end()) {
678
255k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
679
243k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
680
243k
            }
681
255k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
682
255k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
683
255k
                                                  ? 0
684
255k
                                                  : info.task_idx]
685
255k
                                  .get();
686
255k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
687
813k
        } else {
688
813k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
302
                DCHECK(false);
690
302
            }
691
813k
            _shared_state = info.shared_state->template cast<SharedState>();
692
813k
            _dependency = _shared_state->create_sink_dependency(
693
813k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
813k
        }
695
1.06M
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
1.06M
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
1.06M
    }
698
699
1.61M
    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.61M
    _rows_input_counter =
704
1.61M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
1.61M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
1.61M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
1.61M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
1.61M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
1.61M
    _memory_used_counter =
710
1.61M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
1.61M
    _common_profile->add_info_string("IsColocate",
712
1.61M
                                     std::to_string(_parent->is_colocated_operator()));
713
1.61M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
1.61M
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
1.61M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
1.61M
    return Status::OK();
717
1.61M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
109k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
109k
    _operator_profile =
660
109k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
109k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
109k
    _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
109k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
109k
    _operator_profile->add_child(_common_profile, true);
669
109k
    _operator_profile->add_child(_custom_profile, true);
670
671
109k
    _operator_profile->set_metadata(_parent->node_id());
672
109k
    _wait_for_finish_dependency_timer =
673
109k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
109k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
109k
    if constexpr (!is_fake_shared) {
676
109k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
109k
            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
11.7k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
682
11.7k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
683
11.7k
                                                  ? 0
684
11.7k
                                                  : info.task_idx]
685
11.7k
                                  .get();
686
11.7k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
687
97.7k
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
97.7k
            _shared_state = info.shared_state->template cast<SharedState>();
692
97.7k
            _dependency = _shared_state->create_sink_dependency(
693
97.7k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
97.7k
        }
695
109k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
109k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
109k
    }
698
699
109k
    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
109k
    _rows_input_counter =
704
109k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
109k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
109k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
109k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
109k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
109k
    _memory_used_counter =
710
109k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
109k
    _common_profile->add_info_string("IsColocate",
712
109k
                                     std::to_string(_parent->is_colocated_operator()));
713
109k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
109k
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
109k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
109k
    return Status::OK();
717
109k
}
_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
192k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
192k
    _operator_profile =
660
192k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
192k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
192k
    _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
192k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
192k
    _operator_profile->add_child(_common_profile, true);
669
192k
    _operator_profile->add_child(_custom_profile, true);
670
671
192k
    _operator_profile->set_metadata(_parent->node_id());
672
192k
    _wait_for_finish_dependency_timer =
673
192k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
192k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
192k
    if constexpr (!is_fake_shared) {
676
192k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
192k
            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
192k
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
192k
            _shared_state = info.shared_state->template cast<SharedState>();
692
192k
            _dependency = _shared_state->create_sink_dependency(
693
192k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
192k
        }
695
192k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
192k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
192k
    }
698
699
192k
    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
192k
    _rows_input_counter =
704
192k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
192k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
192k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
192k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
192k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
192k
    _memory_used_counter =
710
192k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
192k
    _common_profile->add_info_string("IsColocate",
712
192k
                                     std::to_string(_parent->is_colocated_operator()));
713
192k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
192k
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
192k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
192k
    return Status::OK();
717
192k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
32
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
32
    _operator_profile =
660
32
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
32
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
32
    _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
32
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
32
    _operator_profile->add_child(_common_profile, true);
669
32
    _operator_profile->add_child(_custom_profile, true);
670
671
32
    _operator_profile->set_metadata(_parent->node_id());
672
32
    _wait_for_finish_dependency_timer =
673
32
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
32
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
32
    if constexpr (!is_fake_shared) {
676
32
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
32
            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
32
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
32
            _shared_state = info.shared_state->template cast<SharedState>();
692
32
            _dependency = _shared_state->create_sink_dependency(
693
32
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
32
        }
695
32
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
32
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
32
    }
698
699
32
    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
32
    _rows_input_counter =
704
32
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
32
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
32
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
32
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
32
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
32
    _memory_used_counter =
710
32
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
32
    _common_profile->add_info_string("IsColocate",
712
32
                                     std::to_string(_parent->is_colocated_operator()));
713
32
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
32
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
32
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
32
    return Status::OK();
717
32
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
5.70k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
5.70k
    _operator_profile =
660
5.70k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
5.70k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
5.70k
    _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.70k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
5.70k
    _operator_profile->add_child(_common_profile, true);
669
5.70k
    _operator_profile->add_child(_custom_profile, true);
670
671
5.70k
    _operator_profile->set_metadata(_parent->node_id());
672
5.70k
    _wait_for_finish_dependency_timer =
673
5.70k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
5.70k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
5.70k
    if constexpr (!is_fake_shared) {
676
5.70k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
5.70k
            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.70k
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
5.70k
            _shared_state = info.shared_state->template cast<SharedState>();
692
5.70k
            _dependency = _shared_state->create_sink_dependency(
693
5.70k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
5.70k
        }
695
5.70k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
5.70k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
5.70k
    }
698
699
5.70k
    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.70k
    _rows_input_counter =
704
5.70k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
5.70k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
5.70k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
5.70k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
5.70k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
5.70k
    _memory_used_counter =
710
5.70k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
5.70k
    _common_profile->add_info_string("IsColocate",
712
5.70k
                                     std::to_string(_parent->is_colocated_operator()));
713
5.70k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
5.70k
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
5.70k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
5.70k
    return Status::OK();
717
5.70k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
7.17k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
7.17k
    _operator_profile =
660
7.17k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
7.17k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
7.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
7.17k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
7.17k
    _operator_profile->add_child(_common_profile, true);
669
7.17k
    _operator_profile->add_child(_custom_profile, true);
670
671
7.17k
    _operator_profile->set_metadata(_parent->node_id());
672
7.17k
    _wait_for_finish_dependency_timer =
673
7.17k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
7.17k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
7.17k
    if constexpr (!is_fake_shared) {
676
7.17k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
7.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
7.17k
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
7.17k
            _shared_state = info.shared_state->template cast<SharedState>();
692
7.17k
            _dependency = _shared_state->create_sink_dependency(
693
7.17k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
7.17k
        }
695
7.17k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
7.17k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
7.17k
    }
698
699
7.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
7.17k
    _rows_input_counter =
704
7.17k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
7.17k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
7.17k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
7.17k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
7.17k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
7.17k
    _memory_used_counter =
710
7.17k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
7.17k
    _common_profile->add_info_string("IsColocate",
712
7.17k
                                     std::to_string(_parent->is_colocated_operator()));
713
7.17k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
7.17k
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
7.17k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
7.17k
    return Status::OK();
717
7.17k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
74.7k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
74.7k
    _operator_profile =
660
74.7k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
74.7k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
74.7k
    _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
74.7k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
74.7k
    _operator_profile->add_child(_common_profile, true);
669
74.7k
    _operator_profile->add_child(_custom_profile, true);
670
671
74.7k
    _operator_profile->set_metadata(_parent->node_id());
672
74.7k
    _wait_for_finish_dependency_timer =
673
74.7k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
74.7k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
74.7k
    if constexpr (!is_fake_shared) {
676
74.7k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
74.7k
            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
74.7k
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
74.7k
            _shared_state = info.shared_state->template cast<SharedState>();
692
74.7k
            _dependency = _shared_state->create_sink_dependency(
693
74.7k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
74.7k
        }
695
74.7k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
74.7k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
74.7k
    }
698
699
74.7k
    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
74.7k
    _rows_input_counter =
704
74.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
74.7k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
74.7k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
74.7k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
74.7k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
74.7k
    _memory_used_counter =
710
74.7k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
74.7k
    _common_profile->add_info_string("IsColocate",
712
74.7k
                                     std::to_string(_parent->is_colocated_operator()));
713
74.7k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
74.7k
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
74.7k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
74.7k
    return Status::OK();
717
74.7k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
280
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
280
    _operator_profile =
660
280
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
280
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
280
    _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
280
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
280
    _operator_profile->add_child(_common_profile, true);
669
280
    _operator_profile->add_child(_custom_profile, true);
670
671
280
    _operator_profile->set_metadata(_parent->node_id());
672
280
    _wait_for_finish_dependency_timer =
673
280
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
280
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
280
    if constexpr (!is_fake_shared) {
676
280
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
280
            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
279
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
682
279
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
683
279
                                                  ? 0
684
279
                                                  : info.task_idx]
685
279
                                  .get();
686
279
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
687
279
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
1
            _shared_state = info.shared_state->template cast<SharedState>();
692
1
            _dependency = _shared_state->create_sink_dependency(
693
1
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
1
        }
695
280
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
280
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
280
    }
698
699
280
    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
280
    _rows_input_counter =
704
280
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
280
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
280
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
280
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
280
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
280
    _memory_used_counter =
710
280
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
280
    _common_profile->add_info_string("IsColocate",
712
280
                                     std::to_string(_parent->is_colocated_operator()));
713
280
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
280
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
280
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
280
    return Status::OK();
717
280
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
48
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
48
    _operator_profile =
660
48
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
48
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
48
    _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
48
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
48
    _operator_profile->add_child(_common_profile, true);
669
48
    _operator_profile->add_child(_custom_profile, true);
670
671
48
    _operator_profile->set_metadata(_parent->node_id());
672
48
    _wait_for_finish_dependency_timer =
673
48
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
48
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
48
    if constexpr (!is_fake_shared) {
676
48
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
48
            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
48
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
48
            _shared_state = info.shared_state->template cast<SharedState>();
692
48
            _dependency = _shared_state->create_sink_dependency(
693
48
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
48
        }
695
48
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
48
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
48
    }
698
699
48
    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
48
    _rows_input_counter =
704
48
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
48
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
48
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
48
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
48
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
48
    _memory_used_counter =
710
48
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
48
    _common_profile->add_info_string("IsColocate",
712
48
                                     std::to_string(_parent->is_colocated_operator()));
713
48
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
48
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
48
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
48
    return Status::OK();
717
48
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
547k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
547k
    _operator_profile =
660
547k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
547k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
547k
    _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
547k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
547k
    _operator_profile->add_child(_common_profile, true);
669
547k
    _operator_profile->add_child(_custom_profile, true);
670
671
547k
    _operator_profile->set_metadata(_parent->node_id());
672
547k
    _wait_for_finish_dependency_timer =
673
547k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
547k
    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
547k
    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
547k
    _rows_input_counter =
704
547k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
547k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
547k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
547k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
547k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
547k
    _memory_used_counter =
710
547k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
547k
    _common_profile->add_info_string("IsColocate",
712
547k
                                     std::to_string(_parent->is_colocated_operator()));
713
547k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
547k
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
547k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
547k
    return Status::OK();
717
547k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
5.43k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
5.43k
    _operator_profile =
660
5.43k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
5.43k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
5.43k
    _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.43k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
5.43k
    _operator_profile->add_child(_common_profile, true);
669
5.43k
    _operator_profile->add_child(_custom_profile, true);
670
671
5.43k
    _operator_profile->set_metadata(_parent->node_id());
672
5.43k
    _wait_for_finish_dependency_timer =
673
5.43k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
5.43k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
5.43k
    if constexpr (!is_fake_shared) {
676
5.43k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
5.43k
            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.43k
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
5.43k
            _shared_state = info.shared_state->template cast<SharedState>();
692
5.43k
            _dependency = _shared_state->create_sink_dependency(
693
5.43k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
5.43k
        }
695
5.43k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
5.43k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
5.43k
    }
698
699
5.43k
    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.43k
    _rows_input_counter =
704
5.43k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
5.43k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
5.43k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
5.43k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
5.43k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
5.43k
    _memory_used_counter =
710
5.43k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
5.43k
    _common_profile->add_info_string("IsColocate",
712
5.43k
                                     std::to_string(_parent->is_colocated_operator()));
713
5.43k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
5.43k
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
5.43k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
5.43k
    return Status::OK();
717
5.43k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
356
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
356
    _operator_profile =
660
356
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
356
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
356
    _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
356
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
356
    _operator_profile->add_child(_common_profile, true);
669
356
    _operator_profile->add_child(_custom_profile, true);
670
671
356
    _operator_profile->set_metadata(_parent->node_id());
672
356
    _wait_for_finish_dependency_timer =
673
356
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
356
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
356
    if constexpr (!is_fake_shared) {
676
356
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
356
            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
356
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
356
            _shared_state = info.shared_state->template cast<SharedState>();
692
356
            _dependency = _shared_state->create_sink_dependency(
693
356
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
356
        }
695
356
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
356
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
356
    }
698
699
356
    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
356
    _rows_input_counter =
704
356
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
356
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
356
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
356
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
356
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
356
    _memory_used_counter =
710
356
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
356
    _common_profile->add_info_string("IsColocate",
712
356
                                     std::to_string(_parent->is_colocated_operator()));
713
356
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
356
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
356
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
356
    return Status::OK();
717
356
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
1.91k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
1.91k
    _operator_profile =
660
1.91k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
1.91k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
1.91k
    _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.91k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
1.91k
    _operator_profile->add_child(_common_profile, true);
669
1.91k
    _operator_profile->add_child(_custom_profile, true);
670
671
1.91k
    _operator_profile->set_metadata(_parent->node_id());
672
1.91k
    _wait_for_finish_dependency_timer =
673
1.91k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
1.91k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
1.91k
    if constexpr (!is_fake_shared) {
676
1.91k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
1.91k
            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.91k
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
1.91k
            _shared_state = info.shared_state->template cast<SharedState>();
692
1.91k
            _dependency = _shared_state->create_sink_dependency(
693
1.91k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
1.91k
        }
695
1.91k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
1.91k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
1.91k
    }
698
699
1.91k
    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.91k
    _rows_input_counter =
704
1.91k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
1.91k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
1.91k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
1.91k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
1.91k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
1.91k
    _memory_used_counter =
710
1.91k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
1.91k
    _common_profile->add_info_string("IsColocate",
712
1.91k
                                     std::to_string(_parent->is_colocated_operator()));
713
1.91k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
1.91k
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
1.91k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
1.91k
    return Status::OK();
717
1.91k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
12.0k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
12.0k
    _operator_profile =
660
12.0k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
12.0k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
12.0k
    _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.0k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
12.0k
    _operator_profile->add_child(_common_profile, true);
669
12.0k
    _operator_profile->add_child(_custom_profile, true);
670
671
12.0k
    _operator_profile->set_metadata(_parent->node_id());
672
12.0k
    _wait_for_finish_dependency_timer =
673
12.0k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
12.0k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
12.0k
    if constexpr (!is_fake_shared) {
676
12.0k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
12.0k
            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.0k
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
12.0k
            _shared_state = info.shared_state->template cast<SharedState>();
692
12.0k
            _dependency = _shared_state->create_sink_dependency(
693
12.0k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
12.0k
        }
695
12.0k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
12.0k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
12.0k
    }
698
699
12.0k
    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.0k
    _rows_input_counter =
704
12.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
12.0k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
12.0k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
12.0k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
12.0k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
12.0k
    _memory_used_counter =
710
12.0k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
12.0k
    _common_profile->add_info_string("IsColocate",
712
12.0k
                                     std::to_string(_parent->is_colocated_operator()));
713
12.0k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
12.0k
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
12.0k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
12.0k
    return Status::OK();
717
12.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
243k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
243k
    _operator_profile =
660
243k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
243k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
243k
    _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
243k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
243k
    _operator_profile->add_child(_common_profile, true);
669
243k
    _operator_profile->add_child(_custom_profile, true);
670
671
243k
    _operator_profile->set_metadata(_parent->node_id());
672
243k
    _wait_for_finish_dependency_timer =
673
243k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
243k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
243k
    if constexpr (!is_fake_shared) {
676
243k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
243k
            info.shared_state_map.end()) {
678
243k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
679
243k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
680
243k
            }
681
243k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
682
243k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
683
243k
                                                  ? 0
684
243k
                                                  : info.task_idx]
685
243k
                                  .get();
686
243k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
687
243k
        } else {
688
302
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
302
                DCHECK(false);
690
302
            }
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
243k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
243k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
243k
    }
698
699
243k
    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
243k
    _rows_input_counter =
704
243k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
243k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
243k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
243k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
243k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
243k
    _memory_used_counter =
710
243k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
243k
    _common_profile->add_info_string("IsColocate",
712
243k
                                     std::to_string(_parent->is_colocated_operator()));
713
243k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
243k
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
243k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
243k
    return Status::OK();
717
243k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
414k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
414k
    _operator_profile =
660
414k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
414k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
414k
    _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
414k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
414k
    _operator_profile->add_child(_common_profile, true);
669
414k
    _operator_profile->add_child(_custom_profile, true);
670
671
414k
    _operator_profile->set_metadata(_parent->node_id());
672
414k
    _wait_for_finish_dependency_timer =
673
414k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
414k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
414k
    if constexpr (!is_fake_shared) {
676
414k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
414k
            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
414k
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
414k
            _shared_state = info.shared_state->template cast<SharedState>();
692
414k
            _dependency = _shared_state->create_sink_dependency(
693
414k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
414k
        }
695
414k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
414k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
414k
    }
698
699
414k
    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
414k
    _rows_input_counter =
704
414k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
414k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
414k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
414k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
414k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
414k
    _memory_used_counter =
710
414k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
414k
    _common_profile->add_info_string("IsColocate",
712
414k
                                     std::to_string(_parent->is_colocated_operator()));
713
414k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
414k
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
414k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
414k
    return Status::OK();
717
414k
}
_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
301
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
301
    _operator_profile =
660
301
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
301
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
301
    _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
301
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
301
    _operator_profile->add_child(_common_profile, true);
669
301
    _operator_profile->add_child(_custom_profile, true);
670
671
301
    _operator_profile->set_metadata(_parent->node_id());
672
301
    _wait_for_finish_dependency_timer =
673
301
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
301
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
301
    if constexpr (!is_fake_shared) {
676
301
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
301
            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
301
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
301
            _shared_state = info.shared_state->template cast<SharedState>();
692
301
            _dependency = _shared_state->create_sink_dependency(
693
301
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
301
        }
695
301
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
301
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
301
    }
698
699
301
    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
301
    _rows_input_counter =
704
301
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
301
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
301
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
301
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
301
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
301
    _memory_used_counter =
710
301
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
301
    _common_profile->add_info_string("IsColocate",
712
301
                                     std::to_string(_parent->is_colocated_operator()));
713
301
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
301
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
301
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
301
    return Status::OK();
717
301
}
718
719
template <typename SharedState>
720
1.61M
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
1.61M
    if (_closed) {
722
2
        return Status::OK();
723
2
    }
724
1.61M
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
1.07M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
1.07M
    }
727
1.61M
    _closed = true;
728
1.61M
    return Status::OK();
729
1.61M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
109k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
109k
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
109k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
109k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
109k
    }
727
109k
    _closed = true;
728
109k
    return Status::OK();
729
109k
}
_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
192k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
192k
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
192k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
192k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
192k
    }
727
192k
    _closed = true;
728
192k
    return Status::OK();
729
192k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
24
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
24
    if (_closed) {
722
2
        return Status::OK();
723
2
    }
724
22
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
22
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
22
    }
727
22
    _closed = true;
728
22
    return Status::OK();
729
24
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
5.69k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
5.69k
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
5.69k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
5.69k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
5.69k
    }
727
5.69k
    _closed = true;
728
5.69k
    return Status::OK();
729
5.69k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
7.15k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
7.15k
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
7.15k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
7.15k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
7.15k
    }
727
7.15k
    _closed = true;
728
7.15k
    return Status::OK();
729
7.15k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
74.6k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
74.6k
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
74.6k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
74.6k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
74.6k
    }
727
74.6k
    _closed = true;
728
74.6k
    return Status::OK();
729
74.6k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
280
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
280
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
280
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
280
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
280
    }
727
280
    _closed = true;
728
280
    return Status::OK();
729
280
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
37
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
37
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
37
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
37
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
37
    }
727
37
    _closed = true;
728
37
    return Status::OK();
729
37
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
548k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
548k
    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
548k
    _closed = true;
728
548k
    return Status::OK();
729
548k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
5.43k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
5.43k
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
5.43k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
5.43k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
5.43k
    }
727
5.43k
    _closed = true;
728
5.43k
    return Status::OK();
729
5.43k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
254
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
254
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
254
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
254
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
254
    }
727
254
    _closed = true;
728
254
    return Status::OK();
729
254
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
1.91k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
1.91k
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
1.91k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
1.91k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
1.91k
    }
727
1.91k
    _closed = true;
728
1.91k
    return Status::OK();
729
1.91k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
12.1k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
12.1k
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
12.1k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
12.1k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
12.1k
    }
727
12.1k
    _closed = true;
728
12.1k
    return Status::OK();
729
12.1k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
244k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
244k
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
244k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
244k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
244k
    }
727
244k
    _closed = true;
728
244k
    return Status::OK();
729
244k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
417k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
417k
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
417k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
417k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
417k
    }
727
417k
    _closed = true;
728
417k
    return Status::OK();
729
417k
}
_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
2.90k
Status StreamingOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
733
2.90k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
734
2.89k
    return pull(state, block, eos);
735
2.90k
}
_ZN5doris18StreamingOperatorXINS_23AssertNumRowsLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
732
31
Status StreamingOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
733
31
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
734
31
    return pull(state, block, eos);
735
31
}
_ZN5doris18StreamingOperatorXINS_16SelectLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
732
2.86k
Status StreamingOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
733
2.86k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
734
2.86k
    return pull(state, block, eos);
735
2.86k
}
736
737
template <typename LocalStateType>
738
715k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
739
715k
    auto& local_state = get_local_state(state);
740
715k
    if (need_more_input_data(state)) {
741
689k
        local_state._child_block->clear_column_data(
742
689k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
743
689k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
744
689k
                state, local_state._child_block.get(), &local_state._child_eos));
745
689k
        *eos = local_state._child_eos;
746
689k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
747
80.1k
            return Status::OK();
748
80.1k
        }
749
609k
        {
750
609k
            SCOPED_TIMER(local_state.exec_time_counter());
751
609k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
752
609k
        }
753
609k
    }
754
755
635k
    if (!need_more_input_data(state)) {
756
600k
        SCOPED_TIMER(local_state.exec_time_counter());
757
600k
        bool new_eos = false;
758
600k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
759
600k
        if (new_eos) {
760
529k
            *eos = true;
761
529k
        } else if (!need_more_input_data(state)) {
762
21.2k
            *eos = false;
763
21.2k
        }
764
600k
    }
765
635k
    return Status::OK();
766
635k
}
_ZN5doris17StatefulOperatorXINS_23HashJoinProbeLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
738
122k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
739
122k
    auto& local_state = get_local_state(state);
740
122k
    if (need_more_input_data(state)) {
741
107k
        local_state._child_block->clear_column_data(
742
107k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
743
107k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
744
107k
                state, local_state._child_block.get(), &local_state._child_eos));
745
107k
        *eos = local_state._child_eos;
746
107k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
747
33.4k
            return Status::OK();
748
33.4k
        }
749
74.1k
        {
750
74.1k
            SCOPED_TIMER(local_state.exec_time_counter());
751
74.1k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
752
74.1k
        }
753
74.1k
    }
754
755
88.8k
    if (!need_more_input_data(state)) {
756
88.8k
        SCOPED_TIMER(local_state.exec_time_counter());
757
88.8k
        bool new_eos = false;
758
88.8k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
759
88.8k
        if (new_eos) {
760
37.2k
            *eos = true;
761
51.5k
        } else if (!need_more_input_data(state)) {
762
8.31k
            *eos = false;
763
8.31k
        }
764
88.8k
    }
765
88.8k
    return Status::OK();
766
88.8k
}
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_34PartitionedHashJoinProbeLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
_ZN5doris17StatefulOperatorXINS_16RepeatLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
738
3.27k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
739
3.27k
    auto& local_state = get_local_state(state);
740
3.27k
    if (need_more_input_data(state)) {
741
2.04k
        local_state._child_block->clear_column_data(
742
2.04k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
743
2.04k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
744
2.04k
                state, local_state._child_block.get(), &local_state._child_eos));
745
2.04k
        *eos = local_state._child_eos;
746
2.04k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
747
602
            return Status::OK();
748
602
        }
749
1.44k
        {
750
1.44k
            SCOPED_TIMER(local_state.exec_time_counter());
751
1.44k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
752
1.44k
        }
753
1.44k
    }
754
755
2.67k
    if (!need_more_input_data(state)) {
756
2.67k
        SCOPED_TIMER(local_state.exec_time_counter());
757
2.67k
        bool new_eos = false;
758
2.67k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
759
2.67k
        if (new_eos) {
760
1.09k
            *eos = true;
761
1.58k
        } else if (!need_more_input_data(state)) {
762
1.22k
            *eos = false;
763
1.22k
        }
764
2.67k
    }
765
2.66k
    return Status::OK();
766
2.66k
}
_ZN5doris17StatefulOperatorXINS_25MaterializationLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
738
1.62k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
739
1.62k
    auto& local_state = get_local_state(state);
740
1.62k
    if (need_more_input_data(state)) {
741
1.62k
        local_state._child_block->clear_column_data(
742
1.62k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
743
1.62k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
744
1.62k
                state, local_state._child_block.get(), &local_state._child_eos));
745
1.62k
        *eos = local_state._child_eos;
746
1.62k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
747
619
            return Status::OK();
748
619
        }
749
1.01k
        {
750
1.01k
            SCOPED_TIMER(local_state.exec_time_counter());
751
1.01k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
752
1.01k
        }
753
1.01k
    }
754
755
1.01k
    if (!need_more_input_data(state)) {
756
1.01k
        SCOPED_TIMER(local_state.exec_time_counter());
757
1.01k
        bool new_eos = false;
758
1.01k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
759
1.01k
        if (new_eos) {
760
649
            *eos = true;
761
649
        } else if (!need_more_input_data(state)) {
762
0
            *eos = false;
763
0
        }
764
1.01k
    }
765
1.01k
    return Status::OK();
766
1.01k
}
_ZN5doris17StatefulOperatorXINS_22StreamingAggLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
738
11.9k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
739
11.9k
    auto& local_state = get_local_state(state);
740
11.9k
    if (need_more_input_data(state)) {
741
11.9k
        local_state._child_block->clear_column_data(
742
11.9k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
743
11.9k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
744
11.9k
                state, local_state._child_block.get(), &local_state._child_eos));
745
11.9k
        *eos = local_state._child_eos;
746
11.9k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
747
2.86k
            return Status::OK();
748
2.86k
        }
749
9.05k
        {
750
9.05k
            SCOPED_TIMER(local_state.exec_time_counter());
751
9.05k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
752
9.05k
        }
753
9.05k
    }
754
755
9.05k
    if (!need_more_input_data(state)) {
756
4.79k
        SCOPED_TIMER(local_state.exec_time_counter());
757
4.79k
        bool new_eos = false;
758
4.79k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
759
4.79k
        if (new_eos) {
760
4.69k
            *eos = true;
761
4.69k
        } else if (!need_more_input_data(state)) {
762
5
            *eos = false;
763
5
        }
764
4.79k
    }
765
9.05k
    return Status::OK();
766
9.05k
}
_ZN5doris17StatefulOperatorXINS_30DistinctStreamingAggLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
738
548k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
739
548k
    auto& local_state = get_local_state(state);
740
549k
    if (need_more_input_data(state)) {
741
549k
        local_state._child_block->clear_column_data(
742
549k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
743
549k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
744
549k
                state, local_state._child_block.get(), &local_state._child_eos));
745
549k
        *eos = local_state._child_eos;
746
549k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
747
41.0k
            return Status::OK();
748
41.0k
        }
749
508k
        {
750
508k
            SCOPED_TIMER(local_state.exec_time_counter());
751
508k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
752
508k
        }
753
508k
    }
754
755
507k
    if (!need_more_input_data(state)) {
756
476k
        SCOPED_TIMER(local_state.exec_time_counter());
757
476k
        bool new_eos = false;
758
476k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
759
476k
        if (new_eos) {
760
476k
            *eos = true;
761
476k
        } else if (!need_more_input_data(state)) {
762
0
            *eos = false;
763
0
        }
764
476k
    }
765
507k
    return Status::OK();
766
507k
}
_ZN5doris17StatefulOperatorXINS_29NestedLoopJoinProbeLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
738
21.4k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
739
21.4k
    auto& local_state = get_local_state(state);
740
21.4k
    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
788
            return Status::OK();
748
788
        }
749
9.31k
        {
750
9.31k
            SCOPED_TIMER(local_state.exec_time_counter());
751
9.31k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
752
9.31k
        }
753
9.31k
    }
754
755
20.6k
    if (!need_more_input_data(state)) {
756
20.1k
        SCOPED_TIMER(local_state.exec_time_counter());
757
20.1k
        bool new_eos = false;
758
20.1k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
759
20.1k
        if (new_eos) {
760
5.69k
            *eos = true;
761
14.4k
        } else if (!need_more_input_data(state)) {
762
11.3k
            *eos = false;
763
11.3k
        }
764
20.1k
    }
765
20.6k
    return Status::OK();
766
20.6k
}
_ZN5doris17StatefulOperatorXINS_23TableFunctionLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
738
6.68k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
739
6.68k
    auto& local_state = get_local_state(state);
740
6.68k
    if (need_more_input_data(state)) {
741
6.32k
        local_state._child_block->clear_column_data(
742
6.32k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
743
6.32k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
744
6.32k
                state, local_state._child_block.get(), &local_state._child_eos));
745
6.32k
        *eos = local_state._child_eos;
746
6.32k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
747
781
            return Status::OK();
748
781
        }
749
5.54k
        {
750
5.54k
            SCOPED_TIMER(local_state.exec_time_counter());
751
5.54k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
752
5.54k
        }
753
5.54k
    }
754
755
5.90k
    if (!need_more_input_data(state)) {
756
5.90k
        SCOPED_TIMER(local_state.exec_time_counter());
757
5.90k
        bool new_eos = false;
758
5.90k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
759
5.90k
        if (new_eos) {
760
3.81k
            *eos = true;
761
3.81k
        } else if (!need_more_input_data(state)) {
762
366
            *eos = false;
763
366
        }
764
5.90k
    }
765
5.89k
    return Status::OK();
766
5.89k
}
767
768
template <typename Writer, typename Parent>
769
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
770
40.7k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
771
40.7k
    RETURN_IF_ERROR(Base::init(state, info));
772
40.7k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
773
40.7k
                                                         "AsyncWriterDependency", true);
774
40.7k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
775
40.7k
                             _finish_dependency));
776
777
40.7k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
778
40.7k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
779
40.7k
    return Status::OK();
780
40.7k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
770
377
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
771
377
    RETURN_IF_ERROR(Base::init(state, info));
772
377
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
773
377
                                                         "AsyncWriterDependency", true);
774
377
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
775
377
                             _finish_dependency));
776
777
377
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
778
377
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
779
377
    return Status::OK();
780
377
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
770
40.3k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
771
40.3k
    RETURN_IF_ERROR(Base::init(state, info));
772
40.3k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
773
40.3k
                                                         "AsyncWriterDependency", true);
774
40.3k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
775
40.3k
                             _finish_dependency));
776
777
40.3k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
778
40.3k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
779
40.3k
    return Status::OK();
780
40.3k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
770
6
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
771
6
    RETURN_IF_ERROR(Base::init(state, info));
772
6
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
773
6
                                                         "AsyncWriterDependency", true);
774
6
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
775
6
                             _finish_dependency));
776
777
6
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
778
6
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
779
6
    return Status::OK();
780
6
}
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
41.0k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
785
41.0k
    RETURN_IF_ERROR(Base::open(state));
786
41.0k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
787
319k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
788
278k
        RETURN_IF_ERROR(
789
278k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
790
278k
    }
791
41.0k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
792
41.0k
    return Status::OK();
793
41.0k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
784
378
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
785
378
    RETURN_IF_ERROR(Base::open(state));
786
378
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
787
1.91k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
788
1.53k
        RETURN_IF_ERROR(
789
1.53k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
790
1.53k
    }
791
378
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
792
378
    return Status::OK();
793
378
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
784
40.6k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
785
40.6k
    RETURN_IF_ERROR(Base::open(state));
786
40.6k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
787
317k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
788
276k
        RETURN_IF_ERROR(
789
276k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
790
276k
    }
791
40.6k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
792
40.6k
    return Status::OK();
793
40.6k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
784
6
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
785
6
    RETURN_IF_ERROR(Base::open(state));
786
6
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
787
108
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
788
102
        RETURN_IF_ERROR(
789
102
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
790
102
    }
791
6
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
792
6
    return Status::OK();
793
6
}
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
55.0k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
798
55.0k
    return _writer->sink(block, eos);
799
55.0k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
797
1.59k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
798
1.59k
    return _writer->sink(block, eos);
799
1.59k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
797
53.4k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
798
53.4k
    return _writer->sink(block, eos);
799
53.4k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
797
6
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
798
6
    return _writer->sink(block, eos);
799
6
}
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
41.0k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
804
41.0k
    if (_closed) {
805
0
        return Status::OK();
806
0
    }
807
41.0k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
808
41.0k
    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
41.0k
    if (_writer) {
811
41.0k
        Status st = _writer->get_writer_status();
812
41.0k
        if (exec_status.ok()) {
813
41.0k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
814
41.0k
                                                       : Status::Cancelled("force close"));
815
41.0k
        } else {
816
61
            _writer->force_close(exec_status);
817
61
        }
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
41.0k
        RETURN_IF_ERROR(st);
822
41.0k
    }
823
40.9k
    return Base::close(state, exec_status);
824
41.0k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
803
366
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
804
366
    if (_closed) {
805
0
        return Status::OK();
806
0
    }
807
366
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
808
366
    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
366
    if (_writer) {
811
366
        Status st = _writer->get_writer_status();
812
366
        if (exec_status.ok()) {
813
366
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
814
366
                                                       : Status::Cancelled("force close"));
815
366
        } 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
366
        RETURN_IF_ERROR(st);
822
366
    }
823
366
    return Base::close(state, exec_status);
824
366
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
803
40.6k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
804
40.6k
    if (_closed) {
805
0
        return Status::OK();
806
0
    }
807
40.6k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
808
40.6k
    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
40.7k
    if (_writer) {
811
40.7k
        Status st = _writer->get_writer_status();
812
40.7k
        if (exec_status.ok()) {
813
40.6k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
814
40.6k
                                                       : Status::Cancelled("force close"));
815
40.6k
        } else {
816
61
            _writer->force_close(exec_status);
817
61
        }
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
40.7k
        RETURN_IF_ERROR(st);
822
40.7k
    }
823
40.6k
    return Base::close(state, exec_status);
824
40.6k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
803
6
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
804
6
    if (_closed) {
805
0
        return Status::OK();
806
0
    }
807
6
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
808
6
    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
6
    if (_writer) {
811
6
        Status st = _writer->get_writer_status();
812
6
        if (exec_status.ok()) {
813
6
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
814
6
                                                       : Status::Cancelled("force close"));
815
6
        } 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
6
        RETURN_IF_ERROR(st);
822
6
    }
823
6
    return Base::close(state, exec_status);
824
6
}
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