Coverage Report

Created: 2026-06-08 16:53

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