Coverage Report

Created: 2026-09-19 06:21

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