Coverage Report

Created: 2026-08-03 13:55

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/partition_sort_sink_operator.h"
68
#include "exec/operator/partition_sort_source_operator.h"
69
#include "exec/operator/partitioned_aggregation_sink_operator.h"
70
#include "exec/operator/partitioned_aggregation_source_operator.h"
71
#include "exec/operator/partitioned_hash_join_probe_operator.h"
72
#include "exec/operator/partitioned_hash_join_sink_operator.h"
73
#include "exec/operator/rec_cte_anchor_sink_operator.h"
74
#include "exec/operator/rec_cte_scan_operator.h"
75
#include "exec/operator/rec_cte_sink_operator.h"
76
#include "exec/operator/rec_cte_source_operator.h"
77
#include "exec/operator/repeat_operator.h"
78
#include "exec/operator/result_file_sink_operator.h"
79
#include "exec/operator/result_sink_operator.h"
80
#include "exec/operator/schema_scan_operator.h"
81
#include "exec/operator/select_operator.h"
82
#include "exec/operator/set_probe_sink_operator.h"
83
#include "exec/operator/set_sink_operator.h"
84
#include "exec/operator/set_source_operator.h"
85
#include "exec/operator/sort_sink_operator.h"
86
#include "exec/operator/sort_source_operator.h"
87
#include "exec/operator/spill_iceberg_table_sink_operator.h"
88
#include "exec/operator/spill_sort_sink_operator.h"
89
#include "exec/operator/spill_sort_source_operator.h"
90
#include "exec/operator/streaming_aggregation_operator.h"
91
#include "exec/operator/table_function_operator.h"
92
#include "exec/operator/tvf_table_sink_operator.h"
93
#include "exec/operator/union_sink_operator.h"
94
#include "exec/operator/union_source_operator.h"
95
#include "exec/pipeline/dependency.h"
96
#include "exec/pipeline/pipeline.h"
97
#include "exprs/vexpr.h"
98
#include "exprs/vexpr_context.h"
99
#include "runtime/runtime_profile.h"
100
#include "runtime/runtime_profile_counter_names.h"
101
#include "util/debug_util.h"
102
#include "util/string_util.h"
103
104
namespace doris {
105
class RowDescriptor;
106
class RuntimeState;
107
} // namespace doris
108
109
namespace doris {
110
111
0
Status OperatorBase::close(RuntimeState* state) {
112
0
    if (_is_closed) {
113
0
        return Status::OK();
114
0
    }
115
0
    _is_closed = true;
116
0
    return Status::OK();
117
0
}
118
119
template <typename SharedStateArg>
120
2.01M
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
2.01M
    if (_parent->nereids_id() == -1) {
122
1.06M
        return fmt::format("(id={})", _parent->node_id());
123
1.06M
    } else {
124
945k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
945k
    }
126
2.01M
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
67.0k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
67.0k
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
67.0k
    } else {
124
67.0k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
67.0k
    }
126
67.0k
}
_ZNK5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
1
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
1
    if (_parent->nereids_id() == -1) {
122
1
        return fmt::format("(id={})", _parent->node_id());
123
1
    } else {
124
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
0
    }
126
1
}
_ZNK5doris19PipelineXLocalStateINS_15SortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
229k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
229k
    if (_parent->nereids_id() == -1) {
122
12
        return fmt::format("(id={})", _parent->node_id());
123
229k
    } else {
124
229k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
229k
    }
126
229k
}
_ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
24
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
24
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
24
    } else {
124
24
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
24
    }
126
24
}
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
8.16k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
8.16k
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
8.16k
    } else {
124
8.16k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
8.16k
    }
126
8.16k
}
_ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
8.34k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
8.34k
    if (_parent->nereids_id() == -1) {
122
11
        return fmt::format("(id={})", _parent->node_id());
123
8.33k
    } else {
124
8.33k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
8.33k
    }
126
8.34k
}
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
119k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
119k
    if (_parent->nereids_id() == -1) {
122
29
        return fmt::format("(id={})", _parent->node_id());
123
119k
    } else {
124
119k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
119k
    }
126
119k
}
_ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
348
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
348
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
348
    } else {
124
348
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
348
    }
126
348
}
_ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
215
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
215
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
215
    } else {
124
215
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
215
    }
126
215
}
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
801k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
801k
    if (_parent->nereids_id() == -1) {
122
348k
        return fmt::format("(id={})", _parent->node_id());
123
453k
    } else {
124
453k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
453k
    }
126
801k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
53.5k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
53.5k
    if (_parent->nereids_id() == -1) {
122
2
        return fmt::format("(id={})", _parent->node_id());
123
53.5k
    } else {
124
53.5k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
53.5k
    }
126
53.5k
}
_ZNK5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
26
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
26
    if (_parent->nereids_id() == -1) {
122
25
        return fmt::format("(id={})", _parent->node_id());
123
25
    } else {
124
1
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
1
    }
126
26
}
_ZNK5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
8.51k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
8.51k
    if (_parent->nereids_id() == -1) {
122
8.51k
        return fmt::format("(id={})", _parent->node_id());
123
8.51k
    } else {
124
5
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
5
    }
126
8.51k
}
_ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
727
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
727
    if (_parent->nereids_id() == -1) {
122
102
        return fmt::format("(id={})", _parent->node_id());
123
625
    } else {
124
625
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
625
    }
126
727
}
_ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
4.72k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
4.72k
    if (_parent->nereids_id() == -1) {
122
13
        return fmt::format("(id={})", _parent->node_id());
123
4.71k
    } else {
124
4.71k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
4.71k
    }
126
4.72k
}
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
709k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
709k
    if (_parent->nereids_id() == -1) {
122
709k
        return fmt::format("(id={})", _parent->node_id());
123
709k
    } else {
124
302
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
302
    }
126
709k
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
_ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
164
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
164
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
164
    } else {
124
164
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
164
    }
126
164
}
127
128
template <typename SharedStateArg>
129
1.24M
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
1.24M
    if (_parent->nereids_id() == -1) {
131
758k
        return fmt::format("(id={})", _parent->node_id());
132
758k
    } else {
133
489k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
489k
    }
135
1.24M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
115k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
115k
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
115k
    } else {
133
115k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
115k
    }
135
115k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
2
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
2
    if (_parent->nereids_id() == -1) {
131
1
        return fmt::format("(id={})", _parent->node_id());
132
1
    } else {
133
1
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
1
    }
135
2
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
231k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
231k
    if (_parent->nereids_id() == -1) {
131
9
        return fmt::format("(id={})", _parent->node_id());
132
231k
    } else {
133
231k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
231k
    }
135
231k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
30
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
30
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
30
    } else {
133
30
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
30
    }
135
30
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
8.16k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
8.16k
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
8.16k
    } else {
133
8.16k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
8.16k
    }
135
8.16k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
8.34k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
8.34k
    if (_parent->nereids_id() == -1) {
131
11
        return fmt::format("(id={})", _parent->node_id());
132
8.33k
    } else {
133
8.33k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
8.33k
    }
135
8.34k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
119k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
119k
    if (_parent->nereids_id() == -1) {
131
29
        return fmt::format("(id={})", _parent->node_id());
132
119k
    } else {
133
119k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
119k
    }
135
119k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
348
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
348
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
348
    } else {
133
348
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
348
    }
135
348
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
225
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
225
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
225
    } else {
133
225
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
225
    }
135
225
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
86
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
86
    if (_parent->nereids_id() == -1) {
131
85
        return fmt::format("(id={})", _parent->node_id());
132
85
    } else {
133
1
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
1
    }
135
86
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
5.23k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
5.23k
    if (_parent->nereids_id() == -1) {
131
3
        return fmt::format("(id={})", _parent->node_id());
132
5.22k
    } else {
133
5.22k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
5.22k
    }
135
5.23k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
728
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
728
    if (_parent->nereids_id() == -1) {
131
102
        return fmt::format("(id={})", _parent->node_id());
132
626
    } else {
133
626
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
626
    }
135
728
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
12.2k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
12.2k
    if (_parent->nereids_id() == -1) {
131
12.2k
        return fmt::format("(id={})", _parent->node_id());
132
18.4E
    } else {
133
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
18.4E
    }
135
12.2k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
291k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
291k
    if (_parent->nereids_id() == -1) {
131
291k
        return fmt::format("(id={})", _parent->node_id());
132
18.4E
    } else {
133
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
18.4E
    }
135
291k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
454k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
454k
    if (_parent->nereids_id() == -1) {
131
454k
        return fmt::format("(id={})", _parent->node_id());
132
18.4E
    } else {
133
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
18.4E
    }
135
454k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
24
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
24
    if (_parent->nereids_id() == -1) {
131
24
        return fmt::format("(id={})", _parent->node_id());
132
24
    } else {
133
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
0
    }
135
24
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
328
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
328
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
328
    } else {
133
328
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
328
    }
135
328
}
136
137
template <typename SharedStateArg>
138
28.2k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
28.2k
    if (_terminated) {
140
1
        return Status::OK();
141
1
    }
142
28.2k
    _terminated = true;
143
28.2k
    return Status::OK();
144
28.2k
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
24.0k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
24.0k
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
24.0k
    _terminated = true;
143
24.0k
    return Status::OK();
144
24.0k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
868
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
868
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
868
    _terminated = true;
143
868
    return Status::OK();
144
868
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
1.82k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
1.82k
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
1.82k
    _terminated = true;
143
1.82k
    return Status::OK();
144
1.82k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
1
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
1
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
1
    _terminated = true;
143
1
    return Status::OK();
144
1
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
2
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
2
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
2
    _terminated = true;
143
2
    return Status::OK();
144
2
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
793
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
793
    if (_terminated) {
140
1
        return Status::OK();
141
1
    }
142
792
    _terminated = true;
143
792
    return Status::OK();
144
793
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
9
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
9
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
9
    _terminated = true;
143
9
    return Status::OK();
144
9
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
2
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
2
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
2
    _terminated = true;
143
2
    return Status::OK();
144
2
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
436
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
436
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
436
    _terminated = true;
143
436
    return Status::OK();
144
436
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
5
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
5
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
5
    _terminated = true;
143
5
    return Status::OK();
144
5
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
182
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
182
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
182
    _terminated = true;
143
182
    return Status::OK();
144
182
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
143
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
143
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
143
    _terminated = true;
143
143
    return Status::OK();
144
143
}
145
146
371k
DataDistribution OperatorBase::required_data_distribution(RuntimeState* /*state*/) const {
147
371k
    return _child && _child->is_serial_operator() && !is_source()
148
371k
                   ? DataDistribution(TLocalPartitionType::PASSTHROUGH)
149
371k
                   : DataDistribution(TLocalPartitionType::NOOP);
150
371k
}
151
152
28.4k
bool OperatorBase::child_breaks_local_key_distribution(RuntimeState* state) const {
153
28.4k
    if (!_child) {
154
25.1k
        return false;
155
25.1k
    }
156
3.30k
    if (_child->is_serial_operator()) {
157
221
        return true;
158
221
    }
159
3.08k
    const auto child_distribution = _child->required_data_distribution(state);
160
3.08k
    return child_distribution.need_local_exchange() &&
161
3.08k
           !is_shuffled_exchange(child_distribution.distribution_type);
162
3.30k
}
163
164
82.1k
const RowDescriptor& OperatorBase::row_desc() const {
165
82.1k
    return _child->row_desc();
166
82.1k
}
167
168
template <typename SharedStateArg>
169
21.3k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
170
21.3k
    fmt::memory_buffer debug_string_buffer;
171
21.3k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
172
21.3k
    return fmt::to_string(debug_string_buffer);
173
21.3k
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
169
224
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
170
224
    fmt::memory_buffer debug_string_buffer;
171
224
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
172
224
    return fmt::to_string(debug_string_buffer);
173
224
}
_ZNK5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
169
3
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
170
3
    fmt::memory_buffer debug_string_buffer;
171
3
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
172
3
    return fmt::to_string(debug_string_buffer);
173
3
}
_ZNK5doris19PipelineXLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
169
64
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
170
64
    fmt::memory_buffer debug_string_buffer;
171
64
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
172
64
    return fmt::to_string(debug_string_buffer);
173
64
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
169
64
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
170
64
    fmt::memory_buffer debug_string_buffer;
171
64
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
172
64
    return fmt::to_string(debug_string_buffer);
173
64
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
169
64
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
170
64
    fmt::memory_buffer debug_string_buffer;
171
64
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
172
64
    return fmt::to_string(debug_string_buffer);
173
64
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
169
20.1k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
170
20.1k
    fmt::memory_buffer debug_string_buffer;
171
20.1k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
172
20.1k
    return fmt::to_string(debug_string_buffer);
173
20.1k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
169
1
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
170
1
    fmt::memory_buffer debug_string_buffer;
171
1
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
172
1
    return fmt::to_string(debug_string_buffer);
173
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
169
736
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
170
736
    fmt::memory_buffer debug_string_buffer;
171
736
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
172
736
    return fmt::to_string(debug_string_buffer);
173
736
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
174
175
template <typename SharedStateArg>
176
20.9k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
177
20.9k
    fmt::memory_buffer debug_string_buffer;
178
20.9k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
179
20.9k
    return fmt::to_string(debug_string_buffer);
180
20.9k
}
_ZNK5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
176
48
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
177
48
    fmt::memory_buffer debug_string_buffer;
178
48
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
179
48
    return fmt::to_string(debug_string_buffer);
180
48
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
176
64
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
177
64
    fmt::memory_buffer debug_string_buffer;
178
64
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
179
64
    return fmt::to_string(debug_string_buffer);
180
64
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
176
48
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
177
48
    fmt::memory_buffer debug_string_buffer;
178
48
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
179
48
    return fmt::to_string(debug_string_buffer);
180
48
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
176
64
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
177
64
    fmt::memory_buffer debug_string_buffer;
178
64
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
179
64
    return fmt::to_string(debug_string_buffer);
180
64
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
176
288
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
177
288
    fmt::memory_buffer debug_string_buffer;
178
288
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
179
288
    return fmt::to_string(debug_string_buffer);
180
288
}
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
176
369
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
177
369
    fmt::memory_buffer debug_string_buffer;
178
369
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
179
369
    return fmt::to_string(debug_string_buffer);
180
369
}
_ZNK5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
176
20.0k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
177
20.0k
    fmt::memory_buffer debug_string_buffer;
178
20.0k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
179
20.0k
    return fmt::to_string(debug_string_buffer);
180
20.0k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
181
182
21.3k
std::string OperatorXBase::debug_string(int indentation_level) const {
183
21.3k
    fmt::memory_buffer debug_string_buffer;
184
21.3k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, parallel_tasks={}, _is_serial_operator={}",
185
21.3k
                   std::string(indentation_level * 2, ' '), _op_name, node_id(), _parallel_tasks,
186
21.3k
                   _is_serial_operator);
187
21.3k
    return fmt::to_string(debug_string_buffer);
188
21.3k
}
189
190
21.3k
std::string OperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
191
21.3k
    return state->get_local_state(operator_id())->debug_string(indentation_level);
192
21.3k
}
193
194
763k
Status OperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
195
763k
    std::string node_name = print_plan_node_type(tnode.node_type);
196
763k
    _nereids_id = tnode.nereids_id;
197
763k
    if (!tnode.intermediate_output_tuple_id_list.empty()) {
198
3.68k
        if (!tnode.__isset.output_tuple_id) {
199
0
            return Status::InternalError("no final output tuple id");
200
0
        }
201
3.68k
        if (tnode.intermediate_output_tuple_id_list.size() !=
202
3.68k
            tnode.intermediate_projections_list.size()) {
203
0
            return Status::InternalError(
204
0
                    "intermediate_output_tuple_id_list size:{} not match "
205
0
                    "intermediate_projections_list size:{}",
206
0
                    tnode.intermediate_output_tuple_id_list.size(),
207
0
                    tnode.intermediate_projections_list.size());
208
0
        }
209
3.68k
    }
210
763k
    auto substr = node_name.substr(0, node_name.find("_NODE"));
211
763k
    _op_name = substr + "_OPERATOR";
212
213
763k
    if (tnode.__isset.vconjunct) {
214
0
        return Status::InternalError("vconjunct is not supported yet");
215
763k
    } else if (tnode.__isset.conjuncts) {
216
371k
        for (const auto& conjunct : tnode.conjuncts) {
217
371k
            VExprContextSPtr context;
218
371k
            RETURN_IF_ERROR(VExpr::create_expr_tree(conjunct, context));
219
371k
            _conjuncts.emplace_back(context);
220
371k
        }
221
122k
    }
222
223
    // create the projections expr
224
763k
    if (tnode.__isset.projections) {
225
286k
        DCHECK(tnode.__isset.output_tuple_id);
226
286k
        RETURN_IF_ERROR(VExpr::create_expr_trees(tnode.projections, _projections));
227
286k
    }
228
763k
    if (!tnode.intermediate_projections_list.empty()) {
229
3.68k
        DCHECK(tnode.__isset.projections) << "no final projections";
230
3.68k
        _intermediate_projections.reserve(tnode.intermediate_projections_list.size());
231
6.38k
        for (const auto& tnode_projections : tnode.intermediate_projections_list) {
232
6.38k
            VExprContextSPtrs projections;
233
6.38k
            RETURN_IF_ERROR(VExpr::create_expr_trees(tnode_projections, projections));
234
6.38k
            _intermediate_projections.push_back(projections);
235
6.38k
        }
236
3.68k
    }
237
763k
    return Status::OK();
238
763k
}
239
240
792k
Status OperatorXBase::prepare(RuntimeState* state) {
241
792k
    for (auto& conjunct : _conjuncts) {
242
371k
        RETURN_IF_ERROR(conjunct->prepare(state, intermediate_row_desc()));
243
371k
    }
244
792k
    if (state->enable_adjust_conjunct_order_by_cost()) {
245
741k
        std::ranges::stable_sort(_conjuncts, [](const auto& a, const auto& b) {
246
489k
            return a->execute_cost() < b->execute_cost();
247
489k
        });
248
741k
    };
249
250
799k
    for (int i = 0; i < _intermediate_projections.size(); i++) {
251
6.38k
        RETURN_IF_ERROR(
252
6.38k
                VExpr::prepare(_intermediate_projections[i], state, intermediate_row_desc(i)));
253
6.38k
    }
254
792k
    RETURN_IF_ERROR(VExpr::prepare(_projections, state, projections_row_desc()));
255
256
792k
    if (has_output_row_desc()) {
257
286k
        RETURN_IF_ERROR(VExpr::check_expr_output_type(_projections, *_output_row_descriptor));
258
286k
    }
259
260
792k
    for (auto& conjunct : _conjuncts) {
261
371k
        RETURN_IF_ERROR(conjunct->open(state));
262
371k
    }
263
792k
    RETURN_IF_ERROR(VExpr::open(_projections, state));
264
792k
    for (auto& projections : _intermediate_projections) {
265
6.38k
        RETURN_IF_ERROR(VExpr::open(projections, state));
266
6.38k
    }
267
792k
    if (_child && !is_source()) {
268
135k
        RETURN_IF_ERROR(_child->prepare(state));
269
135k
    }
270
271
792k
    if (VExpr::contains_blockable_function(_conjuncts) ||
272
792k
        VExpr::contains_blockable_function(_projections)) {
273
0
        _blockable = true;
274
0
    }
275
276
792k
    return Status::OK();
277
792k
}
278
279
5.19k
Status OperatorXBase::terminate(RuntimeState* state) {
280
5.19k
    if (_child && !is_source()) {
281
907
        RETURN_IF_ERROR(_child->terminate(state));
282
907
    }
283
5.19k
    auto result = state->get_local_state_result(operator_id());
284
5.19k
    if (!result) {
285
0
        return result.error();
286
0
    }
287
5.19k
    return result.value()->terminate(state);
288
5.19k
}
289
290
5.64M
Status OperatorXBase::close(RuntimeState* state) {
291
5.64M
    if (_child && !is_source()) {
292
1.04M
        RETURN_IF_ERROR(_child->close(state));
293
1.04M
    }
294
5.64M
    auto result = state->get_local_state_result(operator_id());
295
5.64M
    if (!result) {
296
0
        return result.error();
297
0
    }
298
5.64M
    return result.value()->close(state);
299
5.64M
}
300
301
284k
void PipelineXLocalStateBase::clear_origin_block() {
302
284k
    _origin_block.clear_column_data(_parent->intermediate_row_desc().num_materialized_slots());
303
284k
}
304
305
562k
Status PipelineXLocalStateBase::filter_block(const VExprContextSPtrs& expr_contexts, Block* block) {
306
562k
    RETURN_IF_ERROR(VExprContext::filter_block(expr_contexts, block, block->columns()));
307
308
562k
    _estimate_memory_usage += VExprContext::get_memory_usage(expr_contexts);
309
562k
    return Status::OK();
310
562k
}
311
312
0
bool PipelineXLocalStateBase::is_blockable() const {
313
0
    return std::any_of(_projections.begin(), _projections.end(),
314
0
                       [&](VExprContextSPtr expr) -> bool { return expr->is_blockable(); });
315
0
}
316
317
Status OperatorXBase::do_projections(RuntimeState* state, Block* origin_block,
318
285k
                                     Block* output_block) const {
319
285k
    auto* local_state = state->get_local_state(operator_id());
320
285k
    SCOPED_TIMER(local_state->exec_time_counter());
321
285k
    SCOPED_TIMER(local_state->_projection_timer);
322
285k
    const size_t rows = origin_block->rows();
323
285k
    if (rows == 0) {
324
149k
        return Status::OK();
325
149k
    }
326
136k
    SCOPED_PEAK_MEM(&local_state->_estimate_memory_usage);
327
328
136k
    {
329
136k
        Block input_block = *origin_block;
330
331
136k
        ColumnsWithTypeAndName new_columns;
332
136k
        for (const auto& projections : local_state->_intermediate_projections) {
333
1.77k
            if (projections.empty()) {
334
0
                return Status::InternalError("meet empty intermediate projection, node id: {}",
335
0
                                             node_id());
336
0
            }
337
1.77k
            new_columns.resize(projections.size());
338
12.5k
            for (int i = 0; i < projections.size(); i++) {
339
10.7k
                RETURN_IF_ERROR(projections[i]->execute(&input_block, new_columns[i]));
340
10.7k
                if (new_columns[i].column->size() != rows) {
341
0
                    return Status::InternalError(
342
0
                            "intermediate projection result column size {} not equal input rows "
343
0
                            "{}, expr: {}",
344
0
                            new_columns[i].column->size(), rows,
345
0
                            projections[i]->root()->debug_string());
346
0
                }
347
10.7k
            }
348
1.77k
            Block tmp_block {new_columns};
349
1.77k
            input_block.swap(tmp_block);
350
1.77k
        }
351
352
136k
        if (input_block.rows() != rows) {
353
0
            return Status::InternalError(
354
0
                    "after intermediate projections input block rows {} not equal origin rows {}, "
355
0
                    "input_block: {}",
356
0
                    input_block.rows(), rows, input_block.dump_structure());
357
0
        }
358
359
136k
        auto scoped_mutable_block = VectorizedUtils::build_scoped_mutable_mem_reuse_block(
360
136k
                output_block, *_output_row_descriptor);
361
136k
        auto& mutable_columns = scoped_mutable_block.mutable_columns();
362
136k
        DCHECK_EQ(mutable_columns.size(), local_state->_projections.size()) << debug_string();
363
136k
        Columns shared_columns(mutable_columns.size());
364
365
758k
        for (int i = 0; i < mutable_columns.size(); ++i) {
366
622k
            ColumnPtr column_ptr;
367
622k
            RETURN_IF_ERROR(local_state->_projections[i]->execute(&input_block, column_ptr));
368
622k
            if (column_ptr->size() != rows) {
369
0
                return Status::InternalError(
370
0
                        "projection result column size {} not equal input rows {}, expr: {}",
371
0
                        column_ptr->size(), rows,
372
0
                        local_state->_projections[i]->root()->debug_string());
373
0
            }
374
622k
            column_ptr = column_ptr->convert_to_full_column_if_const();
375
622k
            if (is_column_nullable(*mutable_columns[i]) && !is_column_nullable(*column_ptr)) {
376
0
                column_ptr = make_nullable(column_ptr, false);
377
0
            }
378
622k
            if (column_ptr->is_exclusive()) {
379
227k
                mutable_columns[i] = IColumn::mutate(std::move(column_ptr));
380
394k
            } else {
381
394k
                shared_columns[i] = std::move(column_ptr);
382
394k
            }
383
622k
        }
384
385
136k
        scoped_mutable_block.restore();
386
758k
        for (int i = 0; i < shared_columns.size(); ++i) {
387
622k
            if (shared_columns[i]) {
388
395k
                output_block->replace_by_position(i, std::move(shared_columns[i]));
389
395k
            }
390
622k
        }
391
136k
    }
392
393
0
    origin_block->clear_column_data(
394
136k
            local_state->_parent->intermediate_row_desc().num_materialized_slots());
395
136k
    DCHECK_EQ(output_block->rows(), rows);
396
397
136k
    return Status::OK();
398
136k
}
399
400
4.49M
Status OperatorXBase::get_block_after_projects(RuntimeState* state, Block* block, bool* eos) {
401
4.49M
    DBUG_EXECUTE_IF("Pipeline::return_empty_block", {
402
4.49M
        if (this->_op_name == "AGGREGATION_OPERATOR" || this->_op_name == "HASH_JOIN_OPERATOR" ||
403
4.49M
            this->_op_name == "PARTITIONED_AGGREGATION_OPERATOR" ||
404
4.49M
            this->_op_name == "PARTITIONED_HASH_JOIN_OPERATOR" ||
405
4.49M
            this->_op_name == "CROSS_JOIN_OPERATOR" || this->_op_name == "SORT_OPERATOR") {
406
4.49M
            if (_debug_point_count++ % 2 == 0) {
407
4.49M
                return Status::OK();
408
4.49M
            }
409
4.49M
        }
410
4.49M
    });
411
412
4.49M
    Status status;
413
4.49M
    auto* local_state = state->get_local_state(operator_id());
414
4.49M
    Defer defer([&]() {
415
4.49M
        if (status.ok()) {
416
4.49M
            local_state->update_output_block_counters(*block);
417
4.49M
        }
418
4.49M
    });
419
4.49M
    if (_output_row_descriptor) {
420
284k
        local_state->clear_origin_block();
421
284k
        status = get_block(state, &local_state->_origin_block, eos);
422
284k
        if (UNLIKELY(!status.ok())) {
423
19
            return status;
424
19
        }
425
284k
        status = do_projections(state, &local_state->_origin_block, block);
426
284k
        return status;
427
284k
    }
428
4.20M
    status = get_block(state, block, eos);
429
4.20M
    RETURN_IF_ERROR(block->check_type_and_column());
430
4.20M
    return status;
431
4.20M
}
432
433
2.85M
void PipelineXLocalStateBase::reached_limit(Block* block, bool* eos) {
434
2.85M
    if (_parent->_limit != -1 and _num_rows_returned + block->rows() >= _parent->_limit) {
435
5.68k
        block->set_num_rows(_parent->_limit - _num_rows_returned);
436
5.68k
        *eos = true;
437
5.68k
    }
438
439
2.85M
    DBUG_EXECUTE_IF("Pipeline::reached_limit_early", {
440
2.85M
        auto op_name = to_lower(_parent->_op_name);
441
2.85M
        auto arg_op_name = dp->param<std::string>("op_name");
442
2.85M
        arg_op_name = to_lower(arg_op_name);
443
444
2.85M
        if (op_name == arg_op_name) {
445
2.85M
            *eos = true;
446
2.85M
        }
447
2.85M
    });
448
449
2.85M
    if (auto rows = block->rows()) {
450
820k
        _num_rows_returned += rows;
451
820k
        _state->get_query_ctx()->resource_ctx()->io_context()->update_process_rows(rows);
452
820k
    }
453
2.85M
}
454
455
28.2k
Status DataSinkOperatorXBase::terminate(RuntimeState* state) {
456
28.2k
    auto result = state->get_sink_local_state_result();
457
28.2k
    if (!result) {
458
0
        return result.error();
459
0
    }
460
28.2k
    return result.value()->terminate(state);
461
28.2k
}
462
463
20.9k
std::string DataSinkOperatorXBase::debug_string(int indentation_level) const {
464
20.9k
    fmt::memory_buffer debug_string_buffer;
465
466
20.9k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, _is_serial_operator={}",
467
20.9k
                   std::string(indentation_level * 2, ' '), _name, node_id(), _is_serial_operator);
