Coverage Report

Created: 2026-03-16 08:10

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