Coverage Report

Created: 2026-07-13 05:50

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.09M
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
2.09M
    if (_parent->nereids_id() == -1) {
122
1.10M
        return fmt::format("(id={})", _parent->node_id());
123
1.10M
    } else {
124
988k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
988k
    }
126
2.09M
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
71.8k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
71.8k
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
71.8k
    } else {
124
71.8k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
71.8k
    }
126
71.8k
}
_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
252k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
252k
    if (_parent->nereids_id() == -1) {
122
12
        return fmt::format("(id={})", _parent->node_id());
123
252k
    } else {
124
252k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
252k
    }
126
252k
}
_ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
37
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
37
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
37
    } else {
124
37
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
37
    }
126
37
}
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
11.1k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
11.1k
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
11.1k
    } else {
124
11.1k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
11.1k
    }
126
11.1k
}
_ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
6.92k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
6.92k
    if (_parent->nereids_id() == -1) {
122
11
        return fmt::format("(id={})", _parent->node_id());
123
6.91k
    } else {
124
6.91k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
6.91k
    }
126
6.92k
}
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
155k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
155k
    if (_parent->nereids_id() == -1) {
122
29
        return fmt::format("(id={})", _parent->node_id());
123
155k
    } else {
124
155k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
155k
    }
126
155k
}
_ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
258
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
258
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
258
    } else {
124
258
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
258
    }
126
258
}
_ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
192
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
192
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
192
    } else {
124
192
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
192
    }
126
192
}
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
801k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
801k
    if (_parent->nereids_id() == -1) {
122
373k
        return fmt::format("(id={})", _parent->node_id());
123
427k
    } else {
124
427k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
427k
    }
126
801k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
55.9k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
55.9k
    if (_parent->nereids_id() == -1) {
122
2
        return fmt::format("(id={})", _parent->node_id());
123
55.9k
    } else {
124
55.9k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
55.9k
    }
126
55.9k
}
_ZNK5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
17
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
17
    if (_parent->nereids_id() == -1) {
122
17
        return fmt::format("(id={})", _parent->node_id());
123
17
    } else {
124
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
0
    }
126
17
}
_ZNK5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
11.3k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
11.3k
    if (_parent->nereids_id() == -1) {
122
11.3k
        return fmt::format("(id={})", _parent->node_id());
123
11.3k
    } else {
124
2
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
2
    }
126
11.3k
}
_ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
387
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
387
    if (_parent->nereids_id() == -1) {
122
102
        return fmt::format("(id={})", _parent->node_id());
123
285
    } else {
124
285
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
285
    }
126
387
}
_ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
4.91k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
4.91k
    if (_parent->nereids_id() == -1) {
122
13
        return fmt::format("(id={})", _parent->node_id());
123
4.89k
    } else {
124
4.89k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
4.89k
    }
126
4.91k
}
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
722k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
722k
    if (_parent->nereids_id() == -1) {
122
722k
        return fmt::format("(id={})", _parent->node_id());
123
18.4E
    } else {
124
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
18.4E
    }
126
722k
}
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.33M
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
1.33M
    if (_parent->nereids_id() == -1) {
131
781k
        return fmt::format("(id={})", _parent->node_id());
132
781k
    } else {
133
556k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
556k
    }
135
1.33M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
119k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
119k
    if (_parent->nereids_id() == -1) {
131
0
        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_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
254k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
254k
    if (_parent->nereids_id() == -1) {
131
9
        return fmt::format("(id={})", _parent->node_id());
132
254k
    } else {
133
254k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
254k
    }
135
254k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
44
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
44
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
44
    } else {
133
44
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
44
    }
135
44
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
11.2k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
11.2k
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
11.2k
    } else {
133
11.2k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
11.2k
    }
135
11.2k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
6.96k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
6.96k
    if (_parent->nereids_id() == -1) {
131
11
        return fmt::format("(id={})", _parent->node_id());
132
6.95k
    } else {
133
6.95k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
6.95k
    }
135
6.96k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
156k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
156k
    if (_parent->nereids_id() == -1) {
131
29
        return fmt::format("(id={})", _parent->node_id());
132
156k
    } else {
133
156k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
156k
    }
135
156k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
255
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
255
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
255
    } else {
133
255
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
255
    }
135
255
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
202
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
202
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
202
    } else {
133
202
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
202
    }
135
202
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
103
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
103
    if (_parent->nereids_id() == -1) {
131
103
        return fmt::format("(id={})", _parent->node_id());
132
103
    } else {
133
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
0
    }
135
103
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
6.41k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
6.41k
    if (_parent->nereids_id() == -1) {
131
3
        return fmt::format("(id={})", _parent->node_id());
132
6.41k
    } else {
133
6.41k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
6.41k
    }
135
6.41k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
387
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
387
    if (_parent->nereids_id() == -1) {
131
102
        return fmt::format("(id={})", _parent->node_id());
132
285
    } else {
133
285
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
285
    }
135
387
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
12.1k
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.1k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
280k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
280k
    if (_parent->nereids_id() == -1) {
131
280k
        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
280k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
489k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
489k
    if (_parent->nereids_id() == -1) {
131
488k
        return fmt::format("(id={})", _parent->node_id());
132
488k
    } else {
133
529
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
529
    }
135
489k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
17
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
17
    if (_parent->nereids_id() == -1) {
131
17
        return fmt::format("(id={})", _parent->node_id());
132
17
    } else {
133
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
0
    }
135
17
}
_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
29.6k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
29.6k
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
29.6k
    _terminated = true;
143
29.6k
    return Status::OK();
144
29.6k
}
_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
1.76k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
1.76k
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
1.76k
    _terminated = true;
143
1.76k
    return Status::OK();
144
1.76k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
4
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
4
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
4
    _terminated = true;
143
4
    return Status::OK();
144
4
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_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_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
1.95k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
1.95k
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
1.95k
    _terminated = true;
143
1.95k
    return Status::OK();
144
1.95k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_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
998
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
998
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
998
    _terminated = true;
143
998
    return Status::OK();
144
998
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
8
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
8
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
8
    _terminated = true;
143
8
    return Status::OK();
144
8
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_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_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
625
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
625
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
625
    _terminated = true;
143
625
    return Status::OK();
144
625
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
153
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
153
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
153
    _terminated = true;
143
153
    return Status::OK();
144
153
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
145
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
145
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
145
    _terminated = true;
143
145
    return Status::OK();
144
145
}
145
146
409k
DataDistribution OperatorBase::required_data_distribution(RuntimeState* /*state*/) const {
147
409k
    return _child && _child->is_serial_operator() && !is_source()
148
409k
                   ? DataDistribution(TLocalPartitionType::PASSTHROUGH)
149
409k
                   : DataDistribution(TLocalPartitionType::NOOP);
150
409k
}
151
152
27.6k
bool OperatorBase::child_breaks_local_key_distribution(RuntimeState* state) const {
153
27.6k
    if (!_child) {
154
22.1k
        return false;
155
22.1k
    }
156
5.48k
    if (_child->is_serial_operator()) {
157
221
        return true;
158
221
    }
159
5.25k
    const auto child_distribution = _child->required_data_distribution(state);
160
5.25k
    return child_distribution.need_local_exchange() &&
161
5.25k
           !is_shuffled_exchange(child_distribution.distribution_type);
162
5.48k
}
163
164
82.5k
const RowDescriptor& OperatorBase::row_desc() const {
165
82.5k
    return _child->row_desc();
166
82.5k
}
167
168
template <typename SharedStateArg>
169
20.4k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
170
20.4k
    fmt::memory_buffer debug_string_buffer;
171
20.4k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
172
20.4k
    return fmt::to_string(debug_string_buffer);
173
20.4k
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
169
127
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
170
127
    fmt::memory_buffer debug_string_buffer;
171
127
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
172
127
    return fmt::to_string(debug_string_buffer);
173
127
}
_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
49
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
170
49
    fmt::memory_buffer debug_string_buffer;
171
49
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
172
49
    return fmt::to_string(debug_string_buffer);
173
49
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
169
58
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
170
58
    fmt::memory_buffer debug_string_buffer;
171
58
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
172
58
    return fmt::to_string(debug_string_buffer);
173
58
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
169
23
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
170
23
    fmt::memory_buffer debug_string_buffer;
171
23
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
172
23
    return fmt::to_string(debug_string_buffer);
173
23
}
_ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
169
32
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
170
32
    fmt::memory_buffer debug_string_buffer;
171
32
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
172
32
    return fmt::to_string(debug_string_buffer);
173
32
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
169
20.0k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
170
20.0k
    fmt::memory_buffer debug_string_buffer;
171
20.0k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
172
20.0k
    return fmt::to_string(debug_string_buffer);
173
20.0k
}
_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
156
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
170
156
    fmt::memory_buffer debug_string_buffer;
171
156
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
172
156
    return fmt::to_string(debug_string_buffer);
173
156
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
174
175
template <typename SharedStateArg>
176
20.2k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
177
20.2k
    fmt::memory_buffer debug_string_buffer;
178
20.2k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
179
20.2k
    return fmt::to_string(debug_string_buffer);
180
20.2k
}
_ZNK5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
176
22
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
177
22
    fmt::memory_buffer debug_string_buffer;
178
22
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
179
22
    return fmt::to_string(debug_string_buffer);
180
22
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
176
49
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
177
49
    fmt::memory_buffer debug_string_buffer;
178
49
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
179
49
    return fmt::to_string(debug_string_buffer);
180
49
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
176
22
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
177
22
    fmt::memory_buffer debug_string_buffer;
178
22
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
179
22
    return fmt::to_string(debug_string_buffer);
180
22
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
176
23
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
177
23
    fmt::memory_buffer debug_string_buffer;
178
23
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
179
23
    return fmt::to_string(debug_string_buffer);
180
23
}
_ZNK5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
176
32
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
177
32
    fmt::memory_buffer debug_string_buffer;
178
32
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
179
32
    return fmt::to_string(debug_string_buffer);
180
32
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
176
78
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
177
78
    fmt::memory_buffer debug_string_buffer;
178
78
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
179
78
    return fmt::to_string(debug_string_buffer);
180
78
}
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
61
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
177
61
    fmt::memory_buffer debug_string_buffer;
178
61
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
179
61
    return fmt::to_string(debug_string_buffer);
180
61
}
_ZNK5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
176
19.9k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
177
19.9k
    fmt::memory_buffer debug_string_buffer;
178
19.9k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
179
19.9k
    return fmt::to_string(debug_string_buffer);
180
19.9k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
181
182
20.5k
std::string OperatorXBase::debug_string(int indentation_level) const {
183
20.5k
    fmt::memory_buffer debug_string_buffer;
184
20.5k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, parallel_tasks={}, _is_serial_operator={}",
185
20.5k
                   std::string(indentation_level * 2, ' '), _op_name, node_id(), _parallel_tasks,
186
20.5k
                   _is_serial_operator);
187
20.5k
    return fmt::to_string(debug_string_buffer);
188
20.5k
}
189
190
20.4k
std::string OperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
191
20.4k
    return state->get_local_state(operator_id())->debug_string(indentation_level);
192
20.4k
}
193
194
823k
Status OperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
195
823k
    std::string node_name = print_plan_node_type(tnode.node_type);
196
823k
    _nereids_id = tnode.nereids_id;
197
823k
    if (!tnode.intermediate_output_tuple_id_list.empty()) {
198
4.07k
        if (!tnode.__isset.output_tuple_id) {
199
0
            return Status::InternalError("no final output tuple id");
200
0
        }
201
4.07k
        if (tnode.intermediate_output_tuple_id_list.size() !=
202
4.07k
            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
4.07k
    }
210
823k
    auto substr = node_name.substr(0, node_name.find("_NODE"));
211
823k
    _op_name = substr + "_OPERATOR";
212
213
823k
    if (tnode.__isset.vconjunct) {
214
0
        return Status::InternalError("vconjunct is not supported yet");
215
823k
    } else if (tnode.__isset.conjuncts) {
216
456k
        for (const auto& conjunct : tnode.conjuncts) {
217
456k
            VExprContextSPtr context;
218
456k
            RETURN_IF_ERROR(VExpr::create_expr_tree(conjunct, context));
219
456k
            _conjuncts.emplace_back(context);
220
456k
        }
221
149k
    }
222
223
    // create the projections expr
224
823k
    if (tnode.__isset.projections) {
225
325k
        DCHECK(tnode.__isset.output_tuple_id);
226
325k
        RETURN_IF_ERROR(VExpr::create_expr_trees(tnode.projections, _projections));
227
325k
    }
228
823k
    if (!tnode.intermediate_projections_list.empty()) {
229
4.07k
        DCHECK(tnode.__isset.projections) << "no final projections";
230
4.07k
        _intermediate_projections.reserve(tnode.intermediate_projections_list.size());
231
8.34k
        for (const auto& tnode_projections : tnode.intermediate_projections_list) {
232
8.34k
            VExprContextSPtrs projections;
233
8.34k
            RETURN_IF_ERROR(VExpr::create_expr_trees(tnode_projections, projections));
234
8.34k
            _intermediate_projections.push_back(projections);
235
8.34k
        }
236
4.07k
    }
237
823k
    return Status::OK();
238
823k
}
239
240
856k
Status OperatorXBase::prepare(RuntimeState* state) {
241
856k
    for (auto& conjunct : _conjuncts) {
242
455k
        RETURN_IF_ERROR(conjunct->prepare(state, intermediate_row_desc()));
243
455k
    }
244
856k
    if (state->enable_adjust_conjunct_order_by_cost()) {
245
802k
        std::ranges::stable_sort(_conjuncts, [](const auto& a, const auto& b) {
246
602k
            return a->execute_cost() < b->execute_cost();
247
602k
        });
248
802k
    };
249
250
864k
    for (int i = 0; i < _intermediate_projections.size(); i++) {
251
8.34k
        RETURN_IF_ERROR(
252
8.34k
                VExpr::prepare(_intermediate_projections[i], state, intermediate_row_desc(i)));
253
8.34k
    }
254
856k
    RETURN_IF_ERROR(VExpr::prepare(_projections, state, projections_row_desc()));
255
256
856k
    if (has_output_row_desc()) {
257
325k
        RETURN_IF_ERROR(VExpr::check_expr_output_type(_projections, *_output_row_descriptor));
258
325k
    }
259
260
856k
    for (auto& conjunct : _conjuncts) {
261
456k
        RETURN_IF_ERROR(conjunct->open(state));
262
456k
    }
263
856k
    RETURN_IF_ERROR(VExpr::open(_projections, state));
264
856k
    for (auto& projections : _intermediate_projections) {
265
8.34k
        RETURN_IF_ERROR(VExpr::open(projections, state));
266
8.34k
    }
267
856k
    if (_child && !is_source()) {
268
128k
        RETURN_IF_ERROR(_child->prepare(state));
269
128k
    }
270
271
856k
    if (VExpr::contains_blockable_function(_conjuncts) ||
272
856k
        VExpr::contains_blockable_function(_projections)) {
273
0
        _blockable = true;
274
0
    }
275
276
856k
    return Status::OK();
277
856k
}
278
279
6.69k
Status OperatorXBase::terminate(RuntimeState* state) {
280
6.69k
    if (_child && !is_source()) {
281
1.03k
        RETURN_IF_ERROR(_child->terminate(state));
282
1.03k
    }
283
6.69k
    auto result = state->get_local_state_result(operator_id());
284
6.69k
    if (!result) {
285
0
        return result.error();
286
0
    }
287
6.69k
    return result.value()->terminate(state);
288
6.69k
}
289
290
5.84M
Status OperatorXBase::close(RuntimeState* state) {
291
5.84M
    if (_child && !is_source()) {
292
1.01M
        RETURN_IF_ERROR(_child->close(state));
293
1.01M
    }
294
5.84M
    auto result = state->get_local_state_result(operator_id());
295
5.84M
    if (!result) {
296
0
        return result.error();
297
0
    }
298
5.84M
    return result.value()->close(state);
299
5.84M
}
300
301
306k
void PipelineXLocalStateBase::clear_origin_block() {
302
306k
    _origin_block.clear_column_data(_parent->intermediate_row_desc().num_materialized_slots());
303
306k
}
304
305
586k
Status PipelineXLocalStateBase::filter_block(const VExprContextSPtrs& expr_contexts, Block* block) {
306
586k
    RETURN_IF_ERROR(VExprContext::filter_block(expr_contexts, block, block->columns()));
307
308
586k
    _estimate_memory_usage += VExprContext::get_memory_usage(expr_contexts);
309
586k
    return Status::OK();
310
586k
}
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
306k
                                     Block* output_block) const {
319
306k
    auto* local_state = state->get_local_state(operator_id());
320
306k
    SCOPED_TIMER(local_state->exec_time_counter());
321
306k
    SCOPED_TIMER(local_state->_projection_timer);
322
306k
    const size_t rows = origin_block->rows();
323
306k
    if (rows == 0) {
324
161k
        return Status::OK();
325
161k
    }
326
144k
    Block input_block = *origin_block;
327
328
144k
    size_t bytes_usage = 0;
329
144k
    ColumnsWithTypeAndName new_columns;
330
144k
    for (const auto& projections : local_state->_intermediate_projections) {
331
1.67k
        if (projections.empty()) {
332
0
            return Status::InternalError("meet empty intermediate projection, node id: {}",
333
0
                                         node_id());
334
0
        }
335
1.67k
        new_columns.resize(projections.size());
336
11.4k
        for (int i = 0; i < projections.size(); i++) {
337
9.81k
            RETURN_IF_ERROR(projections[i]->execute(&input_block, new_columns[i]));
338
9.81k
            if (new_columns[i].column->size() != rows) {
339
0
                return Status::InternalError(
340
0
                        "intermediate projection result column size {} not equal input rows {}, "
341
0
                        "expr: {}",
342
0
                        new_columns[i].column->size(), rows,
343
0
                        projections[i]->root()->debug_string());
344
0
            }
345
9.81k
        }
346
1.67k
        Block tmp_block {new_columns};
347
1.67k
        bytes_usage += tmp_block.allocated_bytes();
348
1.67k
        input_block.swap(tmp_block);
349
1.67k
    }
350
351
144k
    if (input_block.rows() != rows) {
352
0
        return Status::InternalError(
353
0
                "after intermediate projections input block rows {} not equal origin rows {}, "
354
0
                "input_block: {}",
355
0
                input_block.rows(), rows, input_block.dump_structure());
356
0
    }
357
692k
    auto insert_column_datas = [&](auto& to, ColumnPtr& from, size_t rows) {
358
692k
        if (is_column_nullable(*to) && !is_column_nullable(*from)) {
359
0
            if (_keep_origin || !from->is_exclusive()) {
360
0
                auto& null_column = reinterpret_cast<ColumnNullable&>(*to);
361
0
                null_column.get_nested_column().insert_range_from(*from, 0, rows);
362
0
                null_column.get_null_map_column().get_data().resize_fill(rows, 0);
363
0
                bytes_usage += null_column.allocated_bytes();
364
0
            } else {
365
0
                to = make_nullable(from, false)->assert_mutable();
366
0
            }
367
692k
        } else {
368
692k
            if (_keep_origin || !from->is_exclusive()) {
369
692k
                to->insert_range_from(*from, 0, rows);
370
692k
                bytes_usage += from->allocated_bytes();
371
18.4E
            } else {
372
18.4E
                to = from->assert_mutable();
373
18.4E
            }
374
692k
        }
375
692k
    };
376
377
144k
    auto scoped_mutable_block = VectorizedUtils::build_scoped_mutable_mem_reuse_block(
378
144k
            output_block, *_output_row_descriptor);
379
144k
    auto& mutable_block = scoped_mutable_block.mutable_block();
380
144k
    auto& mutable_columns = mutable_block.mutable_columns();
381
144k
    if (rows != 0) {
382
144k
        DCHECK_EQ(mutable_columns.size(), local_state->_projections.size()) << debug_string();
383
837k
        for (int i = 0; i < mutable_columns.size(); ++i) {
384
692k
            ColumnPtr column_ptr;
385
692k
            RETURN_IF_ERROR(local_state->_projections[i]->execute(&input_block, column_ptr));
386
692k
            if (column_ptr->size() != rows) {
387
0
                return Status::InternalError(
388
0
                        "projection result column size {} not equal input rows {}, expr: {}",
389
0
                        column_ptr->size(), rows,
390
0
                        local_state->_projections[i]->root()->debug_string());
391
0
            }
392
692k
            column_ptr = column_ptr->convert_to_full_column_if_const();
393
692k
            bytes_usage += column_ptr->allocated_bytes();
394
692k
            insert_column_datas(mutable_columns[i], column_ptr, rows);
395
692k
        }
396
144k
        DCHECK(mutable_block.rows() == rows);
397
144k
    }
398
144k
    local_state->_estimate_memory_usage += bytes_usage;
399
400
144k
    return Status::OK();
401
144k
}
402
403
4.66M
Status OperatorXBase::get_block_after_projects(RuntimeState* state, Block* block, bool* eos) {
404
4.66M
    DBUG_EXECUTE_IF("Pipeline::return_empty_block", {
405
4.66M
        if (this->_op_name == "AGGREGATION_OPERATOR" || this->_op_name == "HASH_JOIN_OPERATOR" ||
406
4.66M
            this->_op_name == "PARTITIONED_AGGREGATION_OPERATOR" ||
407
4.66M
            this->_op_name == "PARTITIONED_HASH_JOIN_OPERATOR" ||
408
4.66M
            this->_op_name == "CROSS_JOIN_OPERATOR" || this->_op_name == "SORT_OPERATOR") {
409
4.66M
            if (_debug_point_count++ % 2 == 0) {
410
4.66M
                return Status::OK();
411
4.66M
            }
412
4.66M
        }
413
4.66M
    });
414
415
4.66M
    Status status;
416
4.66M
    auto* local_state = state->get_local_state(operator_id());
417
4.66M
    Defer defer([&]() {
418
4.66M
        if (status.ok()) {
419
4.66M
            local_state->update_output_block_counters(*block);
420
4.66M
        }
421
4.66M
    });
422
4.66M
    if (_output_row_descriptor) {
423
305k
        local_state->clear_origin_block();
424
305k
        status = get_block(state, &local_state->_origin_block, eos);
425
305k
        if (UNLIKELY(!status.ok())) {
426
20
            return status;
427
20
        }
428
305k
        status = do_projections(state, &local_state->_origin_block, block);
429
305k
        return status;
430
305k
    }
431
4.35M
    status = get_block(state, block, eos);
432
4.35M
    RETURN_IF_ERROR(block->check_type_and_column());
433
4.35M
    return status;
434
4.35M
}
435
436
3.14M
void PipelineXLocalStateBase::reached_limit(Block* block, bool* eos) {
437
3.14M
    if (_parent->_limit != -1 and _num_rows_returned + block->rows() >= _parent->_limit) {
438
7.33k
        block->set_num_rows(_parent->_limit - _num_rows_returned);
439
7.33k
        *eos = true;
440
7.33k
    }
441
442
3.14M
    DBUG_EXECUTE_IF("Pipeline::reached_limit_early", {
443
3.14M
        auto op_name = to_lower(_parent->_op_name);
444
3.14M
        auto arg_op_name = dp->param<std::string>("op_name");
445
3.14M
        arg_op_name = to_lower(arg_op_name);
446
447
3.14M
        if (op_name == arg_op_name) {
448
3.14M
            *eos = true;
449
3.14M
        }
450
3.14M
    });
451
452
3.14M
    if (auto rows = block->rows()) {
453
912k
        _num_rows_returned += rows;
454
912k
        _state->get_query_ctx()->resource_ctx()->io_context()->update_process_rows(rows);
455
912k
    }
456
3.14M
}
457
458
29.6k
Status DataSinkOperatorXBase::terminate(RuntimeState* state) {
459
29.6k
    auto result = state->get_sink_local_state_result();
460
29.6k
    if (!result) {
461
0
        return result.error();
462
0
    }
463
29.6k
    return result.value()->terminate(state);
464
29.6k
}
465
466
20.2k
std::string DataSinkOperatorXBase::debug_string(int indentation_level) const {
467
20.2k
    fmt::memory_buffer debug_string_buffer;
468
469
20.2k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, _is_serial_operator={}",
470
20.2k
                   std::string(indentation_level * 2, ' '), _name, node_id(), _is_serial_operator);