468
20.9k
    return fmt::to_string(debug_string_buffer);
469
20.9k
}
470
471
20.9k
std::string DataSinkOperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
472
20.9k
    return state->get_sink_local_state()->debug_string(indentation_level);
473
20.9k
}
474
475
407k
Status DataSinkOperatorXBase::init(const TDataSink& tsink) {
476
407k
    std::string op_name = "UNKNOWN_SINK";
477
407k
    auto it = _TDataSinkType_VALUES_TO_NAMES.find(tsink.type);
478
479
407k
    if (it != _TDataSinkType_VALUES_TO_NAMES.end()) {
480
407k
        op_name = it->second;
481
407k
    }
482
407k
    _name = op_name + "_OPERATOR";
483
407k
    return Status::OK();
484
407k
}
485
486
296k
Status DataSinkOperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
487
296k
    std::string op_name = print_plan_node_type(tnode.node_type);
488
296k
    _nereids_id = tnode.nereids_id;
489
296k
    auto substr = op_name.substr(0, op_name.find("_NODE"));
490
296k
    _name = substr + "_SINK_OPERATOR";
491
296k
    return Status::OK();
492
296k
}
493
494
template <typename LocalStateType>
495
Status DataSinkOperatorX<LocalStateType>::setup_local_state(RuntimeState* state,
496
1.86M
                                                            LocalSinkStateInfo& info) {
497
1.86M
    auto local_state = LocalStateType::create_unique(this, state);
498
1.86M
    RETURN_IF_ERROR(local_state->init(state, info));
499
1.86M
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
500
1.86M
    return Status::OK();
501
1.86M
}
_ZN5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
496
115k
                                                            LocalSinkStateInfo& info) {
497
115k
    auto local_state = LocalStateType::create_unique(this, state);
498
115k
    RETURN_IF_ERROR(local_state->init(state, info));
499
115k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
500
115k
    return Status::OK();
501
115k
}
_ZN5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
496
399k
                                                            LocalSinkStateInfo& info) {
497
399k
    auto local_state = LocalStateType::create_unique(this, state);
498
399k
    RETURN_IF_ERROR(local_state->init(state, info));
499
399k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
500
399k
    return Status::OK();
501
399k
}
_ZN5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
496
43
                                                            LocalSinkStateInfo& info) {
497
43
    auto local_state = LocalStateType::create_unique(this, state);
498
43
    RETURN_IF_ERROR(local_state->init(state, info));
499
43
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
500
43
    return Status::OK();
501
43
}
_ZN5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
496
3
                                                            LocalSinkStateInfo& info) {
497
3
    auto local_state = LocalStateType::create_unique(this, state);
498
3
    RETURN_IF_ERROR(local_state->init(state, info));
499
3
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
500
3
    return Status::OK();
501
3
}
_ZN5doris17DataSinkOperatorXINS_24ResultFileSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
496
452
                                                            LocalSinkStateInfo& info) {
497
452
    auto local_state = LocalStateType::create_unique(this, state);
498
452
    RETURN_IF_ERROR(local_state->init(state, info));
499
452
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
500
452
    return Status::OK();
501
452
}
_ZN5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
496
43.7k
                                                            LocalSinkStateInfo& info) {
497
43.7k
    auto local_state = LocalStateType::create_unique(this, state);
498
43.7k
    RETURN_IF_ERROR(local_state->init(state, info));
499
43.7k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
500
43.7k
    return Status::OK();
501
43.7k
}
_ZN5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
496
4.86k
                                                            LocalSinkStateInfo& info) {
497
4.86k
    auto local_state = LocalStateType::create_unique(this, state);
498
4.86k
    RETURN_IF_ERROR(local_state->init(state, info));
499
4.86k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
500
4.86k
    return Status::OK();
501
4.86k
}
_ZN5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
496
2.61k
                                                            LocalSinkStateInfo& info) {
497
2.61k
    auto local_state = LocalStateType::create_unique(this, state);
498
2.61k
    RETURN_IF_ERROR(local_state->init(state, info));
499
2.61k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
500
2.61k
    return Status::OK();
501
2.61k
}
_ZN5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
496
78
                                                            LocalSinkStateInfo& info) {
497
78
    auto local_state = LocalStateType::create_unique(this, state);
498
78
    RETURN_IF_ERROR(local_state->init(state, info));
499
78
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
500
78
    return Status::OK();
501
78
}
_ZN5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
496
2.01k
                                                            LocalSinkStateInfo& info) {
497
2.01k
    auto local_state = LocalStateType::create_unique(this, state);
498
2.01k
    RETURN_IF_ERROR(local_state->init(state, info));
499
2.01k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
500
2.01k
    return Status::OK();
501
2.01k
}
_ZN5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
496
24
                                                            LocalSinkStateInfo& info) {
497
24
    auto local_state = LocalStateType::create_unique(this, state);
498
24
    RETURN_IF_ERROR(local_state->init(state, info));
499
24
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
500
24
    return Status::OK();
501
24
}
_ZN5doris17DataSinkOperatorXINS_27IcebergDeleteSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
496
352
                                                            LocalSinkStateInfo& info) {
497
352
    auto local_state = LocalStateType::create_unique(this, state);
498
352
    RETURN_IF_ERROR(local_state->init(state, info));
499
352
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
500
352
    return Status::OK();
501
352
}
_ZN5doris17DataSinkOperatorXINS_26IcebergMergeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
496
858
                                                            LocalSinkStateInfo& info) {
497
858
    auto local_state = LocalStateType::create_unique(this, state);
498
858
    RETURN_IF_ERROR(local_state->init(state, info));
499
858
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
500
858
    return Status::OK();
501
858
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_21MCTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
496
8.34k
                                                            LocalSinkStateInfo& info) {
497
8.34k
    auto local_state = LocalStateType::create_unique(this, state);
498
8.34k
    RETURN_IF_ERROR(local_state->init(state, info));
499
8.34k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
500
8.34k
    return Status::OK();
501
8.34k
}
_ZN5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
496
81
                                                            LocalSinkStateInfo& info) {
497
81
    auto local_state = LocalStateType::create_unique(this, state);
498
81
    RETURN_IF_ERROR(local_state->init(state, info));
499
81
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
500
81
    return Status::OK();
501
81
}
_ZN5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
496
231k
                                                            LocalSinkStateInfo& info) {
497
231k
    auto local_state = LocalStateType::create_unique(this, state);
498
231k
    RETURN_IF_ERROR(local_state->init(state, info));
499
231k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
500
231k
    return Status::OK();
501
231k
}
_ZN5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
496
31
                                                            LocalSinkStateInfo& info) {
497
31
    auto local_state = LocalStateType::create_unique(this, state);
498
31
    RETURN_IF_ERROR(local_state->init(state, info));
499
31
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
500
31
    return Status::OK();
501
31
}
_ZN5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
496
291k
                                                            LocalSinkStateInfo& info) {
497
291k
    auto local_state = LocalStateType::create_unique(this, state);
498
291k
    RETURN_IF_ERROR(local_state->init(state, info));
499
291k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
500
291k
    return Status::OK();
501
291k
}
_ZN5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
496
119k
                                                            LocalSinkStateInfo& info) {
497
119k
    auto local_state = LocalStateType::create_unique(this, state);
498
119k
    RETURN_IF_ERROR(local_state->init(state, info));
499
119k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
500
119k
    return Status::OK();
501
119k
}
_ZN5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
496
348
                                                            LocalSinkStateInfo& info) {
497
348
    auto local_state = LocalStateType::create_unique(this, state);
498
348
    RETURN_IF_ERROR(local_state->init(state, info));
499
348
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
500
348
    return Status::OK();
501
348
}
_ZN5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
496
225
                                                            LocalSinkStateInfo& info) {
497
225
    auto local_state = LocalStateType::create_unique(this, state);
498
225
    RETURN_IF_ERROR(local_state->init(state, info));
499
225
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
500
225
    return Status::OK();
501
225
}
_ZN5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
496
615k
                                                            LocalSinkStateInfo& info) {
497
615k
    auto local_state = LocalStateType::create_unique(this, state);
498
615k
    RETURN_IF_ERROR(local_state->init(state, info));
499
615k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
500
615k
    return Status::OK();
501
615k
}
_ZN5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
496
8.16k
                                                            LocalSinkStateInfo& info) {
497
8.16k
    auto local_state = LocalStateType::create_unique(this, state);
498
8.16k
    RETURN_IF_ERROR(local_state->init(state, info));
499
8.16k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
500
8.16k
    return Status::OK();
501
8.16k
}
_ZN5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
496
5.22k
                                                            LocalSinkStateInfo& info) {
497
5.22k
    auto local_state = LocalStateType::create_unique(this, state);
498
5.22k
    RETURN_IF_ERROR(local_state->init(state, info));
499
5.22k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
500
5.22k
    return Status::OK();
501
5.22k
}
_ZN5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
496
3.07k
                                                            LocalSinkStateInfo& info) {
497
3.07k
    auto local_state = LocalStateType::create_unique(this, state);
498
3.07k
    RETURN_IF_ERROR(local_state->init(state, info));
499
3.07k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
500
3.07k
    return Status::OK();
501
3.07k
}
_ZN5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
496
623
                                                            LocalSinkStateInfo& info) {
497
623
    auto local_state = LocalStateType::create_unique(this, state);
498
623
    RETURN_IF_ERROR(local_state->init(state, info));
499
623
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
500
623
    return Status::OK();
501
623
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
496
4.69k
                                                            LocalSinkStateInfo& info) {
497
4.69k
    auto local_state = LocalStateType::create_unique(this, state);
498
4.69k
    RETURN_IF_ERROR(local_state->init(state, info));
499
4.69k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
500
4.69k
    return Status::OK();
501
4.69k
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
496
2.53k
                                                            LocalSinkStateInfo& info) {
497
2.53k
    auto local_state = LocalStateType::create_unique(this, state);
498
2.53k
    RETURN_IF_ERROR(local_state->init(state, info));
499
2.53k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
500
2.53k
    return Status::OK();
501
2.53k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
496
2.54k
                                                            LocalSinkStateInfo& info) {
497
2.54k
    auto local_state = LocalStateType::create_unique(this, state);
498
2.54k
    RETURN_IF_ERROR(local_state->init(state, info));
499
2.54k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
500
2.54k
    return Status::OK();
501
2.54k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
496
2.47k
                                                            LocalSinkStateInfo& info) {
497
2.47k
    auto local_state = LocalStateType::create_unique(this, state);
498
2.47k
    RETURN_IF_ERROR(local_state->init(state, info));
499
2.47k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
500
2.47k
    return Status::OK();
501
2.47k
}
_ZN5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
496
1
                                                            LocalSinkStateInfo& info) {
497
1
    auto local_state = LocalStateType::create_unique(this, state);
498
1
    RETURN_IF_ERROR(local_state->init(state, info));
499
1
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
500
1
    return Status::OK();
501
1
}
_ZN5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
496
569
                                                            LocalSinkStateInfo& info) {
497
569
    auto local_state = LocalStateType::create_unique(this, state);
498
569
    RETURN_IF_ERROR(local_state->init(state, info));
499
569
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
500
569
    return Status::OK();
501
569
}
_ZN5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
496
14
                                                            LocalSinkStateInfo& info) {
497
14
    auto local_state = LocalStateType::create_unique(this, state);
498
14
    RETURN_IF_ERROR(local_state->init(state, info));
499
14
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
500
14
    return Status::OK();
501
14
}
_ZN5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
496
101
                                                            LocalSinkStateInfo& info) {
497
101
    auto local_state = LocalStateType::create_unique(this, state);
498
101
    RETURN_IF_ERROR(local_state->init(state, info));
499
101
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
500
101
    return Status::OK();
501
101
}
_ZN5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
496
164
                                                            LocalSinkStateInfo& info) {
497
164
    auto local_state = LocalStateType::create_unique(this, state);
498
164
    RETURN_IF_ERROR(local_state->init(state, info));
499
164
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
500
164
    return Status::OK();
501
164
}
_ZN5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
496
164
                                                            LocalSinkStateInfo& info) {
497
164
    auto local_state = LocalStateType::create_unique(this, state);
498
164
    RETURN_IF_ERROR(local_state->init(state, info));
499
164
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
500
164
    return Status::OK();
501
164
}
502
503
template <typename LocalStateType>
504
1.54M
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
505
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
506
0
                                 LocalExchangeSharedState>) {
507
0
        return nullptr;
508
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
0
                                        MultiCastSharedState>) {
510
0
        throw Exception(Status::FatalError("should not reach here!"));
511
1.54M
    } else {
512
1.54M
        auto ss = LocalStateType::SharedStateType::create_shared();
513
1.54M
        ss->id = operator_id();
514
1.54M
        for (auto& dest : dests_id()) {
515
1.53M
            ss->related_op_ids.insert(dest);
516
1.53M
        }
517
1.54M
        return ss;
518
1.54M
    }
519
1.54M
}
_ZNK5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
504
96.8k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
505
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
506
                                 LocalExchangeSharedState>) {
507
        return nullptr;
508
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                        MultiCastSharedState>) {
510
        throw Exception(Status::FatalError("should not reach here!"));
511
96.8k
    } else {
512
96.8k
        auto ss = LocalStateType::SharedStateType::create_shared();
513
96.8k
        ss->id = operator_id();
514
96.8k
        for (auto& dest : dests_id()) {
515
96.7k
            ss->related_op_ids.insert(dest);
516
96.7k
        }
517
96.8k
        return ss;
518
96.8k
    }
519
96.8k
}
_ZNK5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
504
399k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
505
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
506
                                 LocalExchangeSharedState>) {
507
        return nullptr;
508
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                        MultiCastSharedState>) {
510
        throw Exception(Status::FatalError("should not reach here!"));
511
399k
    } else {
512
399k
        auto ss = LocalStateType::SharedStateType::create_shared();
513
399k
        ss->id = operator_id();
514
399k
        for (auto& dest : dests_id()) {
515
398k
            ss->related_op_ids.insert(dest);
516
398k
        }
517
399k
        return ss;
518
399k
    }
519
399k
}
_ZNK5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
504
43
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
505
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
506
                                 LocalExchangeSharedState>) {
507
        return nullptr;
508
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                        MultiCastSharedState>) {
510
        throw Exception(Status::FatalError("should not reach here!"));
511
43
    } else {
512
43
        auto ss = LocalStateType::SharedStateType::create_shared();
513
43
        ss->id = operator_id();
514
43
        for (auto& dest : dests_id()) {
515
43
            ss->related_op_ids.insert(dest);
516
43
        }
517
43
        return ss;
518
43
    }
519
43
}
_ZNK5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
504
3
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
505
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
506
                                 LocalExchangeSharedState>) {
507
        return nullptr;
508
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                        MultiCastSharedState>) {
510
        throw Exception(Status::FatalError("should not reach here!"));
511
3
    } else {
512
3
        auto ss = LocalStateType::SharedStateType::create_shared();
513
3
        ss->id = operator_id();
514
3
        for (auto& dest : dests_id()) {
515
3
            ss->related_op_ids.insert(dest);
516
3
        }
517
3
        return ss;
518
3
    }
519
3
}
_ZNK5doris17DataSinkOperatorXINS_24ResultFileSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
504
452
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
505
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
506
                                 LocalExchangeSharedState>) {
507
        return nullptr;
508
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                        MultiCastSharedState>) {
510
        throw Exception(Status::FatalError("should not reach here!"));
511
452
    } else {
512
452
        auto ss = LocalStateType::SharedStateType::create_shared();
513
452
        ss->id = operator_id();
514
452
        for (auto& dest : dests_id()) {
515
451
            ss->related_op_ids.insert(dest);
516
451
        }
517
452
        return ss;
518
452
    }
519
452
}
_ZNK5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
504
43.8k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
505
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
506
                                 LocalExchangeSharedState>) {
507
        return nullptr;
508
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                        MultiCastSharedState>) {
510
        throw Exception(Status::FatalError("should not reach here!"));
511
43.8k
    } else {
512
43.8k
        auto ss = LocalStateType::SharedStateType::create_shared();
513
43.8k
        ss->id = operator_id();
514
43.8k
        for (auto& dest : dests_id()) {
515
43.6k
            ss->related_op_ids.insert(dest);
516
43.6k
        }
517
43.8k
        return ss;
518
43.8k
    }
519
43.8k
}
_ZNK5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE19create_shared_stateEv
Line
Count
Source
504
4.86k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
505
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
506
                                 LocalExchangeSharedState>) {
507
        return nullptr;
508
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                        MultiCastSharedState>) {
510
        throw Exception(Status::FatalError("should not reach here!"));
511
4.86k
    } else {
512
4.86k
        auto ss = LocalStateType::SharedStateType::create_shared();
513
4.86k
        ss->id = operator_id();
514
4.86k
        for (auto& dest : dests_id()) {
515
4.86k
            ss->related_op_ids.insert(dest);
516
4.86k
        }
517
4.86k
        return ss;
518
4.86k
    }
519
4.86k
}
_ZNK5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
504
2.61k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
505
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
506
                                 LocalExchangeSharedState>) {
507
        return nullptr;
508
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                        MultiCastSharedState>) {
510
        throw Exception(Status::FatalError("should not reach here!"));
511
2.61k
    } else {
512
2.61k
        auto ss = LocalStateType::SharedStateType::create_shared();
513
2.61k
        ss->id = operator_id();
514
2.61k
        for (auto& dest : dests_id()) {
515
2.61k
            ss->related_op_ids.insert(dest);
516
2.61k
        }
517
2.61k
        return ss;
518
2.61k
    }
519
2.61k
}
_ZNK5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
504
78
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
505
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
506
                                 LocalExchangeSharedState>) {
507
        return nullptr;
508
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                        MultiCastSharedState>) {
510
        throw Exception(Status::FatalError("should not reach here!"));
511
78
    } else {
512
78
        auto ss = LocalStateType::SharedStateType::create_shared();
513
78
        ss->id = operator_id();
514
78
        for (auto& dest : dests_id()) {
515
78
            ss->related_op_ids.insert(dest);
516
78
        }
517
78
        return ss;
518
78
    }
519
78
}
_ZNK5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
504
2.01k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
505
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
506
                                 LocalExchangeSharedState>) {
507
        return nullptr;
508
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                        MultiCastSharedState>) {
510
        throw Exception(Status::FatalError("should not reach here!"));
511
2.01k
    } else {
512
2.01k
        auto ss = LocalStateType::SharedStateType::create_shared();
513
2.01k
        ss->id = operator_id();
514
2.01k
        for (auto& dest : dests_id()) {
515
2.01k
            ss->related_op_ids.insert(dest);
516
2.01k
        }
517
2.01k
        return ss;
518
2.01k
    }
519
2.01k
}
_ZNK5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
504
24
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
505
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
506
                                 LocalExchangeSharedState>) {
507
        return nullptr;
508
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                        MultiCastSharedState>) {
510
        throw Exception(Status::FatalError("should not reach here!"));
511
24
    } else {
512
24
        auto ss = LocalStateType::SharedStateType::create_shared();
513
24
        ss->id = operator_id();
514
24
        for (auto& dest : dests_id()) {
515
24
            ss->related_op_ids.insert(dest);
516
24
        }
517
24
        return ss;
518
24
    }
