Coverage Report

Created: 2026-10-29 13:47

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