471
20.2k
    return fmt::to_string(debug_string_buffer);
472
20.2k
}
473
474
20.2k
std::string DataSinkOperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
475
20.2k
    return state->get_sink_local_state()->debug_string(indentation_level);
476
20.2k
}
477
478
464k
Status DataSinkOperatorXBase::init(const TDataSink& tsink) {
479
464k
    std::string op_name = "UNKNOWN_SINK";
480
464k
    auto it = _TDataSinkType_VALUES_TO_NAMES.find(tsink.type);
481
482
464k
    if (it != _TDataSinkType_VALUES_TO_NAMES.end()) {
483
464k
        op_name = it->second;
484
464k
    }
485
464k
    _name = op_name + "_OPERATOR";
486
464k
    return Status::OK();
487
464k
}
488
489
307k
Status DataSinkOperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
490
307k
    std::string op_name = print_plan_node_type(tnode.node_type);
491
307k
    _nereids_id = tnode.nereids_id;
492
307k
    auto substr = op_name.substr(0, op_name.find("_NODE"));
493
307k
    _name = substr + "_SINK_OPERATOR";
494
307k
    return Status::OK();
495
307k
}
496
497
template <typename LocalStateType>
498
Status DataSinkOperatorX<LocalStateType>::setup_local_state(RuntimeState* state,
499
2.01M
                                                            LocalSinkStateInfo& info) {
500
2.01M
    auto local_state = LocalStateType::create_unique(this, state);
501
2.01M
    RETURN_IF_ERROR(local_state->init(state, info));
502
2.01M
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
2.01M
    return Status::OK();
504
2.01M
}
_ZN5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
120k
                                                            LocalSinkStateInfo& info) {
500
120k
    auto local_state = LocalStateType::create_unique(this, state);
501
120k
    RETURN_IF_ERROR(local_state->init(state, info));
502
120k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
120k
    return Status::OK();
504
120k
}
_ZN5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
421k
                                                            LocalSinkStateInfo& info) {
500
421k
    auto local_state = LocalStateType::create_unique(this, state);
501
421k
    RETURN_IF_ERROR(local_state->init(state, info));
502
421k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
421k
    return Status::OK();
504
421k
}
_ZN5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
88
                                                            LocalSinkStateInfo& info) {
500
88
    auto local_state = LocalStateType::create_unique(this, state);
501
88
    RETURN_IF_ERROR(local_state->init(state, info));
502
88
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
88
    return Status::OK();
504
88
}
_ZN5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
3
                                                            LocalSinkStateInfo& info) {
500
3
    auto local_state = LocalStateType::create_unique(this, state);
501
3
    RETURN_IF_ERROR(local_state->init(state, info));
502
3
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
3
    return Status::OK();
504
3
}
_ZN5doris17DataSinkOperatorXINS_24ResultFileSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
540
                                                            LocalSinkStateInfo& info) {
500
540
    auto local_state = LocalStateType::create_unique(this, state);
501
540
    RETURN_IF_ERROR(local_state->init(state, info));
502
540
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
540
    return Status::OK();
504
540
}
_ZN5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
48.0k
                                                            LocalSinkStateInfo& info) {
500
48.0k
    auto local_state = LocalStateType::create_unique(this, state);
501
48.0k
    RETURN_IF_ERROR(local_state->init(state, info));
502
48.0k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
48.0k
    return Status::OK();
504
48.0k
}
_ZN5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
9.48k
                                                            LocalSinkStateInfo& info) {
500
9.48k
    auto local_state = LocalStateType::create_unique(this, state);
501
9.48k
    RETURN_IF_ERROR(local_state->init(state, info));
502
9.48k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
9.48k
    return Status::OK();
504
9.48k
}
_ZN5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
5.16k
                                                            LocalSinkStateInfo& info) {
500
5.16k
    auto local_state = LocalStateType::create_unique(this, state);
501
5.16k
    RETURN_IF_ERROR(local_state->init(state, info));
502
5.16k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
5.16k
    return Status::OK();
504
5.16k
}
_ZN5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
156
                                                            LocalSinkStateInfo& info) {
500
156
    auto local_state = LocalStateType::create_unique(this, state);
501
156
    RETURN_IF_ERROR(local_state->init(state, info));
502
156
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
156
    return Status::OK();
504
156
}
_ZN5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
3.40k
                                                            LocalSinkStateInfo& info) {
500
3.40k
    auto local_state = LocalStateType::create_unique(this, state);
501
3.40k
    RETURN_IF_ERROR(local_state->init(state, info));
502
3.40k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
3.40k
    return Status::OK();
504
3.40k
}
_ZN5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
32
                                                            LocalSinkStateInfo& info) {
500
32
    auto local_state = LocalStateType::create_unique(this, state);
501
32
    RETURN_IF_ERROR(local_state->init(state, info));
502
32
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
32
    return Status::OK();
504
32
}
_ZN5doris17DataSinkOperatorXINS_27IcebergDeleteSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
176
                                                            LocalSinkStateInfo& info) {
500
176
    auto local_state = LocalStateType::create_unique(this, state);
501
176
    RETURN_IF_ERROR(local_state->init(state, info));
502
176
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
176
    return Status::OK();
504
176
}
_ZN5doris17DataSinkOperatorXINS_26IcebergMergeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
640
                                                            LocalSinkStateInfo& info) {
500
640
    auto local_state = LocalStateType::create_unique(this, state);
501
640
    RETURN_IF_ERROR(local_state->init(state, info));
502
640
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
640
    return Status::OK();
504
640
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_21MCTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
6.96k
                                                            LocalSinkStateInfo& info) {
500
6.96k
    auto local_state = LocalStateType::create_unique(this, state);
501
6.96k
    RETURN_IF_ERROR(local_state->init(state, info));
502
6.96k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
6.96k
    return Status::OK();
504
6.96k
}
_ZN5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
99
                                                            LocalSinkStateInfo& info) {
500
99
    auto local_state = LocalStateType::create_unique(this, state);
501
99
    RETURN_IF_ERROR(local_state->init(state, info));
502
99
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
99
    return Status::OK();
504
99
}
_ZN5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
254k
                                                            LocalSinkStateInfo& info) {
500
254k
    auto local_state = LocalStateType::create_unique(this, state);
501
254k
    RETURN_IF_ERROR(local_state->init(state, info));
502
254k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
254k
    return Status::OK();
504
254k
}
_ZN5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
44
                                                            LocalSinkStateInfo& info) {
500
44
    auto local_state = LocalStateType::create_unique(this, state);
501
44
    RETURN_IF_ERROR(local_state->init(state, info));
502
44
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
44
    return Status::OK();
504
44
}
_ZN5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
280k
                                                            LocalSinkStateInfo& info) {
500
280k
    auto local_state = LocalStateType::create_unique(this, state);
501
280k
    RETURN_IF_ERROR(local_state->init(state, info));
502
280k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
280k
    return Status::OK();
504
280k
}
_ZN5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
156k
                                                            LocalSinkStateInfo& info) {
500
156k
    auto local_state = LocalStateType::create_unique(this, state);
501
156k
    RETURN_IF_ERROR(local_state->init(state, info));
502
156k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
156k
    return Status::OK();
504
156k
}
_ZN5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
254
                                                            LocalSinkStateInfo& info) {
500
254
    auto local_state = LocalStateType::create_unique(this, state);
501
254
    RETURN_IF_ERROR(local_state->init(state, info));
502
254
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
254
    return Status::OK();
504
254
}
_ZN5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
202
                                                            LocalSinkStateInfo& info) {
500
202
    auto local_state = LocalStateType::create_unique(this, state);
501
202
    RETURN_IF_ERROR(local_state->init(state, info));
502
202
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
202
    return Status::OK();
504
202
}
_ZN5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
674k
                                                            LocalSinkStateInfo& info) {
500
674k
    auto local_state = LocalStateType::create_unique(this, state);
501
674k
    RETURN_IF_ERROR(local_state->init(state, info));
502
674k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
674k
    return Status::OK();
504
674k
}
_ZN5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
11.2k
                                                            LocalSinkStateInfo& info) {
500
11.2k
    auto local_state = LocalStateType::create_unique(this, state);
501
11.2k
    RETURN_IF_ERROR(local_state->init(state, info));
502
11.2k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
11.2k
    return Status::OK();
504
11.2k
}
_ZN5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
6.41k
                                                            LocalSinkStateInfo& info) {
500
6.41k
    auto local_state = LocalStateType::create_unique(this, state);
501
6.41k
    RETURN_IF_ERROR(local_state->init(state, info));
502
6.41k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
6.41k
    return Status::OK();
504
6.41k
}
_ZN5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
4.09k
                                                            LocalSinkStateInfo& info) {
500
4.09k
    auto local_state = LocalStateType::create_unique(this, state);
501
4.09k
    RETURN_IF_ERROR(local_state->init(state, info));
502
4.09k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
4.09k
    return Status::OK();
504
4.09k
}
_ZN5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
285
                                                            LocalSinkStateInfo& info) {
500
285
    auto local_state = LocalStateType::create_unique(this, state);
501
285
    RETURN_IF_ERROR(local_state->init(state, info));
502
285
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
285
    return Status::OK();
504
285
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
4.67k
                                                            LocalSinkStateInfo& info) {
500
4.67k
    auto local_state = LocalStateType::create_unique(this, state);
501
4.67k
    RETURN_IF_ERROR(local_state->init(state, info));
502
4.67k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
4.67k
    return Status::OK();
504
4.67k
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
2.57k
                                                            LocalSinkStateInfo& info) {
500
2.57k
    auto local_state = LocalStateType::create_unique(this, state);
501
2.57k
    RETURN_IF_ERROR(local_state->init(state, info));
502
2.57k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
2.57k
    return Status::OK();
504
2.57k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
2.49k
                                                            LocalSinkStateInfo& info) {
500
2.49k
    auto local_state = LocalStateType::create_unique(this, state);
501
2.49k
    RETURN_IF_ERROR(local_state->init(state, info));
502
2.49k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
2.49k
    return Status::OK();
504
2.49k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
2.50k
                                                            LocalSinkStateInfo& info) {
500
2.50k
    auto local_state = LocalStateType::create_unique(this, state);
501
2.50k
    RETURN_IF_ERROR(local_state->init(state, info));
502
2.50k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
2.50k
    return Status::OK();
504
2.50k
}
_ZN5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
1
                                                            LocalSinkStateInfo& info) {
500
1
    auto local_state = LocalStateType::create_unique(this, state);
501
1
    RETURN_IF_ERROR(local_state->init(state, info));
502
1
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
1
    return Status::OK();
504
1
}
_ZN5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
566
                                                            LocalSinkStateInfo& info) {
500
566
    auto local_state = LocalStateType::create_unique(this, state);
501
566
    RETURN_IF_ERROR(local_state->init(state, info));
502
566
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
566
    return Status::OK();
504
566
}
_ZN5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
14
                                                            LocalSinkStateInfo& info) {
500
14
    auto local_state = LocalStateType::create_unique(this, state);
501
14
    RETURN_IF_ERROR(local_state->init(state, info));
502
14
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
14
    return Status::OK();
504
14
}
_ZN5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
104
                                                            LocalSinkStateInfo& info) {
500
104
    auto local_state = LocalStateType::create_unique(this, state);
501
104
    RETURN_IF_ERROR(local_state->init(state, info));
502
104
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
104
    return Status::OK();
504
104
}
_ZN5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
164
                                                            LocalSinkStateInfo& info) {
500
164
    auto local_state = LocalStateType::create_unique(this, state);
501
164
    RETURN_IF_ERROR(local_state->init(state, info));
502
164
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
164
    return Status::OK();
504
164
}
_ZN5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
164
                                                            LocalSinkStateInfo& info) {
500
164
    auto local_state = LocalStateType::create_unique(this, state);
501
164
    RETURN_IF_ERROR(local_state->init(state, info));
502
164
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
164
    return Status::OK();
504
164
}
505
506
template <typename LocalStateType>
507
1.70M
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
0
                                 LocalExchangeSharedState>) {
510
0
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
0
                                        MultiCastSharedState>) {
513
0
        throw Exception(Status::FatalError("should not reach here!"));
514
1.70M
    } else {
515
1.70M
        auto ss = LocalStateType::SharedStateType::create_shared();
516
1.70M
        ss->id = operator_id();
517
1.70M
        for (auto& dest : dests_id()) {
518
1.70M
            ss->related_op_ids.insert(dest);
519
1.70M
        }
520
1.70M
        return ss;
521
1.70M
    }
522
1.70M
}
_ZNK5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
104k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
104k
    } else {
515
104k
        auto ss = LocalStateType::SharedStateType::create_shared();
516
104k
        ss->id = operator_id();
517
104k
        for (auto& dest : dests_id()) {
518
104k
            ss->related_op_ids.insert(dest);
519
104k
        }
520
104k
        return ss;
521
104k
    }
522
104k
}
_ZNK5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
422k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
422k
    } else {
515
422k
        auto ss = LocalStateType::SharedStateType::create_shared();
516
422k
        ss->id = operator_id();
517
422k
        for (auto& dest : dests_id()) {
518
421k
            ss->related_op_ids.insert(dest);
519
421k
        }
520
422k
        return ss;
521
422k
    }
522
422k
}
_ZNK5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
88
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
88
    } else {
515
88
        auto ss = LocalStateType::SharedStateType::create_shared();
516
88
        ss->id = operator_id();
517
88
        for (auto& dest : dests_id()) {
518
88
            ss->related_op_ids.insert(dest);
519
88
        }
520
88
        return ss;
521
88
    }
522
88
}
_ZNK5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
3
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
3
    } else {
515
3
        auto ss = LocalStateType::SharedStateType::create_shared();
516
3
        ss->id = operator_id();
517
3
        for (auto& dest : dests_id()) {
518
3
            ss->related_op_ids.insert(dest);
519
3
        }
520
3
        return ss;
521
3
    }
522
3
}
_ZNK5doris17DataSinkOperatorXINS_24ResultFileSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
541
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
541
    } else {
515
541
        auto ss = LocalStateType::SharedStateType::create_shared();
516
541
        ss->id = operator_id();
517
541
        for (auto& dest : dests_id()) {
518
540
            ss->related_op_ids.insert(dest);
519
540
        }
520
541
        return ss;
521
541
    }
522
541
}
_ZNK5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
48.0k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
48.0k
    } else {
515
48.0k
        auto ss = LocalStateType::SharedStateType::create_shared();
516
48.0k
        ss->id = operator_id();
517
48.0k
        for (auto& dest : dests_id()) {
518
47.9k
            ss->related_op_ids.insert(dest);
519
47.9k
        }
520
48.0k
        return ss;
521
48.0k
    }
522
48.0k
}
_ZNK5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE19create_shared_stateEv
Line
Count
Source
507
9.48k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
9.48k
    } else {
515
9.48k
        auto ss = LocalStateType::SharedStateType::create_shared();
516
9.48k
        ss->id = operator_id();
517
9.48k
        for (auto& dest : dests_id()) {
518
9.48k
            ss->related_op_ids.insert(dest);
519
9.48k
        }
520
9.48k
        return ss;
521
9.48k
    }
522
9.48k
}
_ZNK5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
5.17k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
5.17k
    } else {
515
5.17k
        auto ss = LocalStateType::SharedStateType::create_shared();
516
5.17k
        ss->id = operator_id();
517
5.17k
        for (auto& dest : dests_id()) {
518
5.17k
            ss->related_op_ids.insert(dest);
519
5.17k
        }
520
5.17k
        return ss;
521
5.17k
    }
522
5.17k
}
_ZNK5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
156
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
156
    } else {
515
156
        auto ss = LocalStateType::SharedStateType::create_shared();
516
156
        ss->id = operator_id();
517
156
        for (auto& dest : dests_id()) {
518
156
            ss->related_op_ids.insert(dest);
519
156
        }
520
156
        return ss;
521
156
    }
522
156
}
_ZNK5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
3.40k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
3.40k
    } else {
515
3.40k
        auto ss = LocalStateType::SharedStateType::create_shared();
516
3.40k
        ss->id = operator_id();
517
3.40k
        for (auto& dest : dests_id()) {
518
3.40k
            ss->related_op_ids.insert(dest);
519
3.40k
        }
520
3.40k
        return ss;
521
3.40k
    }
522
3.40k
}
_ZNK5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
32
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
32
    } else {
515
32
        auto ss = LocalStateType::SharedStateType::create_shared();
516
32
        ss->id = operator_id();
517
32
        for (auto& dest : dests_id()) {
518
32
            ss->related_op_ids.insert(dest);
519
32
        }
520
32
        return ss;
521
32
    }
522
32
}
_ZNK5doris17DataSinkOperatorXINS_27IcebergDeleteSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
176
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
176
    } else {
515
176
        auto ss = LocalStateType::SharedStateType::create_shared();
516
176
        ss->id = operator_id();
517
176
        for (auto& dest : dests_id()) {
518
176
            ss->related_op_ids.insert(dest);
519
176
        }
520
176
        return ss;
521
176
    }
522
176
}
_ZNK5doris17DataSinkOperatorXINS_26IcebergMergeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
640
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
640
    } else {
515
640
        auto ss = LocalStateType::SharedStateType::create_shared();
516
640
        ss->id = operator_id();
517
640
        for (auto& dest : dests_id()) {
518
640
            ss->related_op_ids.insert(dest);
519
640
        }
520
640
        return ss;
521
640
    }
522
640
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_21MCTableSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
6.98k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
6.98k
    } else {
515
6.98k
        auto ss = LocalStateType::SharedStateType::create_shared();
516
6.98k
        ss->id = operator_id();
517
6.98k
        for (auto& dest : dests_id()) {
518
6.97k
            ss->related_op_ids.insert(dest);
519
6.97k
        }
520
6.98k
        return ss;
521
6.98k
    }
522
6.98k
}
_ZNK5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
100
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
100
    } else {
515
100
        auto ss = LocalStateType::SharedStateType::create_shared();
516
100
        ss->id = operator_id();
517
100
        for (auto& dest : dests_id()) {
518
99
            ss->related_op_ids.insert(dest);
519
99
        }
520
100
        return ss;
521
100
    }
522
100
}
_ZNK5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
255k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
255k
    } else {
515
255k
        auto ss = LocalStateType::SharedStateType::create_shared();
516
255k
        ss->id = operator_id();
517
255k
        for (auto& dest : dests_id()) {
518
254k
            ss->related_op_ids.insert(dest);
519
254k
        }
520
255k
        return ss;
521
255k
    }
522
255k
}
_ZNK5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
46
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
46
    } else {
515
46
        auto ss = LocalStateType::SharedStateType::create_shared();
516
46
        ss->id = operator_id();
517
46
        for (auto& dest : dests_id()) {
518
46
            ss->related_op_ids.insert(dest);
519
46
        }
520
46
        return ss;
521
46
    }
522
46
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
156k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
156k
    } else {
515
156k
        auto ss = LocalStateType::SharedStateType::create_shared();
516
156k
        ss->id = operator_id();
517
156k
        for (auto& dest : dests_id()) {
518
156k
            ss->related_op_ids.insert(dest);
519
156k
        }
520
156k
        return ss;
521
156k
    }
522
156k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
201
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
201
    } else {
515
201
        auto ss = LocalStateType::SharedStateType::create_shared();
516
201
        ss->id = operator_id();
517
201
        for (auto& dest : dests_id()) {
518
201
            ss->related_op_ids.insert(dest);
519
201
        }
520
201
        return ss;
521
201
    }