519
24
}
_ZNK5doris17DataSinkOperatorXINS_27IcebergDeleteSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
504
352
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
505
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
506
                                 LocalExchangeSharedState>) {
507
        return nullptr;
508
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                        MultiCastSharedState>) {
510
        throw Exception(Status::FatalError("should not reach here!"));
511
352
    } else {
512
352
        auto ss = LocalStateType::SharedStateType::create_shared();
513
352
        ss->id = operator_id();
514
352
        for (auto& dest : dests_id()) {
515
352
            ss->related_op_ids.insert(dest);
516
352
        }
517
352
        return ss;
518
352
    }
519
352
}
_ZNK5doris17DataSinkOperatorXINS_26IcebergMergeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
504
858
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
505
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
506
                                 LocalExchangeSharedState>) {
507
        return nullptr;
508
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                        MultiCastSharedState>) {
510
        throw Exception(Status::FatalError("should not reach here!"));
511
858
    } else {
512
858
        auto ss = LocalStateType::SharedStateType::create_shared();
513
858
        ss->id = operator_id();
514
858
        for (auto& dest : dests_id()) {
515
858
            ss->related_op_ids.insert(dest);
516
858
        }
517
858
        return ss;
518
858
    }
519
858
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_21MCTableSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
504
8.36k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
505
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
506
                                 LocalExchangeSharedState>) {
507
        return nullptr;
508
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                        MultiCastSharedState>) {
510
        throw Exception(Status::FatalError("should not reach here!"));
511
8.36k
    } else {
512
8.36k
        auto ss = LocalStateType::SharedStateType::create_shared();
513
8.36k
        ss->id = operator_id();
514
8.36k
        for (auto& dest : dests_id()) {
515
8.36k
            ss->related_op_ids.insert(dest);
516
8.36k
        }
517
8.36k
        return ss;
518
8.36k
    }
519
8.36k
}
_ZNK5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
504
84
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
505
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
506
                                 LocalExchangeSharedState>) {
507
        return nullptr;
508
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                        MultiCastSharedState>) {
510
        throw Exception(Status::FatalError("should not reach here!"));
511
84
    } else {
512
84
        auto ss = LocalStateType::SharedStateType::create_shared();
513
84
        ss->id = operator_id();
514
86
        for (auto& dest : dests_id()) {
515
86
            ss->related_op_ids.insert(dest);
516
86
        }
517
84
        return ss;
518
84
    }
519
84
}
_ZNK5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
504
232k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
505
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
506
                                 LocalExchangeSharedState>) {
507
        return nullptr;
508
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                        MultiCastSharedState>) {
510
        throw Exception(Status::FatalError("should not reach here!"));
511
232k
    } else {
512
232k
        auto ss = LocalStateType::SharedStateType::create_shared();
513
232k
        ss->id = operator_id();
514
232k
        for (auto& dest : dests_id()) {
515
232k
            ss->related_op_ids.insert(dest);
516
232k
        }
517
232k
        return ss;
518
232k
    }
519
232k
}
_ZNK5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
504
33
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
505
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
506
                                 LocalExchangeSharedState>) {
507
        return nullptr;
508
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                        MultiCastSharedState>) {
510
        throw Exception(Status::FatalError("should not reach here!"));
511
33
    } else {
512
33
        auto ss = LocalStateType::SharedStateType::create_shared();
513
33
        ss->id = operator_id();
514
33
        for (auto& dest : dests_id()) {
515
32
            ss->related_op_ids.insert(dest);
516
32
        }
517
33
        return ss;
518
33
    }
519
33
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
504
120k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
505
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
506
                                 LocalExchangeSharedState>) {
507
        return nullptr;
508
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                        MultiCastSharedState>) {
510
        throw Exception(Status::FatalError("should not reach here!"));
511
120k
    } else {
512
120k
        auto ss = LocalStateType::SharedStateType::create_shared();
513
120k
        ss->id = operator_id();
514
120k
        for (auto& dest : dests_id()) {
515
120k
            ss->related_op_ids.insert(dest);
516
120k
        }
517
120k
        return ss;
518
120k
    }
519
120k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
504
224
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
505
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
506
                                 LocalExchangeSharedState>) {
507
        return nullptr;
508
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                        MultiCastSharedState>) {
510
        throw Exception(Status::FatalError("should not reach here!"));
511
224
    } else {
512
224
        auto ss = LocalStateType::SharedStateType::create_shared();
513
224
        ss->id = operator_id();
514
224
        for (auto& dest : dests_id()) {
515
224
            ss->related_op_ids.insert(dest);
516
224
        }
517
224
        return ss;
518
224
    }
519
224
}
_ZNK5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
504
617k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
505
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
506
                                 LocalExchangeSharedState>) {
507
        return nullptr;
508
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                        MultiCastSharedState>) {
510
        throw Exception(Status::FatalError("should not reach here!"));
511
617k
    } else {
512
617k
        auto ss = LocalStateType::SharedStateType::create_shared();
513
617k
        ss->id = operator_id();
514
617k
        for (auto& dest : dests_id()) {
515
613k
            ss->related_op_ids.insert(dest);
516
613k
        }
517
617k
        return ss;
518
617k
    }
519
617k
}
_ZNK5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
504
8.16k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
505
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
506
                                 LocalExchangeSharedState>) {
507
        return nullptr;
508
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                        MultiCastSharedState>) {
510
        throw Exception(Status::FatalError("should not reach here!"));
511
8.16k
    } else {
512
8.16k
        auto ss = LocalStateType::SharedStateType::create_shared();
513
8.16k
        ss->id = operator_id();
514
8.17k
        for (auto& dest : dests_id()) {
515
8.17k
            ss->related_op_ids.insert(dest);
516
8.17k
        }
517
8.16k
        return ss;
518
8.16k
    }
519
8.16k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
504
727
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
505
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
506
                                 LocalExchangeSharedState>) {
507
        return nullptr;
508
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                        MultiCastSharedState>) {
510
        throw Exception(Status::FatalError("should not reach here!"));
511
727
    } else {
512
727
        auto ss = LocalStateType::SharedStateType::create_shared();
513
727
        ss->id = operator_id();
514
729
        for (auto& dest : dests_id()) {
515
729
            ss->related_op_ids.insert(dest);
516
729
        }
517
727
        return ss;
518
727
    }
519
727
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE19create_shared_stateEv
Line
Count
Source
504
2.57k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
505
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
506
                                 LocalExchangeSharedState>) {
507
        return nullptr;
508
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                        MultiCastSharedState>) {
510
        throw Exception(Status::FatalError("should not reach here!"));
511
2.57k
    } else {
512
2.57k
        auto ss = LocalStateType::SharedStateType::create_shared();
513
2.57k
        ss->id = operator_id();
514
2.57k
        for (auto& dest : dests_id()) {
515
2.56k
            ss->related_op_ids.insert(dest);
516
2.56k
        }
517
2.57k
        return ss;
518
2.57k
    }
519
2.57k
}
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE19create_shared_stateEv
Line
Count
Source
504
2.47k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
505
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
506
                                 LocalExchangeSharedState>) {
507
        return nullptr;
508
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                        MultiCastSharedState>) {
510
        throw Exception(Status::FatalError("should not reach here!"));
511
2.47k
    } else {
512
2.47k
        auto ss = LocalStateType::SharedStateType::create_shared();
513
2.47k
        ss->id = operator_id();
514
2.47k
        for (auto& dest : dests_id()) {
515
2.47k
            ss->related_op_ids.insert(dest);
516
2.47k
        }
517
2.47k
        return ss;
518
2.47k
    }
519
2.47k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
504
568
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
505
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
506
                                 LocalExchangeSharedState>) {
507
        return nullptr;
508
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                        MultiCastSharedState>) {
510
        throw Exception(Status::FatalError("should not reach here!"));
511
568
    } else {
512
568
        auto ss = LocalStateType::SharedStateType::create_shared();
513
568
        ss->id = operator_id();
514
568
        for (auto& dest : dests_id()) {
515
565
            ss->related_op_ids.insert(dest);
516
565
        }
517
568
        return ss;
518
568
    }
519
568
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
504
101
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
505
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
506
                                 LocalExchangeSharedState>) {
507
        return nullptr;
508
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                        MultiCastSharedState>) {
510
        throw Exception(Status::FatalError("should not reach here!"));
511
101
    } else {
512
101
        auto ss = LocalStateType::SharedStateType::create_shared();
513
101
        ss->id = operator_id();
514
101
        for (auto& dest : dests_id()) {
515
101
            ss->related_op_ids.insert(dest);
516
101
        }
517
101
        return ss;
518
101
    }
519
101
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE19create_shared_stateEv
520
521
template <typename LocalStateType>
522
2.32M
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
523
2.32M
    auto local_state = LocalStateType::create_unique(state, this);
524
2.32M
    RETURN_IF_ERROR(local_state->init(state, info));
525
2.32M
    state->emplace_local_state(operator_id(), std::move(local_state));
526
2.32M
    return Status::OK();
527
2.32M
}
_ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
522
67.1k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
523
67.1k
    auto local_state = LocalStateType::create_unique(state, this);
524
67.1k
    RETURN_IF_ERROR(local_state->init(state, info));
525
67.1k
    state->emplace_local_state(operator_id(), std::move(local_state));
526
67.1k
    return Status::OK();
527
67.1k
}
_ZN5doris9OperatorXINS_18OlapScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
522
274k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
523
274k
    auto local_state = LocalStateType::create_unique(state, this);
524
274k
    RETURN_IF_ERROR(local_state->init(state, info));
525
274k
    state->emplace_local_state(operator_id(), std::move(local_state));
526
274k
    return Status::OK();
527
274k
}
_ZN5doris9OperatorXINS_21GroupCommitLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
522
136
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
523
136
    auto local_state = LocalStateType::create_unique(state, this);
524
136
    RETURN_IF_ERROR(local_state->init(state, info));
525
136
    state->emplace_local_state(operator_id(), std::move(local_state));
526
136
    return Status::OK();
527
136
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_18JDBCScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_18FileScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
522
20.5k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
523
20.5k
    auto local_state = LocalStateType::create_unique(state, this);
524
20.5k
    RETURN_IF_ERROR(local_state->init(state, info));
525
20.5k
    state->emplace_local_state(operator_id(), std::move(local_state));
526
20.5k
    return Status::OK();
527
20.5k
}
_ZN5doris9OperatorXINS_18AnalyticLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
522
8.34k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
523
8.34k
    auto local_state = LocalStateType::create_unique(state, this);
524
8.34k
    RETURN_IF_ERROR(local_state->init(state, info));
525
8.34k
    state->emplace_local_state(operator_id(), std::move(local_state));
526
8.34k
    return Status::OK();
527
8.34k
}
_ZN5doris9OperatorXINS_14SortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
522
8.45k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
523
8.45k
    auto local_state = LocalStateType::create_unique(state, this);
524
8.45k
    RETURN_IF_ERROR(local_state->init(state, info));
525
8.45k
    state->emplace_local_state(operator_id(), std::move(local_state));
526
8.45k
    return Status::OK();
527
8.45k
}
_ZN5doris9OperatorXINS_19SpillSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
522
23
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
523
23
    auto local_state = LocalStateType::create_unique(state, this);
524
23
    RETURN_IF_ERROR(local_state->init(state, info));
525
23
    state->emplace_local_state(operator_id(), std::move(local_state));
526
23
    return Status::OK();
527
23
}
_ZN5doris9OperatorXINS_24LocalMergeSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
522
222k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
523
222k
    auto local_state = LocalStateType::create_unique(state, this);
524
222k
    RETURN_IF_ERROR(local_state->init(state, info));
525
222k
    state->emplace_local_state(operator_id(), std::move(local_state));
526
222k
    return Status::OK();
527
222k
}
_ZN5doris9OperatorXINS_13AggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
522
119k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
523
119k
    auto local_state = LocalStateType::create_unique(state, this);
524
119k
    RETURN_IF_ERROR(local_state->init(state, info));
525
119k
    state->emplace_local_state(operator_id(), std::move(local_state));
526
119k
    return Status::OK();
527
119k
}
_ZN5doris9OperatorXINS_21BucketedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
522
348
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
523
348
    auto local_state = LocalStateType::create_unique(state, this);
524
348
    RETURN_IF_ERROR(local_state->init(state, info));
525
348
    state->emplace_local_state(operator_id(), std::move(local_state));
526
348
    return Status::OK();
527
348
}
_ZN5doris9OperatorXINS_24PartitionedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
522
215
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
523
215
    auto local_state = LocalStateType::create_unique(state, this);
524
215
    RETURN_IF_ERROR(local_state->init(state, info));
525
215
    state->emplace_local_state(operator_id(), std::move(local_state));
526
215
    return Status::OK();
527
215
}
_ZN5doris9OperatorXINS_23TableFunctionLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
522
4.25k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
523
4.25k
    auto local_state = LocalStateType::create_unique(state, this);
524
4.25k
    RETURN_IF_ERROR(local_state->init(state, info));
525
4.25k
    state->emplace_local_state(operator_id(), std::move(local_state));
526
4.25k
    return Status::OK();
527
4.25k
}
_ZN5doris9OperatorXINS_18ExchangeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
522
348k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
523
348k
    auto local_state = LocalStateType::create_unique(state, this);
524
348k
    RETURN_IF_ERROR(local_state->init(state, info));
525
348k
    state->emplace_local_state(operator_id(), std::move(local_state));
526
348k
    return Status::OK();
527
348k
}
_ZN5doris9OperatorXINS_16RepeatLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
522
1.22k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
523
1.22k
    auto local_state = LocalStateType::create_unique(state, this);
524
1.22k
    RETURN_IF_ERROR(local_state->init(state, info));
525
1.22k
    state->emplace_local_state(operator_id(), std::move(local_state));
526
1.22k
    return Status::OK();
527
1.22k
}
_ZN5doris9OperatorXINS_29NestedLoopJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
522
8.15k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
523
8.15k
    auto local_state = LocalStateType::create_unique(state, this);
524
8.15k
    RETURN_IF_ERROR(local_state->init(state, info));
525
8.15k
    state->emplace_local_state(operator_id(), std::move(local_state));
526
8.15k
    return Status::OK();
527
8.15k
}
_ZN5doris9OperatorXINS_23AssertNumRowsLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
522
121
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
523
121
    auto local_state = LocalStateType::create_unique(state, this);
524
121
    RETURN_IF_ERROR(local_state->init(state, info));
525
121
    state->emplace_local_state(operator_id(), std::move(local_state));
526
121
    return Status::OK();
527
121
}
_ZN5doris9OperatorXINS_18EmptySetLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
522
1.73k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
523
1.73k
    auto local_state = LocalStateType::create_unique(state, this);
524
1.73k
    RETURN_IF_ERROR(local_state->init(state, info));
525
1.73k
    state->emplace_local_state(operator_id(), std::move(local_state));
526
1.73k
    return Status::OK();
527
1.73k
}
_ZN5doris9OperatorXINS_21UnionSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
522
53.6k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
523
53.6k
    auto local_state = LocalStateType::create_unique(state, this);
524
53.6k
    RETURN_IF_ERROR(local_state->init(state, info));
525
53.6k
    state->emplace_local_state(operator_id(), std::move(local_state));
526
53.6k
    return Status::OK();
527
53.6k
}
_ZN5doris9OperatorXINS_35MultiCastDataStreamSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
522
8.52k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
523
8.52k
    auto local_state = LocalStateType::create_unique(state, this);
524
8.52k
    RETURN_IF_ERROR(local_state->init(state, info));
525
8.52k
    state->emplace_local_state(operator_id(), std::move(local_state));
526
8.52k
    return Status::OK();
527
8.52k
}
_ZN5doris9OperatorXINS_29PartitionSortSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
522
617
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
523
617
    auto local_state = LocalStateType::create_unique(state, this);
524
617
    RETURN_IF_ERROR(local_state->init(state, info));
525
617
    state->emplace_local_state(operator_id(), std::move(local_state));
526
617
    return Status::OK();
527
617
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
522
2.49k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
523
2.49k
    auto local_state = LocalStateType::create_unique(state, this);
524
2.49k
    RETURN_IF_ERROR(local_state->init(state, info));
525
2.49k
    state->emplace_local_state(operator_id(), std::move(local_state));
526
2.49k
    return Status::OK();
527
2.49k
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
522
2.41k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
523
2.41k
    auto local_state = LocalStateType::create_unique(state, this);
524
2.41k
    RETURN_IF_ERROR(local_state->init(state, info));
525
2.41k
    state->emplace_local_state(operator_id(), std::move(local_state));
526
2.41k
    return Status::OK();
527
2.41k
}
_ZN5doris9OperatorXINS_17DataGenLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
522
414
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
523
414
    auto local_state = LocalStateType::create_unique(state, this);
524
414
    RETURN_IF_ERROR(local_state->init(state, info));
525
414
    state->emplace_local_state(operator_id(), std::move(local_state));
526
414
    return Status::OK();
527
414
}
_ZN5doris9OperatorXINS_20SchemaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
522
1.90k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
523
1.90k
    auto local_state = LocalStateType::create_unique(state, this);
524
1.90k
    RETURN_IF_ERROR(local_state->init(state, info));
525
1.90k
    state->emplace_local_state(operator_id(), std::move(local_state));
526
1.90k
    return Status::OK();
527
1.90k
}
_ZN5doris9OperatorXINS_18MetaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
522
5.97k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
523
5.97k
    auto local_state = LocalStateType::create_unique(state, this);
524
5.97k
    RETURN_IF_ERROR(local_state->init(state, info));
525
5.97k
    state->emplace_local_state(operator_id(), std::move(local_state));
526
5.97k
    return Status::OK();
527
5.97k
}
_ZN5doris9OperatorXINS_29LocalExchangeSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
522
714k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
523
714k
    auto local_state = LocalStateType::create_unique(state, this);
524
714k
    RETURN_IF_ERROR(local_state->init(state, info));
525
714k
    state->emplace_local_state(operator_id(), std::move(local_state));
526
714k
    return Status::OK();
527
714k
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_34PartitionedHashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_21CacheSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
522
14
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
523
14
    auto local_state = LocalStateType::create_unique(state, this);
524
14
    RETURN_IF_ERROR(local_state->init(state, info));
525
14
    state->emplace_local_state(operator_id(), std::move(local_state));
526
14
    return Status::OK();
527
14
}
_ZN5doris9OperatorXINS_22RecCTESourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
522
164
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
523
164
    auto local_state = LocalStateType::create_unique(state, this);
524
164
    RETURN_IF_ERROR(local_state->init(state, info));
525
164
    state->emplace_local_state(operator_id(), std::move(local_state));
526
164
    return Status::OK();
527
164
}
_ZN5doris9OperatorXINS_20RecCTEScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
522
2.18k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
523
2.18k
    auto local_state = LocalStateType::create_unique(state, this);
524
2.18k
    RETURN_IF_ERROR(local_state->init(state, info));
525
2.18k
    state->emplace_local_state(operator_id(), std::move(local_state));
526
2.18k
    return Status::OK();
527
2.18k
}
_ZN5doris9OperatorXINS_25MaterializationLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
522
1.27k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
523
1.27k
    auto local_state = LocalStateType::create_unique(state, this);
524
1.27k
    RETURN_IF_ERROR(local_state->init(state, info));
525
1.27k
    state->emplace_local_state(operator_id(), std::move(local_state));
526
1.27k
    return Status::OK();
527
1.27k
}
_ZN5doris9OperatorXINS_16SelectLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
522
2.10k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
523
2.10k
    auto local_state = LocalStateType::create_unique(state, this);
524
2.10k
    RETURN_IF_ERROR(local_state->init(state, info));
525
2.10k
    state->emplace_local_state(operator_id(), std::move(local_state));
526
2.10k
    return Status::OK();
527
2.10k
}
_ZN5doris9OperatorXINS_22StreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
522
9.43k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
523
9.43k
    auto local_state = LocalStateType::create_unique(state, this);
524
9.43k
    RETURN_IF_ERROR(local_state->init(state, info));
525
9.43k
    state->emplace_local_state(operator_id(), std::move(local_state));
526
9.43k
    return Status::OK();
527
9.43k
}
_ZN5doris9OperatorXINS_30DistinctStreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
522
427k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
523
427k
    auto local_state = LocalStateType::create_unique(state, this);
524
427k
    RETURN_IF_ERROR(local_state->init(state, info));
525
427k
    state->emplace_local_state(operator_id(), std::move(local_state));
526
427k
    return Status::OK();
527
427k
}
528
529
PipelineXSinkLocalStateBase::PipelineXSinkLocalStateBase(DataSinkOperatorXBase* parent,
530
                                                         RuntimeState* state)
531
1.87M
        : _parent(parent), _state(state) {}
532
533
PipelineXLocalStateBase::PipelineXLocalStateBase(RuntimeState* state, OperatorXBase* parent)
534
2.31M
        : _num_rows_returned(0),
535
2.31M
          _rows_returned_counter(nullptr),
536
2.31M
          _parent(parent),
537
2.31M
          _state(state),
538
2.31M
          _budget(state->batch_size(), state->preferred_block_size_bytes()) {}
539
540
template <typename SharedStateArg>
541
2.32M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
542
2.32M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
543
2.32M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
544
2.32M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
545
2.32M
    _operator_profile->set_metadata(_parent->node_id());
546
    // indent is false so that source operator will have same
547
    // indentation_level with its parent operator.
548
2.32M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
549
2.32M
    _operator_profile->add_child(_common_profile.get(), true);
550
2.32M
    _operator_profile->add_child(_custom_profile.get(), true);
551
2.32M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
552
2.32M
    if constexpr (!is_fake_shared) {
553
1.22M
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
554
730k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
555
730k
                                    .first.get()
556
730k
                                    ->template cast<SharedStateArg>();
557
558
730k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
559
730k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
560
730k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
561
730k
        } else if (info.shared_state) {
562
424k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
563
0
                DCHECK(false);
564
0
            }
565
            // For UnionSourceOperator without children, there is no shared state.
566
424k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
567
568
424k
            _dependency = _shared_state->create_source_dependency(
569
424k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
570
424k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
571
424k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
572
424k
        } else {
573
70.1k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
574
7.90k
                DCHECK(false);
575
7.90k
            }
576
70.1k
        }
577
1.22M
    }
578
579
2.32M
    if (must_set_shared_state() && _shared_state == nullptr) {
580
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
581
0
    }
582
583
2.32M
    _rows_returned_counter =
584
2.32M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
585
2.32M
    _blocks_returned_counter =
586
2.32M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
587
2.32M
    _output_block_bytes_counter =
588
2.32M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
589
2.32M
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
590
2.32M
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
591
2.32M
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
592
2.32M
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
593
2.32M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
594
2.32M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
595
2.32M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
596
2.32M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
597
2.32M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
598
2.32M
    _memory_used_counter =
599
2.32M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
600
2.32M
    _common_profile->add_info_string("IsColocate",
601
2.32M
                                     std::to_string(_parent->is_colocated_operator()));
602
2.32M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
603
2.32M
    _common_profile->add_info_string("FollowedByShuffledOperator",
604
2.32M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
605
2.32M
    return Status::OK();
606
2.32M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
541
67.3k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
542
67.3k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
543
67.3k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
544
67.3k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
545
67.3k
    _operator_profile->set_metadata(_parent->node_id());
546
    // indent is false so that source operator will have same
547
    // indentation_level with its parent operator.
548
67.3k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
549
67.3k
    _operator_profile->add_child(_common_profile.get(), true);
550
67.3k
    _operator_profile->add_child(_custom_profile.get(), true);
551
67.3k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
552
67.3k
    if constexpr (!is_fake_shared) {
553
67.3k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
554
18.3k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
555
18.3k
                                    .first.get()
556
18.3k
                                    ->template cast<SharedStateArg>();
557
558
18.3k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
559
18.3k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
560
18.3k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
561
48.9k
        } else if (info.shared_state) {
562
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
563
                DCHECK(false);
564
            }
565
            // For UnionSourceOperator without children, there is no shared state.
566
48.5k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
567
568
48.5k
            _dependency = _shared_state->create_source_dependency(
569
48.5k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
570
48.5k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
571
48.5k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
572
48.5k
        } else {
573
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
574
                DCHECK(false);
575
            }
576
485
        }
