Coverage Report

Created: 2026-10-31 06:38

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