522
201
}
_ZNK5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
674k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
674k
    } else {
515
674k
        auto ss = LocalStateType::SharedStateType::create_shared();
516
674k
        ss->id = operator_id();
517
674k
        for (auto& dest : dests_id()) {
518
671k
            ss->related_op_ids.insert(dest);
519
671k
        }
520
674k
        return ss;
521
674k
    }
522
674k
}
_ZNK5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
11.2k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
11.2k
    } else {
515
11.2k
        auto ss = LocalStateType::SharedStateType::create_shared();
516
11.2k
        ss->id = operator_id();
517
11.2k
        for (auto& dest : dests_id()) {
518
11.2k
            ss->related_op_ids.insert(dest);
519
11.2k
        }
520
11.2k
        return ss;
521
11.2k
    }
522
11.2k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
387
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
387
    } else {
515
387
        auto ss = LocalStateType::SharedStateType::create_shared();
516
387
        ss->id = operator_id();
517
387
        for (auto& dest : dests_id()) {
518
387
            ss->related_op_ids.insert(dest);
519
387
        }
520
387
        return ss;
521
387
    }
522
387
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE19create_shared_stateEv
Line
Count
Source
507
2.52k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
2.52k
    } else {
515
2.52k
        auto ss = LocalStateType::SharedStateType::create_shared();
516
2.52k
        ss->id = operator_id();
517
2.52k
        for (auto& dest : dests_id()) {
518
2.52k
            ss->related_op_ids.insert(dest);
519
2.52k
        }
520
2.52k
        return ss;
521
2.52k
    }
522
2.52k
}
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE19create_shared_stateEv
Line
Count
Source
507
2.52k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
2.52k
    } else {
515
2.52k
        auto ss = LocalStateType::SharedStateType::create_shared();
516
2.52k
        ss->id = operator_id();
517
2.52k
        for (auto& dest : dests_id()) {
518
2.52k
            ss->related_op_ids.insert(dest);
519
2.52k
        }
520
2.52k
        return ss;
521
2.52k
    }
522
2.52k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
567
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
567
    } else {
515
567
        auto ss = LocalStateType::SharedStateType::create_shared();
516
567
        ss->id = operator_id();
517
567
        for (auto& dest : dests_id()) {
518
562
            ss->related_op_ids.insert(dest);
519
562
        }
520
567
        return ss;
521
567
    }
522
567
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
105
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
105
    } else {
515
105
        auto ss = LocalStateType::SharedStateType::create_shared();
516
105
        ss->id = operator_id();
517
105
        for (auto& dest : dests_id()) {
518
105
            ss->related_op_ids.insert(dest);
519
105
        }
520
105
        return ss;
521
105
    }
522
105
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE19create_shared_stateEv
523
524
template <typename LocalStateType>
525
2.44M
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
2.44M
    auto local_state = LocalStateType::create_unique(state, this);
527
2.44M
    RETURN_IF_ERROR(local_state->init(state, info));
528
2.44M
    state->emplace_local_state(operator_id(), std::move(local_state));
529
2.44M
    return Status::OK();
530
2.44M
}
_ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
71.8k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
71.8k
    auto local_state = LocalStateType::create_unique(state, this);
527
71.8k
    RETURN_IF_ERROR(local_state->init(state, info));
528
71.8k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
71.8k
    return Status::OK();
530
71.8k
}
_ZN5doris9OperatorXINS_18OlapScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
308k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
308k
    auto local_state = LocalStateType::create_unique(state, this);
527
308k
    RETURN_IF_ERROR(local_state->init(state, info));
528
308k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
308k
    return Status::OK();
530
308k
}
_ZN5doris9OperatorXINS_21GroupCommitLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
123
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
123
    auto local_state = LocalStateType::create_unique(state, this);
527
123
    RETURN_IF_ERROR(local_state->init(state, info));
528
123
    state->emplace_local_state(operator_id(), std::move(local_state));
529
123
    return Status::OK();
530
123
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_18JDBCScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_18FileScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
35.1k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
35.1k
    auto local_state = LocalStateType::create_unique(state, this);
527
35.1k
    RETURN_IF_ERROR(local_state->init(state, info));
528
35.1k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
35.1k
    return Status::OK();
530
35.1k
}
_ZN5doris9OperatorXINS_18AnalyticLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
6.91k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
6.91k
    auto local_state = LocalStateType::create_unique(state, this);
527
6.91k
    RETURN_IF_ERROR(local_state->init(state, info));
528
6.91k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
6.91k
    return Status::OK();
530
6.91k
}
_ZN5doris9OperatorXINS_14SortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
7.28k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
7.28k
    auto local_state = LocalStateType::create_unique(state, this);
527
7.28k
    RETURN_IF_ERROR(local_state->init(state, info));
528
7.28k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
7.28k
    return Status::OK();
530
7.28k
}
_ZN5doris9OperatorXINS_19SpillSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
37
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
37
    auto local_state = LocalStateType::create_unique(state, this);
527
37
    RETURN_IF_ERROR(local_state->init(state, info));
528
37
    state->emplace_local_state(operator_id(), std::move(local_state));
529
37
    return Status::OK();
530
37
}
_ZN5doris9OperatorXINS_24LocalMergeSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
246k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
246k
    auto local_state = LocalStateType::create_unique(state, this);
527
246k
    RETURN_IF_ERROR(local_state->init(state, info));
528
246k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
246k
    return Status::OK();
530
246k
}
_ZN5doris9OperatorXINS_13AggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
155k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
155k
    auto local_state = LocalStateType::create_unique(state, this);
527
155k
    RETURN_IF_ERROR(local_state->init(state, info));
528
155k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
155k
    return Status::OK();
530
155k
}
_ZN5doris9OperatorXINS_21BucketedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
257
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
257
    auto local_state = LocalStateType::create_unique(state, this);
527
257
    RETURN_IF_ERROR(local_state->init(state, info));
528
257
    state->emplace_local_state(operator_id(), std::move(local_state));
529
257
    return Status::OK();
530
257
}
_ZN5doris9OperatorXINS_24PartitionedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
192
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
192
    auto local_state = LocalStateType::create_unique(state, this);
527
192
    RETURN_IF_ERROR(local_state->init(state, info));
528
192
    state->emplace_local_state(operator_id(), std::move(local_state));
529
192
    return Status::OK();
530
192
}
_ZN5doris9OperatorXINS_23TableFunctionLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
4.98k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
4.98k
    auto local_state = LocalStateType::create_unique(state, this);
527
4.98k
    RETURN_IF_ERROR(local_state->init(state, info));
528
4.98k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
4.98k
    return Status::OK();
530
4.98k
}
_ZN5doris9OperatorXINS_18ExchangeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
373k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
373k
    auto local_state = LocalStateType::create_unique(state, this);
527
373k
    RETURN_IF_ERROR(local_state->init(state, info));
528
373k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
373k
    return Status::OK();
530
373k
}
_ZN5doris9OperatorXINS_16RepeatLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
1.00k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
1.00k
    auto local_state = LocalStateType::create_unique(state, this);
527
1.00k
    RETURN_IF_ERROR(local_state->init(state, info));
528
1.00k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
1.00k
    return Status::OK();
530
1.00k
}
_ZN5doris9OperatorXINS_29NestedLoopJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
11.1k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
11.1k
    auto local_state = LocalStateType::create_unique(state, this);
527
11.1k
    RETURN_IF_ERROR(local_state->init(state, info));
528
11.1k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
11.1k
    return Status::OK();
530
11.1k
}
_ZN5doris9OperatorXINS_23AssertNumRowsLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
221
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
221
    auto local_state = LocalStateType::create_unique(state, this);
527
221
    RETURN_IF_ERROR(local_state->init(state, info));
528
221
    state->emplace_local_state(operator_id(), std::move(local_state));
529
221
    return Status::OK();
530
221
}
_ZN5doris9OperatorXINS_18EmptySetLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
1.68k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
1.68k
    auto local_state = LocalStateType::create_unique(state, this);
527
1.68k
    RETURN_IF_ERROR(local_state->init(state, info));
528
1.68k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
1.68k
    return Status::OK();
530
1.68k
}
_ZN5doris9OperatorXINS_21UnionSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
56.0k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
56.0k
    auto local_state = LocalStateType::create_unique(state, this);
527
56.0k
    RETURN_IF_ERROR(local_state->init(state, info));
528
56.0k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
56.0k
    return Status::OK();
530
56.0k
}
_ZN5doris9OperatorXINS_35MultiCastDataStreamSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
11.3k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
11.3k
    auto local_state = LocalStateType::create_unique(state, this);
527
11.3k
    RETURN_IF_ERROR(local_state->init(state, info));
528
11.3k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
11.3k
    return Status::OK();
530
11.3k
}
_ZN5doris9OperatorXINS_29PartitionSortSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
285
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
285
    auto local_state = LocalStateType::create_unique(state, this);
527
285
    RETURN_IF_ERROR(local_state->init(state, info));
528
285
    state->emplace_local_state(operator_id(), std::move(local_state));
529
285
    return Status::OK();
530
285
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
2.49k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
2.49k
    auto local_state = LocalStateType::create_unique(state, this);
527
2.49k
    RETURN_IF_ERROR(local_state->init(state, info));
528
2.49k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
2.49k
    return Status::OK();
530
2.49k
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
2.44k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
2.44k
    auto local_state = LocalStateType::create_unique(state, this);
527
2.44k
    RETURN_IF_ERROR(local_state->init(state, info));
528
2.44k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
2.44k
    return Status::OK();
530
2.44k
}
_ZN5doris9OperatorXINS_17DataGenLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
499
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
499
    auto local_state = LocalStateType::create_unique(state, this);
527
499
    RETURN_IF_ERROR(local_state->init(state, info));
528
499
    state->emplace_local_state(operator_id(), std::move(local_state));
529
499
    return Status::OK();
530
499
}
_ZN5doris9OperatorXINS_20SchemaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
2.20k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
2.20k
    auto local_state = LocalStateType::create_unique(state, this);
527
2.20k
    RETURN_IF_ERROR(local_state->init(state, info));
528
2.20k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
2.20k
    return Status::OK();
530
2.20k
}
_ZN5doris9OperatorXINS_18MetaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
7.05k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
7.05k
    auto local_state = LocalStateType::create_unique(state, this);
527
7.05k
    RETURN_IF_ERROR(local_state->init(state, info));
528
7.05k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
7.05k
    return Status::OK();
530
7.05k
}
_ZN5doris9OperatorXINS_29LocalExchangeSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
724k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
724k
    auto local_state = LocalStateType::create_unique(state, this);
527
724k
    RETURN_IF_ERROR(local_state->init(state, info));
528
724k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
724k
    return Status::OK();
530
724k
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_34PartitionedHashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_21CacheSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
14
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
14
    auto local_state = LocalStateType::create_unique(state, this);
527
14
    RETURN_IF_ERROR(local_state->init(state, info));
528
14
    state->emplace_local_state(operator_id(), std::move(local_state));
529
14
    return Status::OK();
530
14
}
_ZN5doris9OperatorXINS_22RecCTESourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
164
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
164
    auto local_state = LocalStateType::create_unique(state, this);
527
164
    RETURN_IF_ERROR(local_state->init(state, info));
528
164
    state->emplace_local_state(operator_id(), std::move(local_state));
529
164
    return Status::OK();
530
164
}
_ZN5doris9OperatorXINS_20RecCTEScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
2.18k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
2.18k
    auto local_state = LocalStateType::create_unique(state, this);
527
2.18k
    RETURN_IF_ERROR(local_state->init(state, info));
528
2.18k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
2.18k
    return Status::OK();
530
2.18k
}
_ZN5doris9OperatorXINS_25MaterializationLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
1.73k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
1.73k
    auto local_state = LocalStateType::create_unique(state, this);
527
1.73k
    RETURN_IF_ERROR(local_state->init(state, info));
528
1.73k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
1.73k
    return Status::OK();
530
1.73k
}
_ZN5doris9OperatorXINS_16SelectLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
3.06k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
3.06k
    auto local_state = LocalStateType::create_unique(state, this);
527
3.06k
    RETURN_IF_ERROR(local_state->init(state, info));
528
3.06k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
3.06k
    return Status::OK();
530
3.06k
}
_ZN5doris9OperatorXINS_22StreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
12.4k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
12.4k
    auto local_state = LocalStateType::create_unique(state, this);
527
12.4k
    RETURN_IF_ERROR(local_state->init(state, info));
528
12.4k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
12.4k
    return Status::OK();
530
12.4k
}
_ZN5doris9OperatorXINS_30DistinctStreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
394k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
394k
    auto local_state = LocalStateType::create_unique(state, this);
527
394k
    RETURN_IF_ERROR(local_state->init(state, info));
528
394k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
394k
    return Status::OK();
530
394k
}
531
532
PipelineXSinkLocalStateBase::PipelineXSinkLocalStateBase(DataSinkOperatorXBase* parent,
533
                                                         RuntimeState* state)
534
2.01M
        : _parent(parent), _state(state) {}
535
536
PipelineXLocalStateBase::PipelineXLocalStateBase(RuntimeState* state, OperatorXBase* parent)
537
2.44M
        : _num_rows_returned(0),
538
2.44M
          _rows_returned_counter(nullptr),
539
2.44M
          _parent(parent),
540
2.44M
          _state(state),
541
2.44M
          _budget(state->batch_size(), state->preferred_block_size_bytes()) {}
542
543
template <typename SharedStateArg>
544
2.45M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
545
2.45M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
546
2.45M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
547
2.45M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
548
2.45M
    _operator_profile->set_metadata(_parent->node_id());
549
    // indent is false so that source operator will have same
550
    // indentation_level with its parent operator.
551
2.45M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
552
2.45M
    _operator_profile->add_child(_common_profile.get(), true);
553
2.45M
    _operator_profile->add_child(_custom_profile.get(), true);
554
2.45M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
555
2.45M
    if constexpr (!is_fake_shared) {
556
1.30M
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
557
738k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
558
738k
                                    .first.get()
559
738k
                                    ->template cast<SharedStateArg>();
560
561
738k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
562
738k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
738k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
738k
        } else if (info.shared_state) {
565
497k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
0
                DCHECK(false);
567
0
            }
568
            // For UnionSourceOperator without children, there is no shared state.
569
497k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
570
571
497k
            _dependency = _shared_state->create_source_dependency(
572
497k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
573
497k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
574
497k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
575
497k
        } else {
576
66.6k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
577
5.26k
                DCHECK(false);
578
5.26k
            }
579
66.6k
        }
580
1.30M
    }
581
582
2.45M
    if (must_set_shared_state() && _shared_state == nullptr) {
583
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
584
0
    }
585
586
2.45M
    _rows_returned_counter =
587
2.45M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
588
2.45M
    _blocks_returned_counter =
589
2.45M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
590
2.45M
    _output_block_bytes_counter =
591
2.45M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
592
2.45M
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
593
2.45M
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
594
2.45M
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
595
2.45M
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
2.45M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
597
2.45M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
598
2.45M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
599
2.45M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
600
2.45M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
601
2.45M
    _memory_used_counter =
602
2.45M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
603
2.45M
    _common_profile->add_info_string("IsColocate",
604
2.45M
                                     std::to_string(_parent->is_colocated_operator()));
605
2.45M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
606
2.45M
    _common_profile->add_info_string("FollowedByShuffledOperator",
607
2.45M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
608
2.45M
    return Status::OK();
609
2.45M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
544
72.0k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
545
72.0k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
546
72.0k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
547
72.0k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
548
72.0k
    _operator_profile->set_metadata(_parent->node_id());
549
    // indent is false so that source operator will have same
550
    // indentation_level with its parent operator.
551
72.0k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
552
72.0k
    _operator_profile->add_child(_common_profile.get(), true);
553
72.0k
    _operator_profile->add_child(_custom_profile.get(), true);
554
72.0k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
555
72.0k
    if constexpr (!is_fake_shared) {
556
72.0k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
557
15.5k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
558
15.5k
                                    .first.get()
559
15.5k
                                    ->template cast<SharedStateArg>();
560
561
15.5k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
562
15.5k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
15.5k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
56.5k
        } else if (info.shared_state) {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
            // For UnionSourceOperator without children, there is no shared state.
569
56.0k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
570
571
56.0k
            _dependency = _shared_state->create_source_dependency(
572
56.0k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
573
56.0k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
574
56.0k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
575
56.0k
        } else {
576
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
577
                DCHECK(false);
578
            }
579
463
        }
580
72.0k
    }
581
582
72.0k
    if (must_set_shared_state() && _shared_state == nullptr) {
583
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
584
0
    }
585
586
72.0k
    _rows_returned_counter =
587
72.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
588
72.0k
    _blocks_returned_counter =
589
72.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
590
72.0k
    _output_block_bytes_counter =
591
72.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
592
72.0k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
593
72.0k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
594
72.0k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
595
72.0k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
72.0k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
597
72.0k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
598
72.0k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
599
72.0k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
600
72.0k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
601
72.0k
    _memory_used_counter =
602
72.0k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
603
72.0k
    _common_profile->add_info_string("IsColocate",
604
72.0k
                                     std::to_string(_parent->is_colocated_operator()));
605
72.0k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
606
72.0k
    _common_profile->add_info_string("FollowedByShuffledOperator",
607
72.0k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
608
72.0k
    return Status::OK();
609
72.0k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
544
1
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
545
1
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
546
1
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
547
1
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
548
1
    _operator_profile->set_metadata(_parent->node_id());
549
    // indent is false so that source operator will have same
550
    // indentation_level with its parent operator.
551
1
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
552
1
    _operator_profile->add_child(_common_profile.get(), true);
553
1
    _operator_profile->add_child(_custom_profile.get(), true);
554
1
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
555
1
    if constexpr (!is_fake_shared) {
556
1
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
557
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
558
0
                                    .first.get()
559
0
                                    ->template cast<SharedStateArg>();
560
561
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
562
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
1
        } else if (info.shared_state) {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
            // For UnionSourceOperator without children, there is no shared state.
569
1
            _shared_state = info.shared_state->template cast<SharedStateArg>();
570
571
1
            _dependency = _shared_state->create_source_dependency(
572
1
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
573
1
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
574
1
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
575
1
        } else {
576
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
577
                DCHECK(false);
578
            }
579
0
        }
580
1
    }
581
582
1
    if (must_set_shared_state() && _shared_state == nullptr) {
583
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
584
0
    }
585
586
1
    _rows_returned_counter =
587
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
588
1
    _blocks_returned_counter =
589
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
590
1
    _output_block_bytes_counter =
591
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
592
1
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
593
1
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
594
1
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
595
1
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
1
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
597
1
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
598
1
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
599
1
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
600
1
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
601
1
    _memory_used_counter =
602
1
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
603
1
    _common_profile->add_info_string("IsColocate",
604
1
                                     std::to_string(_parent->is_colocated_operator()));
605
1
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
606
1
    _common_profile->add_info_string("FollowedByShuffledOperator",
607
1
                                     std::to_string(_parent->followed_by_shuffled_operator()));
608
1
    return Status::OK();
609
1
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
544
254k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
545
254k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
546
254k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
547
254k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
548
254k
    _operator_profile->set_metadata(_parent->node_id());
549
    // indent is false so that source operator will have same
550
    // indentation_level with its parent operator.
551
254k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
552
254k
    _operator_profile->add_child(_common_profile.get(), true);
553
254k
    _operator_profile->add_child(_custom_profile.get(), true);
554
254k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
555
254k
    if constexpr (!is_fake_shared) {
556
254k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
557
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
558
0
                                    .first.get()
559
0
                                    ->template cast<SharedStateArg>();
560
561
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
562
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
254k
        } else if (info.shared_state) {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
            // For UnionSourceOperator without children, there is no shared state.
569
249k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
570
571
249k
            _dependency = _shared_state->create_source_dependency(
572
249k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
573
249k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
574
249k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
575
249k
        } else {
576
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
577
                DCHECK(false);
578
            }
579
5.57k
        }
580
254k
    }
581
582
254k
    if (must_set_shared_state() && _shared_state == nullptr) {
583
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
584
0
    }
585
586
254k
    _rows_returned_counter =
587
254k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
588
254k
    _blocks_returned_counter =
589
254k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
590
254k
    _output_block_bytes_counter =
591
254k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
592
254k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
593
254k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
594
254k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
595
254k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
254k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
597
254k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
598
254k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
599
254k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
600
254k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
601
254k
    _memory_used_counter =
602
254k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
603
254k
    _common_profile->add_info_string("IsColocate",
604
254k
                                     std::to_string(_parent->is_colocated_operator()));
605
254k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
606
254k
    _common_profile->add_info_string("FollowedByShuffledOperator",
607
254k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
608
254k
    return Status::OK();
609
254k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
544
37
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
545
37
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
546
37
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
547
37
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
548
37
    _operator_profile->set_metadata(_parent->node_id());
549
    // indent is false so that source operator will have same
550
    // indentation_level with its parent operator.
551
37
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
552
37
    _operator_profile->add_child(_common_profile.get(), true);
553
37
    _operator_profile->add_child(_custom_profile.get(), true);
554
37
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
555
37
    if constexpr (!is_fake_shared) {
556
37
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
557
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
558
0
                                    .first.get()
559
0
                                    ->template cast<SharedStateArg>();
560
561
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
562
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
37
        } else if (info.shared_state) {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
            // For UnionSourceOperator without children, there is no shared state.
569
37
            _shared_state = info.shared_state->template cast<SharedStateArg>();
570
571
37
            _dependency = _shared_state->create_source_dependency(
572
37
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
573
37
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
574
37
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
575
37
        } else {
576
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
577
                DCHECK(false);
578
            }
579
0
        }
580
37
    }
581
582
37
    if (must_set_shared_state() && _shared_state == nullptr) {
583
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
584
0
    }
585
586
37
    _rows_returned_counter =
587
37
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
588
37
    _blocks_returned_counter =
589
37
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
590
37
    _output_block_bytes_counter =
591
37
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
592
37
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
593
37
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
594
37
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
595
37
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
37
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
597
37
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
598
37
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
599
37
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
600
37
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
601
37
    _memory_used_counter =