577
67.3k
    }
578
579
67.3k
    if (must_set_shared_state() && _shared_state == nullptr) {
580
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
581
0
    }
582
583
67.3k
    _rows_returned_counter =
584
67.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
585
67.3k
    _blocks_returned_counter =
586
67.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
587
67.3k
    _output_block_bytes_counter =
588
67.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
589
67.3k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
590
67.3k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
591
67.3k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
592
67.3k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
593
67.3k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
594
67.3k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
595
67.3k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
596
67.3k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
597
67.3k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
598
67.3k
    _memory_used_counter =
599
67.3k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
600
67.3k
    _common_profile->add_info_string("IsColocate",
601
67.3k
                                     std::to_string(_parent->is_colocated_operator()));
602
67.3k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
603
67.3k
    _common_profile->add_info_string("FollowedByShuffledOperator",
604
67.3k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
605
67.3k
    return Status::OK();
606
67.3k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
541
1
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
542
1
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
543
1
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
544
1
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
545
1
    _operator_profile->set_metadata(_parent->node_id());
546
    // indent is false so that source operator will have same
547
    // indentation_level with its parent operator.
548
1
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
549
1
    _operator_profile->add_child(_common_profile.get(), true);
550
1
    _operator_profile->add_child(_custom_profile.get(), true);
551
1
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
552
1
    if constexpr (!is_fake_shared) {
553
1
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
554
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
555
0
                                    .first.get()
556
0
                                    ->template cast<SharedStateArg>();
557
558
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
559
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
560
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
561
1
        } else if (info.shared_state) {
562
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
563
                DCHECK(false);
564
            }
565
            // For UnionSourceOperator without children, there is no shared state.
566
1
            _shared_state = info.shared_state->template cast<SharedStateArg>();
567
568
1
            _dependency = _shared_state->create_source_dependency(
569
1
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
570
1
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
571
1
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
572
1
        } else {
573
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
574
                DCHECK(false);
575
            }
576
0
        }
577
1
    }
578
579
1
    if (must_set_shared_state() && _shared_state == nullptr) {
580
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
581
0
    }
582
583
1
    _rows_returned_counter =
584
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
585
1
    _blocks_returned_counter =
586
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
587
1
    _output_block_bytes_counter =
588
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
589
1
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
590
1
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
591
1
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
592
1
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
593
1
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
594
1
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
595
1
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
596
1
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
597
1
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
598
1
    _memory_used_counter =
599
1
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
600
1
    _common_profile->add_info_string("IsColocate",
601
1
                                     std::to_string(_parent->is_colocated_operator()));
602
1
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
603
1
    _common_profile->add_info_string("FollowedByShuffledOperator",
604
1
                                     std::to_string(_parent->followed_by_shuffled_operator()));
605
1
    return Status::OK();
606
1
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
541
232k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
542
232k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
543
232k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
544
232k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
545
232k
    _operator_profile->set_metadata(_parent->node_id());
546
    // indent is false so that source operator will have same
547
    // indentation_level with its parent operator.
548
232k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
549
232k
    _operator_profile->add_child(_common_profile.get(), true);
550
232k
    _operator_profile->add_child(_custom_profile.get(), true);
551
232k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
552
232k
    if constexpr (!is_fake_shared) {
553
232k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
554
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
555
0
                                    .first.get()
556
0
                                    ->template cast<SharedStateArg>();
557
558
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
559
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
560
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
561
232k
        } else if (info.shared_state) {
562
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
563
                DCHECK(false);
564
            }
565
            // For UnionSourceOperator without children, there is no shared state.
566
223k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
567
568
223k
            _dependency = _shared_state->create_source_dependency(
569
223k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
570
223k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
571
223k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
572
223k
        } else {
573
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
574
                DCHECK(false);
575
            }
576
8.75k
        }
577
232k
    }
578
579
232k
    if (must_set_shared_state() && _shared_state == nullptr) {
580
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
581
0
    }
582
583
232k
    _rows_returned_counter =
584
232k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
585
232k
    _blocks_returned_counter =
586
232k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
587
232k
    _output_block_bytes_counter =
588
232k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
589
232k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
590
232k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
591
232k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
592
232k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
593
232k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
594
232k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
595
232k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
596
232k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
597
232k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
598
232k
    _memory_used_counter =
599
232k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
600
232k
    _common_profile->add_info_string("IsColocate",
601
232k
                                     std::to_string(_parent->is_colocated_operator()));
602
232k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
603
232k
    _common_profile->add_info_string("FollowedByShuffledOperator",
604
232k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
605
232k
    return Status::OK();
606
232k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
541
24
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
542
24
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
543
24
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
544
24
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
545
24
    _operator_profile->set_metadata(_parent->node_id());
546
    // indent is false so that source operator will have same
547
    // indentation_level with its parent operator.
548
24
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
549
24
    _operator_profile->add_child(_common_profile.get(), true);
550
24
    _operator_profile->add_child(_custom_profile.get(), true);
551
24
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
552
24
    if constexpr (!is_fake_shared) {
553
24
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
554
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
555
0
                                    .first.get()
556
0
                                    ->template cast<SharedStateArg>();
557
558
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
559
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
560
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
561
24
        } else if (info.shared_state) {
562
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
563
                DCHECK(false);
564
            }
565
            // For UnionSourceOperator without children, there is no shared state.
566
24
            _shared_state = info.shared_state->template cast<SharedStateArg>();
567
568
24
            _dependency = _shared_state->create_source_dependency(
569
24
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
570
24
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
571
24
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
572
24
        } else {
573
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
574
                DCHECK(false);
575
            }
576
0
        }
577
24
    }
578
579
24
    if (must_set_shared_state() && _shared_state == nullptr) {
580
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
581
0
    }
582
583
24
    _rows_returned_counter =
584
24
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
585
24
    _blocks_returned_counter =
586
24
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
587
24
    _output_block_bytes_counter =
588
24
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
589
24
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
590
24
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
591
24
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
592
24
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
593
24
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
594
24
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
595
24
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
596
24
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
597
24
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
598
24
    _memory_used_counter =
599
24
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
600
24
    _common_profile->add_info_string("IsColocate",
601
24
                                     std::to_string(_parent->is_colocated_operator()));
602
24
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
603
24
    _common_profile->add_info_string("FollowedByShuffledOperator",
604
24
                                     std::to_string(_parent->followed_by_shuffled_operator()));
605
24
    return Status::OK();
606
24
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
541
8.16k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
542
8.16k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
543
8.16k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
544
8.16k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
545
8.16k
    _operator_profile->set_metadata(_parent->node_id());
546
    // indent is false so that source operator will have same
547
    // indentation_level with its parent operator.
548
8.16k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
549
8.16k
    _operator_profile->add_child(_common_profile.get(), true);
550
8.16k
    _operator_profile->add_child(_custom_profile.get(), true);
551
8.16k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
552
8.16k
    if constexpr (!is_fake_shared) {
553
8.16k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
554
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
555
0
                                    .first.get()
556
0
                                    ->template cast<SharedStateArg>();
557
558
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
559
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
560
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
561
8.16k
        } else if (info.shared_state) {
562
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
563
                DCHECK(false);
564
            }
565
            // For UnionSourceOperator without children, there is no shared state.
566
8.13k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
567
568
8.13k
            _dependency = _shared_state->create_source_dependency(
569
8.13k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
570
8.13k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
571
8.13k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
572
8.13k
        } else {
573
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
574
                DCHECK(false);
575
            }
576
28
        }
577
8.16k
    }
578
579
8.16k
    if (must_set_shared_state() && _shared_state == nullptr) {
580
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
581
0
    }
582
583
8.16k
    _rows_returned_counter =
584
8.16k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
585
8.16k
    _blocks_returned_counter =
586
8.16k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
587
8.16k
    _output_block_bytes_counter =
588
8.16k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
589
8.16k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
590
8.16k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
591
8.16k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
592
8.16k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
593
8.16k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
594
8.16k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
595
8.16k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
596
8.16k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
597
8.16k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
598
8.16k
    _memory_used_counter =
599
8.16k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
600
8.16k
    _common_profile->add_info_string("IsColocate",
601
8.16k
                                     std::to_string(_parent->is_colocated_operator()));
602
8.16k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
603
8.16k
    _common_profile->add_info_string("FollowedByShuffledOperator",
604
8.16k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
605
8.16k
    return Status::OK();
606
8.16k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
541
8.37k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
542
8.37k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
543
8.37k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
544
8.37k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
545
8.37k
    _operator_profile->set_metadata(_parent->node_id());
546
    // indent is false so that source operator will have same
547
    // indentation_level with its parent operator.
548
8.37k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
549
8.37k
    _operator_profile->add_child(_common_profile.get(), true);
550
8.37k
    _operator_profile->add_child(_custom_profile.get(), true);
551
8.37k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
552
8.37k
    if constexpr (!is_fake_shared) {
553
8.37k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
554
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
555
0
                                    .first.get()
556
0
                                    ->template cast<SharedStateArg>();
557
558
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
559
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
560
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
561
8.37k
        } else if (info.shared_state) {
562
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
563
                DCHECK(false);
564
            }
565
            // For UnionSourceOperator without children, there is no shared state.
566
8.32k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
567
568
8.32k
            _dependency = _shared_state->create_source_dependency(
569
8.32k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
570
8.32k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
571
8.32k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
572
8.32k
        } else {
573
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
574
                DCHECK(false);
575
            }
576
51
        }
577
8.37k
    }
578
579
8.37k
    if (must_set_shared_state() && _shared_state == nullptr) {
580
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
581
0
    }
582
583
8.37k
    _rows_returned_counter =
584
8.37k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
585
8.37k
    _blocks_returned_counter =
586
8.37k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
587
8.37k
    _output_block_bytes_counter =
588
8.37k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
589
8.37k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
590
8.37k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
591
8.37k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
592
8.37k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
593
8.37k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
594
8.37k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
595
8.37k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
596
8.37k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
597
8.37k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
598
8.37k
    _memory_used_counter =
599
8.37k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
600
8.37k
    _common_profile->add_info_string("IsColocate",
601
8.37k
                                     std::to_string(_parent->is_colocated_operator()));
602
8.37k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
603
8.37k
    _common_profile->add_info_string("FollowedByShuffledOperator",
604
8.37k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
605
8.37k
    return Status::OK();
606
8.37k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
541
120k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
542
120k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
543
120k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
544
120k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
545
120k
    _operator_profile->set_metadata(_parent->node_id());
546
    // indent is false so that source operator will have same
547
    // indentation_level with its parent operator.
548
120k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
549
120k
    _operator_profile->add_child(_common_profile.get(), true);
550
120k
    _operator_profile->add_child(_custom_profile.get(), true);
551
120k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
552
120k
    if constexpr (!is_fake_shared) {
553
120k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
554
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
555
0
                                    .first.get()
556
0
                                    ->template cast<SharedStateArg>();
557
558
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
559
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
560
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
561
120k
        } else if (info.shared_state) {
562
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
563
                DCHECK(false);
564
            }
565
            // For UnionSourceOperator without children, there is no shared state.
566
119k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
567
568
119k
            _dependency = _shared_state->create_source_dependency(
569
119k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
570
119k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
571
119k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
572
119k
        } else {
573
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
574
                DCHECK(false);
575
            }
576
1.02k
        }
577
120k
    }
578
579
120k
    if (must_set_shared_state() && _shared_state == nullptr) {
580
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
581
0
    }
582
583
120k
    _rows_returned_counter =
584
120k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
585
120k
    _blocks_returned_counter =
586
120k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
587
120k
    _output_block_bytes_counter =
588
120k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
589
120k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
590
120k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
591
120k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
592
120k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
593
120k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
594
120k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
595
120k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
596
120k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
597
120k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
598
120k
    _memory_used_counter =
599
120k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
600
120k
    _common_profile->add_info_string("IsColocate",
601
120k
                                     std::to_string(_parent->is_colocated_operator()));
602
120k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
603
120k
    _common_profile->add_info_string("FollowedByShuffledOperator",
604
120k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
605
120k
    return Status::OK();
606
120k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
541
350
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
542
350
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
543
350
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
544
350
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
545
350
    _operator_profile->set_metadata(_parent->node_id());
546
    // indent is false so that source operator will have same
547
    // indentation_level with its parent operator.
548
350
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
549
350
    _operator_profile->add_child(_common_profile.get(), true);
550
350
    _operator_profile->add_child(_custom_profile.get(), true);
551
350
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
552
350
    if constexpr (!is_fake_shared) {
553
350
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
554
339
            _shared_state = info.shared_state_map.at(_parent->operator_id())
555
339
                                    .first.get()
556
339
                                    ->template cast<SharedStateArg>();
557
558
339
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
559
339
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
560
339
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
561
339
        } else if (info.shared_state) {
562
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
563
                DCHECK(false);
564
            }
565
            // For UnionSourceOperator without children, there is no shared state.
566
0
            _shared_state = info.shared_state->template cast<SharedStateArg>();
567
568
0
            _dependency = _shared_state->create_source_dependency(
569
0
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
570
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
571
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
572
11
        } else {
573
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
574
                DCHECK(false);
575
            }
576
11
        }
577
350
    }
578
579
350
    if (must_set_shared_state() && _shared_state == nullptr) {
580
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
581
0
    }
582
583
350
    _rows_returned_counter =
584
350
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
585
350
    _blocks_returned_counter =
586
350
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
587
350
    _output_block_bytes_counter =
588
350
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
589
350
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
590
350
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
591
350
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
592
350
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
593
350
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
594
350
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
595
350
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
596
350
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
597
350
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
598
350
    _memory_used_counter =
599
350
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
600
350
    _common_profile->add_info_string("IsColocate",
601
350
                                     std::to_string(_parent->is_colocated_operator()));
602
350
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
603
350
    _common_profile->add_info_string("FollowedByShuffledOperator",
604
350
                                     std::to_string(_parent->followed_by_shuffled_operator()));
605
350
    return Status::OK();
606
350
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
541
215
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
542
215
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
543
215
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
544
215
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
545
215
    _operator_profile->set_metadata(_parent->node_id());
546
    // indent is false so that source operator will have same
547
    // indentation_level with its parent operator.
548
215
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
549
215
    _operator_profile->add_child(_common_profile.get(), true);
550
215
    _operator_profile->add_child(_custom_profile.get(), true);
551
215
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
552
215
    if constexpr (!is_fake_shared) {
553
215
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
554
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
555
0
                                    .first.get()
556
0
                                    ->template cast<SharedStateArg>();
557
558
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
559
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
560
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
561
215
        } else if (info.shared_state) {
562
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
563
                DCHECK(false);
564
            }
565
            // For UnionSourceOperator without children, there is no shared state.
566
215
            _shared_state = info.shared_state->template cast<SharedStateArg>();
567
568
215
            _dependency = _shared_state->create_source_dependency(
569
215
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
570
215
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
571
215
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
572
215
        } else {
573
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
574
                DCHECK(false);
575
            }
576
0
        }
577
215
    }
578
579
215
    if (must_set_shared_state() && _shared_state == nullptr) {
580
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
581
0
    }
582
583
215
    _rows_returned_counter =
584
215
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
585
215
    _blocks_returned_counter =
586
215
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
587
215
    _output_block_bytes_counter =
588
215
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
589
215
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
590
215
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
591
215
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
592
215
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
593
215
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
594
215
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
595
215
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
596
215
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
597
215
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
598
215
    _memory_used_counter =
599
215
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
600
215
    _common_profile->add_info_string("IsColocate",
601
215
                                     std::to_string(_parent->is_colocated_operator()));
602
215
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
603
215
    _common_profile->add_info_string("FollowedByShuffledOperator",
604
215
                                     std::to_string(_parent->followed_by_shuffled_operator()));
605
215
    return Status::OK();
606
215
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
541
1.10M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
542
1.10M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
543
1.10M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
544
1.10M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
545
1.10M
    _operator_profile->set_metadata(_parent->node_id());
546
    // indent is false so that source operator will have same
547
    // indentation_level with its parent operator.
548
1.10M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
549
1.10M
    _operator_profile->add_child(_common_profile.get(), true);
550
1.10M
    _operator_profile->add_child(_custom_profile.get(), true);
551
1.10M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
552
    if constexpr (!is_fake_shared) {
553
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
554
            _shared_state = info.shared_state_map.at(_parent->operator_id())
555
                                    .first.get()
556
                                    ->template cast<SharedStateArg>();
557
558
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
559
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
560
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
561
        } else if (info.shared_state) {
562
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
563
                DCHECK(false);
564
            }
565
            // For UnionSourceOperator without children, there is no shared state.
566
            _shared_state = info.shared_state->template cast<SharedStateArg>();
567
568
            _dependency = _shared_state->create_source_dependency(
569
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
570
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
571
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
572
        } else {
573
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
574
                DCHECK(false);
575
            }
576
        }
577
    }
578
579
1.10M
    if (must_set_shared_state() && _shared_state == nullptr) {
580
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
581
0
    }
582
583
1.10M
    _rows_returned_counter =
584
1.10M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
585
1.10M
    _blocks_returned_counter =
586
1.10M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
587
1.10M
    _output_block_bytes_counter =
588
1.10M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
589
1.10M
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
590
1.10M
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
591
1.10M
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
592
1.10M
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
593
1.10M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
594
1.10M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
595
1.10M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
596
1.10M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
597
1.10M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
598
1.10M
    _memory_used_counter =
599
1.10M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
600
1.10M
    _common_profile->add_info_string("IsColocate",
601
1.10M
                                     std::to_string(_parent->is_colocated_operator()));
602
1.10M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
603
1.10M
    _common_profile->add_info_string("FollowedByShuffledOperator",
604
1.10M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
605
1.10M
    return Status::OK();
606
1.10M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
541
53.6k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
542
53.6k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
543
53.6k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
544
53.6k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
545
53.6k
    _operator_profile->set_metadata(_parent->node_id());
546
    // indent is false so that source operator will have same
547
    // indentation_level with its parent operator.
548
53.6k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
549
53.6k
    _operator_profile->add_child(_common_profile.get(), true);
550
53.6k
    _operator_profile->add_child(_custom_profile.get(), true);
551
53.6k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
552
53.6k
    if constexpr (!is_fake_shared) {
553
53.6k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
554
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
555
0
                                    .first.get()
556
0
                                    ->template cast<SharedStateArg>();
557
558
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
559
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
560
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
561
53.6k
        } else if (info.shared_state) {
562
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
563
                DCHECK(false);
564
            }
565
            // For UnionSourceOperator without children, there is no shared state.
566
2.42k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
567
568
2.42k
            _dependency = _shared_state->create_source_dependency(
569
2.42k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
570
2.42k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
571
2.42k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
572
51.2k
        } else {
573
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
574
                DCHECK(false);
575
            }
576
51.2k
        }
577
53.6k
    }
578
579
53.6k
    if (must_set_shared_state() && _shared_state == nullptr) {
580
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
581
0
    }
582
583
53.6k
    _rows_returned_counter =
584
53.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
585
53.6k
    _blocks_returned_counter =
586
53.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
587
53.6k
    _output_block_bytes_counter =
588
53.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
589
53.6k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
590
53.6k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
591
53.6k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
592
53.6k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
593
53.6k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
594
53.6k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
595
53.6k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
596
53.6k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
597
53.6k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
598
53.6k
    _memory_used_counter =
599
53.6k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
600
53.6k
    _common_profile->add_info_string("IsColocate",
601
53.6k
                                     std::to_string(_parent->is_colocated_operator()));
602
53.6k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
603
53.6k
    _common_profile->add_info_string("FollowedByShuffledOperator",
604
53.6k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
605
53.6k
    return Status::OK();
606
53.6k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
541
26
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
542
26
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
543
26
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
544
26
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
545
26
    _operator_profile->set_metadata(_parent->node_id());
546
    // indent is false so that source operator will have same
547
    // indentation_level with its parent operator.
548
26
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
549
26
    _operator_profile->add_child(_common_profile.get(), true);
550
26
    _operator_profile->add_child(_custom_profile.get(), true);
551
26
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
552
26
    if constexpr (!is_fake_shared) {
553
26
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
554
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
555
0
                                    .first.get()
556
0
                                    ->template cast<SharedStateArg>();
557
558
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
559
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
560
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
561
26
        } else if (info.shared_state) {
562
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
563
                DCHECK(false);
564
            }
565
            // For UnionSourceOperator without children, there is no shared state.
566
26
            _shared_state = info.shared_state->template cast<SharedStateArg>();
567
568
26
            _dependency = _shared_state->create_source_dependency(
569
26
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
570
26
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
571
26
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
572
26
        } else {
573
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
574
                DCHECK(false);
575
            }
576
0
        }
577
26
    }
578
579
26
    if (must_set_shared_state() && _shared_state == nullptr) {
580
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
581
0
    }
582
583
26
    _rows_returned_counter =
584
26
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
585
26
    _blocks_returned_counter =
586
26
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
587
26
    _output_block_bytes_counter =
588
26
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
589
26
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
590
26
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
591
26
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
592
26
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
593
26
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
594
26
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
595
26
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
596
26
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
597
26
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
598
26
    _memory_used_counter =
599
26
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
600
26
    _common_profile->add_info_string("IsColocate",
601
26
                                     std::to_string(_parent->is_colocated_operator()));
602
26
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
603
26
    _common_profile->add_info_string("FollowedByShuffledOperator",
604
26
                                     std::to_string(_parent->followed_by_shuffled_operator()));
605
26
    return Status::OK();
606
26
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
541
8.53k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
542
8.53k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
543
8.53k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
544
8.53k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
545
8.53k
    _operator_profile->set_metadata(_parent->node_id());
546
    // indent is false so that source operator will have same
547
    // indentation_level with its parent operator.
548
8.53k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
549
8.53k
    _operator_profile->add_child(_common_profile.get(), true);
550
8.53k
    _operator_profile->add_child(_custom_profile.get(), true);
551
8.53k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
552
8.53k
    if constexpr (!is_fake_shared) {
553
8.53k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
554
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
555
0
                                    .first.get()
556
0
                                    ->template cast<SharedStateArg>();
557
558
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
559
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
560
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
561
8.53k
        } else if (info.shared_state) {
562
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
563
                DCHECK(false);
564
            }
565
            // For UnionSourceOperator without children, there is no shared state.
566
8.51k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
567
568
8.51k
            _dependency = _shared_state->create_source_dependency(
569
8.51k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
570
8.51k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
571
8.51k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
572
8.51k
        } else {
573
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
574
                DCHECK(false);
575
            }
576
28
        }
577
8.53k
    }
578
579
8.53k
    if (must_set_shared_state() && _shared_state == nullptr) {
580
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
581
0
    }
582
583
8.53k
    _rows_returned_counter =
584
8.53k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
585
8.53k
    _blocks_returned_counter =
586
8.53k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
587
8.53k
    _output_block_bytes_counter =
588
8.53k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
589
8.53k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
590
8.53k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
591
8.53k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
592
8.53k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
593
8.53k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
594
8.53k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
595
8.53k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
596
8.53k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
597
8.53k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
598
8.53k
    _memory_used_counter =
599
8.53k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
600
8.53k
    _common_profile->add_info_string("IsColocate",
601
8.53k
                                     std::to_string(_parent->is_colocated_operator()));
602
8.53k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
603
8.53k
    _common_profile->add_info_string("FollowedByShuffledOperator",
604
8.53k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
605
8.53k
    return Status::OK();
606
8.53k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
541
730
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
542
730
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
543
730
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
544
730
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
545
730
    _operator_profile->set_metadata(_parent->node_id());
546
    // indent is false so that source operator will have same
547
    // indentation_level with its parent operator.
548
730
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
549
730
    _operator_profile->add_child(_common_profile.get(), true);
550
730
    _operator_profile->add_child(_custom_profile.get(), true);
551
730
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
552
730
    if constexpr (!is_fake_shared) {
553
730
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
554
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
555
0
                                    .first.get()
556
0
                                    ->template cast<SharedStateArg>();
557
558
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
559
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
560
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
561
730
        } else if (info.shared_state) {
562
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
563
                DCHECK(false);
564
            }
565
            // For UnionSourceOperator without children, there is no shared state.
566
728
            _shared_state = info.shared_state->template cast<SharedStateArg>();
567
568
728
            _dependency = _shared_state->create_source_dependency(
569
728
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
570
728
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
571
728
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
572
728
        } else {
573
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
574
                DCHECK(false);
575
            }
576
2
        }
