Coverage Report

Created: 2026-06-03 19:59

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