602
37
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
603
37
    _common_profile->add_info_string("IsColocate",
604
37
                                     std::to_string(_parent->is_colocated_operator()));
605
37
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
606
37
    _common_profile->add_info_string("FollowedByShuffledOperator",
607
37
                                     std::to_string(_parent->followed_by_shuffled_operator()));
608
37
    return Status::OK();
609
37
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
544
11.2k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
545
11.2k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
546
11.2k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
547
11.2k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
548
11.2k
    _operator_profile->set_metadata(_parent->node_id());
549
    // indent is false so that source operator will have same
550
    // indentation_level with its parent operator.
551
11.2k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
552
11.2k
    _operator_profile->add_child(_common_profile.get(), true);
553
11.2k
    _operator_profile->add_child(_custom_profile.get(), true);
554
11.2k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
555
11.2k
    if constexpr (!is_fake_shared) {
556
11.2k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
557
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
558
0
                                    .first.get()
559
0
                                    ->template cast<SharedStateArg>();
560
561
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
562
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
11.2k
        } else if (info.shared_state) {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
            // For UnionSourceOperator without children, there is no shared state.
569
11.1k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
570
571
11.1k
            _dependency = _shared_state->create_source_dependency(
572
11.1k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
573
11.1k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
574
11.1k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
575
11.1k
        } else {
576
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
577
                DCHECK(false);
578
            }
579
58
        }
580
11.2k
    }
581
582
11.2k
    if (must_set_shared_state() && _shared_state == nullptr) {
583
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
584
0
    }
585
586
11.2k
    _rows_returned_counter =
587
11.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
588
11.2k
    _blocks_returned_counter =
589
11.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
590
11.2k
    _output_block_bytes_counter =
591
11.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
592
11.2k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
593
11.2k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
594
11.2k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
595
11.2k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
11.2k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
597
11.2k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
598
11.2k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
599
11.2k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
600
11.2k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
601
11.2k
    _memory_used_counter =
602
11.2k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
603
11.2k
    _common_profile->add_info_string("IsColocate",
604
11.2k
                                     std::to_string(_parent->is_colocated_operator()));
605
11.2k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
606
11.2k
    _common_profile->add_info_string("FollowedByShuffledOperator",
607
11.2k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
608
11.2k
    return Status::OK();
609
11.2k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
544
6.97k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
545
6.97k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
546
6.97k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
547
6.97k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
548
6.97k
    _operator_profile->set_metadata(_parent->node_id());
549
    // indent is false so that source operator will have same
550
    // indentation_level with its parent operator.
551
6.97k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
552
6.97k
    _operator_profile->add_child(_common_profile.get(), true);
553
6.97k
    _operator_profile->add_child(_custom_profile.get(), true);
554
6.97k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
555
6.97k
    if constexpr (!is_fake_shared) {
556
6.97k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
557
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
558
0
                                    .first.get()
559
0
                                    ->template cast<SharedStateArg>();
560
561
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
562
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
6.97k
        } else if (info.shared_state) {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
            // For UnionSourceOperator without children, there is no shared state.
569
6.76k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
570
571
6.76k
            _dependency = _shared_state->create_source_dependency(
572
6.76k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
573
6.76k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
574
6.76k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
575
6.76k
        } else {
576
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
577
                DCHECK(false);
578
            }
579
215
        }
580
6.97k
    }
581
582
6.97k
    if (must_set_shared_state() && _shared_state == nullptr) {
583
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
584
0
    }
585
586
6.97k
    _rows_returned_counter =
587
6.97k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
588
6.97k
    _blocks_returned_counter =
589
6.97k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
590
6.97k
    _output_block_bytes_counter =
591
6.97k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
592
6.97k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
593
6.97k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
594
6.97k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
595
6.97k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
6.97k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
597
6.97k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
598
6.97k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
599
6.97k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
600
6.97k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
601
6.97k
    _memory_used_counter =
602
6.97k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
603
6.97k
    _common_profile->add_info_string("IsColocate",
604
6.97k
                                     std::to_string(_parent->is_colocated_operator()));
605
6.97k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
606
6.97k
    _common_profile->add_info_string("FollowedByShuffledOperator",
607
6.97k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
608
6.97k
    return Status::OK();
609
6.97k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
544
156k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
545
156k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
546
156k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
547
156k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
548
156k
    _operator_profile->set_metadata(_parent->node_id());
549
    // indent is false so that source operator will have same
550
    // indentation_level with its parent operator.
551
156k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
552
156k
    _operator_profile->add_child(_common_profile.get(), true);
553
156k
    _operator_profile->add_child(_custom_profile.get(), true);
554
156k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
555
156k
    if constexpr (!is_fake_shared) {
556
156k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
557
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
558
0
                                    .first.get()
559
0
                                    ->template cast<SharedStateArg>();
560
561
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
562
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
156k
        } else if (info.shared_state) {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
            // For UnionSourceOperator without children, there is no shared state.
569
154k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
570
571
154k
            _dependency = _shared_state->create_source_dependency(
572
154k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
573
154k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
574
154k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
575
154k
        } else {
576
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
577
                DCHECK(false);
578
            }
579
1.61k
        }
580
156k
    }
581
582
156k
    if (must_set_shared_state() && _shared_state == nullptr) {
583
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
584
0
    }
585
586
156k
    _rows_returned_counter =
587
156k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
588
156k
    _blocks_returned_counter =
589
156k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
590
156k
    _output_block_bytes_counter =
591
156k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
592
156k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
593
156k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
594
156k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
595
156k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
156k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
597
156k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
598
156k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
599
156k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
600
156k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
601
156k
    _memory_used_counter =
602
156k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
603
156k
    _common_profile->add_info_string("IsColocate",
604
156k
                                     std::to_string(_parent->is_colocated_operator()));
605
156k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
606
156k
    _common_profile->add_info_string("FollowedByShuffledOperator",
607
156k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
608
156k
    return Status::OK();
609
156k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
544
258
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
545
258
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
546
258
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
547
258
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
548
258
    _operator_profile->set_metadata(_parent->node_id());
549
    // indent is false so that source operator will have same
550
    // indentation_level with its parent operator.
551
258
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
552
258
    _operator_profile->add_child(_common_profile.get(), true);
553
258
    _operator_profile->add_child(_custom_profile.get(), true);
554
258
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
555
258
    if constexpr (!is_fake_shared) {
556
258
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
557
255
            _shared_state = info.shared_state_map.at(_parent->operator_id())
558
255
                                    .first.get()
559
255
                                    ->template cast<SharedStateArg>();
560
561
255
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
562
255
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
255
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
255
        } else if (info.shared_state) {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
            // For UnionSourceOperator without children, there is no shared state.
569
0
            _shared_state = info.shared_state->template cast<SharedStateArg>();
570
571
0
            _dependency = _shared_state->create_source_dependency(
572
0
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
573
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
574
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
575
3
        } else {
576
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
577
                DCHECK(false);
578
            }
579
3
        }
580
258
    }
581
582
258
    if (must_set_shared_state() && _shared_state == nullptr) {
583
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
584
0
    }
585
586
258
    _rows_returned_counter =
587
258
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
588
258
    _blocks_returned_counter =
589
258
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
590
258
    _output_block_bytes_counter =
591
258
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
592
258
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
593
258
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
594
258
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
595
258
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
258
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
597
258
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
598
258
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
599
258
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
600
258
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
601
258
    _memory_used_counter =
602
258
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
603
258
    _common_profile->add_info_string("IsColocate",
604
258
                                     std::to_string(_parent->is_colocated_operator()));
605
258
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
606
258
    _common_profile->add_info_string("FollowedByShuffledOperator",
607
258
                                     std::to_string(_parent->followed_by_shuffled_operator()));
608
258
    return Status::OK();
609
258
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
544
192
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
545
192
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
546
192
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
547
192
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
548
192
    _operator_profile->set_metadata(_parent->node_id());
549
    // indent is false so that source operator will have same
550
    // indentation_level with its parent operator.
551
192
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
552
192
    _operator_profile->add_child(_common_profile.get(), true);
553
192
    _operator_profile->add_child(_custom_profile.get(), true);
554
192
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
555
192
    if constexpr (!is_fake_shared) {
556
192
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
557
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
558
0
                                    .first.get()
559
0
                                    ->template cast<SharedStateArg>();
560
561
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
562
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
192
        } else if (info.shared_state) {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
            // For UnionSourceOperator without children, there is no shared state.
569
192
            _shared_state = info.shared_state->template cast<SharedStateArg>();
570
571
192
            _dependency = _shared_state->create_source_dependency(
572
192
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
573
192
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
574
192
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
575
192
        } else {
576
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
577
                DCHECK(false);
578
            }
579
0
        }
580
192
    }
581
582
192
    if (must_set_shared_state() && _shared_state == nullptr) {
583
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
584
0
    }
585
586
192
    _rows_returned_counter =
587
192
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
588
192
    _blocks_returned_counter =
589
192
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
590
192
    _output_block_bytes_counter =
591
192
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
592
192
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
593
192
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
594
192
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
595
192
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
192
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
597
192
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
598
192
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
599
192
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
600
192
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
601
192
    _memory_used_counter =
602
192
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
603
192
    _common_profile->add_info_string("IsColocate",
604
192
                                     std::to_string(_parent->is_colocated_operator()));
605
192
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
606
192
    _common_profile->add_info_string("FollowedByShuffledOperator",
607
192
                                     std::to_string(_parent->followed_by_shuffled_operator()));
608
192
    return Status::OK();
609
192
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
544
1.14M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
545
1.14M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
546
1.14M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
547
1.14M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
548
1.14M
    _operator_profile->set_metadata(_parent->node_id());
549
    // indent is false so that source operator will have same
550
    // indentation_level with its parent operator.
551
1.14M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
552
1.14M
    _operator_profile->add_child(_common_profile.get(), true);
553
1.14M
    _operator_profile->add_child(_custom_profile.get(), true);
554
1.14M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
555
    if constexpr (!is_fake_shared) {
556
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
557
            _shared_state = info.shared_state_map.at(_parent->operator_id())
558
                                    .first.get()
559
                                    ->template cast<SharedStateArg>();
560
561
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
562
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
        } else if (info.shared_state) {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
            // For UnionSourceOperator without children, there is no shared state.
569
            _shared_state = info.shared_state->template cast<SharedStateArg>();
570
571
            _dependency = _shared_state->create_source_dependency(
572
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
573
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
574
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
575
        } else {
576
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
577
                DCHECK(false);
578
            }
579
        }
580
    }
581
582
1.14M
    if (must_set_shared_state() && _shared_state == nullptr) {
583
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
584
0
    }
585
586
1.14M
    _rows_returned_counter =
587
1.14M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
588
1.14M
    _blocks_returned_counter =
589
1.14M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
590
1.14M
    _output_block_bytes_counter =
591
1.14M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
592
1.14M
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
593
1.14M
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
594
1.14M
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
595
1.14M
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
1.14M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
597
1.14M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
598
1.14M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
599
1.14M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
600
1.14M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
601
1.14M
    _memory_used_counter =
602
1.14M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
603
1.14M
    _common_profile->add_info_string("IsColocate",
604
1.14M
                                     std::to_string(_parent->is_colocated_operator()));
605
1.14M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
606
1.14M
    _common_profile->add_info_string("FollowedByShuffledOperator",
607
1.14M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
608
1.14M
    return Status::OK();
609
1.14M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
544
56.0k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
545
56.0k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
546
56.0k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
547
56.0k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
548
56.0k
    _operator_profile->set_metadata(_parent->node_id());
549
    // indent is false so that source operator will have same
550
    // indentation_level with its parent operator.
551
56.0k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
552
56.0k
    _operator_profile->add_child(_common_profile.get(), true);
553
56.0k
    _operator_profile->add_child(_custom_profile.get(), true);
554
56.0k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
555
56.0k
    if constexpr (!is_fake_shared) {
556
56.0k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
557
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
558
0
                                    .first.get()
559
0
                                    ->template cast<SharedStateArg>();
560
561
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
562
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
56.0k
        } else if (info.shared_state) {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
            // For UnionSourceOperator without children, there is no shared state.
569
2.99k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
570
571
2.99k
            _dependency = _shared_state->create_source_dependency(
572
2.99k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
573
2.99k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
574
2.99k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
575
53.0k
        } else {
576
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
577
                DCHECK(false);
578
            }
579
53.0k
        }
580
56.0k
    }
581
582
56.0k
    if (must_set_shared_state() && _shared_state == nullptr) {
583
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
584
0
    }
585
586
56.0k
    _rows_returned_counter =
587
56.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
588
56.0k
    _blocks_returned_counter =
589
56.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
590
56.0k
    _output_block_bytes_counter =
591
56.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
592
56.0k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
593
56.0k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
594
56.0k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
595
56.0k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
56.0k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
597
56.0k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
598
56.0k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
599
56.0k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
600
56.0k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
601
56.0k
    _memory_used_counter =
602
56.0k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
603
56.0k
    _common_profile->add_info_string("IsColocate",
604
56.0k
                                     std::to_string(_parent->is_colocated_operator()));
605
56.0k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
606
56.0k
    _common_profile->add_info_string("FollowedByShuffledOperator",
607
56.0k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
608
56.0k
    return Status::OK();
609
56.0k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
544
17
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
545
17
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
546
17
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
547
17
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
548
17
    _operator_profile->set_metadata(_parent->node_id());
549
    // indent is false so that source operator will have same
550
    // indentation_level with its parent operator.
551
17
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
552
17
    _operator_profile->add_child(_common_profile.get(), true);
553
17
    _operator_profile->add_child(_custom_profile.get(), true);
554
17
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
555
17
    if constexpr (!is_fake_shared) {
556
17
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
557
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
558
0
                                    .first.get()
559
0
                                    ->template cast<SharedStateArg>();
560
561
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
562
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
17
        } else if (info.shared_state) {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
            // For UnionSourceOperator without children, there is no shared state.
569
17
            _shared_state = info.shared_state->template cast<SharedStateArg>();
570
571
17
            _dependency = _shared_state->create_source_dependency(
572
17
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
573
17
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
574
17
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
575
17
        } else {
576
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
577
                DCHECK(false);
578
            }
579
0
        }
580
17
    }
581
582
17
    if (must_set_shared_state() && _shared_state == nullptr) {
583
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
584
0
    }
585
586
17
    _rows_returned_counter =
587
17
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
588
17
    _blocks_returned_counter =
589
17
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
590
17
    _output_block_bytes_counter =
591
17
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
592
17
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
593
17
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
594
17
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
595
17
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
17
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
597
17
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
598
17
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
599
17
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
600
17
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
601
17
    _memory_used_counter =
602
17
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
603
17
    _common_profile->add_info_string("IsColocate",
604
17
                                     std::to_string(_parent->is_colocated_operator()));
605
17
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
606
17
    _common_profile->add_info_string("FollowedByShuffledOperator",
607
17
                                     std::to_string(_parent->followed_by_shuffled_operator()));
608
17
    return Status::OK();
609
17
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
544
11.4k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
545
11.4k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
546
11.4k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
547
11.4k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
548
11.4k
    _operator_profile->set_metadata(_parent->node_id());
549
    // indent is false so that source operator will have same
550
    // indentation_level with its parent operator.
551
11.4k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
552
11.4k
    _operator_profile->add_child(_common_profile.get(), true);
553
11.4k
    _operator_profile->add_child(_custom_profile.get(), true);
554
11.4k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
555
11.4k
    if constexpr (!is_fake_shared) {
556
11.4k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
557
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
558
0
                                    .first.get()
559
0
                                    ->template cast<SharedStateArg>();
560
561
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
562
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
11.4k
        } else if (info.shared_state) {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
            // For UnionSourceOperator without children, there is no shared state.
569
11.3k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
570
571
11.3k
            _dependency = _shared_state->create_source_dependency(
572
11.3k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
573
11.3k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
574
11.3k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
575
11.3k
        } else {
576
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
577
                DCHECK(false);
578
            }
579
19
        }
580
11.4k
    }
581
582
11.4k
    if (must_set_shared_state() && _shared_state == nullptr) {
583
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
584
0
    }
585
586
11.4k
    _rows_returned_counter =
587
11.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
588
11.4k
    _blocks_returned_counter =
589
11.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
590
11.4k
    _output_block_bytes_counter =
591
11.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
592
11.4k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
593
11.4k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
594
11.4k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
595
11.4k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
11.4k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
597
11.4k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
598
11.4k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
599
11.4k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
600
11.4k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
601
11.4k
    _memory_used_counter =
602
11.4k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
603
11.4k
    _common_profile->add_info_string("IsColocate",
604
11.4k
                                     std::to_string(_parent->is_colocated_operator()));
605
11.4k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
606
11.4k
    _common_profile->add_info_string("FollowedByShuffledOperator",
607
11.4k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
608
11.4k
    return Status::OK();
609
11.4k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
544
387
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
545
387
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
546
387
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
547
387
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
548
387
    _operator_profile->set_metadata(_parent->node_id());
549
    // indent is false so that source operator will have same
550
    // indentation_level with its parent operator.
551
387
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
552
387
    _operator_profile->add_child(_common_profile.get(), true);
553
387
    _operator_profile->add_child(_custom_profile.get(), true);
554
387
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
555
387
    if constexpr (!is_fake_shared) {
556
387
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
557
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
558
0
                                    .first.get()
559
0
                                    ->template cast<SharedStateArg>();
560
561
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
562
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
387
        } else if (info.shared_state) {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
            // For UnionSourceOperator without children, there is no shared state.
569
386
            _shared_state = info.shared_state->template cast<SharedStateArg>();
570
571
386
            _dependency = _shared_state->create_source_dependency(
572
386
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
573
386
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
574
386
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
575
386
        } else {
576
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
577
                DCHECK(false);
578
            }
579
1
        }
580
387
    }
581
582
387
    if (must_set_shared_state() && _shared_state == nullptr) {
583
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
584
0
    }
585
586
387
    _rows_returned_counter =
587
387
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
588
387
    _blocks_returned_counter =
589
387
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
590
387
    _output_block_bytes_counter =
591
387
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
592
387
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
593
387
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
594
387
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
595
387
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
387
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
597
387
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
598
387
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
599
387
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
600
387
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
601
387
    _memory_used_counter =
602
387
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
603
387
    _common_profile->add_info_string("IsColocate",
604
387
                                     std::to_string(_parent->is_colocated_operator()));
605
387
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
606
387
    _common_profile->add_info_string("FollowedByShuffledOperator",
607
387
                                     std::to_string(_parent->followed_by_shuffled_operator()));
608
387
    return Status::OK();
609
387
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
544
5.02k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
545
5.02k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
546
5.02k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
547
5.02k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
548
5.02k
    _operator_profile->set_metadata(_parent->node_id());
549
    // indent is false so that source operator will have same
550
    // indentation_level with its parent operator.
551
5.02k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
552
5.02k
    _operator_profile->add_child(_common_profile.get(), true);
553
5.02k
    _operator_profile->add_child(_custom_profile.get(), true);
554
5.02k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
555
5.02k
    if constexpr (!is_fake_shared) {
556
5.02k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
557
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
558
0
                                    .first.get()
559
0
                                    ->template cast<SharedStateArg>();
560
561
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
562
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
5.02k
        } else if (info.shared_state) {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
            // For UnionSourceOperator without children, there is no shared state.
569
4.61k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
570
571
4.61k
            _dependency = _shared_state->create_source_dependency(
572
4.61k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
573
4.61k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
574
4.61k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
575
4.61k
        } else {
576
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
577
                DCHECK(false);
578
            }
579
406
        }
580
5.02k
    }
581
582
5.02k
    if (must_set_shared_state() && _shared_state == nullptr) {
583
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
584
0
    }
585
586
5.02k
    _rows_returned_counter =
587
5.02k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
588
5.02k
    _blocks_returned_counter =
589
5.02k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
590
5.02k
    _output_block_bytes_counter =
591
5.02k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
592
5.02k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
593
5.02k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
594
5.02k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
595
5.02k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
5.02k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
597
5.02k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
598
5.02k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
599
5.02k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
600
5.02k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
601
5.02k
    _memory_used_counter =
602
5.02k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
603
5.02k
    _common_profile->add_info_string("IsColocate",
604
5.02k
                                     std::to_string(_parent->is_colocated_operator()));
605
5.02k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
606
5.02k
    _common_profile->add_info_string("FollowedByShuffledOperator",
607
5.02k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
608
5.02k
    return Status::OK();
609
5.02k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
544
727k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
545
727k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
546
727k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
547
727k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
548
727k
    _operator_profile->set_metadata(_parent->node_id());
549
    // indent is false so that source operator will have same
550
    // indentation_level with its parent operator.
551
727k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
552
727k
    _operator_profile->add_child(_common_profile.get(), true);
553
727k
    _operator_profile->add_child(_custom_profile.get(), true);
554
727k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
555
727k
    if constexpr (!is_fake_shared) {
556
727k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
557
722k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
558
722k
                                    .first.get()
559
722k
                                    ->template cast<SharedStateArg>();
560
561
722k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
562
722k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
722k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
722k
        } else if (info.shared_state) {
565
0
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
0
                DCHECK(false);
567
0
            }
568
            // For UnionSourceOperator without children, there is no shared state.
569
0
            _shared_state = info.shared_state->template cast<SharedStateArg>();
570
571
0
            _dependency = _shared_state->create_source_dependency(
572
0
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
573
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
574
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
575
5.26k
        } else {
576
5.26k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
577
5.26k
                DCHECK(false);
578
5.26k
            }
579
5.26k
        }
580
727k
    }
581
582
727k
    if (must_set_shared_state() && _shared_state == nullptr) {
583
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
584
0
    }
585
586
727k
    _rows_returned_counter =
587
727k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
588
727k
    _blocks_returned_counter =
589
727k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
590
727k
    _output_block_bytes_counter =
591
727k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
592
727k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
593
727k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
594
727k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
595
727k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
727k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
597
727k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
598
727k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
599
727k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
600
727k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
601
727k
    _memory_used_counter =