577
730
    }
578
579
730
    if (must_set_shared_state() && _shared_state == nullptr) {
580
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
581
0
    }
582
583
730
    _rows_returned_counter =
584
730
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
585
730
    _blocks_returned_counter =
586
730
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
587
730
    _output_block_bytes_counter =
588
730
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
589
730
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
590
730
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
591
730
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
592
730
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
593
730
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
594
730
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
595
730
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
596
730
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
597
730
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
598
730
    _memory_used_counter =
599
730
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
600
730
    _common_profile->add_info_string("IsColocate",
601
730
                                     std::to_string(_parent->is_colocated_operator()));
602
730
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
603
730
    _common_profile->add_info_string("FollowedByShuffledOperator",
604
730
                                     std::to_string(_parent->followed_by_shuffled_operator()));
605
730
    return Status::OK();
606
730
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
541
5.00k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
542
5.00k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
543
5.00k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
544
5.00k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
545
5.00k
    _operator_profile->set_metadata(_parent->node_id());
546
    // indent is false so that source operator will have same
547
    // indentation_level with its parent operator.
548
5.00k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
549
5.00k
    _operator_profile->add_child(_common_profile.get(), true);
550
5.00k
    _operator_profile->add_child(_custom_profile.get(), true);
551
5.00k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
552
5.00k
    if constexpr (!is_fake_shared) {
553
5.00k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
554
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
555
0
                                    .first.get()
556
0
                                    ->template cast<SharedStateArg>();
557
558
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
559
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
560
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
561
5.00k
        } else if (info.shared_state) {
562
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
563
                DCHECK(false);
564
            }
565
            // For UnionSourceOperator without children, there is no shared state.
566
4.34k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
567
568
4.34k
            _dependency = _shared_state->create_source_dependency(
569
4.34k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
570
4.34k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
571
4.34k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
572
4.34k
        } else {
573
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
574
                DCHECK(false);
575
            }
576
667
        }
577
5.00k
    }
578
579
5.00k
    if (must_set_shared_state() && _shared_state == nullptr) {
580
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
581
0
    }
582
583
5.00k
    _rows_returned_counter =
584
5.00k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
585
5.00k
    _blocks_returned_counter =
586
5.00k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
587
5.00k
    _output_block_bytes_counter =
588
5.00k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
589
5.00k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
590
5.00k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
591
5.00k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
592
5.00k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
593
5.00k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
594
5.00k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
595
5.00k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
596
5.00k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
597
5.00k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
598
5.00k
    _memory_used_counter =
599
5.00k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
600
5.00k
    _common_profile->add_info_string("IsColocate",
601
5.00k
                                     std::to_string(_parent->is_colocated_operator()));
602
5.00k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
603
5.00k
    _common_profile->add_info_string("FollowedByShuffledOperator",
604
5.00k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
605
5.00k
    return Status::OK();
606
5.00k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
541
719k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
542
719k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
543
719k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
544
719k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
545
719k
    _operator_profile->set_metadata(_parent->node_id());
546
    // indent is false so that source operator will have same
547
    // indentation_level with its parent operator.
548
719k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
549
719k
    _operator_profile->add_child(_common_profile.get(), true);
550
719k
    _operator_profile->add_child(_custom_profile.get(), true);
551
719k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
552
719k
    if constexpr (!is_fake_shared) {
553
719k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
554
711k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
555
711k
                                    .first.get()
556
711k
                                    ->template cast<SharedStateArg>();
557
558
711k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
559
711k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
560
711k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
561
711k
        } else if (info.shared_state) {
562
0
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
563
0
                DCHECK(false);
564
0
            }
565
            // For UnionSourceOperator without children, there is no shared state.
566
0
            _shared_state = info.shared_state->template cast<SharedStateArg>();
567
568
0
            _dependency = _shared_state->create_source_dependency(
569
0
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
570
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
571
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
572
7.90k
        } else {
573
7.90k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
574
7.90k
                DCHECK(false);
575
7.90k
            }
576
7.90k
        }
577
719k
    }
578
579
719k
    if (must_set_shared_state() && _shared_state == nullptr) {
580
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
581
0
    }
582
583
719k
    _rows_returned_counter =
584
719k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
585
719k
    _blocks_returned_counter =
586
719k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
587
719k
    _output_block_bytes_counter =
588
719k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
589
719k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
590
719k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
591
719k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
592
719k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
593
719k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
594
719k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
595
719k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
596
719k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
597
719k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
598
719k
    _memory_used_counter =
599
719k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
600
719k
    _common_profile->add_info_string("IsColocate",
601
719k
                                     std::to_string(_parent->is_colocated_operator()));
602
719k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
603
719k
    _common_profile->add_info_string("FollowedByShuffledOperator",
604
719k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
605
719k
    return Status::OK();
606
719k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
541
164
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
542
164
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
543
164
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
544
164
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
545
164
    _operator_profile->set_metadata(_parent->node_id());
546
    // indent is false so that source operator will have same
547
    // indentation_level with its parent operator.
548
164
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
549
164
    _operator_profile->add_child(_common_profile.get(), true);
550
164
    _operator_profile->add_child(_custom_profile.get(), true);
551
164
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
552
164
    if constexpr (!is_fake_shared) {
553
164
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
554
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
555
0
                                    .first.get()
556
0
                                    ->template cast<SharedStateArg>();
557
558
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
559
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
560
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
561
164
        } else if (info.shared_state) {
562
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
563
                DCHECK(false);
564
            }
565
            // For UnionSourceOperator without children, there is no shared state.
566
164
            _shared_state = info.shared_state->template cast<SharedStateArg>();
567
568
164
            _dependency = _shared_state->create_source_dependency(
569
164
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
570
164
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
571
164
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
572
164
        } else {
573
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
574
                DCHECK(false);
575
            }
576
0
        }
577
164
    }
578
579
164
    if (must_set_shared_state() && _shared_state == nullptr) {
580
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
581
0
    }
582
583
164
    _rows_returned_counter =
584
164
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
585
164
    _blocks_returned_counter =
586
164
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
587
164
    _output_block_bytes_counter =
588
164
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
589
164
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
590
164
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
591
164
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
592
164
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
593
164
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
594
164
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
595
164
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
596
164
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
597
164
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
598
164
    _memory_used_counter =
599
164
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
600
164
    _common_profile->add_info_string("IsColocate",
601
164
                                     std::to_string(_parent->is_colocated_operator()));
602
164
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
603
164
    _common_profile->add_info_string("FollowedByShuffledOperator",
604
164
                                     std::to_string(_parent->followed_by_shuffled_operator()));
605
164
    return Status::OK();
606
164
}
607
608
template <typename SharedStateArg>
609
2.33M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
610
2.33M
    _conjuncts.resize(_parent->_conjuncts.size());
611
2.33M
    _projections.resize(_parent->_projections.size());
612
2.74M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
613
413k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
614
413k
    }
615
4.66M
    for (size_t i = 0; i < _projections.size(); i++) {
616
2.33M
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
617
2.33M
    }
618
2.33M
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
619
2.34M
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
620
9.03k
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
621
66.1k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
622
57.1k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
623
57.1k
                    state, _intermediate_projections[i][j]));
624
57.1k
        }
625
9.03k
    }
626
2.33M
    return Status::OK();
627
2.33M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
609
67.3k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
610
67.3k
    _conjuncts.resize(_parent->_conjuncts.size());
611
67.3k
    _projections.resize(_parent->_projections.size());
612
68.4k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
613
1.06k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
614
1.06k
    }
615
343k
    for (size_t i = 0; i < _projections.size(); i++) {
616
276k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
617
276k
    }
618
67.3k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
619
69.3k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
620
2.01k
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
621
23.7k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
622
21.7k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
623
21.7k
                    state, _intermediate_projections[i][j]));
624
21.7k
        }
625
2.01k
    }
626
67.3k
    return Status::OK();
627
67.3k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
609
3
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
610
3
    _conjuncts.resize(_parent->_conjuncts.size());
611
3
    _projections.resize(_parent->_projections.size());
612
3
    for (size_t i = 0; i < _conjuncts.size(); i++) {
613
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
614
0
    }
615
3
    for (size_t i = 0; i < _projections.size(); i++) {
616
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
617
0
    }
618
3
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
619
3
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
620
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
621
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
622
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
623
0
                    state, _intermediate_projections[i][j]));
624
0
        }
625
0
    }
626
3
    return Status::OK();
627
3
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
609
232k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
610
232k
    _conjuncts.resize(_parent->_conjuncts.size());
611
232k
    _projections.resize(_parent->_projections.size());
612
232k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
613
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
614
0
    }
615
233k
    for (size_t i = 0; i < _projections.size(); i++) {
616
329
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
617
329
    }
618
232k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
619
232k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
620
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
621
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
622
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
623
0
                    state, _intermediate_projections[i][j]));
624
0
        }
625
0
    }
626
232k
    return Status::OK();
627
232k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
609
24
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
610
24
    _conjuncts.resize(_parent->_conjuncts.size());
611
24
    _projections.resize(_parent->_projections.size());
612
24
    for (size_t i = 0; i < _conjuncts.size(); i++) {
613
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
614
0
    }
615
24
    for (size_t i = 0; i < _projections.size(); i++) {
616
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
617
0
    }
618
24
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
619
24
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
620
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
621
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
622
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
623
0
                    state, _intermediate_projections[i][j]));
624
0
        }
625
0
    }
626
24
    return Status::OK();
627
24
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
609
8.17k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
610
8.17k
    _conjuncts.resize(_parent->_conjuncts.size());
611
8.17k
    _projections.resize(_parent->_projections.size());
612
8.32k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
613
155
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
614
155
    }
615
48.3k
    for (size_t i = 0; i < _projections.size(); i++) {
616
40.1k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
617
40.1k
    }
618
8.17k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
619
8.27k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
620
103
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
621
625
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
622
522
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
623
522
                    state, _intermediate_projections[i][j]));
624
522
        }
625
103
    }
626
8.17k
    return Status::OK();
627
8.17k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
609
8.36k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
610
8.36k
    _conjuncts.resize(_parent->_conjuncts.size());
611
8.36k
    _projections.resize(_parent->_projections.size());
612
9.50k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
613
1.13k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
614
1.13k
    }
615
22.8k
    for (size_t i = 0; i < _projections.size(); i++) {
616
14.4k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
617
14.4k
    }
618
8.36k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
619
8.45k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
620
89
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
621
673
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
622
584
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
623
584
                    state, _intermediate_projections[i][j]));
624
584
        }
625
89
    }
626
8.36k
    return Status::OK();
627
8.36k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
609
119k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
610
119k
    _conjuncts.resize(_parent->_conjuncts.size());
611
119k
    _projections.resize(_parent->_projections.size());
612
122k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
613
2.90k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
614
2.90k
    }
615
358k
    for (size_t i = 0; i < _projections.size(); i++) {
616
238k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
617
238k
    }
618
119k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
619
120k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
620
200
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
621
1.32k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
622
1.12k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
623
1.12k
                    state, _intermediate_projections[i][j]));
624
1.12k
        }
625
200
    }
626
119k
    return Status::OK();
627
119k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
609
353
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
610
353
    _conjuncts.resize(_parent->_conjuncts.size());
611
353
    _projections.resize(_parent->_projections.size());
612
360
    for (size_t i = 0; i < _conjuncts.size(); i++) {
613
7
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
614
7
    }
615
1.35k
    for (size_t i = 0; i < _projections.size(); i++) {
616
1.00k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
617
1.00k
    }
618
353
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
619
353
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
620
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
621
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
622
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
623
0
                    state, _intermediate_projections[i][j]));
624
0
        }
625
0
    }
626
353
    return Status::OK();
627
353
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
609
219
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
610
219
    _conjuncts.resize(_parent->_conjuncts.size());
611
219
    _projections.resize(_parent->_projections.size());
612
219
    for (size_t i = 0; i < _conjuncts.size(); i++) {
613
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
614
0
    }
615
623
    for (size_t i = 0; i < _projections.size(); i++) {
616
404
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
617
404
    }
618
219
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
619
219
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
620
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
621
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
622
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
623
0
                    state, _intermediate_projections[i][j]));
624
0
        }
625
0
    }
626
219
    return Status::OK();
627
219
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
609
1.10M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
610
1.10M
    _conjuncts.resize(_parent->_conjuncts.size());
611
1.10M
    _projections.resize(_parent->_projections.size());
612
1.51M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
613
405k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
614
405k
    }
615
2.77M
    for (size_t i = 0; i < _projections.size(); i++) {
616
1.66M
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
617
1.66M
    }
618
1.10M
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
619
1.11M
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
620
6.62k
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
621
39.7k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
622
33.1k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
623
33.1k
                    state, _intermediate_projections[i][j]));
624
33.1k
        }
625
6.62k
    }
626
1.10M
    return Status::OK();
627
1.10M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
609
53.7k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
610
53.7k
    _conjuncts.resize(_parent->_conjuncts.size());
611
53.7k
    _projections.resize(_parent->_projections.size());
612
53.7k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
613
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
614
0
    }
615
144k
    for (size_t i = 0; i < _projections.size(); i++) {
616
91.0k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
617
91.0k
    }
618
53.7k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
619
53.7k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
620
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
621
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
622
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
623
0
                    state, _intermediate_projections[i][j]));
624
0
        }
625
0
    }
626
53.7k
    return Status::OK();
627
53.7k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
609
25
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
610
25
    _conjuncts.resize(_parent->_conjuncts.size());
611
25
    _projections.resize(_parent->_projections.size());
612
25
    for (size_t i = 0; i < _conjuncts.size(); i++) {
613
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
614
0
    }
615
25
    for (size_t i = 0; i < _projections.size(); i++) {
616
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
617
0
    }
618
25
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
619
25
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
620
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
621
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
622
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
623
0
                    state, _intermediate_projections[i][j]));
624
0
        }
625
0
    }
626
25
    return Status::OK();
627
25
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
609
8.51k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
610
8.51k
    _conjuncts.resize(_parent->_conjuncts.size());
611
8.51k
    _projections.resize(_parent->_projections.size());
612
11.3k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
613
2.86k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
614
2.86k
    }
615
8.51k
    for (size_t i = 0; i < _projections.size(); i++) {
616
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
617
0
    }
618
8.51k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
619
8.51k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
620
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
621
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
622
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
623
0
                    state, _intermediate_projections[i][j]));
624
0
        }
625
0
    }
626
8.51k
    return Status::OK();
627
8.51k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
609
732
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
610
732
    _conjuncts.resize(_parent->_conjuncts.size());
611
732
    _projections.resize(_parent->_projections.size());
612
732
    for (size_t i = 0; i < _conjuncts.size(); i++) {
613
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
614
0
    }
615
732
    for (size_t i = 0; i < _projections.size(); i++) {
616
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
617
0
    }
618
732
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
619
732
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
620
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
621
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
622
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
623
0
                    state, _intermediate_projections[i][j]));
624
0
        }
625
0
    }
626
732
    return Status::OK();
627
732
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
609
5.15k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
610
5.15k
    _conjuncts.resize(_parent->_conjuncts.size());
611
5.15k
    _projections.resize(_parent->_projections.size());
612
5.15k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
613
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
614
0
    }
615
5.32k
    for (size_t i = 0; i < _projections.size(); i++) {
616
168
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
617
168
    }
618
5.15k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
619
5.15k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
620
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
621
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
622
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
623
0
                    state, _intermediate_projections[i][j]));
624
0
        }
625
0
    }
626
5.15k
    return Status::OK();
627
5.15k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
609
719k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
610
719k
    _conjuncts.resize(_parent->_conjuncts.size());
611
719k
    _projections.resize(_parent->_projections.size());
612
719k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
613
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
614
0
    }
615
719k
    for (size_t i = 0; i < _projections.size(); i++) {
616
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
617
0
    }
618
719k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
619
719k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
620
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
621
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
622
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
623
0
                    state, _intermediate_projections[i][j]));
624
0
        }
625
0
    }
626
719k
    return Status::OK();
627
719k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4openEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
609
164
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
610
164
    _conjuncts.resize(_parent->_conjuncts.size());
611
164
    _projections.resize(_parent->_projections.size());
612
171
    for (size_t i = 0; i < _conjuncts.size(); i++) {
613
7
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
614
7
    }
615
483
    for (size_t i = 0; i < _projections.size(); i++) {
616
319
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
617
319
    }
618
164
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
619
167
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
620
3
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
621
11
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
622
8
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
623
8
                    state, _intermediate_projections[i][j]));
624
8
        }
625
3
    }
626
164
    return Status::OK();
627
164
}
628
629
template <typename SharedStateArg>
630
5.19k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
631
5.19k
    if (_terminated) {
632
2
        return Status::OK();
633
2
    }
634
5.19k
    _terminated = true;
635
5.19k
    return Status::OK();
636
5.19k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
630
287
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
631
287
    if (_terminated) {
632
0
        return Status::OK();
633
0
    }
634
287
    _terminated = true;
635
287
    return Status::OK();
636
287
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
630
62
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
631
62
    if (_terminated) {
632
0
        return Status::OK();
633
0
    }
634
62
    _terminated = true;
635
62
    return Status::OK();
636
62
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
630
51
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
631
51
    if (_terminated) {
632
0
        return Status::OK();
633
0
    }
634
51
    _terminated = true;
635
51
    return Status::OK();
636
51
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
630
106
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
631
106
    if (_terminated) {
632
0
        return Status::OK();
633
0
    }
634
106
    _terminated = true;
635
106
    return Status::OK();
636
106
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
630
3.92k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
631
3.92k
    if (_terminated) {
632
1
        return Status::OK();
633
1
    }
634
3.92k
    _terminated = true;
635
3.92k
    return Status::OK();
636
3.92k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
630
4
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
631
4
    if (_terminated) {
632
0
        return Status::OK();
633
0
    }
634
4
    _terminated = true;
635
4
    return Status::OK();
636
4
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
630
6
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
631
6
    if (_terminated) {
632
0
        return Status::OK();
633
0
    }
634
6
    _terminated = true;
635
6
    return Status::OK();
636
6
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
630
305
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
631
305
    if (_terminated) {
632
0
        return Status::OK();
633
0
    }
634
305
    _terminated = true;
635
305
    return Status::OK();
636
305
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
630
434
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
631
434
    if (_terminated) {
632
1
        return Status::OK();
633
1
    }
634
433
    _terminated = true;
635
433
    return Status::OK();
636
434
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
630
15
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
631
15
    if (_terminated) {
632
0
        return Status::OK();
633
0
    }
634
15
    _terminated = true;
635
15
    return Status::OK();
636
15
}
637
638
template <typename SharedStateArg>
639
2.59M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
640
2.59M
    if (_closed) {
641
264k
        return Status::OK();
642
264k
    }
643
2.33M
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
644
1.22M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
645
1.22M
    }
646
2.33M
    _closed = true;
647
2.33M
    return Status::OK();
648
2.59M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
639
67.2k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
640
67.2k
    if (_closed) {
641
0
        return Status::OK();
642
0
    }
643
67.2k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
644
67.2k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
645
67.2k
    }
646
67.2k
    _closed = true;
647
67.2k
    return Status::OK();
648
67.2k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
639
4
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
640
4
    if (_closed) {
641
0
        return Status::OK();
642
0
    }
643
4
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
644
4
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
645
4
    }
646
4
    _closed = true;
647
4
    return Status::OK();
648
4
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
639
462k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
640
462k
    if (_closed) {
641
231k
        return Status::OK();
642
231k
    }
643
230k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
644
230k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
645
230k
    }
646
230k
    _closed = true;
647
230k
    return Status::OK();
648
462k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
639
24
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
640
24
    if (_closed) {
641
0
        return Status::OK();
642
0
    }
643
24
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
644
24
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
645
24
    }
646
24
    _closed = true;
647
24
    return Status::OK();
648
24
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
639
8.16k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
640
8.16k
    if (_closed) {
641
0
        return Status::OK();
642
0
    }
643
8.16k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
644
8.16k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
645
8.16k
    }
646
8.16k
    _closed = true;
647
8.16k
    return Status::OK();
648
8.16k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
639
16.9k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
640
16.9k
    if (_closed) {
641
8.55k
        return Status::OK();
642
8.55k
    }
643
8.35k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
644
8.35k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
645
8.35k
    }
646
8.35k
    _closed = true;
647
8.35k
    return Status::OK();
648
16.9k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
639
119k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
640
119k
    if (_closed) {
641
0
        return Status::OK();
642
0
    }
643
119k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
644
119k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
645
119k
    }
646
119k
    _closed = true;
647
119k
    return Status::OK();
648
119k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
639
351
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
640
351
    if (_closed) {
641
0
        return Status::OK();
642
0
    }
643
351
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
644
351
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
645
351
    }
646
351
    _closed = true;
647
351
    return Status::OK();
648
351
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
639
214
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
640
214
    if (_closed) {
641
0
        return Status::OK();
642
0
    }
643
214
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
644
214
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
645
214
    }
646
214
    _closed = true;
647
214
    return Status::OK();
648
214
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
639
1.12M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
640
1.12M
    if (_closed) {
641
17.5k
        return Status::OK();
642
17.5k
    }
643
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
644
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
645
    }
646
1.10M
    _closed = true;
647
1.10M
    return Status::OK();
648
1.12M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
639
53.7k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
640
53.7k
    if (_closed) {
641
0
        return Status::OK();
642
0
    }
643
53.7k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
644
53.7k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
645
53.7k
    }
646
53.7k
    _closed = true;
647
53.7k
    return Status::OK();
648
53.7k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
639
28
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
640
28
    if (_closed) {
641
14
        return Status::OK();
642
14
    }
643
14
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
644
14
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
645
14
    }
646
14
    _closed = true;
647
14
    return Status::OK();
648
28
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
639
8.49k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
640
8.49k
    if (_closed) {
641
0
        return Status::OK();
642
0
    }
643
8.49k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
644
8.49k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
645
8.49k
    }
646
8.49k
    _closed = true;
647
8.49k
    return Status::OK();
648
8.49k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
639
1.25k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
640
1.25k
    if (_closed) {
641
626
        return Status::OK();
642
626
    }
643
628
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
644
628
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
645
628
    }
646
628
    _closed = true;
647
628
    return Status::OK();
648
1.25k
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
639
10.5k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
640
10.5k
    if (_closed) {
641
5.44k
        return Status::OK();
642
5.44k
    }
643
5.15k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
644
5.15k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
645
5.15k
    }
646
5.15k
    _closed = true;
647
5.15k
    return Status::OK();
648
10.5k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
639
721k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
640
721k
    if (_closed) {
641
0
        return Status::OK();
642
0
    }
643
721k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
644
721k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
645
721k
    }
646
721k
    _closed = true;
647
721k
    return Status::OK();
648
721k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
639
333
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
640
333
    if (_closed) {
641
178
        return Status::OK();
642
178
    }
643
155
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
644
155
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
645
155
    }
646
155
    _closed = true;
647
155
    return Status::OK();
648
333
}
649
650
template <typename SharedState>
651
1.87M
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
652
    // create profile
653
1.87M
    _operator_profile =
654
1.87M
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
655
1.87M
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
656
1.87M
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
657
658
    // indentation is true
659
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
660
    // So we should set the indentation to true.
661
1.87M
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
662
1.87M
    _operator_profile->add_child(_common_profile, true);
663
1.87M
    _operator_profile->add_child(_custom_profile, true);
664
665
1.87M
    _operator_profile->set_metadata(_parent->node_id());
666
1.87M
    _wait_for_finish_dependency_timer =