602
727k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
603
727k
    _common_profile->add_info_string("IsColocate",
604
727k
                                     std::to_string(_parent->is_colocated_operator()));
605
727k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
606
727k
    _common_profile->add_info_string("FollowedByShuffledOperator",
607
727k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
608
727k
    return Status::OK();
609
727k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
544
164
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
545
164
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
546
164
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
547
164
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
548
164
    _operator_profile->set_metadata(_parent->node_id());
549
    // indent is false so that source operator will have same
550
    // indentation_level with its parent operator.
551
164
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
552
164
    _operator_profile->add_child(_common_profile.get(), true);
553
164
    _operator_profile->add_child(_custom_profile.get(), true);
554
164
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
555
164
    if constexpr (!is_fake_shared) {
556
164
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
557
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
558
0
                                    .first.get()
559
0
                                    ->template cast<SharedStateArg>();
560
561
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
562
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
164
        } else if (info.shared_state) {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
            // For UnionSourceOperator without children, there is no shared state.
569
164
            _shared_state = info.shared_state->template cast<SharedStateArg>();
570
571
164
            _dependency = _shared_state->create_source_dependency(
572
164
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
573
164
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
574
164
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
575
164
        } else {
576
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
577
                DCHECK(false);
578
            }
579
0
        }
580
164
    }
581
582
164
    if (must_set_shared_state() && _shared_state == nullptr) {
583
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
584
0
    }
585
586
164
    _rows_returned_counter =
587
164
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
588
164
    _blocks_returned_counter =
589
164
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
590
164
    _output_block_bytes_counter =
591
164
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
592
164
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
593
164
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
594
164
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
595
164
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
164
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
597
164
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
598
164
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
599
164
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
600
164
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
601
164
    _memory_used_counter =
602
164
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
603
164
    _common_profile->add_info_string("IsColocate",
604
164
                                     std::to_string(_parent->is_colocated_operator()));
605
164
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
606
164
    _common_profile->add_info_string("FollowedByShuffledOperator",
607
164
                                     std::to_string(_parent->followed_by_shuffled_operator()));
608
164
    return Status::OK();
609
164
}
610
611
template <typename SharedStateArg>
612
2.45M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
613
2.45M
    _conjuncts.resize(_parent->_conjuncts.size());
614
2.45M
    _projections.resize(_parent->_projections.size());
615
2.96M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
616
511k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
617
511k
    }
618
5.18M
    for (size_t i = 0; i < _projections.size(); i++) {
619
2.73M
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
620
2.73M
    }
621
2.45M
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
622
2.46M
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
623
11.8k
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
624
78.7k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
625
66.8k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
626
66.8k
                    state, _intermediate_projections[i][j]));
627
66.8k
        }
628
11.8k
    }
629
2.45M
    return Status::OK();
630
2.45M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
612
72.0k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
613
72.0k
    _conjuncts.resize(_parent->_conjuncts.size());
614
72.0k
    _projections.resize(_parent->_projections.size());
615
73.0k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
616
999
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
617
999
    }
618
357k
    for (size_t i = 0; i < _projections.size(); i++) {
619
285k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
620
285k
    }
621
72.0k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
622
73.6k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
623
1.57k
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
624
15.8k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
625
14.2k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
626
14.2k
                    state, _intermediate_projections[i][j]));
627
14.2k
        }
628
1.57k
    }
629
72.0k
    return Status::OK();
630
72.0k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
612
3
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
613
3
    _conjuncts.resize(_parent->_conjuncts.size());
614
3
    _projections.resize(_parent->_projections.size());
615
3
    for (size_t i = 0; i < _conjuncts.size(); i++) {
616
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
617
0
    }
618
3
    for (size_t i = 0; i < _projections.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
620
0
    }
621
3
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
622
3
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
623
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
624
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
625
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
626
0
                    state, _intermediate_projections[i][j]));
627
0
        }
628
0
    }
629
3
    return Status::OK();
630
3
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
612
255k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
613
255k
    _conjuncts.resize(_parent->_conjuncts.size());
614
255k
    _projections.resize(_parent->_projections.size());
615
255k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
616
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
617
0
    }
618
255k
    for (size_t i = 0; i < _projections.size(); i++) {
619
363
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
620
363
    }
621
255k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
622
255k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
623
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
624
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
625
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
626
0
                    state, _intermediate_projections[i][j]));
627
0
        }
628
0
    }
629
255k
    return Status::OK();
630
255k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
612
37
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
613
37
    _conjuncts.resize(_parent->_conjuncts.size());
614
37
    _projections.resize(_parent->_projections.size());
615
37
    for (size_t i = 0; i < _conjuncts.size(); i++) {
616
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
617
0
    }
618
37
    for (size_t i = 0; i < _projections.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
620
0
    }
621
37
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
622
37
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
623
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
624
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
625
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
626
0
                    state, _intermediate_projections[i][j]));
627
0
        }
628
0
    }
629
37
    return Status::OK();
630
37
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
612
11.2k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
613
11.2k
    _conjuncts.resize(_parent->_conjuncts.size());
614
11.2k
    _projections.resize(_parent->_projections.size());
615
11.3k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
616
93
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
617
93
    }
618
71.1k
    for (size_t i = 0; i < _projections.size(); i++) {
619
59.9k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
620
59.9k
    }
621
11.2k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
622
11.3k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
623
145
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
624
879
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
625
734
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
626
734
                    state, _intermediate_projections[i][j]));
627
734
        }
628
145
    }
629
11.2k
    return Status::OK();
630
11.2k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
612
7.00k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
613
7.00k
    _conjuncts.resize(_parent->_conjuncts.size());
614
7.00k
    _projections.resize(_parent->_projections.size());
615
7.72k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
616
725
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
617
725
    }
618
19.4k
    for (size_t i = 0; i < _projections.size(); i++) {
619
12.4k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
620
12.4k
    }
621
7.00k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
622
7.08k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
623
83
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
624
622
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
625
539
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
626
539
                    state, _intermediate_projections[i][j]));
627
539
        }
628
83
    }
629
7.00k
    return Status::OK();
630
7.00k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
612
156k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
613
156k
    _conjuncts.resize(_parent->_conjuncts.size());
614
156k
    _projections.resize(_parent->_projections.size());
615
161k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
616
4.73k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
617
4.73k
    }
618
430k
    for (size_t i = 0; i < _projections.size(); i++) {
619
274k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
620
274k
    }
621
156k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
622
156k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
623
291
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
624
2.24k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
625
1.95k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
626
1.95k
                    state, _intermediate_projections[i][j]));
627
1.95k
        }
628
291
    }
629
156k
    return Status::OK();
630
156k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
612
258
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
613
258
    _conjuncts.resize(_parent->_conjuncts.size());
614
258
    _projections.resize(_parent->_projections.size());
615
264
    for (size_t i = 0; i < _conjuncts.size(); i++) {
616
6
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
617
6
    }
618
990
    for (size_t i = 0; i < _projections.size(); i++) {
619
732
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
620
732
    }
621
258
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
622
258
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
623
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
624
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
625
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
626
0
                    state, _intermediate_projections[i][j]));
627
0
        }
628
0
    }
629
258
    return Status::OK();
630
258
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
612
196
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
613
196
    _conjuncts.resize(_parent->_conjuncts.size());
614
196
    _projections.resize(_parent->_projections.size());
615
196
    for (size_t i = 0; i < _conjuncts.size(); i++) {
616
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
617
0
    }
618
528
    for (size_t i = 0; i < _projections.size(); i++) {
619
332
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
620
332
    }
621
196
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
622
196
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
623
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
624
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
625
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
626
0
                    state, _intermediate_projections[i][j]));
627
0
        }
628
0
    }
629
196
    return Status::OK();
630
196
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
612
1.15M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
613
1.15M
    _conjuncts.resize(_parent->_conjuncts.size());
614
1.15M
    _projections.resize(_parent->_projections.size());
615
1.65M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
616
500k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
617
500k
    }
618
3.15M
    for (size_t i = 0; i < _projections.size(); i++) {
619
2.00M
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
620
2.00M
    }
621
1.15M
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
622
1.16M
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
623
9.75k
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
624
59.0k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
625
49.3k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
626
49.3k
                    state, _intermediate_projections[i][j]));
627
49.3k
        }
628
9.75k
    }
629
1.15M
    return Status::OK();
630
1.15M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
612
56.1k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
613
56.1k
    _conjuncts.resize(_parent->_conjuncts.size());
614
56.1k
    _projections.resize(_parent->_projections.size());
615
56.1k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
616
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
617
0
    }
618
152k
    for (size_t i = 0; i < _projections.size(); i++) {
619
96.4k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
620
96.4k
    }
621
56.1k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
622
56.1k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
623
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
624
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
625
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
626
0
                    state, _intermediate_projections[i][j]));
627
0
        }
628
0
    }
629
56.1k
    return Status::OK();
630
56.1k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
612
17
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
613
17
    _conjuncts.resize(_parent->_conjuncts.size());
614
17
    _projections.resize(_parent->_projections.size());
615
17
    for (size_t i = 0; i < _conjuncts.size(); i++) {
616
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
617
0
    }
618
17
    for (size_t i = 0; i < _projections.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
620
0
    }
621
17
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
622
17
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
623
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
624
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
625
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
626
0
                    state, _intermediate_projections[i][j]));
627
0
        }
628
0
    }
629
17
    return Status::OK();
630
17
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
612
11.3k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
613
11.3k
    _conjuncts.resize(_parent->_conjuncts.size());
614
11.3k
    _projections.resize(_parent->_projections.size());
615
16.0k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
616
4.61k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
617
4.61k
    }
618
11.3k
    for (size_t i = 0; i < _projections.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
620
0
    }
621
11.3k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
622
11.3k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
623
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
624
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
625
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
626
0
                    state, _intermediate_projections[i][j]));
627
0
        }
628
0
    }
629
11.3k
    return Status::OK();
630
11.3k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
612
387
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
613
387
    _conjuncts.resize(_parent->_conjuncts.size());
614
387
    _projections.resize(_parent->_projections.size());
615
387
    for (size_t i = 0; i < _conjuncts.size(); i++) {
616
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
617
0
    }
618
387
    for (size_t i = 0; i < _projections.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
620
0
    }
621
387
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
622
387
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
623
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
624
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
625
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
626
0
                    state, _intermediate_projections[i][j]));
627
0
        }
628
0
    }
629
387
    return Status::OK();
630
387
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
612
5.11k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
613
5.11k
    _conjuncts.resize(_parent->_conjuncts.size());
614
5.11k
    _projections.resize(_parent->_projections.size());
615
5.11k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
616
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
617
0
    }
618
5.27k
    for (size_t i = 0; i < _projections.size(); i++) {
619
168
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
620
168
    }
621
5.11k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
622
5.11k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
623
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
624
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
625
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
626
0
                    state, _intermediate_projections[i][j]));
627
0
        }
628
0
    }
629
5.11k
    return Status::OK();
630
5.11k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
612
728k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
613
728k
    _conjuncts.resize(_parent->_conjuncts.size());
614
728k
    _projections.resize(_parent->_projections.size());
615
728k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
616
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
617
0
    }
618
728k
    for (size_t i = 0; i < _projections.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
620
0
    }
621
728k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
622
728k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
623
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
624
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
625
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
626
0
                    state, _intermediate_projections[i][j]));
627
0
        }
628
0
    }
629
728k
    return Status::OK();
630
728k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4openEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
612
164
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
613
164
    _conjuncts.resize(_parent->_conjuncts.size());
614
164
    _projections.resize(_parent->_projections.size());
615
171
    for (size_t i = 0; i < _conjuncts.size(); i++) {
616
7
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
617
7
    }
618
483
    for (size_t i = 0; i < _projections.size(); i++) {
619
319
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
620
319
    }
621
164
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
622
167
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
623
3
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
624
11
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
625
8
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
626
8
                    state, _intermediate_projections[i][j]));
627
8
        }
628
3
    }
629
164
    return Status::OK();
630
164
}
631
632
template <typename SharedStateArg>
633
6.69k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
634
6.69k
    if (_terminated) {
635
0
        return Status::OK();
636
0
    }
637
6.69k
    _terminated = true;
638
6.69k
    return Status::OK();
639
6.69k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
633
209
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
634
209
    if (_terminated) {
635
0
        return Status::OK();
636
0
    }
637
209
    _terminated = true;
638
209
    return Status::OK();
639
209
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
633
67
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
634
67
    if (_terminated) {
635
0
        return Status::OK();
636
0
    }
637
67
    _terminated = true;
638
67
    return Status::OK();
639
67
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
633
44
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
634
44
    if (_terminated) {
635
0
        return Status::OK();
636
0
    }
637
44
    _terminated = true;
638
44
    return Status::OK();
639
44
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
633
1
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
634
1
    if (_terminated) {
635
0
        return Status::OK();
636
0
    }
637
1
    _terminated = true;
638
1
    return Status::OK();
639
1
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
633
138
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
634
138
    if (_terminated) {
635
0
        return Status::OK();
636
0
    }
637
138
    _terminated = true;
638
138
    return Status::OK();
639
138
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
633
5.40k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
634
5.40k
    if (_terminated) {
635
0
        return Status::OK();
636
0
    }
637
5.40k
    _terminated = true;
638
5.40k
    return Status::OK();
639
5.40k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
633
5
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
634
5
    if (_terminated) {
635
0
        return Status::OK();
636
0
    }
637
5
    _terminated = true;
638
5
    return Status::OK();
639
5
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
633
1
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
634
1
    if (_terminated) {
635
0
        return Status::OK();
636
0
    }
637
1
    _terminated = true;
638
1
    return Status::OK();
639
1
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
633
234
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
634
234
    if (_terminated) {
635
0
        return Status::OK();
636
0
    }
637
234
    _terminated = true;
638
234
    return Status::OK();
639
234
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
633
586
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
634
586
    if (_terminated) {
635
0
        return Status::OK();
636
0
    }
637
586
    _terminated = true;
638
586
    return Status::OK();
639
586
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
633
11
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
634
11
    if (_terminated) {
635
0
        return Status::OK();
636
0
    }
637
11
    _terminated = true;
638
11
    return Status::OK();
639
11
}
640
641
template <typename SharedStateArg>
642
2.74M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
643
2.74M
    if (_closed) {
644
286k
        return Status::OK();
645
286k
    }
646
2.45M
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
647
1.30M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
648
1.30M
    }
649
2.45M
    _closed = true;
650
2.45M
    return Status::OK();
651
2.74M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
642
72.0k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
643
72.0k
    if (_closed) {
644
0
        return Status::OK();
645
0
    }
646
72.0k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
647
72.0k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
648
72.0k
    }
649
72.0k
    _closed = true;
650
72.0k
    return Status::OK();
651
72.0k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
642
4
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
643
4
    if (_closed) {
644
0
        return Status::OK();
645
0
    }
646
4
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
647
4
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
648
4
    }
649
4
    _closed = true;
650
4
    return Status::OK();
651
4
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
642
507k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
643
507k
    if (_closed) {
644
254k
        return Status::OK();
645
254k
    }
646
253k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
647
253k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
648
253k
    }
649
253k
    _closed = true;
650
253k
    return Status::OK();
651
507k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
642
37
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
643
37
    if (_closed) {
644
0
        return Status::OK();
645
0
    }
646
37
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
647
37
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
648
37
    }
649
37
    _closed = true;
650
37
    return Status::OK();
651
37
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
642
11.2k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
643
11.2k
    if (_closed) {
644
0
        return Status::OK();
645
0
    }
646
11.2k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
647
11.2k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
648
11.2k
    }
649
11.2k
    _closed = true;
650
11.2k
    return Status::OK();
651
11.2k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
642
14.1k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
643
14.1k
    if (_closed) {
644
7.11k
        return Status::OK();
645
7.11k
    }
646
6.98k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
647
6.98k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
648
6.98k
    }
649
6.98k
    _closed = true;
650
6.98k
    return Status::OK();
651
14.1k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
642
156k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
643
156k
    if (_closed) {
644
0
        return Status::OK();
645
0
    }
646
156k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
647
156k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
648
156k
    }
649
156k
    _closed = true;
650
156k
    return Status::OK();
651
156k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
642
258
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
643
258
    if (_closed) {
644
0
        return Status::OK();
645
0
    }
646
258
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
647
258
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
648
258
    }
649
258
    _closed = true;
650
258
    return Status::OK();
651
258
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
642
191
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
643
191
    if (_closed) {
644
0
        return Status::OK();
645
0
    }
646
191
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
647
191
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
648
191
    }
649
191
    _closed = true;
650
191
    return Status::OK();
651
191
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
642
1.17M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
643
1.17M
    if (_closed) {
644
19.1k
        return Status::OK();
645
19.1k
    }
646
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
647
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
648
    }
649
1.15M
    _closed = true;
650
1.15M
    return Status::OK();
651
1.17M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
642
56.1k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
643
56.1k
    if (_closed) {
644
0
        return Status::OK();
645
0
    }
646
56.1k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
647
56.1k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
648
56.1k
    }
649
56.1k
    _closed = true;
650
56.1k
    return Status::OK();
651
56.1k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
642
28
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
643
28
    if (_closed) {
644
14
        return Status::OK();
645
14
    }
646
14
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
647
14
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
648
14
    }
649
14
    _closed = true;
650
14
    return Status::OK();
651
28
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
642
11.3k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
643
11.3k
    if (_closed) {
644
0
        return Status::OK();
645
0
    }
646
11.3k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
647
11.3k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
648
11.3k
    }
649
11.3k
    _closed = true;
650
11.3k
    return Status::OK();
651
11.3k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
642
569
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
643
569
    if (_closed) {
644
284
        return Status::OK();
645
284
    }
646
285
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
647
285
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
648
285
    }
649
285
    _closed = true;
650
285
    return Status::OK();
651
569
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
642
10.2k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
643
10.2k
    if (_closed) {
644
5.18k
        return Status::OK();
645
5.18k
    }
646
5.09k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
647
5.09k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
648
5.09k
    }
649
5.09k
    _closed = true;
650
5.09k
    return Status::OK();
651
10.2k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
642
730k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
643
730k
    if (_closed) {
644
0
        return Status::OK();
645
0
    }
646
730k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
647
730k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
648
730k
    }
649
730k
    _closed = true;
650
730k
    return Status::OK();
651
730k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
642
333
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
643
333
    if (_closed) {
644
178
        return Status::OK();
645
178
    }
646
155
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
647
155
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
648
155
    }
649
155
    _closed = true;
650
155
    return Status::OK();
651
333
}
652
653
template <typename SharedState>
654
2.02M
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
2.02M
    _operator_profile =
657
2.02M
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
2.02M
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
2.02M
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
660
661
    // indentation is true
662
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
663
    // So we should set the indentation to true.
664
2.02M
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
2.02M
    _operator_profile->add_child(_common_profile, true);
666
2.02M
    _operator_profile->add_child(_custom_profile, true);
667
668
2.02M
    _operator_profile->set_metadata(_parent->node_id());
669
2.02M
    _wait_for_finish_dependency_timer =
670
2.02M
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
2.02M
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
2.02M
    if constexpr (!is_fake_shared) {
673
1.34M
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
1.34M
            info.shared_state_map.end()) {
675
296k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
280k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
677
280k
            }
678
296k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
679
296k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
680
296k
                                                  ? 0
681
296k
                                                  : info.task_idx]
682
296k
                                  .get();
683
296k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
684
1.04M
        } else {
685
1.04M
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
137
                DCHECK(false);
687
137
            }
688
1.04M
            _shared_state = info.shared_state->template cast<SharedState>();
689
1.04M
            _dependency = _shared_state->create_sink_dependency(
690
1.04M
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
1.04M
        }
692
1.34M
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
1.34M
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
1.34M
    }
695
696
2.02M
    if (must_set_shared_state() && _shared_state == nullptr) {
697
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
698
0
    }
699
700
2.02M
    _rows_input_counter =
701
2.02M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
2.02M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
2.02M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
2.02M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
2.02M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
2.02M
    _memory_used_counter =
707
2.02M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
2.02M
    _common_profile->add_info_string("IsColocate",
709
2.02M
                                     std::to_string(_parent->is_colocated_operator()));
710
2.02M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
2.02M
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
2.02M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
2.02M
    return Status::OK();
714
2.02M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
654
120k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
120k
    _operator_profile =
657
120k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
120k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
120k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
660
661
    // indentation is true
662
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
663
    // So we should set the indentation to true.
664
120k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
120k
    _operator_profile->add_child(_common_profile, true);
666
120k
    _operator_profile->add_child(_custom_profile, true);
667
668
120k
    _operator_profile->set_metadata(_parent->node_id());
669
120k
    _wait_for_finish_dependency_timer =
670
120k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
120k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
120k
    if constexpr (!is_fake_shared) {
673
120k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
120k
            info.shared_state_map.end()) {
675
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
677
            }
678
15.6k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
679
15.6k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
680
15.6k
                                                  ? 0
681
15.6k
                                                  : info.task_idx]
682
15.6k
                                  .get();
683
15.6k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
684
104k
        } else {
685
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
                DCHECK(false);
687
            }
688
104k
            _shared_state = info.shared_state->template cast<SharedState>();
689
104k
            _dependency = _shared_state->create_sink_dependency(
690
104k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
104k
        }
692
120k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
120k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
120k
    }
695
696
120k
    if (must_set_shared_state() && _shared_state == nullptr) {
697
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
698
0
    }
699
700
120k
    _rows_input_counter =
701
120k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
120k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
120k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
120k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
120k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
120k
    _memory_used_counter =
707
120k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
120k
    _common_profile->add_info_string("IsColocate",
709
120k
                                     std::to_string(_parent->is_colocated_operator()));
710
120k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
120k
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
120k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
120k
    return Status::OK();
714
120k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
654
2
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
2
    _operator_profile =
657
2
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
2
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
2
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
660
661
    // indentation is true