667
1.87M
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
668
1.87M
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
669
1.87M
    if constexpr (!is_fake_shared) {
670
1.25M
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
671
1.25M
            info.shared_state_map.end()) {
672
310k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
292k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
674
292k
            }
675
310k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
676
310k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
677
310k
                                                  ? 0
678
310k
                                                  : info.task_idx]
679
310k
                                  .get();
680
310k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
681
943k
        } else {
682
18.4E
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
18.4E
                DCHECK(false);
684
18.4E
            }
685
943k
            _shared_state = info.shared_state->template cast<SharedState>();
686
943k
            _dependency = _shared_state->create_sink_dependency(
687
943k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
688
943k
        }
689
1.25M
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
690
1.25M
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
691
1.25M
    }
692
693
1.87M
    if (must_set_shared_state() && _shared_state == nullptr) {
694
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
695
0
    }
696
697
1.87M
    _rows_input_counter =
698
1.87M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
699
1.87M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
700
1.87M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
701
1.87M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
702
1.87M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
703
1.87M
    _memory_used_counter =
704
1.87M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
705
1.87M
    _common_profile->add_info_string("IsColocate",
706
1.87M
                                     std::to_string(_parent->is_colocated_operator()));
707
1.87M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
708
1.87M
    _common_profile->add_info_string("FollowedByShuffledOperator",
709
1.87M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
710
1.87M
    return Status::OK();
711
1.87M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
651
115k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
652
    // create profile
653
115k
    _operator_profile =
654
115k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
655
115k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
656
115k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
657
658
    // indentation is true
659
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
660
    // So we should set the indentation to true.
661
115k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
662
115k
    _operator_profile->add_child(_common_profile, true);
663
115k
    _operator_profile->add_child(_custom_profile, true);
664
665
115k
    _operator_profile->set_metadata(_parent->node_id());
666
115k
    _wait_for_finish_dependency_timer =
667
115k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
668
115k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
669
115k
    if constexpr (!is_fake_shared) {
670
115k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
671
115k
            info.shared_state_map.end()) {
672
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
674
            }
675
18.4k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
676
18.4k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
677
18.4k
                                                  ? 0
678
18.4k
                                                  : info.task_idx]
679
18.4k
                                  .get();
680
18.4k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
681
96.8k
        } else {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(false);
684
            }
685
96.8k
            _shared_state = info.shared_state->template cast<SharedState>();
686
96.8k
            _dependency = _shared_state->create_sink_dependency(
687
96.8k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
688
96.8k
        }
689
115k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
690
115k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
691
115k
    }
692
693
115k
    if (must_set_shared_state() && _shared_state == nullptr) {
694
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
695
0
    }
696
697
115k
    _rows_input_counter =
698
115k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
699
115k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
700
115k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
701
115k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
702
115k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
703
115k
    _memory_used_counter =
704
115k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
705
115k
    _common_profile->add_info_string("IsColocate",
706
115k
                                     std::to_string(_parent->is_colocated_operator()));
707
115k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
708
115k
    _common_profile->add_info_string("FollowedByShuffledOperator",
709
115k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
710
115k
    return Status::OK();
711
115k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
651
2
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
652
    // create profile
653
2
    _operator_profile =
654
2
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
655
2
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
656
2
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
657
658
    // indentation is true
659
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
660
    // So we should set the indentation to true.
661
2
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
662
2
    _operator_profile->add_child(_common_profile, true);
663
2
    _operator_profile->add_child(_custom_profile, true);
664
665
2
    _operator_profile->set_metadata(_parent->node_id());
666
2
    _wait_for_finish_dependency_timer =
667
2
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
668
2
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
669
2
    if constexpr (!is_fake_shared) {
670
2
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
671
2
            info.shared_state_map.end()) {
672
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
674
            }
675
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
676
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
677
0
                                                  ? 0
678
0
                                                  : info.task_idx]
679
0
                                  .get();
680
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
681
2
        } else {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(false);
684
            }
685
2
            _shared_state = info.shared_state->template cast<SharedState>();
686
2
            _dependency = _shared_state->create_sink_dependency(
687
2
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
688
2
        }
689
2
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
690
2
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
691
2
    }
692
693
2
    if (must_set_shared_state() && _shared_state == nullptr) {
694
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
695
0
    }
696
697
2
    _rows_input_counter =
698
2
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
699
2
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
700
2
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
701
2
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
702
2
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
703
2
    _memory_used_counter =
704
2
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
705
2
    _common_profile->add_info_string("IsColocate",
706
2
                                     std::to_string(_parent->is_colocated_operator()));
707
2
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
708
2
    _common_profile->add_info_string("FollowedByShuffledOperator",
709
2
                                     std::to_string(_parent->followed_by_shuffled_operator()));
710
2
    return Status::OK();
711
2
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
651
232k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
652
    // create profile
653
232k
    _operator_profile =
654
232k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
655
232k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
656
232k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
657
658
    // indentation is true
659
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
660
    // So we should set the indentation to true.
661
232k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
662
232k
    _operator_profile->add_child(_common_profile, true);
663
232k
    _operator_profile->add_child(_custom_profile, true);
664
665
232k
    _operator_profile->set_metadata(_parent->node_id());
666
232k
    _wait_for_finish_dependency_timer =
667
232k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
668
232k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
669
232k
    if constexpr (!is_fake_shared) {
670
232k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
671
232k
            info.shared_state_map.end()) {
672
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
674
            }
675
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
676
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
677
0
                                                  ? 0
678
0
                                                  : info.task_idx]
679
0
                                  .get();
680
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
681
232k
        } else {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(false);
684
            }
685
232k
            _shared_state = info.shared_state->template cast<SharedState>();
686
232k
            _dependency = _shared_state->create_sink_dependency(
687
232k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
688
232k
        }
689
232k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
690
232k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
691
232k
    }
692
693
232k
    if (must_set_shared_state() && _shared_state == nullptr) {
694
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
695
0
    }
696
697
232k
    _rows_input_counter =
698
232k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
699
232k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
700
232k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
701
232k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
702
232k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
703
232k
    _memory_used_counter =
704
232k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
705
232k
    _common_profile->add_info_string("IsColocate",
706
232k
                                     std::to_string(_parent->is_colocated_operator()));
707
232k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
708
232k
    _common_profile->add_info_string("FollowedByShuffledOperator",
709
232k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
710
232k
    return Status::OK();
711
232k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
651
31
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
652
    // create profile
653
31
    _operator_profile =
654
31
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
655
31
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
656
31
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
657
658
    // indentation is true
659
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
660
    // So we should set the indentation to true.
661
31
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
662
31
    _operator_profile->add_child(_common_profile, true);
663
31
    _operator_profile->add_child(_custom_profile, true);
664
665
31
    _operator_profile->set_metadata(_parent->node_id());
666
31
    _wait_for_finish_dependency_timer =
667
31
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
668
31
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
669
31
    if constexpr (!is_fake_shared) {
670
31
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
671
31
            info.shared_state_map.end()) {
672
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
674
            }
675
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
676
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
677
0
                                                  ? 0
678
0
                                                  : info.task_idx]
679
0
                                  .get();
680
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
681
31
        } else {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(false);
684
            }
685
31
            _shared_state = info.shared_state->template cast<SharedState>();
686
31
            _dependency = _shared_state->create_sink_dependency(
687
31
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
688
31
        }
689
31
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
690
31
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
691
31
    }
692
693
31
    if (must_set_shared_state() && _shared_state == nullptr) {
694
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
695
0
    }
696
697
31
    _rows_input_counter =
698
31
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
699
31
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
700
31
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
701
31
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
702
31
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
703
31
    _memory_used_counter =
704
31
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
705
31
    _common_profile->add_info_string("IsColocate",
706
31
                                     std::to_string(_parent->is_colocated_operator()));
707
31
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
708
31
    _common_profile->add_info_string("FollowedByShuffledOperator",
709
31
                                     std::to_string(_parent->followed_by_shuffled_operator()));
710
31
    return Status::OK();
711
31
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
651
8.16k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
652
    // create profile
653
8.16k
    _operator_profile =
654
8.16k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
655
8.16k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
656
8.16k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
657
658
    // indentation is true
659
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
660
    // So we should set the indentation to true.
661
8.16k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
662
8.16k
    _operator_profile->add_child(_common_profile, true);
663
8.16k
    _operator_profile->add_child(_custom_profile, true);
664
665
8.16k
    _operator_profile->set_metadata(_parent->node_id());
666
8.16k
    _wait_for_finish_dependency_timer =
667
8.16k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
668
8.16k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
669
8.16k
    if constexpr (!is_fake_shared) {
670
8.16k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
671
8.16k
            info.shared_state_map.end()) {
672
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
674
            }
675
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
676
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
677
0
                                                  ? 0
678
0
                                                  : info.task_idx]
679
0
                                  .get();
680
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
681
8.16k
        } else {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(false);
684
            }
685
8.16k
            _shared_state = info.shared_state->template cast<SharedState>();
686
8.16k
            _dependency = _shared_state->create_sink_dependency(
687
8.16k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
688
8.16k
        }
689
8.16k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
690
8.16k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
691
8.16k
    }
692
693
8.16k
    if (must_set_shared_state() && _shared_state == nullptr) {
694
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
695
0
    }
696
697
8.16k
    _rows_input_counter =
698
8.16k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
699
8.16k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
700
8.16k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
701
8.16k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
702
8.16k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
703
8.16k
    _memory_used_counter =
704
8.16k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
705
8.16k
    _common_profile->add_info_string("IsColocate",
706
8.16k
                                     std::to_string(_parent->is_colocated_operator()));
707
8.16k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
708
8.16k
    _common_profile->add_info_string("FollowedByShuffledOperator",
709
8.16k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
710
8.16k
    return Status::OK();
711
8.16k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
651
8.36k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
652
    // create profile
653
8.36k
    _operator_profile =
654
8.36k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
655
8.36k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
656
8.36k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
657
658
    // indentation is true
659
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
660
    // So we should set the indentation to true.
661
8.36k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
662
8.36k
    _operator_profile->add_child(_common_profile, true);
663
8.36k
    _operator_profile->add_child(_custom_profile, true);
664
665
8.36k
    _operator_profile->set_metadata(_parent->node_id());
666
8.36k
    _wait_for_finish_dependency_timer =
667
8.36k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
668
8.36k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
669
8.36k
    if constexpr (!is_fake_shared) {
670
8.36k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
671
8.36k
            info.shared_state_map.end()) {
672
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
674
            }
675
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
676
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
677
0
                                                  ? 0
678
0
                                                  : info.task_idx]
679
0
                                  .get();
680
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
681
8.36k
        } else {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(false);
684
            }
685
8.36k
            _shared_state = info.shared_state->template cast<SharedState>();
686
8.36k
            _dependency = _shared_state->create_sink_dependency(
687
8.36k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
688
8.36k
        }
689
8.36k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
690
8.36k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
691
8.36k
    }
692
693
8.36k
    if (must_set_shared_state() && _shared_state == nullptr) {
694
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
695
0
    }
696
697
8.36k
    _rows_input_counter =
698
8.36k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
699
8.36k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
700
8.36k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
701
8.36k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
702
8.36k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
703
8.36k
    _memory_used_counter =
704
8.36k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
705
8.36k
    _common_profile->add_info_string("IsColocate",
706
8.36k
                                     std::to_string(_parent->is_colocated_operator()));
707
8.36k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
708
8.36k
    _common_profile->add_info_string("FollowedByShuffledOperator",
709
8.36k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
710
8.36k
    return Status::OK();
711
8.36k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
651
120k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
652
    // create profile
653
120k
    _operator_profile =
654
120k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
655
120k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
656
120k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
657
658
    // indentation is true
659
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
660
    // So we should set the indentation to true.
661
120k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
662
120k
    _operator_profile->add_child(_common_profile, true);
663
120k
    _operator_profile->add_child(_custom_profile, true);
664
665
120k
    _operator_profile->set_metadata(_parent->node_id());
666
120k
    _wait_for_finish_dependency_timer =
667
120k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
668
120k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
669
120k
    if constexpr (!is_fake_shared) {
670
120k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
671
120k
            info.shared_state_map.end()) {
672
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
674
            }
675
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
676
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
677
0
                                                  ? 0
678
0
                                                  : info.task_idx]
679
0
                                  .get();
680
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
681
120k
        } else {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(false);
684
            }
685
120k
            _shared_state = info.shared_state->template cast<SharedState>();
686
120k
            _dependency = _shared_state->create_sink_dependency(
687
120k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
688
120k
        }
689
120k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
690
120k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
691
120k
    }
692
693
120k
    if (must_set_shared_state() && _shared_state == nullptr) {
694
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
695
0
    }
696
697
120k
    _rows_input_counter =
698
120k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
699
120k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
700
120k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
701
120k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
702
120k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
703
120k
    _memory_used_counter =
704
120k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
705
120k
    _common_profile->add_info_string("IsColocate",
706
120k
                                     std::to_string(_parent->is_colocated_operator()));
707
120k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
708
120k
    _common_profile->add_info_string("FollowedByShuffledOperator",
709
120k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
710
120k
    return Status::OK();
711
120k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
651
348
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
652
    // create profile
653
348
    _operator_profile =
654
348
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
655
348
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
656
348
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
657
658
    // indentation is true
659
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
660
    // So we should set the indentation to true.
661
348
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
662
348
    _operator_profile->add_child(_common_profile, true);
663
348
    _operator_profile->add_child(_custom_profile, true);
664
665
348
    _operator_profile->set_metadata(_parent->node_id());
666
348
    _wait_for_finish_dependency_timer =
667
348
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
668
348
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
669
348
    if constexpr (!is_fake_shared) {
670
348
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
671
348
            info.shared_state_map.end()) {
672
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
674
            }
675
347
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
676
347
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
677
347
                                                  ? 0
678
347
                                                  : info.task_idx]
679
347
                                  .get();
680
347
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
681
347
        } else {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(false);
684
            }
685
1
            _shared_state = info.shared_state->template cast<SharedState>();
686
1
            _dependency = _shared_state->create_sink_dependency(
687
1
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
688
1
        }
689
348
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
690
348
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
691
348
    }
692
693
348
    if (must_set_shared_state() && _shared_state == nullptr) {
694
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
695
0
    }
696
697
348
    _rows_input_counter =
698
348
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
699
348
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
700
348
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
701
348
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
702
348
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
703
348
    _memory_used_counter =
704
348
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
705
348
    _common_profile->add_info_string("IsColocate",
706
348
                                     std::to_string(_parent->is_colocated_operator()));
707
348
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
708
348
    _common_profile->add_info_string("FollowedByShuffledOperator",
709
348
                                     std::to_string(_parent->followed_by_shuffled_operator()));
710
348
    return Status::OK();
711
348
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
651
225
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
652
    // create profile
653
225
    _operator_profile =
654
225
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
655
225
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
656
225
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
657
658
    // indentation is true
659
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
660
    // So we should set the indentation to true.
661
225
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
662
225
    _operator_profile->add_child(_common_profile, true);
663
225
    _operator_profile->add_child(_custom_profile, true);
664
665
225
    _operator_profile->set_metadata(_parent->node_id());
666
225
    _wait_for_finish_dependency_timer =
667
225
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
668
225
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
669
225
    if constexpr (!is_fake_shared) {
670
225
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
671
225
            info.shared_state_map.end()) {
672
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
674
            }
675
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
676
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
677
0
                                                  ? 0
678
0
                                                  : info.task_idx]
679
0
                                  .get();
680
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
681
225
        } else {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(false);
684
            }
685
225
            _shared_state = info.shared_state->template cast<SharedState>();
686
225
            _dependency = _shared_state->create_sink_dependency(
687
225
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
688
225
        }
689
225
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
690
225
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
691
225
    }
692
693
225
    if (must_set_shared_state() && _shared_state == nullptr) {
694
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
695
0
    }
696
697
225
    _rows_input_counter =
698
225
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
699
225
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
700
225
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
701
225
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
702
225
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
703
225
    _memory_used_counter =
704
225
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
705
225
    _common_profile->add_info_string("IsColocate",
706
225
                                     std::to_string(_parent->is_colocated_operator()));
707
225
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
708
225
    _common_profile->add_info_string("FollowedByShuffledOperator",
709
225
                                     std::to_string(_parent->followed_by_shuffled_operator()));
710
225
    return Status::OK();
711
225
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
651
620k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
652
    // create profile
653
620k
    _operator_profile =
654
620k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
655
620k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
656
620k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
657
658
    // indentation is true
659
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
660
    // So we should set the indentation to true.
661
620k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
662
620k
    _operator_profile->add_child(_common_profile, true);
663
620k
    _operator_profile->add_child(_custom_profile, true);
664
665
620k
    _operator_profile->set_metadata(_parent->node_id());
666
620k
    _wait_for_finish_dependency_timer =
667
620k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
668
620k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
669
    if constexpr (!is_fake_shared) {
670
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
671
            info.shared_state_map.end()) {
672
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
674
            }
675
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
676
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
677
                                                  ? 0
678
                                                  : info.task_idx]
679
                                  .get();
680
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
681
        } else {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(false);
684
            }
685
            _shared_state = info.shared_state->template cast<SharedState>();
686
            _dependency = _shared_state->create_sink_dependency(
687
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
688
        }
689
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
690
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
691
    }
692
693
620k
    if (must_set_shared_state() && _shared_state == nullptr) {
694
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
695
0
    }
696
697
620k
    _rows_input_counter =
698
620k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
699
620k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
700
620k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
701
620k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
702
620k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
703
620k
    _memory_used_counter =
704
620k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
705
620k
    _common_profile->add_info_string("IsColocate",
706
620k
                                     std::to_string(_parent->is_colocated_operator()));
707
620k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
708
620k
    _common_profile->add_info_string("FollowedByShuffledOperator",
709
620k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
710
620k
    return Status::OK();
711
620k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
651
5.23k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
652
    // create profile
653
5.23k
    _operator_profile =
654
5.23k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
655
5.23k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
656
5.23k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
657
658
    // indentation is true
659
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
660
    // So we should set the indentation to true.
661
5.23k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
662
5.23k
    _operator_profile->add_child(_common_profile, true);
663
5.23k
    _operator_profile->add_child(_custom_profile, true);
664
665
5.23k
    _operator_profile->set_metadata(_parent->node_id());
666
5.23k
    _wait_for_finish_dependency_timer =
667
5.23k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
668
5.23k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
669
5.23k
    if constexpr (!is_fake_shared) {
670
5.23k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
671
5.23k
            info.shared_state_map.end()) {
672
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
674
            }
675
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
676
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
677
0
                                                  ? 0
678
0
                                                  : info.task_idx]
679
0
                                  .get();
680
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
681
5.23k
        } else {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(false);
684
            }
685
5.23k
            _shared_state = info.shared_state->template cast<SharedState>();
686
5.23k
            _dependency = _shared_state->create_sink_dependency(
687
5.23k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
688
5.23k
        }
689
5.23k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
690
5.23k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
691
5.23k
    }
692
693
5.23k
    if (must_set_shared_state() && _shared_state == nullptr) {
694
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
695
0
    }
696
697
5.23k
    _rows_input_counter =
698
5.23k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
699
5.23k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
700
5.23k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
701
5.23k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
702
5.23k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
703
5.23k
    _memory_used_counter =
704
5.23k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
705
5.23k
    _common_profile->add_info_string("IsColocate",
706
5.23k
                                     std::to_string(_parent->is_colocated_operator()));
707
5.23k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
708
5.23k
    _common_profile->add_info_string("FollowedByShuffledOperator",
709
5.23k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
710
5.23k
    return Status::OK();
711
5.23k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
651
730
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
652
    // create profile
653
730
    _operator_profile =
654
730
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
655
730
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
656
730
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
657
658
    // indentation is true
659
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
660
    // So we should set the indentation to true.
661
730
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
662
730
    _operator_profile->add_child(_common_profile, true);
663
730
    _operator_profile->add_child(_custom_profile, true);
664
665
730
    _operator_profile->set_metadata(_parent->node_id());
666
730
    _wait_for_finish_dependency_timer =
667
730
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
668
730
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
669
730
    if constexpr (!is_fake_shared) {
670
730
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
671
730
            info.shared_state_map.end()) {
672
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
674
            }
675
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
676
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
677
0
                                                  ? 0
678
0
                                                  : info.task_idx]
679
0
                                  .get();
680
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
681
730
        } else {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(false);
684
            }
685
730
            _shared_state = info.shared_state->template cast<SharedState>();
686
730
            _dependency = _shared_state->create_sink_dependency(
687
730
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
688
730
        }
689
730
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
690
730
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
691
730
    }
692
693
730
    if (must_set_shared_state() && _shared_state == nullptr) {
694
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
695
0
    }
696
697
730
    _rows_input_counter =
698
730
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
699
730
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
700
730
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
701
730
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
702
730
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
703
730
    _memory_used_counter =
704
730
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
705
730
    _common_profile->add_info_string("IsColocate",
706
730
                                     std::to_string(_parent->is_colocated_operator()));
707
730
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
708
730
    _common_profile->add_info_string("FollowedByShuffledOperator",
709
730
                                     std::to_string(_parent->followed_by_shuffled_operator()));
710
730
    return Status::OK();
711
730
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
651
3.08k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
652
    // create profile
653
3.08k
    _operator_profile =
654
3.08k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
655
3.08k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
656
3.08k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
657
658
    // indentation is true
659
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
660
    // So we should set the indentation to true.
661
3.08k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
662
3.08k
    _operator_profile->add_child(_common_profile, true);
663
3.08k
    _operator_profile->add_child(_custom_profile, true);
664
665
3.08k
    _operator_profile->set_metadata(_parent->node_id());
666
3.08k
    _wait_for_finish_dependency_timer =
667
3.08k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
668
3.08k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
669
3.08k
    if constexpr (!is_fake_shared) {
670
3.08k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
671
3.08k
            info.shared_state_map.end()) {
672
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
674
            }
675
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
676
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
677
0
                                                  ? 0
678
0
                                                  : info.task_idx]
679
0
                                  .get();
680
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
681
3.08k
        } else {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(false);
684
            }
685
3.08k
            _shared_state = info.shared_state->template cast<SharedState>();
686
3.08k
            _dependency = _shared_state->create_sink_dependency(
687
3.08k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
688
3.08k
        }
689
3.08k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
690
3.08k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
691
3.08k
    }
692
693
3.08k
    if (must_set_shared_state() && _shared_state == nullptr) {
694
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
695
0
    }
696
697
3.08k
    _rows_input_counter =
698
3.08k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
699
3.08k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
700
3.08k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
701
3.08k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
702
3.08k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
703
3.08k
    _memory_used_counter =
704
3.08k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
705
3.08k
    _common_profile->add_info_string("IsColocate",
706
3.08k
                                     std::to_string(_parent->is_colocated_operator()));
707
3.08k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
708
3.08k
    _common_profile->add_info_string("FollowedByShuffledOperator",
709
3.08k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
710
3.08k
    return Status::OK();
711
3.08k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
651
12.3k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
652
    // create profile
653
12.3k
    _operator_profile =
654
12.3k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
655
12.3k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
656
12.3k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
657
658
    // indentation is true
659
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
660
    // So we should set the indentation to true.
661
12.3k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
662
12.3k
    _operator_profile->add_child(_common_profile, true);
663
12.3k
    _operator_profile->add_child(_custom_profile, true);
664
665
12.3k
    _operator_profile->set_metadata(_parent->node_id());
666
12.3k
    _wait_for_finish_dependency_timer =
667
12.3k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
668
12.3k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
669
12.3k
    if constexpr (!is_fake_shared) {
670
12.3k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
671
12.3k
            info.shared_state_map.end()) {
672
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
674
            }
675
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
676
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
677
0
                                                  ? 0
678
0
                                                  : info.task_idx]
679
0
                                  .get();
680
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
681
12.3k
        } else {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(false);
684
            }
685
12.3k
            _shared_state = info.shared_state->template cast<SharedState>();
686
12.3k
            _dependency = _shared_state->create_sink_dependency(
687
12.3k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
688
12.3k
        }
689
12.3k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
690
12.3k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
691
12.3k
    }