662
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
663
    // So we should set the indentation to true.
664
2
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
2
    _operator_profile->add_child(_common_profile, true);
666
2
    _operator_profile->add_child(_custom_profile, true);
667
668
2
    _operator_profile->set_metadata(_parent->node_id());
669
2
    _wait_for_finish_dependency_timer =
670
2
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
2
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
2
    if constexpr (!is_fake_shared) {
673
2
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
2
            info.shared_state_map.end()) {
675
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
677
            }
678
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
679
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
680
0
                                                  ? 0
681
0
                                                  : info.task_idx]
682
0
                                  .get();
683
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
684
2
        } else {
685
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
                DCHECK(false);
687
            }
688
2
            _shared_state = info.shared_state->template cast<SharedState>();
689
2
            _dependency = _shared_state->create_sink_dependency(
690
2
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
2
        }
692
2
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
2
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
2
    }
695
696
2
    if (must_set_shared_state() && _shared_state == nullptr) {
697
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
698
0
    }
699
700
2
    _rows_input_counter =
701
2
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
2
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
2
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
2
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
2
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
2
    _memory_used_counter =
707
2
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
2
    _common_profile->add_info_string("IsColocate",
709
2
                                     std::to_string(_parent->is_colocated_operator()));
710
2
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
2
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
2
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
2
    return Status::OK();
714
2
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
654
254k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
254k
    _operator_profile =
657
254k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
254k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
254k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
660
661
    // indentation is true
662
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
663
    // So we should set the indentation to true.
664
254k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
254k
    _operator_profile->add_child(_common_profile, true);
666
254k
    _operator_profile->add_child(_custom_profile, true);
667
668
254k
    _operator_profile->set_metadata(_parent->node_id());
669
254k
    _wait_for_finish_dependency_timer =
670
254k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
254k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
254k
    if constexpr (!is_fake_shared) {
673
254k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
254k
            info.shared_state_map.end()) {
675
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
677
            }
678
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
679
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
680
0
                                                  ? 0
681
0
                                                  : info.task_idx]
682
0
                                  .get();
683
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
684
254k
        } else {
685
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
                DCHECK(false);
687
            }
688
254k
            _shared_state = info.shared_state->template cast<SharedState>();
689
254k
            _dependency = _shared_state->create_sink_dependency(
690
254k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
254k
        }
692
254k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
254k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
254k
    }
695
696
254k
    if (must_set_shared_state() && _shared_state == nullptr) {
697
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
698
0
    }
699
700
254k
    _rows_input_counter =
701
254k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
254k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
254k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
254k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
254k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
254k
    _memory_used_counter =
707
254k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
254k
    _common_profile->add_info_string("IsColocate",
709
254k
                                     std::to_string(_parent->is_colocated_operator()));
710
254k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
254k
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
254k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
254k
    return Status::OK();
714
254k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
654
44
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
44
    _operator_profile =
657
44
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
44
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
44
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
660
661
    // indentation is true
662
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
663
    // So we should set the indentation to true.
664
44
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
44
    _operator_profile->add_child(_common_profile, true);
666
44
    _operator_profile->add_child(_custom_profile, true);
667
668
44
    _operator_profile->set_metadata(_parent->node_id());
669
44
    _wait_for_finish_dependency_timer =
670
44
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
44
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
44
    if constexpr (!is_fake_shared) {
673
44
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
44
            info.shared_state_map.end()) {
675
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
677
            }
678
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
679
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
680
0
                                                  ? 0
681
0
                                                  : info.task_idx]
682
0
                                  .get();
683
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
684
44
        } else {
685
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
                DCHECK(false);
687
            }
688
44
            _shared_state = info.shared_state->template cast<SharedState>();
689
44
            _dependency = _shared_state->create_sink_dependency(
690
44
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
44
        }
692
44
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
44
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
44
    }
695
696
44
    if (must_set_shared_state() && _shared_state == nullptr) {
697
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
698
0
    }
699
700
44
    _rows_input_counter =
701
44
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
44
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
44
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
44
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
44
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
44
    _memory_used_counter =
707
44
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
44
    _common_profile->add_info_string("IsColocate",
709
44
                                     std::to_string(_parent->is_colocated_operator()));
710
44
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
44
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
44
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
44
    return Status::OK();
714
44
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
654
11.2k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
11.2k
    _operator_profile =
657
11.2k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
11.2k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
11.2k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
660
661
    // indentation is true
662
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
663
    // So we should set the indentation to true.
664
11.2k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
11.2k
    _operator_profile->add_child(_common_profile, true);
666
11.2k
    _operator_profile->add_child(_custom_profile, true);
667
668
11.2k
    _operator_profile->set_metadata(_parent->node_id());
669
11.2k
    _wait_for_finish_dependency_timer =
670
11.2k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
11.2k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
11.2k
    if constexpr (!is_fake_shared) {
673
11.2k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
11.2k
            info.shared_state_map.end()) {
675
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
677
            }
678
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
679
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
680
0
                                                  ? 0
681
0
                                                  : info.task_idx]
682
0
                                  .get();
683
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
684
11.2k
        } else {
685
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
                DCHECK(false);
687
            }
688
11.2k
            _shared_state = info.shared_state->template cast<SharedState>();
689
11.2k
            _dependency = _shared_state->create_sink_dependency(
690
11.2k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
11.2k
        }
692
11.2k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
11.2k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
11.2k
    }
695
696
11.2k
    if (must_set_shared_state() && _shared_state == nullptr) {
697
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
698
0
    }
699
700
11.2k
    _rows_input_counter =
701
11.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
11.2k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
11.2k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
11.2k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
11.2k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
11.2k
    _memory_used_counter =
707
11.2k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
11.2k
    _common_profile->add_info_string("IsColocate",
709
11.2k
                                     std::to_string(_parent->is_colocated_operator()));
710
11.2k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
11.2k
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
11.2k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
11.2k
    return Status::OK();
714
11.2k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
654
6.96k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
6.96k
    _operator_profile =
657
6.96k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
6.96k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
6.96k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
660
661
    // indentation is true
662
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
663
    // So we should set the indentation to true.
664
6.96k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
6.96k
    _operator_profile->add_child(_common_profile, true);
666
6.96k
    _operator_profile->add_child(_custom_profile, true);
667
668
6.96k
    _operator_profile->set_metadata(_parent->node_id());
669
6.96k
    _wait_for_finish_dependency_timer =
670
6.96k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
6.96k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
6.96k
    if constexpr (!is_fake_shared) {
673
6.96k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
6.96k
            info.shared_state_map.end()) {
675
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
677
            }
678
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
679
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
680
0
                                                  ? 0
681
0
                                                  : info.task_idx]
682
0
                                  .get();
683
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
684
6.96k
        } else {
685
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
                DCHECK(false);
687
            }
688
6.96k
            _shared_state = info.shared_state->template cast<SharedState>();
689
6.96k
            _dependency = _shared_state->create_sink_dependency(
690
6.96k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
6.96k
        }
692
6.96k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
6.96k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
6.96k
    }
695
696
6.96k
    if (must_set_shared_state() && _shared_state == nullptr) {
697
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
698
0
    }
699
700
6.96k
    _rows_input_counter =
701
6.96k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
6.96k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
6.96k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
6.96k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
6.96k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
6.96k
    _memory_used_counter =
707
6.96k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
6.96k
    _common_profile->add_info_string("IsColocate",
709
6.96k
                                     std::to_string(_parent->is_colocated_operator()));
710
6.96k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
6.96k
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
6.96k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
6.96k
    return Status::OK();
714
6.96k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
654
156k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
156k
    _operator_profile =
657
156k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
156k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
156k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
660
661
    // indentation is true
662
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
663
    // So we should set the indentation to true.
664
156k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
156k
    _operator_profile->add_child(_common_profile, true);
666
156k
    _operator_profile->add_child(_custom_profile, true);
667
668
156k
    _operator_profile->set_metadata(_parent->node_id());
669
156k
    _wait_for_finish_dependency_timer =
670
156k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
156k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
156k
    if constexpr (!is_fake_shared) {
673
156k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
156k
            info.shared_state_map.end()) {
675
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
677
            }
678
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
679
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
680
0
                                                  ? 0
681
0
                                                  : info.task_idx]
682
0
                                  .get();
683
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
684
156k
        } else {
685
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
                DCHECK(false);
687
            }
688
156k
            _shared_state = info.shared_state->template cast<SharedState>();
689
156k
            _dependency = _shared_state->create_sink_dependency(
690
156k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
156k
        }
692
156k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
156k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
156k
    }
695
696
156k
    if (must_set_shared_state() && _shared_state == nullptr) {
697
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
698
0
    }
699
700
156k
    _rows_input_counter =
701
156k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
156k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
156k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
156k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
156k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
156k
    _memory_used_counter =
707
156k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
156k
    _common_profile->add_info_string("IsColocate",
709
156k
                                     std::to_string(_parent->is_colocated_operator()));
710
156k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
156k
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
156k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
156k
    return Status::OK();
714
156k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
654
254
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
254
    _operator_profile =
657
254
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
254
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
254
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
660
661
    // indentation is true
662
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
663
    // So we should set the indentation to true.
664
254
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
254
    _operator_profile->add_child(_common_profile, true);
666
254
    _operator_profile->add_child(_custom_profile, true);
667
668
254
    _operator_profile->set_metadata(_parent->node_id());
669
254
    _wait_for_finish_dependency_timer =
670
254
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
254
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
254
    if constexpr (!is_fake_shared) {
673
254
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
255
            info.shared_state_map.end()) {
675
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
677
            }
678
255
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
679
255
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
680
255
                                                  ? 0
681
255
                                                  : info.task_idx]
682
255
                                  .get();
683
255
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
684
18.4E
        } else {
685
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
                DCHECK(false);
687
            }
688
18.4E
            _shared_state = info.shared_state->template cast<SharedState>();
689
18.4E
            _dependency = _shared_state->create_sink_dependency(
690
18.4E
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
18.4E
        }
692
254
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
254
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
254
    }
695
696
255
    if (must_set_shared_state() && _shared_state == nullptr) {
697
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
698
0
    }
699
700
254
    _rows_input_counter =
701
254
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
254
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
254
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
254
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
254
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
254
    _memory_used_counter =
707
254
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
254
    _common_profile->add_info_string("IsColocate",
709
254
                                     std::to_string(_parent->is_colocated_operator()));
710
254
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
254
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
254
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
254
    return Status::OK();
714
254
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
654
202
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
202
    _operator_profile =
657
202
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
202
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
202
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
660
661
    // indentation is true
662
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
663
    // So we should set the indentation to true.
664
202
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
202
    _operator_profile->add_child(_common_profile, true);
666
202
    _operator_profile->add_child(_custom_profile, true);
667
668
202
    _operator_profile->set_metadata(_parent->node_id());
669
202
    _wait_for_finish_dependency_timer =
670
202
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
202
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
202
    if constexpr (!is_fake_shared) {
673
202
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
202
            info.shared_state_map.end()) {
675
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
677
            }
678
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
679
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
680
0
                                                  ? 0
681
0
                                                  : info.task_idx]
682
0
                                  .get();
683
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
684
202
        } else {
685
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
                DCHECK(false);
687
            }
688
202
            _shared_state = info.shared_state->template cast<SharedState>();
689
202
            _dependency = _shared_state->create_sink_dependency(
690
202
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
202
        }
692
202
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
202
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
202
    }
695
696
202
    if (must_set_shared_state() && _shared_state == nullptr) {
697
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
698
0
    }
699
700
202
    _rows_input_counter =
701
202
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
202
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
202
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
202
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
202
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
202
    _memory_used_counter =
707
202
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
202
    _common_profile->add_info_string("IsColocate",
709
202
                                     std::to_string(_parent->is_colocated_operator()));
710
202
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
202
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
202
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
202
    return Status::OK();
714
202
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
654
676k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
676k
    _operator_profile =
657
676k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
676k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
676k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
660
661
    // indentation is true
662
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
663
    // So we should set the indentation to true.
664
676k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
676k
    _operator_profile->add_child(_common_profile, true);
666
676k
    _operator_profile->add_child(_custom_profile, true);
667
668
676k
    _operator_profile->set_metadata(_parent->node_id());
669
676k
    _wait_for_finish_dependency_timer =
670
676k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
676k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
    if constexpr (!is_fake_shared) {
673
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
            info.shared_state_map.end()) {
675
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
677
            }
678
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
679
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
680
                                                  ? 0
681
                                                  : info.task_idx]
682
                                  .get();
683
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
684
        } else {
685
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
                DCHECK(false);
687
            }
688
            _shared_state = info.shared_state->template cast<SharedState>();
689
            _dependency = _shared_state->create_sink_dependency(
690
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
        }
692
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
    }
695
696
676k
    if (must_set_shared_state() && _shared_state == nullptr) {
697
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
698
0
    }
699
700
676k
    _rows_input_counter =
701
676k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
676k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
676k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
676k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
676k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
676k
    _memory_used_counter =
707
676k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
676k
    _common_profile->add_info_string("IsColocate",
709
676k
                                     std::to_string(_parent->is_colocated_operator()));
710
676k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
676k
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
676k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
676k
    return Status::OK();
714
676k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
654
6.41k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
6.41k
    _operator_profile =
657
6.41k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
6.41k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
6.41k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
660
661
    // indentation is true
662
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
663
    // So we should set the indentation to true.
664
6.41k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
6.41k
    _operator_profile->add_child(_common_profile, true);
666
6.41k
    _operator_profile->add_child(_custom_profile, true);
667
668
6.41k
    _operator_profile->set_metadata(_parent->node_id());
669
6.41k
    _wait_for_finish_dependency_timer =
670
6.41k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
6.41k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
6.41k
    if constexpr (!is_fake_shared) {
673
6.41k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
6.41k
            info.shared_state_map.end()) {
675
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
677
            }
678
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
679
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
680
0
                                                  ? 0
681
0
                                                  : info.task_idx]
682
0
                                  .get();
683
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
684
6.41k
        } else {
685
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
                DCHECK(false);
687
            }
688
6.41k
            _shared_state = info.shared_state->template cast<SharedState>();
689
6.41k
            _dependency = _shared_state->create_sink_dependency(
690
6.41k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
6.41k
        }
692
6.41k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
6.41k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
6.41k
    }
695
696
6.41k
    if (must_set_shared_state() && _shared_state == nullptr) {
697
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
698
0
    }
699
700
6.41k
    _rows_input_counter =
701
6.41k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
6.41k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
6.41k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
6.41k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
6.41k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
6.41k
    _memory_used_counter =
707
6.41k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
6.41k
    _common_profile->add_info_string("IsColocate",
709
6.41k
                                     std::to_string(_parent->is_colocated_operator()));
710
6.41k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
6.41k
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
6.41k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
6.41k
    return Status::OK();
714
6.41k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
654
386
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
386
    _operator_profile =
657
386
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
386
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
386
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
660
661
    // indentation is true
662
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
663
    // So we should set the indentation to true.
664
386
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
386
    _operator_profile->add_child(_common_profile, true);
666
386
    _operator_profile->add_child(_custom_profile, true);
667
668
386
    _operator_profile->set_metadata(_parent->node_id());
669
386
    _wait_for_finish_dependency_timer =
670
386
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
386
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
386
    if constexpr (!is_fake_shared) {
673
386
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
386
            info.shared_state_map.end()) {
675
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
677
            }
678
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
679
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
680
0
                                                  ? 0
681
0
                                                  : info.task_idx]
682
0
                                  .get();
683
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
684
386
        } else {
685
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
                DCHECK(false);
687
            }
688
386
            _shared_state = info.shared_state->template cast<SharedState>();
689
386
            _dependency = _shared_state->create_sink_dependency(
690
386
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
386
        }
692
386
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
386
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
386
    }
695
696
386
    if (must_set_shared_state() && _shared_state == nullptr) {
697
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
698
0
    }
699
700
386
    _rows_input_counter =
701
386
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
386
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
386
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
386
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
386
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
386
    _memory_used_counter =
707
386
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
386
    _common_profile->add_info_string("IsColocate",
709
386
                                     std::to_string(_parent->is_colocated_operator()));
710
386
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
386
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
386
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
386
    return Status::OK();
714
386
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
654
4.09k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
4.09k
    _operator_profile =
657
4.09k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
4.09k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
4.09k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
660
661
    // indentation is true
662
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
663
    // So we should set the indentation to true.
664
4.09k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
4.09k
    _operator_profile->add_child(_common_profile, true);
666
4.09k
    _operator_profile->add_child(_custom_profile, true);
667
668
4.09k
    _operator_profile->set_metadata(_parent->node_id());
669
4.09k
    _wait_for_finish_dependency_timer =
670
4.09k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
4.09k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
4.09k
    if constexpr (!is_fake_shared) {
673
4.09k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
4.09k
            info.shared_state_map.end()) {
675
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
677
            }
678
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
679
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
680
0
                                                  ? 0
681
0
                                                  : info.task_idx]
682
0
                                  .get();
683
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
684
4.09k
        } else {
685
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
                DCHECK(false);
687
            }
688
4.09k
            _shared_state = info.shared_state->template cast<SharedState>();
689
4.09k
            _dependency = _shared_state->create_sink_dependency(
690
4.09k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
4.09k
        }
692
4.09k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
4.09k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
4.09k
    }
695
696
4.09k
    if (must_set_shared_state() && _shared_state == nullptr) {
697
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
698
0
    }
699
700
4.09k
    _rows_input_counter =
701
4.09k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
4.09k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
4.09k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
4.09k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
4.09k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
4.09k
    _memory_used_counter =
707
4.09k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
4.09k
    _common_profile->add_info_string("IsColocate",
709
4.09k
                                     std::to_string(_parent->is_colocated_operator()));
710
4.09k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
4.09k
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
4.09k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
4.09k
    return Status::OK();
714
4.09k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
654
12.2k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
12.2k
    _operator_profile =
657
12.2k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
12.2k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
12.2k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
660
661
    // indentation is true
662
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
663
    // So we should set the indentation to true.
664
12.2k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
12.2k
    _operator_profile->add_child(_common_profile, true);
666
12.2k
    _operator_profile->add_child(_custom_profile, true);
667
668
12.2k
    _operator_profile->set_metadata(_parent->node_id());
669
12.2k
    _wait_for_finish_dependency_timer =
670
12.2k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
12.2k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
12.2k
    if constexpr (!is_fake_shared) {
673
12.2k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
12.2k
            info.shared_state_map.end()) {
675
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
677
            }
678
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
679
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
680
0
                                                  ? 0
681
0
                                                  : info.task_idx]
682
0
                                  .get();
683
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
684
12.2k
        } else {
685
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
                DCHECK(false);
687
            }
688
12.2k
            _shared_state = info.shared_state->template cast<SharedState>();
689
12.2k
            _dependency = _shared_state->create_sink_dependency(
690
12.2k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
12.2k
        }
692
12.2k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
12.2k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
12.2k
    }
695
696
12.2k
    if (must_set_shared_state() && _shared_state == nullptr) {
697
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
698
0
    }
699
700
12.2k
    _rows_input_counter =
701
12.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
12.2k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
12.2k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
12.2k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
12.2k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
12.2k
    _memory_used_counter =
707
12.2k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
12.2k
    _common_profile->add_info_string("IsColocate",
709
12.2k
                                     std::to_string(_parent->is_colocated_operator()));
710
12.2k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
12.2k
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
12.2k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
12.2k
    return Status::OK();
714
12.2k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
654
280k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
280k
    _operator_profile =
657
280k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
280k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
280k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
660
661
    // indentation is true
662
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
663
    // So we should set the indentation to true.
664
280k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
280k
    _operator_profile->add_child(_common_profile, true);
666
280k
    _operator_profile->add_child(_custom_profile, true);
667
668
280k
    _operator_profile->set_metadata(_parent->node_id());
669
280k
    _wait_for_finish_dependency_timer =
670
280k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
280k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
280k
    if constexpr (!is_fake_shared) {
673
280k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
280k
            info.shared_state_map.end()) {
675
280k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
280k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
677
280k
            }
678
280k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
679
280k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
680
280k
                                                  ? 0
681
280k
                                                  : info.task_idx]
682
280k
                                  .get();
683
280k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
684
280k
        } else {
685
137
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
137
                DCHECK(false);
687
137
            }
688
137
            _shared_state = info.shared_state->template cast<SharedState>();
689
137
            _dependency = _shared_state->create_sink_dependency(
690
137
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
137
        }
692
280k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
280k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
280k
    }
695
696
280k
    if (must_set_shared_state() && _shared_state == nullptr) {
697
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
698
0
    }
699
700
280k
    _rows_input_counter =
701
280k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
280k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
280k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
280k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
280k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
280k
    _memory_used_counter =
707
280k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
280k
    _common_profile->add_info_string("IsColocate",
709
280k
                                     std::to_string(_parent->is_colocated_operator()));
710
280k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
280k
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
280k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
280k
    return Status::OK();
714
280k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
654
491k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
491k
    _operator_profile =
657
491k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
491k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
491k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
660
661
    // indentation is true
662
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
663
    // So we should set the indentation to true.
664
491k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
491k
    _operator_profile->add_child(_common_profile, true);
666
491k
    _operator_profile->add_child(_custom_profile, true);
667
668
491k
    _operator_profile->set_metadata(_parent->node_id());
669
491k
    _wait_for_finish_dependency_timer =
670
491k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
491k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
491k
    if constexpr (!is_fake_shared) {
673
491k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
491k
            info.shared_state_map.end()) {
675
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
677
            }
678
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
679
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
680
0
                                                  ? 0
681
0
                                                  : info.task_idx]
682
0
                                  .get();
683
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
684
491k
        } else {
685
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
                DCHECK(false);
687
            }
688
491k
            _shared_state = info.shared_state->template cast<SharedState>();
689
491k
            _dependency = _shared_state->create_sink_dependency(
690
491k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
491k
        }
692
491k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
491k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
491k
    }
695
696
491k
    if (must_set_shared_state() && _shared_state == nullptr) {
697
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
698
0
    }
699
700
491k
    _rows_input_counter =
701
491k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
491k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
491k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
491k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
491k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
491k
    _memory_used_counter =
707
491k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
491k
    _common_profile->add_info_string("IsColocate",
709
491k
                                     std::to_string(_parent->is_colocated_operator()));
710
491k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
491k
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
491k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
491k
    return Status::OK();
714
491k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
654
17
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
17
    _operator_profile =
657
17
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
17
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
17
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
660
661
    // indentation is true
662
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
663
    // So we should set the indentation to true.
664
17
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
17
    _operator_profile->add_child(_common_profile, true);
666
17
    _operator_profile->add_child(_custom_profile, true);
667
668
17
    _operator_profile->set_metadata(_parent->node_id());
669
17
    _wait_for_finish_dependency_timer =
670
17
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
17
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
17
    if constexpr (!is_fake_shared) {
673
17
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
17
            info.shared_state_map.end()) {
675
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
677
            }
678
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
679
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
680
0
                                                  ? 0
681
0
                                                  : info.task_idx]
682
0
                                  .get();
683
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
684
17
        } else {
685
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
                DCHECK(false);
687
            }
688
17
            _shared_state = info.shared_state->template cast<SharedState>();
689
17
            _dependency = _shared_state->create_sink_dependency(
690
17
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
17
        }
692
17
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
17
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
17
    }
695
696
17
    if (must_set_shared_state() && _shared_state == nullptr) {
697
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
698
0
    }
699
700
17
    _rows_input_counter =
701
17
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
17
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
17
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
17
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
17
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
17
    _memory_used_counter =
707
17
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
17
    _common_profile->add_info_string("IsColocate",
709
17
                                     std::to_string(_parent->is_colocated_operator()));
710
17
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
17
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
17
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
17
    return Status::OK();
714
17
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
654
328
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
328
    _operator_profile =
657
328
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
328
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
328
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
660
661
    // indentation is true
662
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
663
    // So we should set the indentation to true.
664
328
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
328
    _operator_profile->add_child(_common_profile, true);
666
328
    _operator_profile->add_child(_custom_profile, true);
667
668
328
    _operator_profile->set_metadata(_parent->node_id());
669
328
    _wait_for_finish_dependency_timer =
670
328
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
328
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
328
    if constexpr (!is_fake_shared) {
673
328
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
328
            info.shared_state_map.end()) {
675
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
677
            }
678
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
679
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
680
0
                                                  ? 0
681
0
                                                  : info.task_idx]
682
0
                                  .get();
683
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
684
328
        } else {
685
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
                DCHECK(false);
687
            }
688
328
            _shared_state = info.shared_state->template cast<SharedState>();
689
328
            _dependency = _shared_state->create_sink_dependency(
690
328
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
328
        }
692
328
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
328
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
328
    }
695
696
328
    if (must_set_shared_state() && _shared_state == nullptr) {
697
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
698
0
    }
699
700
328
    _rows_input_counter =
701
328
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
328
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
328
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
328
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
328
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
328
    _memory_used_counter =
707
328
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
328
    _common_profile->add_info_string("IsColocate",
709
328
                                     std::to_string(_parent->is_colocated_operator()));
710
328
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
328
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
328
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
328
    return Status::OK();
714
328
}
715
716
template <typename SharedState>
717
2.02M
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
718
2.02M
    if (_closed) {
719
2
        return Status::OK();
720
2
    }
721
2.02M
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
722
1.34M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
723
1.34M
    }
724
2.02M
    _closed = true;
725
2.02M
    return Status::OK();
726
2.02M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
717
119k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
718
119k
    if (_closed) {
719
0
        return Status::OK();
720
0
    }
721
119k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
722
119k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
723
119k
    }
724
119k
    _closed = true;
725
119k
    return Status::OK();
726
119k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
717
1
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
718
1
    if (_closed) {
719
0
        return Status::OK();
720
0
    }
721
1
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
722
1
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
723
1
    }
724
1
    _closed = true;
725
1
    return Status::OK();
726
1
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
717
254k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
718
254k
    if (_closed) {
719
0
        return Status::OK();
720
0
    }
721
254k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
722
254k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
723
254k
    }
724
254k
    _closed = true;
725
254k
    return Status::OK();
726
254k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
717
35
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
718
35
    if (_closed) {
719
2
        return Status::OK();
720
2
    }
721
33
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
722
33
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
723
33
    }
724
33
    _closed = true;
725
33
    return Status::OK();
726
35
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
717
11.2k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
718
11.2k
    if (_closed) {
719
0
        return Status::OK();
720
0
    }
721
11.2k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
722
11.2k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
723
11.2k
    }
724
11.2k
    _closed = true;
725
11.2k
    return Status::OK();
726
11.2k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
717
6.98k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
718
6.98k
    if (_closed) {
719
0
        return Status::OK();
720
0
    }
721
6.98k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
722
6.98k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
723
6.98k
    }
724
6.98k
    _closed = true;
725
6.98k
    return Status::OK();
726
6.98k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
717
155k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
718
155k
    if (_closed) {
719
0
        return Status::OK();
720
0
    }
721
155k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
722
155k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
723
155k
    }
724
155k
    _closed = true;
725
155k
    return Status::OK();
726
155k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
717
255
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
718
255
    if (_closed) {
719
0
        return Status::OK();
720
0
    }
721
255
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
722
255
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
723
255
    }
724
255
    _closed = true;
725
255
    return Status::OK();
726
255
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
717
191
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
718
191
    if (_closed) {
719
0
        return Status::OK();
720
0
    }
721
191
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
722
191
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
723
191
    }
724
191
    _closed = true;
725
191
    return Status::OK();
726
191
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
717
676k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
718
676k
    if (_closed) {
719
0
        return Status::OK();
720
0
    }
721
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
722
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
723
    }
724
676k
    _closed = true;
725
676k
    return Status::OK();
726
676k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
717
6.42k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
718
6.42k
    if (_closed) {
719
0
        return Status::OK();
720
0
    }
721
6.42k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
722
6.42k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
723
6.42k
    }
724
6.42k
    _closed = true;
725
6.42k
    return Status::OK();
726
6.42k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
717
282
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
718
282
    if (_closed) {
719
0
        return Status::OK();
720
0
    }
721
282
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
722
282
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
723
282
    }
724
282
    _closed = true;
725
282
    return Status::OK();
726
282
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
717
4.09k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
718
4.09k
    if (_closed) {
719
0
        return Status::OK();
720
0
    }
721
4.09k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
722
4.09k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
723
4.09k
    }
724
4.09k
    _closed = true;
725
4.09k
    return Status::OK();
726
4.09k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
717
12.4k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
718
12.4k
    if (_closed) {
719
0
        return Status::OK();
720
0
    }
721
12.4k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
722
12.4k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
723
12.4k
    }
724
12.4k
    _closed = true;
725
12.4k
    return Status::OK();
726
12.4k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
717
281k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
718
281k
    if (_closed) {
719
0
        return Status::OK();
720
0
    }
721
281k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
722
281k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
723
281k
    }
724
281k
    _closed = true;
725
281k
    return Status::OK();
726
281k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
717
492k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
718
492k
    if (_closed) {
719
0
        return Status::OK();
720
0
    }
721
492k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
722
492k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
723
492k
    }
724
492k
    _closed = true;
725
492k
    return Status::OK();
726
492k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
717
14
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
718
14
    if (_closed) {
719
0
        return Status::OK();
720
0
    }
721
14
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
722
14
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
723
14
    }
724
14
    _closed = true;
725
14
    return Status::OK();
726
14
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
717
328
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
718
328
    if (_closed) {
719
0
        return Status::OK();
720
0
    }
721
328
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
722
328
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
723
328
    }
724
328
    _closed = true;
725
328
    return Status::OK();
726
328
}
727
728
template <typename LocalStateType>
729
Status StreamingOperatorX<LocalStateType>::get_block_impl(RuntimeState* state, Block* block,
730
15.5k
                                                          bool* eos) {
731
15.5k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
732
15.5k
    return pull(state, block, eos);
733
15.5k
}
_ZN5doris18StreamingOperatorXINS_23AssertNumRowsLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
730
432
                                                          bool* eos) {
731
432
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
732
432
    return pull(state, block, eos);
733
432
}
_ZN5doris18StreamingOperatorXINS_16SelectLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
730
15.1k
                                                          bool* eos) {
731
15.1k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
732
15.1k
    return pull(state, block, eos);
733
15.1k
}
734
735
template <typename LocalStateType>
736
Status StatefulOperatorX<LocalStateType>::get_block_impl(RuntimeState* state, Block* block,
737
683k
                                                         bool* eos) {
738
683k
    auto& local_state = get_local_state(state);
739
683k
    if (need_more_input_data(state)) {
740
653k
        local_state._child_block->clear_column_data(
741
653k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
742
653k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
743
653k
                state, local_state._child_block.get(), &local_state._child_eos));
744
653k
        *eos = local_state._child_eos;
745
653k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
746
71.3k
            return Status::OK();
747
71.3k
        }
748
581k
        {
749
581k
            SCOPED_TIMER(local_state.exec_time_counter());
750
581k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
751
581k
        }
752
581k
    }
753
754
612k
    if (!need_more_input_data(state)) {
755
556k
        SCOPED_TIMER(local_state.exec_time_counter());
756
556k
        bool new_eos = false;
757
556k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
758
556k
        if (new_eos) {
759
473k
            *eos = true;
760
473k
        } else if (!need_more_input_data(state)) {
761
24.4k
            *eos = false;
762
24.4k
        }
763
556k
    }
764
612k
    return Status::OK();
765
612k
}
_ZN5doris17StatefulOperatorXINS_23HashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
151k
                                                         bool* eos) {
738
151k
    auto& local_state = get_local_state(state);
739
151k
    if (need_more_input_data(state)) {
740
134k
        local_state._child_block->clear_column_data(
741
134k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
742
134k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
743
134k
                state, local_state._child_block.get(), &local_state._child_eos));
744
134k
        *eos = local_state._child_eos;
745
134k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
746
45.4k
            return Status::OK();
747
45.4k
        }
748
89.3k
        {
749
89.3k
            SCOPED_TIMER(local_state.exec_time_counter());
750
89.3k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
751
89.3k
        }
752
89.3k
    }
753
754
106k
    if (!need_more_input_data(state)) {
755
106k
        SCOPED_TIMER(local_state.exec_time_counter());
756
106k
        bool new_eos = false;
757
106k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
758
106k
        if (new_eos) {
759
47.7k
            *eos = true;
760
58.2k
        } else if (!need_more_input_data(state)) {
761
9.79k
            *eos = false;
762
9.79k
        }
763
106k
    }
764
106k
    return Status::OK();
765
106k
}
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_34PartitionedHashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
_ZN5doris17StatefulOperatorXINS_16RepeatLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
3.87k
                                                         bool* eos) {
738
3.87k
    auto& local_state = get_local_state(state);
739
3.87k
    if (need_more_input_data(state)) {
740
2.10k
        local_state._child_block->clear_column_data(
741
2.10k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
742
2.10k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
743
2.10k
                state, local_state._child_block.get(), &local_state._child_eos));
744
2.10k
        *eos = local_state._child_eos;
745
2.10k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
746
488
            return Status::OK();
747
488
        }
748
1.62k
        {
749
1.62k
            SCOPED_TIMER(local_state.exec_time_counter());
750
1.62k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
751
1.62k
        }
752
1.62k
    }
753
754
3.39k
    if (!need_more_input_data(state)) {
755
3.39k
        SCOPED_TIMER(local_state.exec_time_counter());
756
3.39k
        bool new_eos = false;
757
3.39k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
758
3.39k
        if (new_eos) {
759
1.00k
            *eos = true;
760
2.39k
        } else if (!need_more_input_data(state)) {
761
1.77k
            *eos = false;
762
1.77k
        }
763
3.39k
    }
764
3.38k
    return Status::OK();
765
3.38k
}
_ZN5doris17StatefulOperatorXINS_25MaterializationLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
4.94k
                                                         bool* eos) {
738
4.94k
    auto& local_state = get_local_state(state);
739
4.94k
    if (need_more_input_data(state)) {
740
4.94k
        local_state._child_block->clear_column_data(
741
4.94k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
742
4.94k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
743
4.94k
                state, local_state._child_block.get(), &local_state._child_eos));
744
4.94k
        *eos = local_state._child_eos;
745
4.94k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
746
1.72k
            return Status::OK();
747
1.72k
        }
748
3.22k
        {
749
3.22k
            SCOPED_TIMER(local_state.exec_time_counter());
750
3.22k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
751
3.22k
        }
752
3.22k
    }
753
754
3.22k
    if (!need_more_input_data(state)) {
755
3.22k
        SCOPED_TIMER(local_state.exec_time_counter());
756
3.22k
        bool new_eos = false;
757
3.22k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
758
3.22k
        if (new_eos) {
759
1.73k
            *eos = true;
760
1.73k
        } else if (!need_more_input_data(state)) {
761
0
            *eos = false;
762
0
        }
763
3.22k
    }
764
3.22k
    return Status::OK();
765
3.22k
}
_ZN5doris17StatefulOperatorXINS_22StreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
40.8k
                                                         bool* eos) {
738
40.8k
    auto& local_state = get_local_state(state);
739
40.9k
    if (need_more_input_data(state)) {
740
40.9k
        local_state._child_block->clear_column_data(
741
40.9k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
742
40.9k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
743
40.9k
                state, local_state._child_block.get(), &local_state._child_eos));
744
40.9k
        *eos = local_state._child_eos;
745
40.9k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
746
6.92k
            return Status::OK();
747
6.92k
        }
748
33.9k
        {
749
33.9k
            SCOPED_TIMER(local_state.exec_time_counter());
750
33.9k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
751
33.9k
        }
752
33.9k
    }
753
754
33.9k
    if (!need_more_input_data(state)) {
755
12.4k
        SCOPED_TIMER(local_state.exec_time_counter());
756
12.4k
        bool new_eos = false;
757
12.4k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
758
12.4k
        if (new_eos) {
759
12.3k
            *eos = true;
760
12.3k
        } else if (!need_more_input_data(state)) {
761
11
            *eos = false;
762
11
        }
763
12.4k
    }
764
33.9k
    return Status::OK();
765
33.9k
}
_ZN5doris17StatefulOperatorXINS_30DistinctStreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
442k
                                                         bool* eos) {
738
442k
    auto& local_state = get_local_state(state);
739
443k
    if (need_more_input_data(state)) {
740
443k
        local_state._child_block->clear_column_data(
741
443k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
742
443k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
743
443k
                state, local_state._child_block.get(), &local_state._child_eos));
744
443k
        *eos = local_state._child_eos;
745
443k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
746
13.3k
            return Status::OK();
747
13.3k
        }
748
429k
        {
749
429k
            SCOPED_TIMER(local_state.exec_time_counter());
750
429k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
751
429k
        }
752
429k
    }
753
754
429k
    if (!need_more_input_data(state)) {
755
395k
        SCOPED_TIMER(local_state.exec_time_counter());
756
395k
        bool new_eos = false;
757
395k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
758
395k
        if (new_eos) {
759
394k
            *eos = true;
760
394k
        } else if (!need_more_input_data(state)) {
761
0
            *eos = false;
762
0
        }
763
395k
    }
764
429k
    return Status::OK();
765
429k
}
_ZN5doris17StatefulOperatorXINS_29NestedLoopJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
32.4k
                                                         bool* eos) {
738
32.4k
    auto& local_state = get_local_state(state);
739
32.4k
    if (need_more_input_data(state)) {
740
20.0k
        local_state._child_block->clear_column_data(
741
20.0k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
742
20.0k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
743
20.0k
                state, local_state._child_block.get(), &local_state._child_eos));
744
20.0k
        *eos = local_state._child_eos;
745
20.0k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
746
2.99k
            return Status::OK();
747
2.99k
        }
748
17.0k
        {
749
17.0k
            SCOPED_TIMER(local_state.exec_time_counter());
750
17.0k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
751
17.0k
        }
752
17.0k
    }
753
754
29.4k
    if (!need_more_input_data(state)) {
755
28.7k
        SCOPED_TIMER(local_state.exec_time_counter());
756
28.7k
        bool new_eos = false;
757
28.7k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
758
28.7k
        if (new_eos) {
759
11.1k
            *eos = true;
760
17.5k
        } else if (!need_more_input_data(state)) {
761
12.4k
            *eos = false;
762
12.4k
        }
763
28.7k
    }
764
29.4k
    return Status::OK();
765
29.4k
}
_ZN5doris17StatefulOperatorXINS_23TableFunctionLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
7.46k
                                                         bool* eos) {
738
7.46k
    auto& local_state = get_local_state(state);
739
7.46k
    if (need_more_input_data(state)) {
740
7.10k
        local_state._child_block->clear_column_data(
741
7.10k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
742
7.10k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
743
7.10k
                state, local_state._child_block.get(), &local_state._child_eos));
744
7.10k
        *eos = local_state._child_eos;
745
7.10k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
746
489
            return Status::OK();
747
489
        }
748
6.61k
        {
749
6.61k
            SCOPED_TIMER(local_state.exec_time_counter());
750
6.61k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
751
6.61k
        }
752
6.61k
    }
753
754
6.97k
    if (!need_more_input_data(state)) {
755
6.97k
        SCOPED_TIMER(local_state.exec_time_counter());
756
6.97k
        bool new_eos = false;
757
6.97k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
758
6.97k
        if (new_eos) {
759
4.96k
            *eos = true;
760
4.96k
        } else if (!need_more_input_data(state)) {
761
366
            *eos = false;
762
366
        }
763
6.97k
    }
764
6.96k
    return Status::OK();
765
6.96k
}
766
767
template <typename Writer, typename Parent>
768
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
769
67.5k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
770
67.5k
    RETURN_IF_ERROR(Base::init(state, info));
771
67.5k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
772
67.5k
                                                         "AsyncWriterDependency", true);
773
67.5k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
774
67.5k
                             _finish_dependency));
775
776
67.5k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
777
67.5k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
778
67.5k
    return Status::OK();
779
67.5k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
769
538
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
770
538
    RETURN_IF_ERROR(Base::init(state, info));
771
538
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
772
538
                                                         "AsyncWriterDependency", true);
773
538
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
774
538
                             _finish_dependency));
775
776
538
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
777
538
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
778
538
    return Status::OK();
779
538
}
_ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
769
88
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
770
88
    RETURN_IF_ERROR(Base::init(state, info));
771
88
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
772
88
                                                         "AsyncWriterDependency", true);
773
88
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
774
88
                             _finish_dependency));
775
776
88
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
777
88
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
778
88
    return Status::OK();
779
88
}
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
769
47.8k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
770
47.8k
    RETURN_IF_ERROR(Base::init(state, info));
771
47.8k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
772
47.8k
                                                         "AsyncWriterDependency", true);
773
47.8k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
774
47.8k
                             _finish_dependency));
775
776
47.8k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
777
47.8k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
778
47.8k
    return Status::OK();
779
47.8k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
769
9.48k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
770
9.48k
    RETURN_IF_ERROR(Base::init(state, info));
771
9.48k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
772
9.48k
                                                         "AsyncWriterDependency", true);
773
9.48k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
774
9.48k
                             _finish_dependency));
775
776
9.48k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
777
9.48k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
778
9.48k
    return Status::OK();
779
9.48k
}
_ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
769
5.17k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
770
5.17k
    RETURN_IF_ERROR(Base::init(state, info));
771
5.17k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
772
5.17k
                                                         "AsyncWriterDependency", true);
773
5.17k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
774
5.17k
                             _finish_dependency));
775
776
5.17k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
777
5.17k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
778
5.17k
    return Status::OK();
779
5.17k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
769
3.40k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
770
3.40k
    RETURN_IF_ERROR(Base::init(state, info));
771
3.40k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
772
3.40k
                                                         "AsyncWriterDependency", true);
773
3.40k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
774
3.40k
                             _finish_dependency));
775
776
3.40k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
777
3.40k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
778
3.40k
    return Status::OK();
779
3.40k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
769
32
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
770
32
    RETURN_IF_ERROR(Base::init(state, info));
771
32
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
772
32
                                                         "AsyncWriterDependency", true);
773
32
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
774
32
                             _finish_dependency));
775
776
32
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
777
32
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
778
32
    return Status::OK();
779
32
}
_ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
769
176
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
770
176
    RETURN_IF_ERROR(Base::init(state, info));
771
176
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
772
176
                                                         "AsyncWriterDependency", true);
773
176
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
774
176
                             _finish_dependency));
775
776
176
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
777
176
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
778
176
    return Status::OK();
779
176
}
_ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
769
640
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
770
640
    RETURN_IF_ERROR(Base::init(state, info));
771
640
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
772
640
                                                         "AsyncWriterDependency", true);
773
640
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
774
640
                             _finish_dependency));
775
776
640
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
777
640
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
778
640
    return Status::OK();
779
640
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
769
156
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
770
156
    RETURN_IF_ERROR(Base::init(state, info));
771
156
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
772
156
                                                         "AsyncWriterDependency", true);
773
156
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
774
156
                             _finish_dependency));
775
776
156
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
777
156
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
778
156
    return Status::OK();
779
156
}
780
781
template <typename Writer, typename Parent>
782
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
783
67.8k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
784
67.8k
    RETURN_IF_ERROR(Base::open(state));
785
67.8k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
786
588k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
787
520k
        RETURN_IF_ERROR(
788
520k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
789
520k
    }
790
67.8k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
791
67.8k
    return Status::OK();
792
67.8k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
783
541
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
784
541
    RETURN_IF_ERROR(Base::open(state));
785
541
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
786
2.85k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
787
2.30k
        RETURN_IF_ERROR(
788
2.30k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
789
2.30k
    }
790
541
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
791
541
    return Status::OK();
792
541
}
_ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
783
88
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
784
88
    RETURN_IF_ERROR(Base::open(state));