692
693
12.3k
    if (must_set_shared_state() && _shared_state == nullptr) {
694
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
695
0
    }
696
697
12.3k
    _rows_input_counter =
698
12.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
699
12.3k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
700
12.3k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
701
12.3k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
702
12.3k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
703
12.3k
    _memory_used_counter =
704
12.3k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
705
12.3k
    _common_profile->add_info_string("IsColocate",
706
12.3k
                                     std::to_string(_parent->is_colocated_operator()));
707
12.3k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
708
12.3k
    _common_profile->add_info_string("FollowedByShuffledOperator",
709
12.3k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
710
12.3k
    return Status::OK();
711
12.3k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
651
291k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
652
    // create profile
653
291k
    _operator_profile =
654
291k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
655
291k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
656
291k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
657
658
    // indentation is true
659
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
660
    // So we should set the indentation to true.
661
291k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
662
291k
    _operator_profile->add_child(_common_profile, true);
663
291k
    _operator_profile->add_child(_custom_profile, true);
664
665
291k
    _operator_profile->set_metadata(_parent->node_id());
666
291k
    _wait_for_finish_dependency_timer =
667
291k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
668
291k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
669
291k
    if constexpr (!is_fake_shared) {
670
291k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
671
292k
            info.shared_state_map.end()) {
672
292k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
292k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
674
292k
            }
675
292k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
676
292k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
677
292k
                                                  ? 0
678
292k
                                                  : info.task_idx]
679
292k
                                  .get();
680
292k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
681
18.4E
        } else {
682
18.4E
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
18.4E
                DCHECK(false);
684
18.4E
            }
685
18.4E
            _shared_state = info.shared_state->template cast<SharedState>();
686
18.4E
            _dependency = _shared_state->create_sink_dependency(
687
18.4E
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
688
18.4E
        }
689
291k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
690
291k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
691
291k
    }
692
693
291k
    if (must_set_shared_state() && _shared_state == nullptr) {
694
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
695
0
    }
696
697
291k
    _rows_input_counter =
698
291k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
699
291k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
700
291k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
701
291k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
702
291k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
703
291k
    _memory_used_counter =
704
291k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
705
291k
    _common_profile->add_info_string("IsColocate",
706
291k
                                     std::to_string(_parent->is_colocated_operator()));
707
291k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
708
291k
    _common_profile->add_info_string("FollowedByShuffledOperator",
709
291k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
710
291k
    return Status::OK();
711
291k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
651
455k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
652
    // create profile
653
455k
    _operator_profile =
654
455k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
655
455k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
656
455k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
657
658
    // indentation is true
659
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
660
    // So we should set the indentation to true.
661
455k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
662
455k
    _operator_profile->add_child(_common_profile, true);
663
455k
    _operator_profile->add_child(_custom_profile, true);
664
665
455k
    _operator_profile->set_metadata(_parent->node_id());
666
455k
    _wait_for_finish_dependency_timer =
667
455k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
668
455k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
669
455k
    if constexpr (!is_fake_shared) {
670
455k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
671
455k
            info.shared_state_map.end()) {
672
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
674
            }
675
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
676
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
677
0
                                                  ? 0
678
0
                                                  : info.task_idx]
679
0
                                  .get();
680
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
681
455k
        } else {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(false);
684
            }
685
455k
            _shared_state = info.shared_state->template cast<SharedState>();
686
455k
            _dependency = _shared_state->create_sink_dependency(
687
455k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
688
455k
        }
689
455k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
690
455k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
691
455k
    }
692
693
455k
    if (must_set_shared_state() && _shared_state == nullptr) {
694
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
695
0
    }
696
697
455k
    _rows_input_counter =
698
455k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
699
455k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
700
455k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
701
455k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
702
455k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
703
455k
    _memory_used_counter =
704
455k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
705
455k
    _common_profile->add_info_string("IsColocate",
706
455k
                                     std::to_string(_parent->is_colocated_operator()));
707
455k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
708
455k
    _common_profile->add_info_string("FollowedByShuffledOperator",
709
455k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
710
455k
    return Status::OK();
711
455k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
651
25
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
652
    // create profile
653
25
    _operator_profile =
654
25
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
655
25
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
656
25
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
657
658
    // indentation is true
659
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
660
    // So we should set the indentation to true.
661
25
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
662
25
    _operator_profile->add_child(_common_profile, true);
663
25
    _operator_profile->add_child(_custom_profile, true);
664
665
25
    _operator_profile->set_metadata(_parent->node_id());
666
25
    _wait_for_finish_dependency_timer =
667
25
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
668
25
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
669
25
    if constexpr (!is_fake_shared) {
670
25
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
671
25
            info.shared_state_map.end()) {
672
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
674
            }
675
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
676
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
677
0
                                                  ? 0
678
0
                                                  : info.task_idx]
679
0
                                  .get();
680
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
681
25
        } else {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(false);
684
            }
685
25
            _shared_state = info.shared_state->template cast<SharedState>();
686
25
            _dependency = _shared_state->create_sink_dependency(
687
25
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
688
25
        }
689
25
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
690
25
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
691
25
    }
692
693
25
    if (must_set_shared_state() && _shared_state == nullptr) {
694
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
695
0
    }
696
697
25
    _rows_input_counter =
698
25
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
699
25
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
700
25
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
701
25
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
702
25
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
703
25
    _memory_used_counter =
704
25
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
705
25
    _common_profile->add_info_string("IsColocate",
706
25
                                     std::to_string(_parent->is_colocated_operator()));
707
25
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
708
25
    _common_profile->add_info_string("FollowedByShuffledOperator",
709
25
                                     std::to_string(_parent->followed_by_shuffled_operator()));
710
25
    return Status::OK();
711
25
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
651
328
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
652
    // create profile
653
328
    _operator_profile =
654
328
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
655
328
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
656
328
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
657
658
    // indentation is true
659
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
660
    // So we should set the indentation to true.
661
328
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
662
328
    _operator_profile->add_child(_common_profile, true);
663
328
    _operator_profile->add_child(_custom_profile, true);
664
665
328
    _operator_profile->set_metadata(_parent->node_id());
666
328
    _wait_for_finish_dependency_timer =
667
328
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
668
328
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
669
328
    if constexpr (!is_fake_shared) {
670
328
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
671
328
            info.shared_state_map.end()) {
672
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
674
            }
675
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
676
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
677
0
                                                  ? 0
678
0
                                                  : info.task_idx]
679
0
                                  .get();
680
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
681
328
        } else {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(false);
684
            }
685
328
            _shared_state = info.shared_state->template cast<SharedState>();
686
328
            _dependency = _shared_state->create_sink_dependency(
687
328
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
688
328
        }
689
328
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
690
328
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
691
328
    }
692
693
328
    if (must_set_shared_state() && _shared_state == nullptr) {
694
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
695
0
    }
696
697
328
    _rows_input_counter =
698
328
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
699
328
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
700
328
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
701
328
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
702
328
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
703
328
    _memory_used_counter =
704
328
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
705
328
    _common_profile->add_info_string("IsColocate",
706
328
                                     std::to_string(_parent->is_colocated_operator()));
707
328
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
708
328
    _common_profile->add_info_string("FollowedByShuffledOperator",
709
328
                                     std::to_string(_parent->followed_by_shuffled_operator()));
710
328
    return Status::OK();
711
328
}
712
713
template <typename SharedState>
714
1.87M
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
715
1.87M
    if (_closed) {
716
2
        return Status::OK();
717
2
    }
718
1.87M
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
719
1.25M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
720
1.25M
    }
721
1.87M
    _closed = true;
722
1.87M
    return Status::OK();
723
1.87M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
714
115k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
715
115k
    if (_closed) {
716
0
        return Status::OK();
717
0
    }
718
115k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
719
115k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
720
115k
    }
721
115k
    _closed = true;
722
115k
    return Status::OK();
723
115k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
714
1
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
715
1
    if (_closed) {
716
0
        return Status::OK();
717
0
    }
718
1
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
719
1
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
720
1
    }
721
1
    _closed = true;
722
1
    return Status::OK();
723
1
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
714
231k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
715
231k
    if (_closed) {
716
0
        return Status::OK();
717
0
    }
718
231k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
719
231k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
720
231k
    }
721
231k
    _closed = true;
722
231k
    return Status::OK();
723
231k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
714
22
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
715
22
    if (_closed) {
716
2
        return Status::OK();
717
2
    }
718
20
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
719
20
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
720
20
    }
721
20
    _closed = true;
722
20
    return Status::OK();
723
22
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
714
8.15k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
715
8.15k
    if (_closed) {
716
0
        return Status::OK();
717
0
    }
718
8.15k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
719
8.15k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
720
8.15k
    }
721
8.15k
    _closed = true;
722
8.15k
    return Status::OK();
723
8.15k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
714
8.33k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
715
8.33k
    if (_closed) {
716
0
        return Status::OK();
717
0
    }
718
8.33k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
719
8.33k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
720
8.33k
    }
721
8.33k
    _closed = true;
722
8.33k
    return Status::OK();
723
8.33k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
714
119k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
715
119k
    if (_closed) {
716
0
        return Status::OK();
717
0
    }
718
119k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
719
119k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
720
119k
    }
721
119k
    _closed = true;
722
119k
    return Status::OK();
723
119k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
714
347
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
715
347
    if (_closed) {
716
0
        return Status::OK();
717
0
    }
718
347
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
719
347
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
720
347
    }
721
347
    _closed = true;
722
347
    return Status::OK();
723
347
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
714
214
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
715
214
    if (_closed) {
716
0
        return Status::OK();
717
0
    }
718
214
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
719
214
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
720
214
    }
721
214
    _closed = true;
722
214
    return Status::OK();
723
214
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
714
620k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
715
620k
    if (_closed) {
716
0
        return Status::OK();
717
0
    }
718
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
719
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
720
    }
721
620k
    _closed = true;
722
620k
    return Status::OK();
723
620k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
714
5.24k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
715
5.24k
    if (_closed) {
716
0
        return Status::OK();
717
0
    }
718
5.24k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
719
5.24k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
720
5.24k
    }
721
5.24k
    _closed = true;
722
5.24k
    return Status::OK();
723
5.24k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
714
625
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
715
625
    if (_closed) {
716
0
        return Status::OK();
717
0
    }
718
625
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
719
625
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
720
625
    }
721
625
    _closed = true;
722
625
    return Status::OK();
723
625
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
714
3.08k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
715
3.08k
    if (_closed) {
716
0
        return Status::OK();
717
0
    }
718
3.08k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
719
3.08k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
720
3.08k
    }
721
3.08k
    _closed = true;
722
3.08k
    return Status::OK();
723
3.08k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
714
12.4k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
715
12.4k
    if (_closed) {
716
0
        return Status::OK();
717
0
    }
718
12.4k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
719
12.4k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
720
12.4k
    }
721
12.4k
    _closed = true;
722
12.4k
    return Status::OK();
723
12.4k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
714
293k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
715
293k
    if (_closed) {
716
0
        return Status::OK();
717
0
    }
718
293k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
719
293k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
720
293k
    }
721
293k
    _closed = true;
722
293k
    return Status::OK();
723
293k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
714
457k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
715
457k
    if (_closed) {
716
0
        return Status::OK();
717
0
    }
718
457k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
719
457k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
720
457k
    }
721
457k
    _closed = true;
722
457k
    return Status::OK();
723
457k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
714
14
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
715
14
    if (_closed) {
716
0
        return Status::OK();
717
0
    }
718
14
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
719
14
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
720
14
    }
721
14
    _closed = true;
722
14
    return Status::OK();
723
14
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
714
328
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
715
328
    if (_closed) {
716
0
        return Status::OK();
717
0
    }
718
328
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
719
328
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
720
328
    }
721
328
    _closed = true;
722
328
    return Status::OK();
723
328
}
724
725
template <typename LocalStateType>
726
Status StreamingOperatorX<LocalStateType>::get_block_impl(RuntimeState* state, Block* block,
727
13.5k
                                                          bool* eos) {
728
13.5k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
729
13.5k
    return pull(state, block, eos);
730
13.5k
}
_ZN5doris18StreamingOperatorXINS_23AssertNumRowsLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
727
232
                                                          bool* eos) {
728
232
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
729
232
    return pull(state, block, eos);
730
232
}
_ZN5doris18StreamingOperatorXINS_16SelectLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
727
13.3k
                                                          bool* eos) {
728
13.3k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
729
13.3k
    return pull(state, block, eos);
730
13.3k
}
731
732
template <typename LocalStateType>
733
Status StatefulOperatorX<LocalStateType>::get_block_impl(RuntimeState* state, Block* block,
734
694k
                                                         bool* eos) {
735
694k
    auto& local_state = get_local_state(state);
736
694k
    if (need_more_input_data(state)) {
737
665k
        local_state._child_block->clear_column_data(
738
665k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
739
665k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
740
665k
                state, local_state._child_block.get(), &local_state._child_eos));
741
665k
        *eos = local_state._child_eos;
742
665k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
743
71.8k
            return Status::OK();
744
71.8k
        }
745
593k
        {
746
593k
            SCOPED_TIMER(local_state.exec_time_counter());
747
593k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
748
593k
        }
749
593k
    }
750
751
622k
    if (!need_more_input_data(state)) {
752
574k
        SCOPED_TIMER(local_state.exec_time_counter());
753
574k
        bool new_eos = false;
754
574k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
755
574k
        if (new_eos) {
756
495k
            *eos = true;
757
495k
        } else if (!need_more_input_data(state)) {
758
23.1k
            *eos = false;
759
23.1k
        }
760
574k
    }
761
622k
    return Status::OK();
762
622k
}
_ZN5doris17StatefulOperatorXINS_23HashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
734
141k
                                                         bool* eos) {
735
141k
    auto& local_state = get_local_state(state);
736
141k
    if (need_more_input_data(state)) {
737
126k
        local_state._child_block->clear_column_data(
738
126k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
739
126k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
740
126k
                state, local_state._child_block.get(), &local_state._child_eos));
741
126k
        *eos = local_state._child_eos;
742
126k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
743
42.9k
            return Status::OK();
744
42.9k
        }
745
83.8k
        {
746
83.8k
            SCOPED_TIMER(local_state.exec_time_counter());
747
83.8k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
748
83.8k
        }
749
83.8k
    }
750
751
98.9k
    if (!need_more_input_data(state)) {
752
98.8k
        SCOPED_TIMER(local_state.exec_time_counter());
753
98.8k
        bool new_eos = false;
754
98.8k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
755
98.8k
        if (new_eos) {
756
42.9k
            *eos = true;
757
55.9k
        } else if (!need_more_input_data(state)) {
758
8.82k
            *eos = false;
759
8.82k
        }
760
98.8k
    }
761
98.9k
    return Status::OK();
762
98.9k
}
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_34PartitionedHashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
_ZN5doris17StatefulOperatorXINS_16RepeatLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
734
4.32k
                                                         bool* eos) {
735
4.32k
    auto& local_state = get_local_state(state);
736
4.32k
    if (need_more_input_data(state)) {
737
2.53k
        local_state._child_block->clear_column_data(
738
2.53k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
739
2.53k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
740
2.53k
                state, local_state._child_block.get(), &local_state._child_eos));
741
2.53k
        *eos = local_state._child_eos;
742
2.53k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
743
704
            return Status::OK();
744
704
        }
745
1.83k
        {
746
1.83k
            SCOPED_TIMER(local_state.exec_time_counter());
747
1.83k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
748
1.83k
        }
749
1.83k
    }
750
751
3.62k
    if (!need_more_input_data(state)) {
752
3.62k
        SCOPED_TIMER(local_state.exec_time_counter());
753
3.62k
        bool new_eos = false;
754
3.62k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
755
3.62k
        if (new_eos) {
756
1.23k
            *eos = true;
757
2.39k
        } else if (!need_more_input_data(state)) {
758
1.79k
            *eos = false;
759
1.79k
        }
760
3.62k
    }
761
3.62k
    return Status::OK();
762
3.62k
}
_ZN5doris17StatefulOperatorXINS_25MaterializationLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
734
3.43k
                                                         bool* eos) {
735
3.43k
    auto& local_state = get_local_state(state);
736
3.43k
    if (need_more_input_data(state)) {
737
3.43k
        local_state._child_block->clear_column_data(
738
3.43k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
739
3.43k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
740
3.43k
                state, local_state._child_block.get(), &local_state._child_eos));
741
3.43k
        *eos = local_state._child_eos;
742
3.43k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
743
1.25k
            return Status::OK();
744
1.25k
        }
745
2.18k
        {
746
2.18k
            SCOPED_TIMER(local_state.exec_time_counter());
747
2.18k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
748
2.18k
        }
749
2.18k
    }
750
751
2.18k
    if (!need_more_input_data(state)) {
752
2.18k
        SCOPED_TIMER(local_state.exec_time_counter());
753
2.18k
        bool new_eos = false;
754
2.18k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
755
2.18k
        if (new_eos) {
756
1.27k
            *eos = true;
757
1.27k
        } else if (!need_more_input_data(state)) {
758
0
            *eos = false;
759
0
        }
760
2.18k
    }
761
2.18k
    return Status::OK();
762
2.18k
}
_ZN5doris17StatefulOperatorXINS_22StreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
734
28.9k
                                                         bool* eos) {
735
28.9k
    auto& local_state = get_local_state(state);
736
28.9k
    if (need_more_input_data(state)) {
737
28.9k
        local_state._child_block->clear_column_data(
738
28.9k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
739
28.9k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
740
28.9k
                state, local_state._child_block.get(), &local_state._child_eos));
741
28.9k
        *eos = local_state._child_eos;
742
28.9k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
743
4.33k
            return Status::OK();
744
4.33k
        }
745
24.6k
        {
746
24.6k
            SCOPED_TIMER(local_state.exec_time_counter());
747
24.6k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
748
24.6k
        }
749
24.6k
    }
750
751
24.5k
    if (!need_more_input_data(state)) {
752
9.40k
        SCOPED_TIMER(local_state.exec_time_counter());
753
9.40k
        bool new_eos = false;
754
9.40k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
755
9.40k
        if (new_eos) {
756
9.26k
            *eos = true;
757
9.26k
        } else if (!need_more_input_data(state)) {
758
12
            *eos = false;
759
12
        }
760
9.40k
    }
761
24.5k
    return Status::OK();
762
24.5k
}
_ZN5doris17StatefulOperatorXINS_30DistinctStreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
734
482k
                                                         bool* eos) {
735
482k
    auto& local_state = get_local_state(state);
736
483k
    if (need_more_input_data(state)) {
737
483k
        local_state._child_block->clear_column_data(
738
483k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
739
483k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
740
483k
                state, local_state._child_block.get(), &local_state._child_eos));
741
483k
        *eos = local_state._child_eos;
742
483k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
743
20.4k
            return Status::OK();
744
20.4k
        }
745
462k
        {
746
462k
            SCOPED_TIMER(local_state.exec_time_counter());
747
462k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
748
462k
        }
749
462k
    }
750
751
461k
    if (!need_more_input_data(state)) {
752
429k
        SCOPED_TIMER(local_state.exec_time_counter());
753
429k
        bool new_eos = false;
754
429k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
755
429k
        if (new_eos) {
756
428k
            *eos = true;
757
428k
        } else if (!need_more_input_data(state)) {
758
0
            *eos = false;
759
0
        }
760
429k
    }
761
461k
    return Status::OK();
762
461k
}
_ZN5doris17StatefulOperatorXINS_29NestedLoopJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
734
26.7k
                                                         bool* eos) {
735
26.7k
    auto& local_state = get_local_state(state);
736
26.7k
    if (need_more_input_data(state)) {
737
14.6k
        local_state._child_block->clear_column_data(
738
14.6k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
739
14.6k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
740
14.6k
                state, local_state._child_block.get(), &local_state._child_eos));
741
14.6k
        *eos = local_state._child_eos;
742
14.6k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
743
1.79k
            return Status::OK();
744
1.79k
        }
745
12.8k
        {
746
12.8k
            SCOPED_TIMER(local_state.exec_time_counter());
747
12.8k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
748
12.8k
        }
749
12.8k
    }
750
751
24.9k
    if (!need_more_input_data(state)) {
752
24.3k
        SCOPED_TIMER(local_state.exec_time_counter());
753
24.3k
        bool new_eos = false;
754
24.3k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
755
24.3k
        if (new_eos) {
756
8.14k
            *eos = true;
757
16.1k
        } else if (!need_more_input_data(state)) {
758
12.1k
            *eos = false;
759
12.1k
        }
760
24.3k
    }
761
24.9k
    return Status::OK();
762
24.9k
}
_ZN5doris17StatefulOperatorXINS_23TableFunctionLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
734
6.59k
                                                         bool* eos) {
735
6.59k
    auto& local_state = get_local_state(state);
736
6.59k
    if (need_more_input_data(state)) {
737
6.24k
        local_state._child_block->clear_column_data(
738
6.24k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
739
6.24k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
740
6.24k
                state, local_state._child_block.get(), &local_state._child_eos));
741
6.24k
        *eos = local_state._child_eos;
742
6.24k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
743
360
            return Status::OK();
744
360
        }
745
5.88k
        {
746
5.88k
            SCOPED_TIMER(local_state.exec_time_counter());
747
5.88k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
748
5.88k
        }
749
5.88k
    }
750
751
6.23k
    if (!need_more_input_data(state)) {
752
6.23k
        SCOPED_TIMER(local_state.exec_time_counter());
753
6.23k
        bool new_eos = false;
754
6.23k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
755
6.23k
        if (new_eos) {
756
4.17k
            *eos = true;
757
4.17k
        } else if (!need_more_input_data(state)) {
758
366
            *eos = false;
759
366
        }
760
6.23k
    }
761
6.23k
    return Status::OK();
762
6.23k
}
763
764
template <typename Writer, typename Parent>
765
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
766
54.9k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
767
54.9k
    RETURN_IF_ERROR(Base::init(state, info));
768
54.9k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
769
54.9k
                                                         "AsyncWriterDependency", true);
770
54.9k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
771
54.9k
                             _finish_dependency));
772
773
54.9k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
774
54.9k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
775
54.9k
    return Status::OK();
776
54.9k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
766
450
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
767
450
    RETURN_IF_ERROR(Base::init(state, info));
768
450
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
769
450
                                                         "AsyncWriterDependency", true);
770
450
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
771
450
                             _finish_dependency));
772
773
450
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
774
450
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
775
450
    return Status::OK();
776
450
}
_ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
766
43
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
767
43
    RETURN_IF_ERROR(Base::init(state, info));
768
43
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
769
43
                                                         "AsyncWriterDependency", true);
770
43
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
771
43
                             _finish_dependency));
772
773
43
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
774
43
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
775
43
    return Status::OK();
776
43
}
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
766
43.6k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
767
43.6k
    RETURN_IF_ERROR(Base::init(state, info));
768
43.6k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
769
43.6k
                                                         "AsyncWriterDependency", true);
770
43.6k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
771
43.6k
                             _finish_dependency));
772
773
43.6k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
774
43.6k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
775
43.6k
    return Status::OK();
776
43.6k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
766
4.86k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
767
4.86k
    RETURN_IF_ERROR(Base::init(state, info));
768
4.86k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
769
4.86k
                                                         "AsyncWriterDependency", true);
770
4.86k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
771
4.86k
                             _finish_dependency));
772
773
4.86k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
774
4.86k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
775
4.86k
    return Status::OK();
776
4.86k
}
_ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
766
2.61k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
767
2.61k
    RETURN_IF_ERROR(Base::init(state, info));
768
2.61k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
769
2.61k
                                                         "AsyncWriterDependency", true);
770
2.61k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
771
2.61k
                             _finish_dependency));
772
773
2.61k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
774
2.61k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
775
2.61k
    return Status::OK();
776
2.61k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
766
2.01k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
767
2.01k
    RETURN_IF_ERROR(Base::init(state, info));
768
2.01k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
769
2.01k
                                                         "AsyncWriterDependency", true);