785
88
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
786
412
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
787
324
        RETURN_IF_ERROR(
788
324
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
789
324
    }
790
88
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
791
88
    return Status::OK();
792
88
}
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
783
48.2k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
784
48.2k
    RETURN_IF_ERROR(Base::open(state));
785
48.2k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
786
345k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
787
297k
        RETURN_IF_ERROR(
788
297k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
789
297k
    }
790
48.2k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
791
48.2k
    return Status::OK();
792
48.2k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
783
9.43k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
784
9.43k
    RETURN_IF_ERROR(Base::open(state));
785
9.43k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
786
58.6k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
787
49.2k
        RETURN_IF_ERROR(
788
49.2k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
789
49.2k
    }
790
9.43k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
791
9.43k
    return Status::OK();
792
9.43k
}
_ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
783
5.16k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
784
5.16k
    RETURN_IF_ERROR(Base::open(state));
785
5.16k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
786
131k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
787
126k
        RETURN_IF_ERROR(
788
126k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
789
126k
    }
790
5.16k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
791
5.16k
    return Status::OK();
792
5.16k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
783
3.40k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
784
3.40k
    RETURN_IF_ERROR(Base::open(state));
785
3.40k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
786
43.0k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
787
39.6k
        RETURN_IF_ERROR(
788
39.6k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
789
39.6k
    }
790
3.40k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
791
3.40k
    return Status::OK();
792
3.40k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
783
30
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
784
30
    RETURN_IF_ERROR(Base::open(state));
785
30
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
786
126
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
787
96
        RETURN_IF_ERROR(
788
96
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
789
96
    }
790
30
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
791
30
    return Status::OK();
792
30
}
_ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
783
176
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
784
176
    RETURN_IF_ERROR(Base::open(state));
785
176
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
786
526
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
787
350
        RETURN_IF_ERROR(
788
350
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
789
350
    }
790
176
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
791
176
    return Status::OK();
792
176
}
_ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
783
640
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
784
640
    RETURN_IF_ERROR(Base::open(state));
785
640
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
786
4.37k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
787
3.73k
        RETURN_IF_ERROR(
788
3.73k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
789
3.73k
    }
790
640
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
791
640
    return Status::OK();
792
640
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
783
156
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
784
156
    RETURN_IF_ERROR(Base::open(state));
785
156
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
786
786
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
787
630
        RETURN_IF_ERROR(
788
630
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
789
630
    }
790
156
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
791
156
    return Status::OK();
792
156
}
793
794
template <typename Writer, typename Parent>
795
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
796
92.1k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
797
92.1k
    return _writer->sink(block, eos);
798
92.1k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
796
2.41k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
797
2.41k
    return _writer->sink(block, eos);
798
2.41k
}
_ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
796
112
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
797
112
    return _writer->sink(block, eos);
798
112
}
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
796
64.3k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
797
64.3k
    return _writer->sink(block, eos);
798
64.3k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
796
10.9k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
797
10.9k
    return _writer->sink(block, eos);
798
10.9k
}
_ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
796
7.53k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
797
7.53k
    return _writer->sink(block, eos);
798
7.53k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
796
5.38k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
797
5.38k
    return _writer->sink(block, eos);
798
5.38k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
796
40
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
797
40
    return _writer->sink(block, eos);
798
40
}
_ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
796
198
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
797
198
    return _writer->sink(block, eos);
798
198
}
_ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
796
798
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
797
798
    return _writer->sink(block, eos);
798
798
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
796
310
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
797
310
    return _writer->sink(block, eos);
798
310
}
799
800
template <typename Writer, typename Parent>
801
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
802
67.9k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
803
67.9k
    if (_closed) {
804
0
        return Status::OK();
805
0
    }
806
67.9k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
807
67.9k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
808
    // if the init failed, the _writer may be nullptr. so here need check
809
68.0k
    if (_writer) {
810
68.0k
        Status st = _writer->get_writer_status();
811
68.0k
        if (exec_status.ok()) {
812
67.9k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
813
67.9k
                                                       : Status::Cancelled("force close"));
814
67.9k
        } else {
815
90
            _writer->force_close(exec_status);
816
90
        }
817
        // If there is an error in process_block thread, then we should get the writer
818
        // status before call force_close. For example, the thread may failed in commit
819
        // transaction.
820
68.0k
        RETURN_IF_ERROR(st);
821
68.0k
    }
822
67.8k
    return Base::close(state, exec_status);
823
67.9k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
802
529
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
803
529
    if (_closed) {
804
0
        return Status::OK();
805
0
    }
806
529
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
807
529
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
808
    // if the init failed, the _writer may be nullptr. so here need check
809
529
    if (_writer) {
810
529
        Status st = _writer->get_writer_status();
811
529
        if (exec_status.ok()) {
812
529
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
813
529
                                                       : Status::Cancelled("force close"));
814
529
        } else {
815
0
            _writer->force_close(exec_status);
816
0
        }
817
        // If there is an error in process_block thread, then we should get the writer
818
        // status before call force_close. For example, the thread may failed in commit
819
        // transaction.
820
529
        RETURN_IF_ERROR(st);
821
529
    }
822
529
    return Base::close(state, exec_status);
823
529
}
_ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
802
88
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
803
88
    if (_closed) {
804
0
        return Status::OK();
805
0
    }
806
88
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
807
88
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
808
    // if the init failed, the _writer may be nullptr. so here need check
809
88
    if (_writer) {
810
88
        Status st = _writer->get_writer_status();
811
88
        if (exec_status.ok()) {
812
88
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
813
88
                                                       : Status::Cancelled("force close"));
814
88
        } else {
815
0
            _writer->force_close(exec_status);
816
0
        }
817
        // If there is an error in process_block thread, then we should get the writer
818
        // status before call force_close. For example, the thread may failed in commit
819
        // transaction.
820
88
        RETURN_IF_ERROR(st);
821
88
    }
822
80
    return Base::close(state, exec_status);
823
88
}
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
802
48.2k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
803
48.2k
    if (_closed) {
804
0
        return Status::OK();
805
0
    }
806
48.2k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
807
48.2k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
808
    // if the init failed, the _writer may be nullptr. so here need check
809
48.3k
    if (_writer) {
810
48.3k
        Status st = _writer->get_writer_status();
811
48.3k
        if (exec_status.ok()) {
812
48.2k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
813
48.2k
                                                       : Status::Cancelled("force close"));
814
48.2k
        } else {
815
54
            _writer->force_close(exec_status);
816
54
        }
817
        // If there is an error in process_block thread, then we should get the writer
818
        // status before call force_close. For example, the thread may failed in commit
819
        // transaction.
820
48.3k
        RETURN_IF_ERROR(st);
821
48.3k
    }
822
48.2k
    return Base::close(state, exec_status);
823
48.2k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
802
9.45k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
803
9.45k
    if (_closed) {
804
0
        return Status::OK();
805
0
    }
806
9.45k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
807
9.45k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
808
    // if the init failed, the _writer may be nullptr. so here need check
809
9.47k
    if (_writer) {
810
9.47k
        Status st = _writer->get_writer_status();
811
9.47k
        if (exec_status.ok()) {
812
9.44k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
813
9.44k
                                                       : Status::Cancelled("force close"));
814
9.44k
        } else {
815
36
            _writer->force_close(exec_status);
816
36
        }
817
        // If there is an error in process_block thread, then we should get the writer
818
        // status before call force_close. For example, the thread may failed in commit
819
        // transaction.
820
9.47k
        RETURN_IF_ERROR(st);
821
9.47k
    }
822
9.45k
    return Base::close(state, exec_status);
823
9.45k
}
_ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
802
5.16k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
803
5.16k
    if (_closed) {
804
0
        return Status::OK();
805
0
    }
806
5.16k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
807
5.16k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
808
    // if the init failed, the _writer may be nullptr. so here need check
809
5.17k
    if (_writer) {
810
5.17k
        Status st = _writer->get_writer_status();
811
5.17k
        if (exec_status.ok()) {
812
5.17k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
813
5.17k
                                                       : Status::Cancelled("force close"));
814
5.17k
        } else {
815
0
            _writer->force_close(exec_status);
816
0
        }
817
        // If there is an error in process_block thread, then we should get the writer
818
        // status before call force_close. For example, the thread may failed in commit
819
        // transaction.
820
5.17k
        RETURN_IF_ERROR(st);
821
5.17k
    }
822
5.16k
    return Base::close(state, exec_status);
823
5.16k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
802
3.40k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
803
3.40k
    if (_closed) {
804
0
        return Status::OK();
805
0
    }
806
3.40k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
807
3.40k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
808
    // if the init failed, the _writer may be nullptr. so here need check
809
3.40k
    if (_writer) {
810
3.40k
        Status st = _writer->get_writer_status();
811
3.40k
        if (exec_status.ok()) {
812
3.40k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
813
3.40k
                                                       : Status::Cancelled("force close"));
814
3.40k
        } else {
815
0
            _writer->force_close(exec_status);
816
0
        }
817
        // If there is an error in process_block thread, then we should get the writer
818
        // status before call force_close. For example, the thread may failed in commit
819
        // transaction.
820
3.40k
        RETURN_IF_ERROR(st);
821
3.40k
    }
822
3.39k
    return Base::close(state, exec_status);
823
3.40k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
802
32
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
803
32
    if (_closed) {
804
0
        return Status::OK();
805
0
    }
806
32
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
807
32
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
808
    // if the init failed, the _writer may be nullptr. so here need check
809
32
    if (_writer) {
810
32
        Status st = _writer->get_writer_status();
811
32
        if (exec_status.ok()) {
812
32
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
813
32
                                                       : Status::Cancelled("force close"));
814
32
        } else {
815
0
            _writer->force_close(exec_status);
816
0
        }
817
        // If there is an error in process_block thread, then we should get the writer
818
        // status before call force_close. For example, the thread may failed in commit
819
        // transaction.
820
32
        RETURN_IF_ERROR(st);
821
32
    }
822
32
    return Base::close(state, exec_status);
823
32
}
_ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
802
176
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
803
176
    if (_closed) {
804
0
        return Status::OK();
805
0
    }
806
176
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
807
176
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
808
    // if the init failed, the _writer may be nullptr. so here need check
809
176
    if (_writer) {
810
176
        Status st = _writer->get_writer_status();
811
176
        if (exec_status.ok()) {
812
176
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
813
176
                                                       : Status::Cancelled("force close"));
814
176
        } else {
815
0
            _writer->force_close(exec_status);
816
0
        }
817
        // If there is an error in process_block thread, then we should get the writer
818
        // status before call force_close. For example, the thread may failed in commit
819
        // transaction.
820
176
        RETURN_IF_ERROR(st);
821
176
    }
822
176
    return Base::close(state, exec_status);
823
176
}
_ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
802
638
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
803
638
    if (_closed) {
804
0
        return Status::OK();
805
0
    }
806
638
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
807
638
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
808
    // if the init failed, the _writer may be nullptr. so here need check
809
640
    if (_writer) {
810
640
        Status st = _writer->get_writer_status();
811
640
        if (exec_status.ok()) {
812
640
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
813
640
                                                       : Status::Cancelled("force close"));
814
640
        } else {
815
0
            _writer->force_close(exec_status);
816
0
        }
817
        // If there is an error in process_block thread, then we should get the writer
818
        // status before call force_close. For example, the thread may failed in commit
819
        // transaction.
820
640
        RETURN_IF_ERROR(st);
821
640
    }
822
638
    return Base::close(state, exec_status);
823
638
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
802
156
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
803
156
    if (_closed) {
804
0
        return Status::OK();
805
0
    }
806
156
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
807
156
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
808
    // if the init failed, the _writer may be nullptr. so here need check
809
156
    if (_writer) {
810
156
        Status st = _writer->get_writer_status();
811
156
        if (exec_status.ok()) {
812
156
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
813
156
                                                       : Status::Cancelled("force close"));
814
156
        } else {
815
0
            _writer->force_close(exec_status);
816
0
        }
817
        // If there is an error in process_block thread, then we should get the writer
818
        // status before call force_close. For example, the thread may failed in commit
819
        // transaction.
820
156
        RETURN_IF_ERROR(st);
821
156
    }
822
156
    return Base::close(state, exec_status);
823
156
}
824
825
#define DECLARE_OPERATOR(LOCAL_STATE) template class DataSinkOperatorX<LOCAL_STATE>;
826
DECLARE_OPERATOR(HashJoinBuildSinkLocalState)
827
DECLARE_OPERATOR(ResultSinkLocalState)
828
DECLARE_OPERATOR(JdbcTableSinkLocalState)
829
DECLARE_OPERATOR(MemoryScratchSinkLocalState)
830
DECLARE_OPERATOR(ResultFileSinkLocalState)
831
DECLARE_OPERATOR(OlapTableSinkLocalState)
832
DECLARE_OPERATOR(OlapTableSinkV2LocalState)
833
DECLARE_OPERATOR(HiveTableSinkLocalState)
834
DECLARE_OPERATOR(TVFTableSinkLocalState)
835
DECLARE_OPERATOR(IcebergTableSinkLocalState)
836
DECLARE_OPERATOR(SpillIcebergTableSinkLocalState)
837
DECLARE_OPERATOR(IcebergDeleteSinkLocalState)
838
DECLARE_OPERATOR(IcebergMergeSinkLocalState)
839
DECLARE_OPERATOR(MCTableSinkLocalState)
840
DECLARE_OPERATOR(AnalyticSinkLocalState)
841
DECLARE_OPERATOR(BlackholeSinkLocalState)
842
DECLARE_OPERATOR(SortSinkLocalState)
843
DECLARE_OPERATOR(SpillSortSinkLocalState)
844
DECLARE_OPERATOR(LocalExchangeSinkLocalState)
845
DECLARE_OPERATOR(AggSinkLocalState)
846
DECLARE_OPERATOR(BucketedAggSinkLocalState)
847
DECLARE_OPERATOR(PartitionedAggSinkLocalState)
848
DECLARE_OPERATOR(ExchangeSinkLocalState)
849
DECLARE_OPERATOR(NestedLoopJoinBuildSinkLocalState)
850
DECLARE_OPERATOR(UnionSinkLocalState)
851
DECLARE_OPERATOR(MultiCastDataStreamSinkLocalState)
852
DECLARE_OPERATOR(PartitionSortSinkLocalState)
853
DECLARE_OPERATOR(SetProbeSinkLocalState<true>)
854
DECLARE_OPERATOR(SetProbeSinkLocalState<false>)
855
DECLARE_OPERATOR(SetSinkLocalState<true>)
856
DECLARE_OPERATOR(SetSinkLocalState<false>)
857
DECLARE_OPERATOR(PartitionedHashJoinSinkLocalState)
858
DECLARE_OPERATOR(GroupCommitBlockSinkLocalState)
859
DECLARE_OPERATOR(CacheSinkLocalState)
860
DECLARE_OPERATOR(DictSinkLocalState)
861
DECLARE_OPERATOR(RecCTESinkLocalState)
862
DECLARE_OPERATOR(RecCTEAnchorSinkLocalState)
863
864
#undef DECLARE_OPERATOR
865
866
#define DECLARE_OPERATOR(LOCAL_STATE) template class OperatorX<LOCAL_STATE>;
867
DECLARE_OPERATOR(HashJoinProbeLocalState)
868
DECLARE_OPERATOR(OlapScanLocalState)
869
DECLARE_OPERATOR(GroupCommitLocalState)
870
DECLARE_OPERATOR(JDBCScanLocalState)
871
DECLARE_OPERATOR(FileScanLocalState)
872
DECLARE_OPERATOR(AnalyticLocalState)
873
DECLARE_OPERATOR(SortLocalState)
874
DECLARE_OPERATOR(SpillSortLocalState)
875
DECLARE_OPERATOR(LocalMergeSortLocalState)
876
DECLARE_OPERATOR(AggLocalState)
877
DECLARE_OPERATOR(BucketedAggLocalState)
878
DECLARE_OPERATOR(PartitionedAggLocalState)
879
DECLARE_OPERATOR(TableFunctionLocalState)
880
DECLARE_OPERATOR(ExchangeLocalState)
881
DECLARE_OPERATOR(RepeatLocalState)
882
DECLARE_OPERATOR(NestedLoopJoinProbeLocalState)
883
DECLARE_OPERATOR(AssertNumRowsLocalState)
884
DECLARE_OPERATOR(EmptySetLocalState)
885
DECLARE_OPERATOR(UnionSourceLocalState)
886
DECLARE_OPERATOR(MultiCastDataStreamSourceLocalState)
887
DECLARE_OPERATOR(PartitionSortSourceLocalState)
888
DECLARE_OPERATOR(SetSourceLocalState<true>)
889
DECLARE_OPERATOR(SetSourceLocalState<false>)
890
DECLARE_OPERATOR(DataGenLocalState)
891
DECLARE_OPERATOR(SchemaScanLocalState)
892
DECLARE_OPERATOR(MetaScanLocalState)
893
DECLARE_OPERATOR(LocalExchangeSourceLocalState)
894
DECLARE_OPERATOR(PartitionedHashJoinProbeLocalState)
895
DECLARE_OPERATOR(CacheSourceLocalState)
896
DECLARE_OPERATOR(RecCTESourceLocalState)
897
DECLARE_OPERATOR(RecCTEScanLocalState)
898
899
#ifdef BE_TEST
900
DECLARE_OPERATOR(MockLocalState)
901
DECLARE_OPERATOR(MockScanLocalState)
902
#endif
903
#undef DECLARE_OPERATOR
904
905
template class StreamingOperatorX<AssertNumRowsLocalState>;
906
template class StreamingOperatorX<SelectLocalState>;
907
908
template class StatefulOperatorX<HashJoinProbeLocalState>;
909
template class StatefulOperatorX<PartitionedHashJoinProbeLocalState>;
910
template class StatefulOperatorX<RepeatLocalState>;
911
template class StatefulOperatorX<MaterializationLocalState>;
912
template class StatefulOperatorX<StreamingAggLocalState>;
913
template class StatefulOperatorX<DistinctStreamingAggLocalState>;
914
template class StatefulOperatorX<NestedLoopJoinProbeLocalState>;
915
template class StatefulOperatorX<TableFunctionLocalState>;
916
917
template class PipelineXSinkLocalState<HashJoinSharedState>;
918
template class PipelineXSinkLocalState<PartitionedHashJoinSharedState>;
919
template class PipelineXSinkLocalState<SortSharedState>;
920
template class PipelineXSinkLocalState<SpillSortSharedState>;
921
template class PipelineXSinkLocalState<NestedLoopJoinSharedState>;
922
template class PipelineXSinkLocalState<AnalyticSharedState>;
923
template class PipelineXSinkLocalState<AggSharedState>;
924
template class PipelineXSinkLocalState<BucketedAggSharedState>;
925
template class PipelineXSinkLocalState<PartitionedAggSharedState>;
926
template class PipelineXSinkLocalState<FakeSharedState>;
927
template class PipelineXSinkLocalState<UnionSharedState>;
928
template class PipelineXSinkLocalState<PartitionSortNodeSharedState>;
929
template class PipelineXSinkLocalState<MultiCastSharedState>;
930
template class PipelineXSinkLocalState<SetSharedState>;
931
template class PipelineXSinkLocalState<LocalExchangeSharedState>;
932
template class PipelineXSinkLocalState<BasicSharedState>;
933
template class PipelineXSinkLocalState<DataQueueSharedState>;
934
template class PipelineXSinkLocalState<RecCTESharedState>;
935
936
template class PipelineXLocalState<HashJoinSharedState>;
937
template class PipelineXLocalState<PartitionedHashJoinSharedState>;
938
template class PipelineXLocalState<SortSharedState>;
939
template class PipelineXLocalState<SpillSortSharedState>;
940
template class PipelineXLocalState<NestedLoopJoinSharedState>;
941
template class PipelineXLocalState<AnalyticSharedState>;
942
template class PipelineXLocalState<AggSharedState>;
943
template class PipelineXLocalState<BucketedAggSharedState>;
944
template class PipelineXLocalState<PartitionedAggSharedState>;
945
template class PipelineXLocalState<FakeSharedState>;
946
template class PipelineXLocalState<UnionSharedState>;
947
template class PipelineXLocalState<DataQueueSharedState>;
948
template class PipelineXLocalState<MultiCastSharedState>;
949
template class PipelineXLocalState<PartitionSortNodeSharedState>;
950
template class PipelineXLocalState<SetSharedState>;
951
template class PipelineXLocalState<LocalExchangeSharedState>;
952
template class PipelineXLocalState<BasicSharedState>;
953
template class PipelineXLocalState<RecCTESharedState>;
954
955
template class AsyncWriterSink<doris::VFileResultWriter, ResultFileSinkOperatorX>;
956
template class AsyncWriterSink<doris::VJdbcTableWriter, JdbcTableSinkOperatorX>;
957
template class AsyncWriterSink<doris::VTabletWriter, OlapTableSinkOperatorX>;
958
template class AsyncWriterSink<doris::VTabletWriterV2, OlapTableSinkV2OperatorX>;
959
template class AsyncWriterSink<doris::VHiveTableWriter, HiveTableSinkOperatorX>;
960
template class AsyncWriterSink<doris::VIcebergTableWriter, IcebergTableSinkOperatorX>;
961
template class AsyncWriterSink<doris::VIcebergTableWriter, SpillIcebergTableSinkOperatorX>;
962
template class AsyncWriterSink<doris::VIcebergDeleteSink, IcebergDeleteSinkOperatorX>;
963
template class AsyncWriterSink<doris::VIcebergMergeSink, IcebergMergeSinkOperatorX>;
964
template class AsyncWriterSink<doris::VMCTableWriter, MCTableSinkOperatorX>;
965
template class AsyncWriterSink<doris::VTVFTableWriter, TVFTableSinkOperatorX>;
966
967
#ifdef BE_TEST
968
template class OperatorX<DummyOperatorLocalState>;
969
template class DataSinkOperatorX<DummySinkLocalState>;
970
#endif
971
972
} // namespace doris