770
2.01k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
771
2.01k
                             _finish_dependency));
772
773
2.01k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
774
2.01k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
775
2.01k
    return Status::OK();
776
2.01k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
766
24
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
767
24
    RETURN_IF_ERROR(Base::init(state, info));
768
24
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
769
24
                                                         "AsyncWriterDependency", true);
770
24
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
771
24
                             _finish_dependency));
772
773
24
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
774
24
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
775
24
    return Status::OK();
776
24
}
_ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
766
352
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
767
352
    RETURN_IF_ERROR(Base::init(state, info));
768
352
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
769
352
                                                         "AsyncWriterDependency", true);
770
352
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
771
352
                             _finish_dependency));
772
773
352
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
774
352
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
775
352
    return Status::OK();
776
352
}
_ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
766
858
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
767
858
    RETURN_IF_ERROR(Base::init(state, info));
768
858
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
769
858
                                                         "AsyncWriterDependency", true);
770
858
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
771
858
                             _finish_dependency));
772
773
858
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
774
858
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
775
858
    return Status::OK();
776
858
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
766
78
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
767
78
    RETURN_IF_ERROR(Base::init(state, info));
768
78
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
769
78
                                                         "AsyncWriterDependency", true);
770
78
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
771
78
                             _finish_dependency));
772
773
78
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
774
78
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
775
78
    return Status::OK();
776
78
}
777
778
template <typename Writer, typename Parent>
779
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
780
55.0k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
781
55.0k
    RETURN_IF_ERROR(Base::open(state));
782
55.0k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
783
458k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
784
403k
        RETURN_IF_ERROR(
785
403k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
786
403k
    }
787
55.0k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
788
55.0k
    return Status::OK();
789
55.0k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
780
454
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
781
454
    RETURN_IF_ERROR(Base::open(state));
782
454
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
783
2.35k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
784
1.90k
        RETURN_IF_ERROR(
785
1.90k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
786
1.90k
    }
787
454
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
788
454
    return Status::OK();
789
454
}
_ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
780
43
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
781
43
    RETURN_IF_ERROR(Base::open(state));
782
43
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
783
201
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
784
158
        RETURN_IF_ERROR(
785
158
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
786
158
    }
787
43
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
788
43
    return Status::OK();
789
43
}
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
780
43.9k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
781
43.9k
    RETURN_IF_ERROR(Base::open(state));
782
43.9k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
783
327k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
784
283k
        RETURN_IF_ERROR(
785
283k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
786
283k
    }
787
43.9k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
788
43.9k
    return Status::OK();
789
43.9k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
780
4.74k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
781
4.74k
    RETURN_IF_ERROR(Base::open(state));
782
4.74k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
783
29.5k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
784
24.8k
        RETURN_IF_ERROR(
785
24.8k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
786
24.8k
    }
787
4.74k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
788
4.74k
    return Status::OK();
789
4.74k
}
_ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
780
2.60k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
781
2.60k
    RETURN_IF_ERROR(Base::open(state));
782
2.60k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
783
68.1k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
784
65.5k
        RETURN_IF_ERROR(
785
65.5k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
786
65.5k
    }
787
2.60k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
788
2.60k
    return Status::OK();
789
2.60k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
780
2.00k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
781
2.00k
    RETURN_IF_ERROR(Base::open(state));
782
2.00k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
783
22.4k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
784
20.3k
        RETURN_IF_ERROR(
785
20.3k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
786
20.3k
    }
787
2.00k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
788
2.00k
    return Status::OK();
789
2.00k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
780
24
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
781
24
    RETURN_IF_ERROR(Base::open(state));
782
24
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
783
103
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
784
79
        RETURN_IF_ERROR(
785
79
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
786
79
    }
787
24
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
788
24
    return Status::OK();
789
24
}
_ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
780
350
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
781
350
    RETURN_IF_ERROR(Base::open(state));
782
350
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
783
1.05k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
784
700
        RETURN_IF_ERROR(
785
700
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
786
700
    }
787
350
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
788
350
    return Status::OK();
789
350
}
_ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
780
856
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
781
856
    RETURN_IF_ERROR(Base::open(state));
782
856
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
783
6.68k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
784
5.82k
        RETURN_IF_ERROR(
785
5.82k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
786
5.82k
    }
787
856
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
788
856
    return Status::OK();
789
856
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
780
78
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
781
78
    RETURN_IF_ERROR(Base::open(state));
782
78
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
783
393
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
784
315
        RETURN_IF_ERROR(
785
315
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
786
315
    }
787
78
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
788
78
    return Status::OK();
789
78
}
790
791
template <typename Writer, typename Parent>
792
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
793
75.8k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
794
75.8k
    return _writer->sink(block, eos);
795
75.8k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
793
2.12k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
794
2.12k
    return _writer->sink(block, eos);
795
2.12k
}
_ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
793
55
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
794
55
    return _writer->sink(block, eos);
795
55
}
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
793
59.3k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
794
59.3k
    return _writer->sink(block, eos);
795
59.3k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
793
5.53k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
794
5.53k
    return _writer->sink(block, eos);
795
5.53k
}
_ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
793
3.83k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
794
3.83k
    return _writer->sink(block, eos);
795
3.83k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
793
3.29k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
794
3.29k
    return _writer->sink(block, eos);
795
3.29k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
793
30
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
794
30
    return _writer->sink(block, eos);
795
30
}
_ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
793
397
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
794
397
    return _writer->sink(block, eos);
795
397
}
_ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
793
1.08k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
794
1.08k
    return _writer->sink(block, eos);
795
1.08k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
793
155
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
794
155
    return _writer->sink(block, eos);
795
155
}
796
797
template <typename Writer, typename Parent>
798
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
799
55.2k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
800
55.2k
    if (_closed) {
801
0
        return Status::OK();
802
0
    }
803
55.2k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
804
55.2k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
805
    // if the init failed, the _writer may be nullptr. so here need check
806
55.3k
    if (_writer) {
807
55.3k
        Status st = _writer->get_writer_status();
808
55.3k
        if (exec_status.ok()) {
809
55.1k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
810
55.1k
                                                       : Status::Cancelled("force close"));
811
55.1k
        } else {
812
143
            _writer->force_close(exec_status);
813
143
        }
814
        // If there is an error in process_block thread, then we should get the writer
815
        // status before call force_close. For example, the thread may failed in commit
816
        // transaction.
817
55.3k
        RETURN_IF_ERROR(st);
818
55.3k
    }
819
55.1k
    return Base::close(state, exec_status);
820
55.2k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
799
439
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
800
439
    if (_closed) {
801
0
        return Status::OK();
802
0
    }
803
439
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
804
439
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
805
    // if the init failed, the _writer may be nullptr. so here need check
806
439
    if (_writer) {
807
439
        Status st = _writer->get_writer_status();
808
439
        if (exec_status.ok()) {
809
439
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
810
439
                                                       : Status::Cancelled("force close"));
811
439
        } else {
812
0
            _writer->force_close(exec_status);
813
0
        }
814
        // If there is an error in process_block thread, then we should get the writer
815
        // status before call force_close. For example, the thread may failed in commit
816
        // transaction.
817
439
        RETURN_IF_ERROR(st);
818
439
    }
819
439
    return Base::close(state, exec_status);
820
439
}
_ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
799
43
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
800
43
    if (_closed) {
801
0
        return Status::OK();
802
0
    }
803
43
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
804
43
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
805
    // if the init failed, the _writer may be nullptr. so here need check
806
43
    if (_writer) {
807
43
        Status st = _writer->get_writer_status();
808
43
        if (exec_status.ok()) {
809
43
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
810
43
                                                       : Status::Cancelled("force close"));
811
43
        } else {
812
0
            _writer->force_close(exec_status);
813
0
        }
814
        // If there is an error in process_block thread, then we should get the writer
815
        // status before call force_close. For example, the thread may failed in commit
816
        // transaction.
817
43
        RETURN_IF_ERROR(st);
818
43
    }
819
39
    return Base::close(state, exec_status);
820
43
}
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
799
44.0k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
800
44.0k
    if (_closed) {
801
0
        return Status::OK();
802
0
    }
803
44.0k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
804
44.0k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
805
    // if the init failed, the _writer may be nullptr. so here need check
806
44.0k
    if (_writer) {
807
44.0k
        Status st = _writer->get_writer_status();
808
44.0k
        if (exec_status.ok()) {
809
43.9k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
810
43.9k
                                                       : Status::Cancelled("force close"));
811
43.9k
        } else {
812
75
            _writer->force_close(exec_status);
813
75
        }
814
        // If there is an error in process_block thread, then we should get the writer
815
        // status before call force_close. For example, the thread may failed in commit
816
        // transaction.
817
44.0k
        RETURN_IF_ERROR(st);
818
44.0k
    }
819
43.9k
    return Base::close(state, exec_status);
820
44.0k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
799
4.82k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
800
4.82k
    if (_closed) {
801
0
        return Status::OK();
802
0
    }
803
4.82k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
804
4.82k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
805
    // if the init failed, the _writer may be nullptr. so here need check
806
4.86k
    if (_writer) {
807
4.86k
        Status st = _writer->get_writer_status();
808
4.86k
        if (exec_status.ok()) {
809
4.80k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
810
4.80k
                                                       : Status::Cancelled("force close"));
811
4.80k
        } else {
812
64
            _writer->force_close(exec_status);
813
64
        }
814
        // If there is an error in process_block thread, then we should get the writer
815
        // status before call force_close. For example, the thread may failed in commit
816
        // transaction.
817
4.86k
        RETURN_IF_ERROR(st);
818
4.86k
    }
819
4.82k
    return Base::close(state, exec_status);
820
4.82k
}
_ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
799
2.61k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
800
2.61k
    if (_closed) {
801
0
        return Status::OK();
802
0
    }
803
2.61k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
804
2.61k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
805
    // if the init failed, the _writer may be nullptr. so here need check
806
2.61k
    if (_writer) {
807
2.61k
        Status st = _writer->get_writer_status();
808
2.61k
        if (exec_status.ok()) {
809
2.61k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
810
2.61k
                                                       : Status::Cancelled("force close"));
811
2.61k
        } else {
812
2
            _writer->force_close(exec_status);
813
2
        }
814
        // If there is an error in process_block thread, then we should get the writer
815
        // status before call force_close. For example, the thread may failed in commit
816
        // transaction.
817
2.61k
        RETURN_IF_ERROR(st);
818
2.61k
    }
819
2.61k
    return Base::close(state, exec_status);
820
2.61k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
799
2.00k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
800
2.00k
    if (_closed) {
801
0
        return Status::OK();
802
0
    }
803
2.00k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
804
2.00k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
805
    // if the init failed, the _writer may be nullptr. so here need check
806
2.01k
    if (_writer) {
807
2.01k
        Status st = _writer->get_writer_status();
808
2.01k
        if (exec_status.ok()) {
809
2.00k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
810
2.00k
                                                       : Status::Cancelled("force close"));
811
2.00k
        } else {
812
3
            _writer->force_close(exec_status);
813
3
        }
814
        // If there is an error in process_block thread, then we should get the writer
815
        // status before call force_close. For example, the thread may failed in commit
816
        // transaction.
817
2.01k
        RETURN_IF_ERROR(st);
818
2.01k
    }
819
2.00k
    return Base::close(state, exec_status);
820
2.00k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
799
24
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
800
24
    if (_closed) {
801
0
        return Status::OK();
802
0
    }
803
24
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
804
24
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
805
    // if the init failed, the _writer may be nullptr. so here need check
806
24
    if (_writer) {
807
24
        Status st = _writer->get_writer_status();
808
24
        if (exec_status.ok()) {
809
24
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
810
24
                                                       : Status::Cancelled("force close"));
811
24
        } else {
812
0
            _writer->force_close(exec_status);
813
0
        }
814
        // If there is an error in process_block thread, then we should get the writer
815
        // status before call force_close. For example, the thread may failed in commit
816
        // transaction.
817
24
        RETURN_IF_ERROR(st);
818
24
    }
819
24
    return Base::close(state, exec_status);
820
24
}
_ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
799
351
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
800
351
    if (_closed) {
801
0
        return Status::OK();
802
0
    }
803
351
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
804
351
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
805
    // if the init failed, the _writer may be nullptr. so here need check
806
351
    if (_writer) {
807
351
        Status st = _writer->get_writer_status();
808
352
        if (exec_status.ok()) {
809
352
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
810
352
                                                       : Status::Cancelled("force close"));
811
18.4E
        } else {
812
18.4E
            _writer->force_close(exec_status);
813
18.4E
        }
814
        // If there is an error in process_block thread, then we should get the writer
815
        // status before call force_close. For example, the thread may failed in commit
816
        // transaction.
817
351
        RETURN_IF_ERROR(st);
818
351
    }
819
351
    return Base::close(state, exec_status);
820
351
}
_ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
799
858
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
800
858
    if (_closed) {
801
0
        return Status::OK();
802
0
    }
803
858
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
804
858
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
805
    // if the init failed, the _writer may be nullptr. so here need check
806
858
    if (_writer) {
807
858
        Status st = _writer->get_writer_status();
808
858
        if (exec_status.ok()) {
809
858
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
810
858
                                                       : Status::Cancelled("force close"));
811
858
        } else {
812
0
            _writer->force_close(exec_status);
813
0
        }
814
        // If there is an error in process_block thread, then we should get the writer
815
        // status before call force_close. For example, the thread may failed in commit
816
        // transaction.
817
858
        RETURN_IF_ERROR(st);
818
858
    }
819
856
    return Base::close(state, exec_status);
820
858
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
799
78
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
800
78
    if (_closed) {
801
0
        return Status::OK();
802
0
    }
803
78
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
804
78
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
805
    // if the init failed, the _writer may be nullptr. so here need check
806
78
    if (_writer) {
807
78
        Status st = _writer->get_writer_status();
808
78
        if (exec_status.ok()) {
809
78
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
810
78
                                                       : Status::Cancelled("force close"));
811
78
        } else {
812
0
            _writer->force_close(exec_status);
813
0
        }
814
        // If there is an error in process_block thread, then we should get the writer
815
        // status before call force_close. For example, the thread may failed in commit
816
        // transaction.
817
78
        RETURN_IF_ERROR(st);
818
78
    }
819
78
    return Base::close(state, exec_status);
820
78
}
821
822
#define DECLARE_OPERATOR(LOCAL_STATE) template class DataSinkOperatorX<LOCAL_STATE>;
823
DECLARE_OPERATOR(HashJoinBuildSinkLocalState)
824
DECLARE_OPERATOR(ResultSinkLocalState)
825
DECLARE_OPERATOR(JdbcTableSinkLocalState)
826
DECLARE_OPERATOR(MemoryScratchSinkLocalState)
827
DECLARE_OPERATOR(ResultFileSinkLocalState)
828
DECLARE_OPERATOR(OlapTableSinkLocalState)
829
DECLARE_OPERATOR(OlapTableSinkV2LocalState)
830
DECLARE_OPERATOR(HiveTableSinkLocalState)
831
DECLARE_OPERATOR(TVFTableSinkLocalState)
832
DECLARE_OPERATOR(IcebergTableSinkLocalState)
833
DECLARE_OPERATOR(SpillIcebergTableSinkLocalState)
834
DECLARE_OPERATOR(IcebergDeleteSinkLocalState)
835
DECLARE_OPERATOR(IcebergMergeSinkLocalState)
836
DECLARE_OPERATOR(MCTableSinkLocalState)
837
DECLARE_OPERATOR(AnalyticSinkLocalState)
838
DECLARE_OPERATOR(BlackholeSinkLocalState)
839
DECLARE_OPERATOR(SortSinkLocalState)
840
DECLARE_OPERATOR(SpillSortSinkLocalState)
841
DECLARE_OPERATOR(LocalExchangeSinkLocalState)
842
DECLARE_OPERATOR(AggSinkLocalState)
843
DECLARE_OPERATOR(BucketedAggSinkLocalState)
844
DECLARE_OPERATOR(PartitionedAggSinkLocalState)
845
DECLARE_OPERATOR(ExchangeSinkLocalState)
846
DECLARE_OPERATOR(NestedLoopJoinBuildSinkLocalState)
847
DECLARE_OPERATOR(UnionSinkLocalState)
848
DECLARE_OPERATOR(MultiCastDataStreamSinkLocalState)
849
DECLARE_OPERATOR(PartitionSortSinkLocalState)
850
DECLARE_OPERATOR(SetProbeSinkLocalState<true>)
851
DECLARE_OPERATOR(SetProbeSinkLocalState<false>)
852
DECLARE_OPERATOR(SetSinkLocalState<true>)
853
DECLARE_OPERATOR(SetSinkLocalState<false>)
854
DECLARE_OPERATOR(PartitionedHashJoinSinkLocalState)
855
DECLARE_OPERATOR(GroupCommitBlockSinkLocalState)
856
DECLARE_OPERATOR(CacheSinkLocalState)
857
DECLARE_OPERATOR(DictSinkLocalState)
858
DECLARE_OPERATOR(RecCTESinkLocalState)
859
DECLARE_OPERATOR(RecCTEAnchorSinkLocalState)
860
861
#undef DECLARE_OPERATOR
862
863
#define DECLARE_OPERATOR(LOCAL_STATE) template class OperatorX<LOCAL_STATE>;
864
DECLARE_OPERATOR(HashJoinProbeLocalState)
865
DECLARE_OPERATOR(OlapScanLocalState)
866
DECLARE_OPERATOR(GroupCommitLocalState)
867
DECLARE_OPERATOR(JDBCScanLocalState)
868
DECLARE_OPERATOR(FileScanLocalState)
869
DECLARE_OPERATOR(AnalyticLocalState)
870
DECLARE_OPERATOR(SortLocalState)
871
DECLARE_OPERATOR(SpillSortLocalState)
872
DECLARE_OPERATOR(LocalMergeSortLocalState)
873
DECLARE_OPERATOR(AggLocalState)
874
DECLARE_OPERATOR(BucketedAggLocalState)
875
DECLARE_OPERATOR(PartitionedAggLocalState)
876
DECLARE_OPERATOR(TableFunctionLocalState)
877
DECLARE_OPERATOR(ExchangeLocalState)
878
DECLARE_OPERATOR(RepeatLocalState)
879
DECLARE_OPERATOR(NestedLoopJoinProbeLocalState)
880
DECLARE_OPERATOR(AssertNumRowsLocalState)
881
DECLARE_OPERATOR(EmptySetLocalState)
882
DECLARE_OPERATOR(UnionSourceLocalState)
883
DECLARE_OPERATOR(MultiCastDataStreamSourceLocalState)
884
DECLARE_OPERATOR(PartitionSortSourceLocalState)
885
DECLARE_OPERATOR(SetSourceLocalState<true>)
886
DECLARE_OPERATOR(SetSourceLocalState<false>)
887
DECLARE_OPERATOR(DataGenLocalState)
888
DECLARE_OPERATOR(SchemaScanLocalState)
889
DECLARE_OPERATOR(MetaScanLocalState)
890
DECLARE_OPERATOR(LocalExchangeSourceLocalState)
891
DECLARE_OPERATOR(PartitionedHashJoinProbeLocalState)
892
DECLARE_OPERATOR(CacheSourceLocalState)
893
DECLARE_OPERATOR(RecCTESourceLocalState)
894
DECLARE_OPERATOR(RecCTEScanLocalState)
895
896
#ifdef BE_TEST
897
DECLARE_OPERATOR(MockLocalState)
898
DECLARE_OPERATOR(MockScanLocalState)
899
#endif
900
#undef DECLARE_OPERATOR
901
902
template class StreamingOperatorX<AssertNumRowsLocalState>;
903
template class StreamingOperatorX<SelectLocalState>;
904
905
template class StatefulOperatorX<HashJoinProbeLocalState>;
906
template class StatefulOperatorX<PartitionedHashJoinProbeLocalState>;
907
template class StatefulOperatorX<RepeatLocalState>;
908
template class StatefulOperatorX<MaterializationLocalState>;
909
template class StatefulOperatorX<StreamingAggLocalState>;
910
template class StatefulOperatorX<DistinctStreamingAggLocalState>;
911
template class StatefulOperatorX<NestedLoopJoinProbeLocalState>;
912
template class StatefulOperatorX<TableFunctionLocalState>;
913
914
template class PipelineXSinkLocalState<HashJoinSharedState>;
915
template class PipelineXSinkLocalState<PartitionedHashJoinSharedState>;
916
template class PipelineXSinkLocalState<SortSharedState>;
917
template class PipelineXSinkLocalState<SpillSortSharedState>;
918
template class PipelineXSinkLocalState<NestedLoopJoinSharedState>;
919
template class PipelineXSinkLocalState<AnalyticSharedState>;
920
template class PipelineXSinkLocalState<AggSharedState>;
921
template class PipelineXSinkLocalState<BucketedAggSharedState>;
922
template class PipelineXSinkLocalState<PartitionedAggSharedState>;
923
template class PipelineXSinkLocalState<FakeSharedState>;
924
template class PipelineXSinkLocalState<UnionSharedState>;
925
template class PipelineXSinkLocalState<PartitionSortNodeSharedState>;
926
template class PipelineXSinkLocalState<MultiCastSharedState>;
927
template class PipelineXSinkLocalState<SetSharedState>;
928
template class PipelineXSinkLocalState<LocalExchangeSharedState>;
929
template class PipelineXSinkLocalState<BasicSharedState>;
930
template class PipelineXSinkLocalState<DataQueueSharedState>;
931
template class PipelineXSinkLocalState<RecCTESharedState>;
932
933
template class PipelineXLocalState<HashJoinSharedState>;
934
template class PipelineXLocalState<PartitionedHashJoinSharedState>;
935
template class PipelineXLocalState<SortSharedState>;
936
template class PipelineXLocalState<SpillSortSharedState>;
937
template class PipelineXLocalState<NestedLoopJoinSharedState>;
938
template class PipelineXLocalState<AnalyticSharedState>;
939
template class PipelineXLocalState<AggSharedState>;
940
template class PipelineXLocalState<BucketedAggSharedState>;
941
template class PipelineXLocalState<PartitionedAggSharedState>;
942
template class PipelineXLocalState<FakeSharedState>;
943
template class PipelineXLocalState<UnionSharedState>;
944
template class PipelineXLocalState<DataQueueSharedState>;
945
template class PipelineXLocalState<MultiCastSharedState>;
946
template class PipelineXLocalState<PartitionSortNodeSharedState>;
947
template class PipelineXLocalState<SetSharedState>;
948
template class PipelineXLocalState<LocalExchangeSharedState>;
949
template class PipelineXLocalState<BasicSharedState>;
950
template class PipelineXLocalState<RecCTESharedState>;
951
952
template class AsyncWriterSink<doris::VFileResultWriter, ResultFileSinkOperatorX>;
953
template class AsyncWriterSink<doris::VJdbcTableWriter, JdbcTableSinkOperatorX>;
954
template class AsyncWriterSink<doris::VTabletWriter, OlapTableSinkOperatorX>;
955
template class AsyncWriterSink<doris::VTabletWriterV2, OlapTableSinkV2OperatorX>;
956
template class AsyncWriterSink<doris::VHiveTableWriter, HiveTableSinkOperatorX>;
957
template class AsyncWriterSink<doris::VIcebergTableWriter, IcebergTableSinkOperatorX>;
958
template class AsyncWriterSink<doris::VIcebergTableWriter, SpillIcebergTableSinkOperatorX>;
959
template class AsyncWriterSink<doris::VIcebergDeleteSink, IcebergDeleteSinkOperatorX>;
960
template class AsyncWriterSink<doris::VIcebergMergeSink, IcebergMergeSinkOperatorX>;
961
template class AsyncWriterSink<doris::VMCTableWriter, MCTableSinkOperatorX>;
962
template class AsyncWriterSink<doris::VTVFTableWriter, TVFTableSinkOperatorX>;
963
964
#ifdef BE_TEST
965
template class OperatorX<DummyOperatorLocalState>;
966
template class DataSinkOperatorX<DummySinkLocalState>;
967
#endif
968
969
} // namespace doris