Coverage Report

Created: 2026-10-09 14:54

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
be/src/exec/operator/operator.cpp
Line
Count
Source
1
// Licensed to the Apache Software Foundation (ASF) under one
2
// or more contributor license agreements.  See the NOTICE file
3
// distributed with this work for additional information
4
// regarding copyright ownership.  The ASF licenses this file
5
// to you under the Apache License, Version 2.0 (the
6
// "License"); you may not use this file except in compliance
7
// with the License.  You may obtain a copy of the License at
8
//
9
//   http://www.apache.org/licenses/LICENSE-2.0
10
//
11
// Unless required by applicable law or agreed to in writing,
12
// software distributed under the License is distributed on an
13
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
// KIND, either express or implied.  See the License for the
15
// specific language governing permissions and limitations
16
// under the License.
17
18
#include "exec/operator/operator.h"
19
20
#include <algorithm>
21
22
#include "common/status.h"
23
#include "exec/common/util.hpp"
24
#include "exec/exchange/local_exchange_sink_operator.h"
25
#include "exec/exchange/local_exchange_source_operator.h"
26
#include "exec/operator/aggregation_sink_operator.h"
27
#include "exec/operator/aggregation_source_operator.h"
28
#include "exec/operator/analytic_sink_operator.h"
29
#include "exec/operator/analytic_source_operator.h"
30
#include "exec/operator/assert_num_rows_operator.h"
31
#include "exec/operator/blackhole_sink_operator.h"
32
#include "exec/operator/bucketed_aggregation_sink_operator.h"
33
#include "exec/operator/bucketed_aggregation_source_operator.h"
34
#include "exec/operator/cache_sink_operator.h"
35
#include "exec/operator/cache_source_operator.h"
36
#include "exec/operator/datagen_operator.h"
37
#include "exec/operator/dict_sink_operator.h"
38
#include "exec/operator/distinct_streaming_aggregation_operator.h"
39
#include "exec/operator/empty_set_operator.h"
40
#include "exec/operator/exchange_sink_operator.h"
41
#include "exec/operator/exchange_source_operator.h"
42
#include "exec/operator/file_scan_operator.h"
43
#include "exec/operator/group_commit_block_sink_operator.h"
44
#include "exec/operator/group_commit_scan_operator.h"
45
#include "exec/operator/hashjoin_build_sink.h"
46
#include "exec/operator/hashjoin_probe_operator.h"
47
#include "exec/operator/hive_table_sink_operator.h"
48
#include "exec/operator/iceberg_delete_sink_operator.h"
49
#include "exec/operator/iceberg_merge_sink_operator.h"
50
#include "exec/operator/iceberg_table_sink_operator.h"
51
#include "exec/operator/jdbc_scan_operator.h"
52
#include "exec/operator/jdbc_table_sink_operator.h"
53
#include "exec/operator/local_merge_sort_source_operator.h"
54
#include "exec/operator/materialization_opertor.h"
55
#include "exec/operator/maxcompute_table_sink_operator.h"
56
#include "exec/operator/memory_scratch_sink_operator.h"
57
#include "exec/operator/meta_scan_operator.h"
58
#include "exec/operator/mock_operator.h"
59
#include "exec/operator/mock_scan_operator.h"
60
#include "exec/operator/multi_cast_data_stream_sink.h"
61
#include "exec/operator/multi_cast_data_stream_source.h"
62
#include "exec/operator/nested_loop_join_build_operator.h"
63
#include "exec/operator/nested_loop_join_probe_operator.h"
64
#include "exec/operator/olap_scan_operator.h"
65
#include "exec/operator/olap_table_sink_operator.h"
66
#include "exec/operator/olap_table_sink_v2_operator.h"
67
#include "exec/operator/paimon_table_sink_operator.h"
68
#include "exec/operator/partition_sort_sink_operator.h"
69
#include "exec/operator/partition_sort_source_operator.h"
70
#include "exec/operator/partitioned_aggregation_sink_operator.h"
71
#include "exec/operator/partitioned_aggregation_source_operator.h"
72
#include "exec/operator/partitioned_hash_join_probe_operator.h"
73
#include "exec/operator/partitioned_hash_join_sink_operator.h"
74
#include "exec/operator/rec_cte_anchor_sink_operator.h"
75
#include "exec/operator/rec_cte_scan_operator.h"
76
#include "exec/operator/rec_cte_sink_operator.h"
77
#include "exec/operator/rec_cte_source_operator.h"
78
#include "exec/operator/repeat_operator.h"
79
#include "exec/operator/result_file_sink_operator.h"
80
#include "exec/operator/result_sink_operator.h"
81
#include "exec/operator/schema_scan_operator.h"
82
#include "exec/operator/select_operator.h"
83
#include "exec/operator/set_probe_sink_operator.h"
84
#include "exec/operator/set_sink_operator.h"
85
#include "exec/operator/set_source_operator.h"
86
#include "exec/operator/sort_sink_operator.h"
87
#include "exec/operator/sort_source_operator.h"
88
#include "exec/operator/spill_iceberg_table_sink_operator.h"
89
#include "exec/operator/spill_sort_sink_operator.h"
90
#include "exec/operator/spill_sort_source_operator.h"
91
#include "exec/operator/streaming_aggregation_operator.h"
92
#include "exec/operator/table_function_operator.h"
93
#include "exec/operator/tvf_table_sink_operator.h"
94
#include "exec/operator/union_sink_operator.h"
95
#include "exec/operator/union_source_operator.h"
96
#include "exec/pipeline/dependency.h"
97
#include "exec/pipeline/pipeline.h"
98
#include "exprs/vexpr.h"
99
#include "exprs/vexpr_context.h"
100
#include "runtime/runtime_profile.h"
101
#include "runtime/runtime_profile_counter_names.h"
102
#include "util/debug_util.h"
103
#include "util/string_util.h"
104
105
namespace doris {
106
class RowDescriptor;
107
class RuntimeState;
108
} // namespace doris
109
110
namespace doris {
111
112
0
Status OperatorBase::close(RuntimeState* state) {
113
0
    if (_is_closed) {
114
0
        return Status::OK();
115
0
    }
116
0
    _is_closed = true;
117
0
    return Status::OK();
118
0
}
119
120
template <typename SharedStateArg>
121
1.81M
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
1.81M
    if (_parent->nereids_id() == -1) {
123
947k
        return fmt::format("(id={})", _parent->node_id());
124
947k
    } else {
125
870k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
870k
    }
127
1.81M
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
67.6k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
67.6k
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
67.6k
    } else {
125
67.6k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
67.6k
    }
127
67.6k
}
_ZNK5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
1
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
1
    if (_parent->nereids_id() == -1) {
123
1
        return fmt::format("(id={})", _parent->node_id());
124
1
    } else {
125
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
0
    }
127
1
}
_ZNK5doris19PipelineXLocalStateINS_15SortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
240k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
240k
    if (_parent->nereids_id() == -1) {
123
12
        return fmt::format("(id={})", _parent->node_id());
124
240k
    } else {
125
240k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
240k
    }
127
240k
}
_ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
22
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
22
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
22
    } else {
125
22
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
22
    }
127
22
}
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
5.55k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
5.55k
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
5.55k
    } else {
125
5.55k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
5.55k
    }
127
5.55k
}
_ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
8.60k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
8.60k
    if (_parent->nereids_id() == -1) {
123
16
        return fmt::format("(id={})", _parent->node_id());
124
8.58k
    } else {
125
8.58k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
8.58k
    }
127
8.60k
}
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
102k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
102k
    if (_parent->nereids_id() == -1) {
123
29
        return fmt::format("(id={})", _parent->node_id());
124
102k
    } else {
125
102k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
102k
    }
127
102k
}
_ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
48.8k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
48.8k
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
48.8k
    } else {
125
48.8k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
48.8k
    }
127
48.8k
}
_ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
140
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
140
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
140
    } else {
125
140
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
140
    }
127
140
}
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
630k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
630k
    if (_parent->nereids_id() == -1) {
123
294k
        return fmt::format("(id={})", _parent->node_id());
124
336k
    } else {
125
336k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
336k
    }
127
630k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
55.3k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
55.3k
    if (_parent->nereids_id() == -1) {
123
2
        return fmt::format("(id={})", _parent->node_id());
124
55.3k
    } else {
125
55.3k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
55.3k
    }
127
55.3k
}
_ZNK5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
26
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
26
    if (_parent->nereids_id() == -1) {
123
26
        return fmt::format("(id={})", _parent->node_id());
124
26
    } else {
125
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
0
    }
127
26
}
_ZNK5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
5.65k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
5.65k
    if (_parent->nereids_id() == -1) {
123
5.65k
        return fmt::format("(id={})", _parent->node_id());
124
5.65k
    } else {
125
2
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
2
    }
127
5.65k
}
_ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
405
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
405
    if (_parent->nereids_id() == -1) {
123
102
        return fmt::format("(id={})", _parent->node_id());
124
303
    } else {
125
303
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
303
    }
127
405
}
_ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
5.22k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
5.22k
    if (_parent->nereids_id() == -1) {
123
13
        return fmt::format("(id={})", _parent->node_id());
124
5.21k
    } else {
125
5.21k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
5.21k
    }
127
5.22k
}
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
647k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
647k
    if (_parent->nereids_id() == -1) {
123
647k
        return fmt::format("(id={})", _parent->node_id());
124
18.4E
    } else {
125
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
18.4E
    }
127
647k
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
_ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
169
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
169
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
169
    } else {
125
169
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
169
    }
127
169
}
128
129
template <typename SharedStateArg>
130
1.21M
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
1.21M
    if (_parent->nereids_id() == -1) {
132
678k
        return fmt::format("(id={})", _parent->node_id());
133
678k
    } else {
134
536k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
536k
    }
136
1.21M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
116k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
116k
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
116k
    } else {
134
116k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
116k
    }
136
116k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
2
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
2
    if (_parent->nereids_id() == -1) {
132
1
        return fmt::format("(id={})", _parent->node_id());
133
1
    } else {
134
1
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
1
    }
136
2
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
243k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
243k
    if (_parent->nereids_id() == -1) {
132
9
        return fmt::format("(id={})", _parent->node_id());
133
243k
    } else {
134
243k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
243k
    }
136
243k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
29
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
29
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
29
    } else {
134
29
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
29
    }
136
29
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
5.66k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
5.66k
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
5.66k
    } else {
134
5.66k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
5.66k
    }
136
5.66k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
8.60k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
8.60k
    if (_parent->nereids_id() == -1) {
132
16
        return fmt::format("(id={})", _parent->node_id());
133
8.59k
    } else {
134
8.59k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
8.59k
    }
136
8.60k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
102k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
102k
    if (_parent->nereids_id() == -1) {
132
29
        return fmt::format("(id={})", _parent->node_id());
133
102k
    } else {
134
102k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
102k
    }
136
102k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
48.6k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
48.6k
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
48.6k
    } else {
134
48.6k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
48.6k
    }
136
48.6k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
150
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
150
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
150
    } else {
134
150
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
150
    }
136
150
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
15
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
15
    if (_parent->nereids_id() == -1) {
132
15
        return fmt::format("(id={})", _parent->node_id());
133
15
    } else {
134
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
0
    }
136
15
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
11.1k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
11.1k
    if (_parent->nereids_id() == -1) {
132
3
        return fmt::format("(id={})", _parent->node_id());
133
11.1k
    } else {
134
11.1k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
11.1k
    }
136
11.1k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
414
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
414
    if (_parent->nereids_id() == -1) {
132
102
        return fmt::format("(id={})", _parent->node_id());
133
312
    } else {
134
312
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
312
    }
136
414
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
12.8k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
12.9k
    if (_parent->nereids_id() == -1) {
132
12.9k
        return fmt::format("(id={})", _parent->node_id());
133
18.4E
    } else {
134
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
18.4E
    }
136
12.8k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
255k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
256k
    if (_parent->nereids_id() == -1) {
132
256k
        return fmt::format("(id={})", _parent->node_id());
133
18.4E
    } else {
134
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
18.4E
    }
136
255k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
409k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
409k
    if (_parent->nereids_id() == -1) {
132
409k
        return fmt::format("(id={})", _parent->node_id());
133
18.4E
    } else {
134
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
18.4E
    }
136
409k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
25
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
25
    if (_parent->nereids_id() == -1) {
132
25
        return fmt::format("(id={})", _parent->node_id());
133
25
    } else {
134
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
0
    }
136
25
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
338
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
338
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
338
    } else {
134
338
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
338
    }
136
338
}
137
138
template <typename SharedStateArg>
139
29.8k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
29.8k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
29.8k
    _terminated = true;
144
29.8k
    return Status::OK();
145
29.8k
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
24.0k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
24.0k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
24.0k
    _terminated = true;
144
24.0k
    return Status::OK();
145
24.0k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
1.74k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
1.74k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
1.74k
    _terminated = true;
144
1.74k
    return Status::OK();
145
1.74k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
2
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
2
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
2
    _terminated = true;
144
2
    return Status::OK();
145
2
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
1.68k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
1.68k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
1.68k
    _terminated = true;
144
1.68k
    return Status::OK();
145
1.68k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
617
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
617
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
617
    _terminated = true;
144
617
    return Status::OK();
145
617
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
554
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
554
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
554
    _terminated = true;
144
554
    return Status::OK();
145
554
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
516
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
516
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
516
    _terminated = true;
144
516
    return Status::OK();
145
516
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
4
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
4
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
4
    _terminated = true;
144
4
    return Status::OK();
145
4
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
158
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
158
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
158
    _terminated = true;
144
158
    return Status::OK();
145
158
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
7
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
7
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
7
    _terminated = true;
144
7
    return Status::OK();
145
7
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
389
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
389
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
389
    _terminated = true;
144
389
    return Status::OK();
145
389
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
133
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
133
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
133
    _terminated = true;
144
133
    return Status::OK();
145
133
}
146
147
321k
DataDistribution OperatorBase::required_data_distribution(RuntimeState* /*state*/) const {
148
321k
    return _child && _child->is_serial_operator() && !is_source()
149
321k
                   ? DataDistribution(TLocalPartitionType::PASSTHROUGH)
150
321k
                   : DataDistribution(TLocalPartitionType::NOOP);
151
321k
}
152
153
28.0k
bool OperatorBase::child_breaks_local_key_distribution(RuntimeState* state) const {
154
28.0k
    if (!_child) {
155
26.8k
        return false;
156
26.8k
    }
157
1.18k
    if (_child->is_serial_operator()) {
158
163
        return true;
159
163
    }
160
1.02k
    const auto child_distribution = _child->required_data_distribution(state);
161
1.02k
    return child_distribution.need_local_exchange() &&
162
1.02k
           !is_shuffled_exchange(child_distribution.distribution_type);
163
1.18k
}
164
165
template <typename SharedStateArg>
166
16.9k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
16.9k
    fmt::memory_buffer debug_string_buffer;
168
16.9k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
16.9k
    return fmt::to_string(debug_string_buffer);
170
16.9k
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
32
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
32
    fmt::memory_buffer debug_string_buffer;
168
32
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
32
    return fmt::to_string(debug_string_buffer);
170
32
}
_ZNK5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
3
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
3
    fmt::memory_buffer debug_string_buffer;
168
3
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
3
    return fmt::to_string(debug_string_buffer);
170
3
}
_ZNK5doris19PipelineXLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
16
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
16
    fmt::memory_buffer debug_string_buffer;
168
16
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
16
    return fmt::to_string(debug_string_buffer);
170
16
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
16
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
16
    fmt::memory_buffer debug_string_buffer;
168
16
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
16
    return fmt::to_string(debug_string_buffer);
170
16
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
32
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
32
    fmt::memory_buffer debug_string_buffer;
168
32
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
32
    return fmt::to_string(debug_string_buffer);
170
32
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
16.7k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
16.7k
    fmt::memory_buffer debug_string_buffer;
168
16.7k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
16.7k
    return fmt::to_string(debug_string_buffer);
170
16.7k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
1
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
1
    fmt::memory_buffer debug_string_buffer;
168
1
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
1
    return fmt::to_string(debug_string_buffer);
170
1
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
112
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
112
    fmt::memory_buffer debug_string_buffer;
168
112
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
112
    return fmt::to_string(debug_string_buffer);
170
112
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
171
172
template <typename SharedStateArg>
173
16.9k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
16.9k
    fmt::memory_buffer debug_string_buffer;
175
16.9k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
16.9k
    return fmt::to_string(debug_string_buffer);
177
16.9k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
16
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
16
    fmt::memory_buffer debug_string_buffer;
175
16
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
16
    return fmt::to_string(debug_string_buffer);
177
16
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
32
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
32
    fmt::memory_buffer debug_string_buffer;
175
32
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
32
    return fmt::to_string(debug_string_buffer);
177
32
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
48
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
48
    fmt::memory_buffer debug_string_buffer;
175
48
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
48
    return fmt::to_string(debug_string_buffer);
177
48
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
66
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
66
    fmt::memory_buffer debug_string_buffer;
175
66
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
66
    return fmt::to_string(debug_string_buffer);
177
66
}
_ZNK5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
16.7k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
16.7k
    fmt::memory_buffer debug_string_buffer;
175
16.7k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
16.7k
    return fmt::to_string(debug_string_buffer);
177
16.7k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
178
179
17.0k
std::string OperatorXBase::debug_string(int indentation_level) const {
180
17.0k
    fmt::memory_buffer debug_string_buffer;
181
17.0k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, parallel_tasks={}, _is_serial_operator={}",
182
17.0k
                   std::string(indentation_level * 2, ' '), _op_name, node_id(), _parallel_tasks,
183
17.0k
                   _is_serial_operator);
184
17.0k
    return fmt::to_string(debug_string_buffer);
185
17.0k
}
186
187
16.9k
std::string OperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
188
16.9k
    return state->get_local_state(operator_id())->debug_string(indentation_level);
189
16.9k
}
190
191
704k
Status OperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
192
704k
    std::string node_name = print_plan_node_type(tnode.node_type);
193
704k
    _nereids_id = tnode.nereids_id;
194
704k
    if (!tnode.intermediate_output_tuple_id_list.empty()) {
195
6.36k
        if (!has_projection()) {
196
0
            return Status::InternalError("no final output tuple id");
197
0
        }
198
6.36k
        if (tnode.intermediate_output_tuple_id_list.size() !=
199
6.36k
            tnode.intermediate_projections_list.size()) {
200
0
            return Status::InternalError(
201
0
                    "intermediate_output_tuple_id_list size:{} not match "
202
0
                    "intermediate_projections_list size:{}",
203
0
                    tnode.intermediate_output_tuple_id_list.size(),
204
0
                    tnode.intermediate_projections_list.size());
205
0
        }
206
6.36k
    }
207
704k
    auto substr = node_name.substr(0, node_name.find("_NODE"));
208
704k
    _op_name = substr + "_OPERATOR";
209
210
704k
    if (tnode.__isset.vconjunct) {
211
0
        return Status::InternalError("vconjunct is not supported yet");
212
704k
    } else if (tnode.__isset.conjuncts) {
213
278k
        for (const auto& conjunct : tnode.conjuncts) {
214
278k
            VExprContextSPtr context;
215
278k
            RETURN_IF_ERROR(VExpr::create_expr_tree(conjunct, context));
216
278k
            _conjuncts.emplace_back(context);
217
278k
        }
218
102k
    }
219
220
    // create the projections expr
221
704k
    if (tnode.__isset.projections) {
222
271k
        RETURN_IF_ERROR(VExpr::create_expr_trees(tnode.projections, _projection->projections));
223
271k
    }
224
704k
    if (!tnode.intermediate_projections_list.empty()) {
225
6.36k
        DCHECK(has_projection()) << "no final projections";
226
6.36k
        _projection->intermediate_projections.reserve(tnode.intermediate_projections_list.size());
227
10.6k
        for (const auto& tnode_projections : tnode.intermediate_projections_list) {
228
10.6k
            VExprContextSPtrs projections;
229
10.6k
            RETURN_IF_ERROR(VExpr::create_expr_trees(tnode_projections, projections));
230
10.6k
            _projection->intermediate_projections.push_back(projections);
231
10.6k
        }
232
6.36k
    }
233
704k
    return Status::OK();
234
704k
}
235
236
732k
Status OperatorXBase::prepare(RuntimeState* state) {
237
732k
    for (auto& conjunct : _conjuncts) {
238
277k
        RETURN_IF_ERROR(conjunct->prepare(state, operator_row_desc_before_projection()));
239
277k
    }
240
732k
    if (state->enable_adjust_conjunct_order_by_cost()) {
241
682k
        std::ranges::stable_sort(_conjuncts, [](const auto& a, const auto& b) {
242
342k
            return a->execute_cost() < b->execute_cost();
243
342k
        });
244
682k
    };
245
246
732k
    if (has_projection()) {
247
270k
        auto& projection = *_projection;
248
281k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
249
10.6k
            const auto& input_row_desc =
250
10.6k
                    i == 0 ? operator_row_desc_before_projection()
251
10.6k
                           : projection.intermediate_output_row_descriptors[i - 1];
252
10.6k
            RETURN_IF_ERROR(
253
10.6k
                    VExpr::prepare(projection.intermediate_projections[i], state, input_row_desc));
254
10.6k
        }
255
270k
        const auto& final_projection_input_row_desc =
256
270k
                projection.intermediate_output_row_descriptors.empty()
257
270k
                        ? operator_row_desc_before_projection()
258
270k
                        : projection.intermediate_output_row_descriptors.back();
259
270k
        RETURN_IF_ERROR(
260
270k
                VExpr::prepare(projection.projections, state, final_projection_input_row_desc));
261
270k
        RETURN_IF_ERROR(VExpr::check_expr_output_type(projection.projections,
262
270k
                                                      projection.output_row_descriptor));
263
270k
    }
264
265
732k
    for (auto& conjunct : _conjuncts) {
266
278k
        RETURN_IF_ERROR(conjunct->open(state));
267
278k
    }
268
732k
    if (has_projection()) {
269
270k
        RETURN_IF_ERROR(VExpr::open(_projection->projections, state));
270
270k
        for (auto& projections : _projection->intermediate_projections) {
271
10.6k
            RETURN_IF_ERROR(VExpr::open(projections, state));
272
10.6k
        }
273
270k
    }
274
732k
    if (_child && !is_source()) {
275
107k
        RETURN_IF_ERROR(_child->prepare(state));
276
107k
    }
277
278
732k
    if (VExpr::contains_blockable_function(_conjuncts) ||
279
732k
        (has_projection() && VExpr::contains_blockable_function(_projection->projections))) {
280
0
        _blockable = true;
281
0
    }
282
283
732k
    return Status::OK();
284
732k
}
285
286
6.66k
Status OperatorXBase::terminate(RuntimeState* state) {
287
6.66k
    if (_child && !is_source()) {
288
787
        RETURN_IF_ERROR(_child->terminate(state));
289
787
    }
290
6.66k
    auto result = state->get_local_state_result(operator_id());
291
6.66k
    if (!result) {
292
0
        return result.error();
293
0
    }
294
6.66k
    return result.value()->terminate(state);
295
6.66k
}
296
297
4.93M
Status OperatorXBase::close(RuntimeState* state) {
298
4.93M
    if (_child && !is_source()) {
299
797k
        RETURN_IF_ERROR(_child->close(state));
300
797k
    }
301
4.93M
    auto result = state->get_local_state_result(operator_id());
302
4.93M
    if (!result) {
303
0
        return result.error();
304
0
    }
305
4.93M
    return result.value()->close(state);
306
4.93M
}
307
308
282k
void PipelineXLocalStateBase::clear_origin_block() {
309
282k
    _origin_block.clear_column_data(_parent->operator_row_desc_before_projection().num_slots());
310
282k
}
311
312
666k
Status PipelineXLocalStateBase::filter_block(const VExprContextSPtrs& expr_contexts, Block* block) {
313
666k
    RETURN_IF_ERROR(VExprContext::filter_block(expr_contexts, block, block->columns()));
314
315
666k
    _estimate_memory_usage += VExprContext::get_memory_usage(expr_contexts);
316
666k
    return Status::OK();
317
666k
}
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
282k
                                     Block* output_block) const {
326
282k
    auto* local_state = state->get_local_state(operator_id());
327
282k
    SCOPED_TIMER(local_state->exec_time_counter());
328
282k
    SCOPED_TIMER(local_state->_projection_timer);
329
282k
    const size_t rows = origin_block->rows();
330
282k
    if (rows == 0) {
331
145k
        return Status::OK();
332
145k
    }
333
136k
    SCOPED_PEAK_MEM(&local_state->_estimate_memory_usage);
334
335
136k
    {
336
136k
        Block input_block = *origin_block;
337
338
136k
        ColumnsWithTypeAndName new_columns;
339
136k
        for (const auto& projections : local_state->_intermediate_projections) {
340
3.95k
            if (projections.empty()) {
341
0
                return Status::InternalError("meet empty intermediate projection, node id: {}",
342
0
                                             node_id());
343
0
            }
344
3.95k
            new_columns.resize(projections.size());
345
56.2k
            for (int i = 0; i < projections.size(); i++) {
346
52.3k
                RETURN_IF_ERROR(projections[i]->execute(&input_block, new_columns[i]));
347
52.3k
                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
52.3k
            }
355
3.94k
            Block tmp_block {new_columns};
356
3.94k
            input_block.swap(tmp_block);
357
3.94k
        }
358
359
136k
        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
136k
        auto scoped_mutable_block = VectorizedUtils::build_scoped_mutable_mem_reuse_block(
367
136k
                output_block, _projection->output_row_descriptor);
368
136k
        auto& mutable_columns = scoped_mutable_block.mutable_columns();
369
136k
        DCHECK_EQ(mutable_columns.size(), local_state->_projections.size()) << debug_string();
370
136k
        Columns shared_columns(mutable_columns.size());
371
372
788k
        for (int i = 0; i < mutable_columns.size(); ++i) {
373
651k
            ColumnPtr column_ptr;
374
651k
            RETURN_IF_ERROR(local_state->_projections[i]->execute(&input_block, column_ptr));
375
651k
            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
651k
            column_ptr = column_ptr->convert_to_full_column_if_const();
382
651k
            if (is_column_nullable(*mutable_columns[i]) && !is_column_nullable(*column_ptr)) {
383
0
                column_ptr = make_nullable(column_ptr, false);
384
0
            }
385
651k
            if (column_ptr->is_exclusive()) {
386
239k
                mutable_columns[i] = IColumn::mutate(std::move(column_ptr));
387
411k
            } else {
388
411k
                shared_columns[i] = std::move(column_ptr);
389
411k
            }
390
651k
        }
391
392
136k
        scoped_mutable_block.restore();
393
788k
        for (int i = 0; i < shared_columns.size(); ++i) {
394
651k
            if (shared_columns[i]) {
395
411k
                output_block->replace_by_position(i, std::move(shared_columns[i]));
396
411k
            }
397
651k
        }
398
136k
    }
399
400
0
    origin_block->clear_column_data(
401
136k
            local_state->_parent->operator_row_desc_before_projection().num_slots());
402
136k
    DCHECK_EQ(output_block->rows(), rows);
403
404
136k
    return Status::OK();
405
136k
}
406
407
4.14M
Status OperatorXBase::get_block_after_projects(RuntimeState* state, Block* block, bool* eos) {
408
4.14M
    DBUG_EXECUTE_IF("Pipeline::return_empty_block", {
409
4.14M
        if (this->_op_name == "AGGREGATION_OPERATOR" || this->_op_name == "HASH_JOIN_OPERATOR" ||
410
4.14M
            this->_op_name == "PARTITIONED_AGGREGATION_OPERATOR" ||
411
4.14M
            this->_op_name == "PARTITIONED_HASH_JOIN_OPERATOR" ||
412
4.14M
            this->_op_name == "CROSS_JOIN_OPERATOR" || this->_op_name == "SORT_OPERATOR") {
413
4.14M
            if (_debug_point_count++ % 2 == 0) {
414
4.14M
                return Status::OK();
415
4.14M
            }
416
4.14M
        }
417
4.14M
    });
418
419
4.14M
    Status status;
420
4.14M
    auto* local_state = state->get_local_state(operator_id());
421
4.14M
    Defer defer([&]() {
422
4.14M
        if (status.ok()) {
423
4.14M
            local_state->update_output_block_counters(*block);
424
4.14M
        }
425
4.14M
    });
426
4.14M
    if (has_projection()) {
427
282k
        local_state->clear_origin_block();
428
282k
        status = get_block(state, &local_state->_origin_block, eos);
429
282k
        if (UNLIKELY(!status.ok())) {
430
29
            return status;
431
29
        }
432
282k
        status = do_projections(state, &local_state->_origin_block, block);
433
282k
        return status;
434
282k
    }
435
3.85M
    status = get_block(state, block, eos);
436
3.85M
    RETURN_IF_ERROR(block->check_type_and_column());
437
3.85M
    return status;
438
3.85M
}
439
440
2.74M
void PipelineXLocalStateBase::reached_limit(Block* block, bool* eos) {
441
2.74M
    if (_parent->_limit != -1 and _num_rows_returned + block->rows() >= _parent->_limit) {
442
9.89k
        block->set_num_rows(_parent->_limit - _num_rows_returned);
443
9.89k
        *eos = true;
444
9.89k
    }
445
446
2.74M
    DBUG_EXECUTE_IF("Pipeline::reached_limit_early", {
447
2.74M
        auto op_name = to_lower(_parent->_op_name);
448
2.74M
        auto arg_op_name = dp->param<std::string>("op_name");
449
2.74M
        arg_op_name = to_lower(arg_op_name);
450
451
2.74M
        if (op_name == arg_op_name) {
452
2.74M
            *eos = true;
453
2.74M
        }
454
2.74M
    });
455
456
2.74M
    if (auto rows = block->rows()) {
457
790k
        _num_rows_returned += rows;
458
790k
        _state->get_query_ctx()->resource_ctx()->io_context()->update_process_rows(rows);
459
790k
    }
460
2.74M
}
461
462
29.8k
Status DataSinkOperatorXBase::terminate(RuntimeState* state) {
463
29.8k
    auto result = state->get_sink_local_state_result();
464
29.8k
    if (!result) {
465
0
        return result.error();
466
0
    }
467
29.8k
    return result.value()->terminate(state);
468
29.8k
}
469
470
16.9k
std::string DataSinkOperatorXBase::debug_string(int indentation_level) const {
471
16.9k
    fmt::memory_buffer debug_string_buffer;
472
473
16.9k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, _is_serial_operator={}",
474
16.9k
                   std::string(indentation_level * 2, ' '), _name, node_id(), _is_serial_operator);
475
16.9k
    return fmt::to_string(debug_string_buffer);
476
16.9k
}
477
478
16.9k
std::string DataSinkOperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
479
16.9k
    return state->get_sink_local_state()->debug_string(indentation_level);
480
16.9k
}
481
482
362k
Status DataSinkOperatorXBase::init(const TDataSink& tsink) {
483
362k
    std::string op_name = "UNKNOWN_SINK";
484
362k
    auto it = _TDataSinkType_VALUES_TO_NAMES.find(tsink.type);
485
486
363k
    if (it != _TDataSinkType_VALUES_TO_NAMES.end()) {
487
363k
        op_name = it->second;
488
363k
    }
489
362k
    _name = op_name + "_OPERATOR";
490
362k
    return Status::OK();
491
362k
}
492
493
308k
Status DataSinkOperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
494
308k
    std::string op_name = print_plan_node_type(tnode.node_type);
495
308k
    _nereids_id = tnode.nereids_id;
496
308k
    auto substr = op_name.substr(0, op_name.find("_NODE"));
497
308k
    _name = substr + "_SINK_OPERATOR";
498
308k
    return Status::OK();
499
308k
}
500
501
template <typename LocalStateType>
502
Status DataSinkOperatorX<LocalStateType>::setup_local_state(RuntimeState* state,
503
1.76M
                                                            LocalSinkStateInfo& info) {
504
1.76M
    auto local_state = LocalStateType::create_unique(this, state);
505
1.76M
    RETURN_IF_ERROR(local_state->init(state, info));
506
1.76M
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
1.76M
    return Status::OK();
508
1.76M
}
_ZN5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
116k
                                                            LocalSinkStateInfo& info) {
504
116k
    auto local_state = LocalStateType::create_unique(this, state);
505
116k
    RETURN_IF_ERROR(local_state->init(state, info));
506
116k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
116k
    return Status::OK();
508
116k
}
_ZN5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
362k
                                                            LocalSinkStateInfo& info) {
504
362k
    auto local_state = LocalStateType::create_unique(this, state);
505
362k
    RETURN_IF_ERROR(local_state->init(state, info));
506
362k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
362k
    return Status::OK();
508
362k
}
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
367
                                                            LocalSinkStateInfo& info) {
504
367
    auto local_state = LocalStateType::create_unique(this, state);
505
367
    RETURN_IF_ERROR(local_state->init(state, info));
506
367
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
367
    return Status::OK();
508
367
}
_ZN5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
47.5k
                                                            LocalSinkStateInfo& info) {
504
47.5k
    auto local_state = LocalStateType::create_unique(this, state);
505
47.5k
    RETURN_IF_ERROR(local_state->init(state, info));
506
47.5k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
47.5k
    return Status::OK();
508
47.5k
}
_ZN5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
28
                                                            LocalSinkStateInfo& info) {
504
28
    auto local_state = LocalStateType::create_unique(this, state);
505
28
    RETURN_IF_ERROR(local_state->init(state, info));
506
28
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
28
    return Status::OK();
508
28
}
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_25PaimonTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_27IcebergDeleteSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_26IcebergMergeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_21MCTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
8.59k
                                                            LocalSinkStateInfo& info) {
504
8.59k
    auto local_state = LocalStateType::create_unique(this, state);
505
8.59k
    RETURN_IF_ERROR(local_state->init(state, info));
506
8.59k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
8.59k
    return Status::OK();
508
8.59k
}
_ZN5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
12
                                                            LocalSinkStateInfo& info) {
504
12
    auto local_state = LocalStateType::create_unique(this, state);
505
12
    RETURN_IF_ERROR(local_state->init(state, info));
506
12
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
12
    return Status::OK();
508
12
}
_ZN5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
244k
                                                            LocalSinkStateInfo& info) {
504
244k
    auto local_state = LocalStateType::create_unique(this, state);
505
244k
    RETURN_IF_ERROR(local_state->init(state, info));
506
244k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
244k
    return Status::OK();
508
244k
}
_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
255k
                                                            LocalSinkStateInfo& info) {
504
255k
    auto local_state = LocalStateType::create_unique(this, state);
505
255k
    RETURN_IF_ERROR(local_state->init(state, info));
506
255k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
255k
    return Status::OK();
508
255k
}
_ZN5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
102k
                                                            LocalSinkStateInfo& info) {
504
102k
    auto local_state = LocalStateType::create_unique(this, state);
505
102k
    RETURN_IF_ERROR(local_state->init(state, info));
506
102k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
102k
    return Status::OK();
508
102k
}
_ZN5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
48.7k
                                                            LocalSinkStateInfo& info) {
504
48.7k
    auto local_state = LocalStateType::create_unique(this, state);
505
48.7k
    RETURN_IF_ERROR(local_state->init(state, info));
506
48.7k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
48.7k
    return Status::OK();
508
48.7k
}
_ZN5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
150
                                                            LocalSinkStateInfo& info) {
504
150
    auto local_state = LocalStateType::create_unique(this, state);
505
150
    RETURN_IF_ERROR(local_state->init(state, info));
506
150
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
150
    return Status::OK();
508
150
}
_ZN5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
543k
                                                            LocalSinkStateInfo& info) {
504
543k
    auto local_state = LocalStateType::create_unique(this, state);
505
543k
    RETURN_IF_ERROR(local_state->init(state, info));
506
543k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
543k
    return Status::OK();
508
543k
}
_ZN5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
5.67k
                                                            LocalSinkStateInfo& info) {
504
5.67k
    auto local_state = LocalStateType::create_unique(this, state);
505
5.67k
    RETURN_IF_ERROR(local_state->init(state, info));
506
5.67k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
5.67k
    return Status::OK();
508
5.67k
}
_ZN5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
11.1k
                                                            LocalSinkStateInfo& info) {
504
11.1k
    auto local_state = LocalStateType::create_unique(this, state);
505
11.1k
    RETURN_IF_ERROR(local_state->init(state, info));
506
11.1k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
11.1k
    return Status::OK();
508
11.1k
}
_ZN5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.17k
                                                            LocalSinkStateInfo& info) {
504
2.17k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.17k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.17k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.17k
    return Status::OK();
508
2.17k
}
_ZN5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
312
                                                            LocalSinkStateInfo& info) {
504
312
    auto local_state = LocalStateType::create_unique(this, state);
505
312
    RETURN_IF_ERROR(local_state->init(state, info));
506
312
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
312
    return Status::OK();
508
312
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
4.95k
                                                            LocalSinkStateInfo& info) {
504
4.95k
    auto local_state = LocalStateType::create_unique(this, state);
505
4.95k
    RETURN_IF_ERROR(local_state->init(state, info));
506
4.95k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
4.95k
    return Status::OK();
508
4.95k
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.70k
                                                            LocalSinkStateInfo& info) {
504
2.70k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.70k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.70k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.70k
    return Status::OK();
508
2.70k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.65k
                                                            LocalSinkStateInfo& info) {
504
2.65k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.65k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.65k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.65k
    return Status::OK();
508
2.65k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE17setup_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_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.42M
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.42M
    } else {
519
1.42M
        auto ss = LocalStateType::SharedStateType::create_shared();
520
1.42M
        ss->id = operator_id();
521
1.42M
        for (auto& dest : dests_id()) {
522
1.42M
            ss->related_op_ids.insert(dest);
523
1.42M
        }
524
1.42M
        return ss;
525
1.42M
    }
526
1.42M
}
_ZNK5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
104k
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
104k
    } else {
519
104k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
104k
        ss->id = operator_id();
521
104k
        for (auto& dest : dests_id()) {
522
104k
            ss->related_op_ids.insert(dest);
523
104k
        }
524
104k
        return ss;
525
104k
    }
526
104k
}
_ZNK5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
362k
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
362k
    } else {
519
362k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
362k
        ss->id = operator_id();
521
362k
        for (auto& dest : dests_id()) {
522
362k
            ss->related_op_ids.insert(dest);
523
362k
        }
524
362k
        return ss;
525
362k
    }
526
362k
}
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
367
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
367
    } else {
519
367
        auto ss = LocalStateType::SharedStateType::create_shared();
520
367
        ss->id = operator_id();
521
367
        for (auto& dest : dests_id()) {
522
367
            ss->related_op_ids.insert(dest);
523
367
        }
524
367
        return ss;
525
367
    }
526
367
}
_ZNK5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
47.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
47.6k
    } else {
519
47.6k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
47.6k
        ss->id = operator_id();
521
47.6k
        for (auto& dest : dests_id()) {
522
47.3k
            ss->related_op_ids.insert(dest);
523
47.3k
        }
524
47.6k
        return ss;
525
47.6k
    }
526
47.6k
}
_ZNK5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE19create_shared_stateEv
Line
Count
Source
511
28
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
28
    } else {
519
28
        auto ss = LocalStateType::SharedStateType::create_shared();
520
28
        ss->id = operator_id();
521
28
        for (auto& dest : dests_id()) {
522
28
            ss->related_op_ids.insert(dest);
523
28
        }
524
28
        return ss;
525
28
    }
526
28
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_25PaimonTableSinkLocalStateEE19create_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.62k
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.62k
    } else {
519
8.62k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
8.62k
        ss->id = operator_id();
521
8.63k
        for (auto& dest : dests_id()) {
522
8.63k
            ss->related_op_ids.insert(dest);
523
8.63k
        }
524
8.62k
        return ss;
525
8.62k
    }
526
8.62k
}
_ZNK5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
12
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
12
    } else {
519
12
        auto ss = LocalStateType::SharedStateType::create_shared();
520
12
        ss->id = operator_id();
521
12
        for (auto& dest : dests_id()) {
522
12
            ss->related_op_ids.insert(dest);
523
12
        }
524
12
        return ss;
525
12
    }
526
12
}
_ZNK5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
245k
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
245k
    } else {
519
245k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
245k
        ss->id = operator_id();
521
245k
        for (auto& dest : dests_id()) {
522
244k
            ss->related_op_ids.insert(dest);
523
244k
        }
524
245k
        return ss;
525
245k
    }
526
245k
}
_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
103k
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
103k
    } else {
519
103k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
103k
        ss->id = operator_id();
521
103k
        for (auto& dest : dests_id()) {
522
103k
            ss->related_op_ids.insert(dest);
523
103k
        }
524
103k
        return ss;
525
103k
    }
526
103k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
149
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
149
    } else {
519
149
        auto ss = LocalStateType::SharedStateType::create_shared();
520
149
        ss->id = operator_id();
521
149
        for (auto& dest : dests_id()) {
522
149
            ss->related_op_ids.insert(dest);
523
149
        }
524
149
        return ss;
525
149
    }
526
149
}
_ZNK5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
544k
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
544k
    } else {
519
544k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
544k
        ss->id = operator_id();
521
544k
        for (auto& dest : dests_id()) {
522
536k
            ss->related_op_ids.insert(dest);
523
536k
        }
524
544k
        return ss;
525
544k
    }
526
544k
}
_ZNK5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
5.68k
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
5.68k
    } else {
519
5.68k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
5.68k
        ss->id = operator_id();
521
5.68k
        for (auto& dest : dests_id()) {
522
5.67k
            ss->related_op_ids.insert(dest);
523
5.67k
        }
524
5.68k
        return ss;
525
5.68k
    }
526
5.68k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
416
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
416
    } else {
519
416
        auto ss = LocalStateType::SharedStateType::create_shared();
520
416
        ss->id = operator_id();
521
416
        for (auto& dest : dests_id()) {
522
416
            ss->related_op_ids.insert(dest);
523
416
        }
524
416
        return ss;
525
416
    }
526
416
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE19create_shared_stateEv
Line
Count
Source
511
2.62k
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.62k
    } else {
519
2.62k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
2.62k
        ss->id = operator_id();
521
2.62k
        for (auto& dest : dests_id()) {
522
2.62k
            ss->related_op_ids.insert(dest);
523
2.62k
        }
524
2.62k
        return ss;
525
2.62k
    }
526
2.62k
}
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE19create_shared_stateEv
Line
Count
Source
511
2.52k
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.52k
    } else {
519
2.52k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
2.52k
        ss->id = operator_id();
521
2.52k
        for (auto& dest : dests_id()) {
522
2.51k
            ss->related_op_ids.insert(dest);
523
2.51k
        }
524
2.52k
        return ss;
525
2.52k
    }
526
2.52k
}
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
552
            ss->related_op_ids.insert(dest);
523
552
        }
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.09M
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.09M
    auto local_state = LocalStateType::create_unique(state, this);
531
2.09M
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.09M
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.09M
    return Status::OK();
534
2.09M
}
_ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
68.4k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
68.4k
    auto local_state = LocalStateType::create_unique(state, this);
531
68.4k
    RETURN_IF_ERROR(local_state->init(state, info));
532
68.4k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
68.4k
    return Status::OK();
534
68.4k
}
_ZN5doris9OperatorXINS_18OlapScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
251k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
251k
    auto local_state = LocalStateType::create_unique(state, this);
531
251k
    RETURN_IF_ERROR(local_state->init(state, info));
532
251k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
251k
    return Status::OK();
534
251k
}
_ZN5doris9OperatorXINS_21GroupCommitLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
140
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
140
    auto local_state = LocalStateType::create_unique(state, this);
531
140
    RETURN_IF_ERROR(local_state->init(state, info));
532
140
    state->emplace_local_state(operator_id(), std::move(local_state));
533
140
    return Status::OK();
534
140
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_18JDBCScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_18FileScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
3.22k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
3.22k
    auto local_state = LocalStateType::create_unique(state, this);
531
3.22k
    RETURN_IF_ERROR(local_state->init(state, info));
532
3.22k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
3.22k
    return Status::OK();
534
3.22k
}
_ZN5doris9OperatorXINS_18AnalyticLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
8.59k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
8.59k
    auto local_state = LocalStateType::create_unique(state, this);
531
8.59k
    RETURN_IF_ERROR(local_state->init(state, info));
532
8.59k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
8.59k
    return Status::OK();
534
8.59k
}
_ZN5doris9OperatorXINS_14SortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
7.79k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
7.79k
    auto local_state = LocalStateType::create_unique(state, this);
531
7.79k
    RETURN_IF_ERROR(local_state->init(state, info));
532
7.79k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
7.79k
    return Status::OK();
534
7.79k
}
_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
235k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
235k
    auto local_state = LocalStateType::create_unique(state, this);
531
235k
    RETURN_IF_ERROR(local_state->init(state, info));
532
235k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
235k
    return Status::OK();
534
235k
}
_ZN5doris9OperatorXINS_13AggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
102k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
102k
    auto local_state = LocalStateType::create_unique(state, this);
531
102k
    RETURN_IF_ERROR(local_state->init(state, info));
532
102k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
102k
    return Status::OK();
534
102k
}
_ZN5doris9OperatorXINS_21BucketedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
48.9k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
48.9k
    auto local_state = LocalStateType::create_unique(state, this);
531
48.9k
    RETURN_IF_ERROR(local_state->init(state, info));
532
48.9k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
48.9k
    return Status::OK();
534
48.9k
}
_ZN5doris9OperatorXINS_24PartitionedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
140
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
140
    auto local_state = LocalStateType::create_unique(state, this);
531
140
    RETURN_IF_ERROR(local_state->init(state, info));
532
140
    state->emplace_local_state(operator_id(), std::move(local_state));
533
140
    return Status::OK();
534
140
}
_ZN5doris9OperatorXINS_23TableFunctionLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
5.31k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
5.31k
    auto local_state = LocalStateType::create_unique(state, this);
531
5.31k
    RETURN_IF_ERROR(local_state->init(state, info));
532
5.31k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
5.31k
    return Status::OK();
534
5.31k
}
_ZN5doris9OperatorXINS_18ExchangeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
295k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
295k
    auto local_state = LocalStateType::create_unique(state, this);
531
295k
    RETURN_IF_ERROR(local_state->init(state, info));
532
295k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
295k
    return Status::OK();
534
295k
}
_ZN5doris9OperatorXINS_16RepeatLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.37k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.37k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.37k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.37k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.37k
    return Status::OK();
534
1.37k
}
_ZN5doris9OperatorXINS_29NestedLoopJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
5.63k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
5.63k
    auto local_state = LocalStateType::create_unique(state, this);
531
5.63k
    RETURN_IF_ERROR(local_state->init(state, info));
532
5.63k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
5.63k
    return Status::OK();
534
5.63k
}
_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.66k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.66k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.66k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.66k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.66k
    return Status::OK();
534
1.66k
}
_ZN5doris9OperatorXINS_21UnionSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
55.5k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
55.5k
    auto local_state = LocalStateType::create_unique(state, this);
531
55.5k
    RETURN_IF_ERROR(local_state->init(state, info));
532
55.5k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
55.5k
    return Status::OK();
534
55.5k
}
_ZN5doris9OperatorXINS_35MultiCastDataStreamSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
5.66k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
5.66k
    auto local_state = LocalStateType::create_unique(state, this);
531
5.66k
    RETURN_IF_ERROR(local_state->init(state, info));
532
5.66k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
5.66k
    return Status::OK();
534
5.66k
}
_ZN5doris9OperatorXINS_29PartitionSortSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
309
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
309
    auto local_state = LocalStateType::create_unique(state, this);
531
309
    RETURN_IF_ERROR(local_state->init(state, info));
532
309
    state->emplace_local_state(operator_id(), std::move(local_state));
533
309
    return Status::OK();
534
309
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.67k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.67k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.67k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.67k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.67k
    return Status::OK();
534
2.67k
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.55k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.55k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.55k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.55k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.55k
    return Status::OK();
534
2.55k
}
_ZN5doris9OperatorXINS_17DataGenLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
461
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
461
    auto local_state = LocalStateType::create_unique(state, this);
531
461
    RETURN_IF_ERROR(local_state->init(state, info));
532
461
    state->emplace_local_state(operator_id(), std::move(local_state));
533
461
    return Status::OK();
534
461
}
_ZN5doris9OperatorXINS_20SchemaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.69k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.69k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.69k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.69k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.69k
    return Status::OK();
534
1.69k
}
_ZN5doris9OperatorXINS_18MetaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
10.7k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
10.7k
    auto local_state = LocalStateType::create_unique(state, this);
531
10.7k
    RETURN_IF_ERROR(local_state->init(state, info));
532
10.7k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
10.7k
    return Status::OK();
534
10.7k
}
_ZN5doris9OperatorXINS_29LocalExchangeSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
657k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
657k
    auto local_state = LocalStateType::create_unique(state, this);
531
657k
    RETURN_IF_ERROR(local_state->init(state, info));
532
657k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
657k
    return Status::OK();
534
657k
}
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
796
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
796
    auto local_state = LocalStateType::create_unique(state, this);
531
796
    RETURN_IF_ERROR(local_state->init(state, info));
532
796
    state->emplace_local_state(operator_id(), std::move(local_state));
533
796
    return Status::OK();
534
796
}
_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.42k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
6.42k
    auto local_state = LocalStateType::create_unique(state, this);
531
6.42k
    RETURN_IF_ERROR(local_state->init(state, info));
532
6.42k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
6.42k
    return Status::OK();
534
6.42k
}
_ZN5doris9OperatorXINS_30DistinctStreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
306k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
306k
    auto local_state = LocalStateType::create_unique(state, this);
531
306k
    RETURN_IF_ERROR(local_state->init(state, info));
532
306k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
306k
    return Status::OK();
534
306k
}
535
536
PipelineXSinkLocalStateBase::PipelineXSinkLocalStateBase(DataSinkOperatorXBase* parent,
537
                                                         RuntimeState* state)
538
1.75M
        : _parent(parent), _state(state) {}
539
540
PipelineXLocalStateBase::PipelineXLocalStateBase(RuntimeState* state, OperatorXBase* parent)
541
2.07M
        : _num_rows_returned(0),
542
2.07M
          _rows_returned_counter(nullptr),
543
2.07M
          _parent(parent),
544
2.07M
          _state(state),
545
2.07M
          _budget(state->batch_size(), state->preferred_block_size_bytes()) {}
546
547
template <typename SharedStateArg>
548
2.09M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
2.09M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
2.09M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
2.09M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
2.09M
    _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.09M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
2.09M
    _operator_profile->add_child(_common_profile.get(), true);
557
2.09M
    _operator_profile->add_child(_custom_profile.get(), true);
558
2.09M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
2.09M
    if constexpr (!is_fake_shared) {
560
1.20M
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
711k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
711k
                                    .first.get()
563
711k
                                    ->template cast<SharedStateArg>();
564
565
711k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
711k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
711k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
711k
        } else if (info.shared_state) {
569
422k
            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
422k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
422k
            _dependency = _shared_state->create_source_dependency(
576
422k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
422k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
422k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
422k
        } else {
580
72.1k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
8.21k
                DCHECK(false);
582
8.21k
            }
583
72.1k
        }
584
1.20M
    }
585
586
2.09M
    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.09M
    _rows_returned_counter =
591
2.09M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
2.09M
    _blocks_returned_counter =
593
2.09M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
2.09M
    _output_block_bytes_counter =
595
2.09M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
2.09M
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
2.09M
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
2.09M
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
2.09M
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
2.09M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
2.09M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
2.09M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
2.09M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
2.09M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
2.09M
    _memory_used_counter =
606
2.09M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
2.09M
    _common_profile->add_info_string("IsColocate",
608
2.09M
                                     std::to_string(_parent->is_colocated_operator()));
609
2.09M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
2.09M
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
2.09M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
2.09M
    return Status::OK();
613
2.09M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
68.5k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
68.5k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
68.5k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
68.5k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
68.5k
    _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
68.5k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
68.5k
    _operator_profile->add_child(_common_profile.get(), true);
557
68.5k
    _operator_profile->add_child(_custom_profile.get(), true);
558
68.5k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
68.5k
    if constexpr (!is_fake_shared) {
560
68.5k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
11.5k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
11.5k
                                    .first.get()
563
11.5k
                                    ->template cast<SharedStateArg>();
564
565
11.5k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
11.5k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
11.5k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
56.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
55.6k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
55.6k
            _dependency = _shared_state->create_source_dependency(
576
55.6k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
55.6k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
55.6k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
55.6k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
1.35k
        }
584
68.5k
    }
585
586
68.5k
    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
68.5k
    _rows_returned_counter =
591
68.5k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
68.5k
    _blocks_returned_counter =
593
68.5k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
68.5k
    _output_block_bytes_counter =
595
68.5k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
68.5k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
68.5k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
68.5k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
68.5k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
68.5k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
68.5k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
68.5k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
68.5k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
68.5k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
68.5k
    _memory_used_counter =
606
68.5k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
68.5k
    _common_profile->add_info_string("IsColocate",
608
68.5k
                                     std::to_string(_parent->is_colocated_operator()));
609
68.5k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
68.5k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
68.5k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
68.5k
    return Status::OK();
613
68.5k
}
_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
244k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
244k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
244k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
244k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
244k
    _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
244k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
244k
    _operator_profile->add_child(_common_profile.get(), true);
557
244k
    _operator_profile->add_child(_custom_profile.get(), true);
558
244k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
244k
    if constexpr (!is_fake_shared) {
560
244k
        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
244k
        } 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
235k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
235k
            _dependency = _shared_state->create_source_dependency(
576
235k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
235k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
235k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
235k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
8.85k
        }
584
244k
    }
585
586
244k
    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
244k
    _rows_returned_counter =
591
244k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
244k
    _blocks_returned_counter =
593
244k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
244k
    _output_block_bytes_counter =
595
244k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
244k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
244k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
244k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
244k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
244k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
244k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
244k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
244k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
244k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
244k
    _memory_used_counter =
606
244k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
244k
    _common_profile->add_info_string("IsColocate",
608
244k
                                     std::to_string(_parent->is_colocated_operator()));
609
244k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
244k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
244k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
244k
    return Status::OK();
613
244k
}
_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
5.67k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
5.67k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
5.67k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
5.67k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
5.67k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
5.67k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
5.67k
    _operator_profile->add_child(_common_profile.get(), true);
557
5.67k
    _operator_profile->add_child(_custom_profile.get(), true);
558
5.67k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
5.67k
    if constexpr (!is_fake_shared) {
560
5.67k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
5.67k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
5.52k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
5.52k
            _dependency = _shared_state->create_source_dependency(
576
5.52k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
5.52k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
5.52k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
5.52k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
150
        }
584
5.67k
    }
585
586
5.67k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
5.67k
    _rows_returned_counter =
591
5.67k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
5.67k
    _blocks_returned_counter =
593
5.67k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
5.67k
    _output_block_bytes_counter =
595
5.67k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
5.67k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
5.67k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
5.67k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
5.67k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
5.67k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
5.67k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
5.67k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
5.67k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
5.67k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
5.67k
    _memory_used_counter =
606
5.67k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
5.67k
    _common_profile->add_info_string("IsColocate",
608
5.67k
                                     std::to_string(_parent->is_colocated_operator()));
609
5.67k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
5.67k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
5.67k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
5.67k
    return Status::OK();
613
5.67k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
8.63k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
8.63k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
8.63k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
8.63k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
8.63k
    _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.63k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
8.63k
    _operator_profile->add_child(_common_profile.get(), true);
557
8.63k
    _operator_profile->add_child(_custom_profile.get(), true);
558
8.63k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
8.63k
    if constexpr (!is_fake_shared) {
560
8.63k
        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.63k
        } 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.55k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
8.55k
            _dependency = _shared_state->create_source_dependency(
576
8.55k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
8.55k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
8.55k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
8.55k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
80
        }
584
8.63k
    }
585
586
8.63k
    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.63k
    _rows_returned_counter =
591
8.63k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
8.63k
    _blocks_returned_counter =
593
8.63k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
8.63k
    _output_block_bytes_counter =
595
8.63k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
8.63k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
8.63k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
8.63k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
8.63k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
8.63k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
8.63k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
8.63k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
8.63k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
8.63k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
8.63k
    _memory_used_counter =
606
8.63k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
8.63k
    _common_profile->add_info_string("IsColocate",
608
8.63k
                                     std::to_string(_parent->is_colocated_operator()));
609
8.63k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
8.63k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
8.63k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
8.63k
    return Status::OK();
613
8.63k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
103k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
103k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
103k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
103k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
103k
    _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
103k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
103k
    _operator_profile->add_child(_common_profile.get(), true);
557
103k
    _operator_profile->add_child(_custom_profile.get(), true);
558
103k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
103k
    if constexpr (!is_fake_shared) {
560
103k
        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
103k
        } 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
101k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
101k
            _dependency = _shared_state->create_source_dependency(
576
101k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
101k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
101k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
101k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
2.31k
        }
584
103k
    }
585
586
103k
    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
103k
    _rows_returned_counter =
591
103k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
103k
    _blocks_returned_counter =
593
103k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
103k
    _output_block_bytes_counter =
595
103k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
103k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
103k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
103k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
103k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
103k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
103k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
103k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
103k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
103k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
103k
    _memory_used_counter =
606
103k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
103k
    _common_profile->add_info_string("IsColocate",
608
103k
                                     std::to_string(_parent->is_colocated_operator()));
609
103k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
103k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
103k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
103k
    return Status::OK();
613
103k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
48.9k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
48.9k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
48.9k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
48.9k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
48.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
48.9k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
48.9k
    _operator_profile->add_child(_common_profile.get(), true);
557
48.9k
    _operator_profile->add_child(_custom_profile.get(), true);
558
48.9k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
48.9k
    if constexpr (!is_fake_shared) {
560
48.9k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
48.9k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
48.9k
                                    .first.get()
563
48.9k
                                    ->template cast<SharedStateArg>();
564
565
48.9k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
48.9k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
48.9k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
48.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
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
50
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
50
        }
584
48.9k
    }
585
586
48.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
48.9k
    _rows_returned_counter =
591
48.9k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
48.9k
    _blocks_returned_counter =
593
48.9k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
48.9k
    _output_block_bytes_counter =
595
48.9k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
48.9k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
48.9k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
48.9k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
48.9k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
48.9k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
48.9k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
48.9k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
48.9k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
48.9k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
48.9k
    _memory_used_counter =
606
48.9k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
48.9k
    _common_profile->add_info_string("IsColocate",
608
48.9k
                                     std::to_string(_parent->is_colocated_operator()));
609
48.9k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
48.9k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
48.9k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
48.9k
    return Status::OK();
613
48.9k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
140
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
140
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
140
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
140
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
140
    _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
140
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
140
    _operator_profile->add_child(_common_profile.get(), true);
557
140
    _operator_profile->add_child(_custom_profile.get(), true);
558
140
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
140
    if constexpr (!is_fake_shared) {
560
140
        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
140
        } 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
140
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
140
            _dependency = _shared_state->create_source_dependency(
576
140
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
140
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
140
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
140
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
140
    }
585
586
140
    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
140
    _rows_returned_counter =
591
140
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
140
    _blocks_returned_counter =
593
140
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
140
    _output_block_bytes_counter =
595
140
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
140
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
140
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
140
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
140
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
140
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
140
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
140
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
140
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
140
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
140
    _memory_used_counter =
606
140
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
140
    _common_profile->add_info_string("IsColocate",
608
140
                                     std::to_string(_parent->is_colocated_operator()));
609
140
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
140
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
140
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
140
    return Status::OK();
613
140
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
884k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
884k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
884k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
884k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
884k
    _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
884k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
884k
    _operator_profile->add_child(_common_profile.get(), true);
557
884k
    _operator_profile->add_child(_custom_profile.get(), true);
558
884k
    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
884k
    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
884k
    _rows_returned_counter =
591
884k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
884k
    _blocks_returned_counter =
593
884k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
884k
    _output_block_bytes_counter =
595
884k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
884k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
884k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
884k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
884k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
884k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
884k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
884k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
884k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
884k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
884k
    _memory_used_counter =
606
884k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
884k
    _common_profile->add_info_string("IsColocate",
608
884k
                                     std::to_string(_parent->is_colocated_operator()));
609
884k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
884k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
884k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
884k
    return Status::OK();
613
884k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
55.4k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
55.4k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
55.4k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
55.4k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
55.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
55.4k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
55.4k
    _operator_profile->add_child(_common_profile.get(), true);
557
55.4k
    _operator_profile->add_child(_custom_profile.get(), true);
558
55.4k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
55.4k
    if constexpr (!is_fake_shared) {
560
55.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
55.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
4.44k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
4.44k
            _dependency = _shared_state->create_source_dependency(
576
4.44k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
4.44k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
4.44k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
51.0k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
51.0k
        }
584
55.4k
    }
585
586
55.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
55.4k
    _rows_returned_counter =
591
55.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
55.4k
    _blocks_returned_counter =
593
55.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
55.4k
    _output_block_bytes_counter =
595
55.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
55.4k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
55.4k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
55.4k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
55.4k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
55.4k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
55.4k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
55.4k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
55.4k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
55.4k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
55.4k
    _memory_used_counter =
606
55.4k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
55.4k
    _common_profile->add_info_string("IsColocate",
608
55.4k
                                     std::to_string(_parent->is_colocated_operator()));
609
55.4k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
55.4k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
55.4k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
55.4k
    return Status::OK();
613
55.4k
}
_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
5.68k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
5.68k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
5.68k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
5.68k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
5.68k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
5.68k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
5.68k
    _operator_profile->add_child(_common_profile.get(), true);
557
5.68k
    _operator_profile->add_child(_custom_profile.get(), true);
558
5.68k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
5.68k
    if constexpr (!is_fake_shared) {
560
5.68k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
5.68k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
5.63k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
5.63k
            _dependency = _shared_state->create_source_dependency(
576
5.63k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
5.63k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
5.63k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
5.63k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
49
        }
584
5.68k
    }
585
586
5.68k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
5.68k
    _rows_returned_counter =
591
5.68k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
5.68k
    _blocks_returned_counter =
593
5.68k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
5.68k
    _output_block_bytes_counter =
595
5.68k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
5.68k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
5.68k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
5.68k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
5.68k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
5.68k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
5.68k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
5.68k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
5.68k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
5.68k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
5.68k
    _memory_used_counter =
606
5.68k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
5.68k
    _common_profile->add_info_string("IsColocate",
608
5.68k
                                     std::to_string(_parent->is_colocated_operator()));
609
5.68k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
5.68k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
5.68k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
5.68k
    return Status::OK();
613
5.68k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
414
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
414
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
414
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
414
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
414
    _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
414
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
414
    _operator_profile->add_child(_common_profile.get(), true);
557
414
    _operator_profile->add_child(_custom_profile.get(), true);
558
414
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
414
    if constexpr (!is_fake_shared) {
560
414
        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
414
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
411
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
411
            _dependency = _shared_state->create_source_dependency(
576
411
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
411
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
411
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
411
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
3
        }
584
414
    }
585
586
414
    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
414
    _rows_returned_counter =
591
414
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
414
    _blocks_returned_counter =
593
414
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
414
    _output_block_bytes_counter =
595
414
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
414
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
414
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
414
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
414
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
414
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
414
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
414
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
414
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
414
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
414
    _memory_used_counter =
606
414
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
414
    _common_profile->add_info_string("IsColocate",
608
414
                                     std::to_string(_parent->is_colocated_operator()));
609
414
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
414
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
414
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
414
    return Status::OK();
613
414
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
5.25k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
5.25k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
5.25k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
5.25k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
5.25k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
5.25k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
5.25k
    _operator_profile->add_child(_common_profile.get(), true);
557
5.25k
    _operator_profile->add_child(_custom_profile.get(), true);
558
5.25k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
5.25k
    if constexpr (!is_fake_shared) {
560
5.25k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
5.25k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
5.19k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
5.19k
            _dependency = _shared_state->create_source_dependency(
576
5.19k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
5.19k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
5.19k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
5.19k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
56
        }
584
5.25k
    }
585
586
5.25k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
5.25k
    _rows_returned_counter =
591
5.25k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
5.25k
    _blocks_returned_counter =
593
5.25k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
5.25k
    _output_block_bytes_counter =
595
5.25k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
5.25k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
5.25k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
5.25k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
5.25k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
5.25k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
5.25k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
5.25k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
5.25k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
5.25k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
5.25k
    _memory_used_counter =
606
5.25k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
5.25k
    _common_profile->add_info_string("IsColocate",
608
5.25k
                                     std::to_string(_parent->is_colocated_operator()));
609
5.25k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
5.25k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
5.25k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
5.25k
    return Status::OK();
613
5.25k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
659k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
659k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
659k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
659k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
659k
    _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
659k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
659k
    _operator_profile->add_child(_common_profile.get(), true);
557
659k
    _operator_profile->add_child(_custom_profile.get(), true);
558
659k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
659k
    if constexpr (!is_fake_shared) {
560
659k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
651k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
651k
                                    .first.get()
563
651k
                                    ->template cast<SharedStateArg>();
564
565
651k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
651k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
651k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
651k
        } 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
8.21k
        } else {
580
8.21k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
8.21k
                DCHECK(false);
582
8.21k
            }
583
8.21k
        }
584
659k
    }
585
586
659k
    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
659k
    _rows_returned_counter =
591
659k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
659k
    _blocks_returned_counter =
593
659k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
659k
    _output_block_bytes_counter =
595
659k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
659k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
659k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
659k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
659k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
659k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
659k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
659k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
659k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
659k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
659k
    _memory_used_counter =
606
659k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
659k
    _common_profile->add_info_string("IsColocate",
608
659k
                                     std::to_string(_parent->is_colocated_operator()));
609
659k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
659k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
659k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
659k
    return Status::OK();
613
659k
}
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.10M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
2.10M
    _conjuncts.resize(_parent->_conjuncts.size());
618
2.41M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
310k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
310k
    }
621
2.10M
    if (_parent->has_projection()) {
622
388k
        const auto& projection = *_parent->_projection;
623
388k
        _projections.resize(projection.projections.size());
624
2.40M
        for (size_t i = 0; i < _projections.size(); i++) {
625
2.01M
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
2.01M
        }
627
388k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
404k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
16.0k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
185k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
169k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
169k
                        state, _intermediate_projections[i][j]));
633
169k
            }
634
16.0k
        }
635
388k
    }
636
2.10M
    return Status::OK();
637
2.10M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
68.8k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
68.8k
    _conjuncts.resize(_parent->_conjuncts.size());
618
70.1k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
1.31k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1.31k
    }
621
68.8k
    if (_parent->has_projection()) {
622
68.8k
        const auto& projection = *_parent->_projection;
623
68.8k
        _projections.resize(projection.projections.size());
624
366k
        for (size_t i = 0; i < _projections.size(); i++) {
625
297k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
297k
        }
627
68.8k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
74.4k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
5.54k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
120k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
115k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
115k
                        state, _intermediate_projections[i][j]));
633
115k
            }
634
5.54k
        }
635
68.8k
    }
636
68.8k
    return Status::OK();
637
68.8k
}
_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
246k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
246k
    _conjuncts.resize(_parent->_conjuncts.size());
618
246k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
246k
    if (_parent->has_projection()) {
622
80
        const auto& projection = *_parent->_projection;
623
80
        _projections.resize(projection.projections.size());
624
402
        for (size_t i = 0; i < _projections.size(); i++) {
625
322
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
322
        }
627
80
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
80
        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
80
    }
636
246k
    return Status::OK();
637
246k
}
_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
5.70k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
5.70k
    _conjuncts.resize(_parent->_conjuncts.size());
618
5.75k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
50
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
50
    }
621
5.71k
    if (_parent->has_projection()) {
622
5.71k
        const auto& projection = *_parent->_projection;
623
5.71k
        _projections.resize(projection.projections.size());
624
26.7k
        for (size_t i = 0; i < _projections.size(); i++) {
625
21.0k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
21.0k
        }
627
5.71k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
5.73k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
19
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
179
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
160
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
160
                        state, _intermediate_projections[i][j]));
633
160
            }
634
19
        }
635
5.71k
    }
636
5.70k
    return Status::OK();
637
5.70k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
8.62k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
8.62k
    _conjuncts.resize(_parent->_conjuncts.size());
618
9.30k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
675
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
675
    }
621
8.62k
    if (_parent->has_projection()) {
622
4.09k
        const auto& projection = *_parent->_projection;
623
4.09k
        _projections.resize(projection.projections.size());
624
16.6k
        for (size_t i = 0; i < _projections.size(); i++) {
625
12.5k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
12.5k
        }
627
4.09k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
4.17k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
84
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
634
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
550
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
550
                        state, _intermediate_projections[i][j]));
633
550
            }
634
84
        }
635
4.09k
    }
636
8.62k
    return Status::OK();
637
8.62k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
103k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
103k
    _conjuncts.resize(_parent->_conjuncts.size());
618
104k
    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
103k
    if (_parent->has_projection()) {
622
32.3k
        const auto& projection = *_parent->_projection;
623
32.3k
        _projections.resize(projection.projections.size());
624
288k
        for (size_t i = 0; i < _projections.size(); i++) {
625
256k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
256k
        }
627
32.3k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
33.1k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
796
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
5.08k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
4.29k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
4.29k
                        state, _intermediate_projections[i][j]));
633
4.29k
            }
634
796
        }
635
32.3k
    }
636
103k
    return Status::OK();
637
103k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
48.9k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
48.9k
    _conjuncts.resize(_parent->_conjuncts.size());
618
49.0k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
10
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
10
    }
621
48.9k
    if (_parent->has_projection()) {
622
125
        const auto& projection = *_parent->_projection;
623
125
        _projections.resize(projection.projections.size());
624
491
        for (size_t i = 0; i < _projections.size(); i++) {
625
366
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
366
        }
627
125
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
125
        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
125
    }
636
48.9k
    return Status::OK();
637
48.9k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
144
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
144
    _conjuncts.resize(_parent->_conjuncts.size());
618
144
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
144
    if (_parent->has_projection()) {
622
130
        const auto& projection = *_parent->_projection;
623
130
        _projections.resize(projection.projections.size());
624
390
        for (size_t i = 0; i < _projections.size(); i++) {
625
260
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
260
        }
627
130
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
130
        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
130
    }
636
144
    return Status::OK();
637
144
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
891k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
891k
    _conjuncts.resize(_parent->_conjuncts.size());
618
1.19M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
306k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
306k
    }
621
891k
    if (_parent->has_projection()) {
622
265k
        const auto& projection = *_parent->_projection;
623
265k
        _projections.resize(projection.projections.size());
624
1.59M
        for (size_t i = 0; i < _projections.size(); i++) {
625
1.32M
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
1.32M
        }
627
265k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
274k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
9.40k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
55.2k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
45.8k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
45.8k
                        state, _intermediate_projections[i][j]));
633
45.8k
            }
634
9.40k
        }
635
265k
    }
636
891k
    return Status::OK();
637
891k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
55.8k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
55.8k
    _conjuncts.resize(_parent->_conjuncts.size());
618
55.8k
    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.8k
    if (_parent->has_projection()) {
622
11.8k
        const auto& projection = *_parent->_projection;
623
11.8k
        _projections.resize(projection.projections.size());
624
112k
        for (size_t i = 0; i < _projections.size(); i++) {
625
100k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
100k
        }
627
11.8k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
11.9k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
159
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
3.56k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
3.40k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
3.40k
                        state, _intermediate_projections[i][j]));
633
3.40k
            }
634
159
        }
635
11.8k
    }
636
55.8k
    return Status::OK();
637
55.8k
}
_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
5.68k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
5.68k
    _conjuncts.resize(_parent->_conjuncts.size());
618
6.33k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
645
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
645
    }
621
5.68k
    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
5.68k
    return Status::OK();
637
5.68k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
415
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
415
    _conjuncts.resize(_parent->_conjuncts.size());
618
415
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
415
    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
415
    return Status::OK();
637
415
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
5.25k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
5.25k
    _conjuncts.resize(_parent->_conjuncts.size());
618
5.25k
    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.25k
    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.25k
    return Status::OK();
637
5.25k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
664k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
664k
    _conjuncts.resize(_parent->_conjuncts.size());
618
664k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
664k
    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
664k
    return Status::OK();
637
664k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4openEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
169
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
169
    _conjuncts.resize(_parent->_conjuncts.size());
618
176
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
7
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
7
    }
621
169
    if (_parent->has_projection()) {
622
166
        const auto& projection = *_parent->_projection;
623
166
        _projections.resize(projection.projections.size());
624
491
        for (size_t i = 0; i < _projections.size(); i++) {
625
325
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
325
        }
627
166
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
169
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
3
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
11
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
8
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
8
                        state, _intermediate_projections[i][j]));
633
8
            }
634
3
        }
635
166
    }
636
169
    return Status::OK();
637
169
}
638
639
template <typename SharedStateArg>
640
6.66k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
6.66k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
6.66k
    _terminated = true;
645
6.66k
    return Status::OK();
646
6.66k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
463
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
463
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
463
    _terminated = true;
645
463
    return Status::OK();
646
463
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
38
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
38
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
38
    _terminated = true;
645
38
    return Status::OK();
646
38
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
36
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
36
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
36
    _terminated = true;
645
36
    return Status::OK();
646
36
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
107
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
107
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
107
    _terminated = true;
645
107
    return Status::OK();
646
107
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
2
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
2
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
2
    _terminated = true;
645
2
    return Status::OK();
646
2
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
4.61k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
4.61k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
4.61k
    _terminated = true;
645
4.61k
    return Status::OK();
646
4.61k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
110
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
110
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
110
    _terminated = true;
645
110
    return Status::OK();
646
110
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
10
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
10
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
10
    _terminated = true;
645
10
    return Status::OK();
646
10
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
1.24k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
1.24k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
1.24k
    _terminated = true;
645
1.24k
    return Status::OK();
646
1.24k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
32
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
32
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
32
    _terminated = true;
645
32
    return Status::OK();
646
32
}
647
648
template <typename SharedStateArg>
649
2.38M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
2.38M
    if (_closed) {
651
276k
        return Status::OK();
652
276k
    }
653
2.10M
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
1.21M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
1.21M
    }
656
2.10M
    _closed = true;
657
2.10M
    return Status::OK();
658
2.38M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
68.7k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
68.7k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
68.7k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
68.7k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
68.7k
    }
656
68.7k
    _closed = true;
657
68.7k
    return Status::OK();
658
68.7k
}
_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
488k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
488k
    if (_closed) {
651
245k
        return Status::OK();
652
245k
    }
653
243k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
243k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
243k
    }
656
243k
    _closed = true;
657
243k
    return Status::OK();
658
488k
}
_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
5.69k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
5.69k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
5.69k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
5.69k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
5.69k
    }
656
5.69k
    _closed = true;
657
5.69k
    return Status::OK();
658
5.69k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
17.3k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
17.3k
    if (_closed) {
651
8.78k
        return Status::OK();
652
8.78k
    }
653
8.60k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
8.60k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
8.60k
    }
656
8.60k
    _closed = true;
657
8.60k
    return Status::OK();
658
17.3k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
103k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
103k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
103k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
103k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
103k
    }
656
103k
    _closed = true;
657
103k
    return Status::OK();
658
103k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
48.7k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
48.7k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
48.7k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
48.7k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
48.7k
    }
656
48.7k
    _closed = true;
657
48.7k
    return Status::OK();
658
48.7k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
139
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
139
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
139
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
139
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
139
    }
656
139
    _closed = true;
657
139
    return Status::OK();
658
139
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
908k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
908k
    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
892k
    _closed = true;
657
892k
    return Status::OK();
658
908k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
55.8k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
55.8k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
55.8k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
55.8k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
55.8k
    }
656
55.8k
    _closed = true;
657
55.8k
    return Status::OK();
658
55.8k
}
_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
5.63k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
5.63k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
5.63k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
5.63k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
5.63k
    }
656
5.63k
    _closed = true;
657
5.63k
    return Status::OK();
658
5.63k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
626
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
626
    if (_closed) {
651
313
        return Status::OK();
652
313
    }
653
313
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
313
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
313
    }
656
313
    _closed = true;
657
313
    return Status::OK();
658
626
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
10.7k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
10.7k
    if (_closed) {
651
5.48k
        return Status::OK();
652
5.48k
    }
653
5.23k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
5.23k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
5.23k
    }
656
5.23k
    _closed = true;
657
5.23k
    return Status::OK();
658
10.7k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
665k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
665k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
665k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
665k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
665k
    }
656
665k
    _closed = true;
657
665k
    return Status::OK();
658
665k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
335
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
335
    if (_closed) {
651
175
        return Status::OK();
652
175
    }
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
335
}
659
660
template <typename SharedState>
661
1.76M
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
1.76M
    _operator_profile =
664
1.76M
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
1.76M
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
1.76M
    _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.76M
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
1.76M
    _operator_profile->add_child(_common_profile, true);
673
1.76M
    _operator_profile->add_child(_custom_profile, true);
674
675
1.76M
    _operator_profile->set_metadata(_parent->node_id());
676
1.76M
    _wait_for_finish_dependency_timer =
677
1.76M
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
1.76M
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
1.76M
    if constexpr (!is_fake_shared) {
680
1.22M
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
1.22M
            info.shared_state_map.end()) {
682
316k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
256k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
256k
            }
685
316k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
316k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
316k
                                                  ? 0
688
316k
                                                  : info.task_idx]
689
316k
                                  .get();
690
316k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
905k
        } else {
692
18.4E
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
18.4E
                DCHECK(false);
694
18.4E
            }
695
905k
            _shared_state = info.shared_state->template cast<SharedState>();
696
905k
            _dependency = _shared_state->create_sink_dependency(
697
905k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
905k
        }
699
1.22M
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
1.22M
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
1.22M
    }
702
703
1.76M
    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.76M
    _rows_input_counter =
708
1.76M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
1.76M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
1.76M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
1.76M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
1.76M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
1.76M
    _memory_used_counter =
714
1.76M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
1.76M
    _common_profile->add_info_string("IsColocate",
716
1.76M
                                     std::to_string(_parent->is_colocated_operator()));
717
1.76M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
1.76M
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
1.76M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
1.76M
    return Status::OK();
721
1.76M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
116k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
116k
    _operator_profile =
664
116k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
116k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
116k
    _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
116k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
116k
    _operator_profile->add_child(_common_profile, true);
673
116k
    _operator_profile->add_child(_custom_profile, true);
674
675
116k
    _operator_profile->set_metadata(_parent->node_id());
676
116k
    _wait_for_finish_dependency_timer =
677
116k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
116k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
116k
    if constexpr (!is_fake_shared) {
680
116k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
116k
            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
11.7k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
11.7k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
11.7k
                                                  ? 0
688
11.7k
                                                  : info.task_idx]
689
11.7k
                                  .get();
690
11.7k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
104k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
104k
            _shared_state = info.shared_state->template cast<SharedState>();
696
104k
            _dependency = _shared_state->create_sink_dependency(
697
104k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
104k
        }
699
116k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
116k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
116k
    }
702
703
116k
    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
116k
    _rows_input_counter =
708
116k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
116k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
116k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
116k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
116k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
116k
    _memory_used_counter =
714
116k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
116k
    _common_profile->add_info_string("IsColocate",
716
116k
                                     std::to_string(_parent->is_colocated_operator()));
717
116k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
116k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
116k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
116k
    return Status::OK();
721
116k
}
_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
245k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
245k
    _operator_profile =
664
245k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
245k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
245k
    _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
245k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
245k
    _operator_profile->add_child(_common_profile, true);
673
245k
    _operator_profile->add_child(_custom_profile, true);
674
675
245k
    _operator_profile->set_metadata(_parent->node_id());
676
245k
    _wait_for_finish_dependency_timer =
677
245k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
245k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
245k
    if constexpr (!is_fake_shared) {
680
245k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
245k
            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
245k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
245k
            _shared_state = info.shared_state->template cast<SharedState>();
696
245k
            _dependency = _shared_state->create_sink_dependency(
697
245k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
245k
        }
699
245k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
245k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
245k
    }
702
703
245k
    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
245k
    _rows_input_counter =
708
245k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
245k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
245k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
245k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
245k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
245k
    _memory_used_counter =
714
245k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
245k
    _common_profile->add_info_string("IsColocate",
716
245k
                                     std::to_string(_parent->is_colocated_operator()));
717
245k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
245k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
245k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
245k
    return Status::OK();
721
245k
}
_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
5.67k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
5.67k
    _operator_profile =
664
5.67k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
5.67k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
5.67k
    _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
5.67k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
5.67k
    _operator_profile->add_child(_common_profile, true);
673
5.67k
    _operator_profile->add_child(_custom_profile, true);
674
675
5.67k
    _operator_profile->set_metadata(_parent->node_id());
676
5.67k
    _wait_for_finish_dependency_timer =
677
5.67k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
5.67k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
5.67k
    if constexpr (!is_fake_shared) {
680
5.67k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
5.67k
            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
5.67k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
5.67k
            _shared_state = info.shared_state->template cast<SharedState>();
696
5.67k
            _dependency = _shared_state->create_sink_dependency(
697
5.67k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
5.67k
        }
699
5.67k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
5.67k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
5.67k
    }
702
703
5.67k
    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
5.67k
    _rows_input_counter =
708
5.67k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
5.67k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
5.67k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
5.67k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
5.67k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
5.67k
    _memory_used_counter =
714
5.67k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
5.67k
    _common_profile->add_info_string("IsColocate",
716
5.67k
                                     std::to_string(_parent->is_colocated_operator()));
717
5.67k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
5.67k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
5.67k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
5.67k
    return Status::OK();
721
5.67k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
8.62k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
8.62k
    _operator_profile =
664
8.62k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
8.62k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
8.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
8.62k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
8.62k
    _operator_profile->add_child(_common_profile, true);
673
8.62k
    _operator_profile->add_child(_custom_profile, true);
674
675
8.62k
    _operator_profile->set_metadata(_parent->node_id());
676
8.62k
    _wait_for_finish_dependency_timer =
677
8.62k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
8.62k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
8.62k
    if constexpr (!is_fake_shared) {
680
8.62k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
8.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
8.62k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
8.62k
            _shared_state = info.shared_state->template cast<SharedState>();
696
8.62k
            _dependency = _shared_state->create_sink_dependency(
697
8.62k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
8.62k
        }
699
8.62k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
8.62k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
8.62k
    }
702
703
8.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
8.62k
    _rows_input_counter =
708
8.62k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
8.62k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
8.62k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
8.62k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
8.62k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
8.62k
    _memory_used_counter =
714
8.62k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
8.62k
    _common_profile->add_info_string("IsColocate",
716
8.62k
                                     std::to_string(_parent->is_colocated_operator()));
717
8.62k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
8.62k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
8.62k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
8.62k
    return Status::OK();
721
8.62k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
103k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
103k
    _operator_profile =
664
103k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
103k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
103k
    _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
103k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
103k
    _operator_profile->add_child(_common_profile, true);
673
103k
    _operator_profile->add_child(_custom_profile, true);
674
675
103k
    _operator_profile->set_metadata(_parent->node_id());
676
103k
    _wait_for_finish_dependency_timer =
677
103k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
103k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
103k
    if constexpr (!is_fake_shared) {
680
103k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
103k
            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
103k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
103k
            _shared_state = info.shared_state->template cast<SharedState>();
696
103k
            _dependency = _shared_state->create_sink_dependency(
697
103k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
103k
        }
699
103k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
103k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
103k
    }
702
703
103k
    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
103k
    _rows_input_counter =
708
103k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
103k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
103k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
103k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
103k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
103k
    _memory_used_counter =
714
103k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
103k
    _common_profile->add_info_string("IsColocate",
716
103k
                                     std::to_string(_parent->is_colocated_operator()));
717
103k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
103k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
103k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
103k
    return Status::OK();
721
103k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
48.8k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
48.8k
    _operator_profile =
664
48.8k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
48.8k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
48.8k
    _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
48.8k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
48.8k
    _operator_profile->add_child(_common_profile, true);
673
48.8k
    _operator_profile->add_child(_custom_profile, true);
674
675
48.8k
    _operator_profile->set_metadata(_parent->node_id());
676
48.8k
    _wait_for_finish_dependency_timer =
677
48.8k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
48.8k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
48.8k
    if constexpr (!is_fake_shared) {
680
48.8k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
48.9k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
48.9k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
48.9k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
48.9k
                                                  ? 0
688
48.9k
                                                  : info.task_idx]
689
48.9k
                                  .get();
690
48.9k
            _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
48.8k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
48.8k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
48.8k
    }
702
703
48.8k
    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
48.8k
    _rows_input_counter =
708
48.8k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
48.8k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
48.8k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
48.8k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
48.8k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
48.8k
    _memory_used_counter =
714
48.8k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
48.8k
    _common_profile->add_info_string("IsColocate",
716
48.8k
                                     std::to_string(_parent->is_colocated_operator()));
717
48.8k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
48.8k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
48.8k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
48.8k
    return Status::OK();
721
48.8k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
150
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
150
    _operator_profile =
664
150
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
150
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
150
    _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
150
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
150
    _operator_profile->add_child(_common_profile, true);
673
150
    _operator_profile->add_child(_custom_profile, true);
674
675
150
    _operator_profile->set_metadata(_parent->node_id());
676
150
    _wait_for_finish_dependency_timer =
677
150
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
150
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
150
    if constexpr (!is_fake_shared) {
680
150
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
150
            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
150
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
150
            _shared_state = info.shared_state->template cast<SharedState>();
696
150
            _dependency = _shared_state->create_sink_dependency(
697
150
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
150
        }
699
150
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
150
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
150
    }
702
703
150
    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
150
    _rows_input_counter =
708
150
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
150
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
150
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
150
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
150
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
150
    _memory_used_counter =
714
150
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
150
    _common_profile->add_info_string("IsColocate",
716
150
                                     std::to_string(_parent->is_colocated_operator()));
717
150
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
150
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
150
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
150
    return Status::OK();
721
150
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
543k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
543k
    _operator_profile =
664
543k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
543k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
543k
    _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
543k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
543k
    _operator_profile->add_child(_common_profile, true);
673
543k
    _operator_profile->add_child(_custom_profile, true);
674
675
543k
    _operator_profile->set_metadata(_parent->node_id());
676
543k
    _wait_for_finish_dependency_timer =
677
543k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
543k
    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
543k
    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
543k
    _rows_input_counter =
708
543k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
543k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
543k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
543k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
543k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
543k
    _memory_used_counter =
714
543k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
543k
    _common_profile->add_info_string("IsColocate",
716
543k
                                     std::to_string(_parent->is_colocated_operator()));
717
543k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
543k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
543k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
543k
    return Status::OK();
721
543k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
11.1k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
11.1k
    _operator_profile =
664
11.1k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
11.1k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
11.1k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
11.1k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
11.1k
    _operator_profile->add_child(_common_profile, true);
673
11.1k
    _operator_profile->add_child(_custom_profile, true);
674
675
11.1k
    _operator_profile->set_metadata(_parent->node_id());
676
11.1k
    _wait_for_finish_dependency_timer =
677
11.1k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
11.1k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
11.1k
    if constexpr (!is_fake_shared) {
680
11.1k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
11.1k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
11.1k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
11.1k
            _shared_state = info.shared_state->template cast<SharedState>();
696
11.1k
            _dependency = _shared_state->create_sink_dependency(
697
11.1k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
11.1k
        }
699
11.1k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
11.1k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
11.1k
    }
702
703
11.1k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
11.1k
    _rows_input_counter =
708
11.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
11.1k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
11.1k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
11.1k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
11.1k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
11.1k
    _memory_used_counter =
714
11.1k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
11.1k
    _common_profile->add_info_string("IsColocate",
716
11.1k
                                     std::to_string(_parent->is_colocated_operator()));
717
11.1k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
11.1k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
11.1k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
11.1k
    return Status::OK();
721
11.1k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
416
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
416
    _operator_profile =
664
416
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
416
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
416
    _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
416
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
416
    _operator_profile->add_child(_common_profile, true);
673
416
    _operator_profile->add_child(_custom_profile, true);
674
675
416
    _operator_profile->set_metadata(_parent->node_id());
676
416
    _wait_for_finish_dependency_timer =
677
416
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
416
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
416
    if constexpr (!is_fake_shared) {
680
416
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
416
            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
416
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
416
            _shared_state = info.shared_state->template cast<SharedState>();
696
416
            _dependency = _shared_state->create_sink_dependency(
697
416
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
416
        }
699
416
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
416
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
416
    }
702
703
416
    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
416
    _rows_input_counter =
708
416
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
416
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
416
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
416
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
416
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
416
    _memory_used_counter =
714
416
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
416
    _common_profile->add_info_string("IsColocate",
716
416
                                     std::to_string(_parent->is_colocated_operator()));
717
416
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
416
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
416
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
416
    return Status::OK();
721
416
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
2.15k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
2.15k
    _operator_profile =
664
2.15k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
2.15k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
2.15k
    _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.15k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
2.15k
    _operator_profile->add_child(_common_profile, true);
673
2.15k
    _operator_profile->add_child(_custom_profile, true);
674
675
2.15k
    _operator_profile->set_metadata(_parent->node_id());
676
2.15k
    _wait_for_finish_dependency_timer =
677
2.15k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
2.15k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
2.15k
    if constexpr (!is_fake_shared) {
680
2.15k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
2.15k
            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.15k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
2.15k
            _shared_state = info.shared_state->template cast<SharedState>();
696
2.15k
            _dependency = _shared_state->create_sink_dependency(
697
2.15k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
2.15k
        }
699
2.15k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
2.15k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
2.15k
    }
702
703
2.15k
    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.15k
    _rows_input_counter =
708
2.15k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
2.15k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
2.15k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
2.15k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
2.15k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
2.15k
    _memory_used_counter =
714
2.15k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
2.15k
    _common_profile->add_info_string("IsColocate",
716
2.15k
                                     std::to_string(_parent->is_colocated_operator()));
717
2.15k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
2.15k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
2.15k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
2.15k
    return Status::OK();
721
2.15k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
12.9k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
12.9k
    _operator_profile =
664
12.9k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
12.9k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
12.9k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
12.9k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
12.9k
    _operator_profile->add_child(_common_profile, true);
673
12.9k
    _operator_profile->add_child(_custom_profile, true);
674
675
12.9k
    _operator_profile->set_metadata(_parent->node_id());
676
12.9k
    _wait_for_finish_dependency_timer =
677
12.9k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
12.9k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
12.9k
    if constexpr (!is_fake_shared) {
680
12.9k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
12.9k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
12.9k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
12.9k
            _shared_state = info.shared_state->template cast<SharedState>();
696
12.9k
            _dependency = _shared_state->create_sink_dependency(
697
12.9k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
12.9k
        }
699
12.9k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
12.9k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
12.9k
    }
702
703
12.9k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
12.9k
    _rows_input_counter =
708
12.9k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
12.9k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
12.9k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
12.9k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
12.9k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
12.9k
    _memory_used_counter =
714
12.9k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
12.9k
    _common_profile->add_info_string("IsColocate",
716
12.9k
                                     std::to_string(_parent->is_colocated_operator()));
717
12.9k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
12.9k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
12.9k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
12.9k
    return Status::OK();
721
12.9k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
255k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
255k
    _operator_profile =
664
255k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
255k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
255k
    _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
255k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
255k
    _operator_profile->add_child(_common_profile, true);
673
255k
    _operator_profile->add_child(_custom_profile, true);
674
675
255k
    _operator_profile->set_metadata(_parent->node_id());
676
255k
    _wait_for_finish_dependency_timer =
677
255k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
255k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
255k
    if constexpr (!is_fake_shared) {
680
255k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
256k
            info.shared_state_map.end()) {
682
256k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
256k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
256k
            }
685
256k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
256k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
256k
                                                  ? 0
688
256k
                                                  : info.task_idx]
689
256k
                                  .get();
690
256k
            _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
255k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
255k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
255k
    }
702
703
255k
    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
255k
    _rows_input_counter =
708
255k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
255k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
255k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
255k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
255k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
255k
    _memory_used_counter =
714
255k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
255k
    _common_profile->add_info_string("IsColocate",
716
255k
                                     std::to_string(_parent->is_colocated_operator()));
717
255k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
255k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
255k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
255k
    return Status::OK();
721
255k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
410k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
410k
    _operator_profile =
664
410k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
410k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
410k
    _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
410k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
410k
    _operator_profile->add_child(_common_profile, true);
673
410k
    _operator_profile->add_child(_custom_profile, true);
674
675
410k
    _operator_profile->set_metadata(_parent->node_id());
676
410k
    _wait_for_finish_dependency_timer =
677
410k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
410k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
410k
    if constexpr (!is_fake_shared) {
680
410k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
410k
            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
410k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
410k
            _shared_state = info.shared_state->template cast<SharedState>();
696
410k
            _dependency = _shared_state->create_sink_dependency(
697
410k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
410k
        }
699
410k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
410k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
410k
    }
702
703
410k
    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
410k
    _rows_input_counter =
708
410k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
410k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
410k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
410k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
410k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
410k
    _memory_used_counter =
714
410k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
410k
    _common_profile->add_info_string("IsColocate",
716
410k
                                     std::to_string(_parent->is_colocated_operator()));
717
410k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
410k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
410k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
410k
    return Status::OK();
721
410k
}
_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.77M
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
1.77M
    if (_closed) {
726
2
        return Status::OK();
727
2
    }
728
1.77M
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
1.22M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
1.22M
    }
731
1.77M
    _closed = true;
732
1.77M
    return Status::OK();
733
1.77M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
116k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
116k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
116k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
116k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
116k
    }
731
116k
    _closed = true;
732
116k
    return Status::OK();
733
116k
}
_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
245k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
245k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
245k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
245k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
245k
    }
731
245k
    _closed = true;
732
245k
    return Status::OK();
733
245k
}
_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
5.67k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
5.67k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
5.67k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
5.67k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
5.67k
    }
731
5.67k
    _closed = true;
732
5.67k
    return Status::OK();
733
5.67k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
8.58k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
8.58k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
8.58k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
8.58k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
8.58k
    }
731
8.58k
    _closed = true;
732
8.58k
    return Status::OK();
733
8.58k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
103k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
103k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
103k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
103k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
103k
    }
731
103k
    _closed = true;
732
103k
    return Status::OK();
733
103k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
48.7k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
48.7k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
48.7k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
48.7k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
48.7k
    }
731
48.7k
    _closed = true;
732
48.7k
    return Status::OK();
733
48.7k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
139
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
139
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
139
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
139
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
139
    }
731
139
    _closed = true;
732
139
    return Status::OK();
733
139
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
549k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
549k
    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
549k
    _closed = true;
732
549k
    return Status::OK();
733
549k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
11.2k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
11.2k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
11.2k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
11.2k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
11.2k
    }
731
11.2k
    _closed = true;
732
11.2k
    return Status::OK();
733
11.2k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
312
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
312
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
312
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
312
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
312
    }
731
312
    _closed = true;
732
312
    return Status::OK();
733
312
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
2.18k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
2.18k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
2.18k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
2.18k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
2.18k
    }
731
2.18k
    _closed = true;
732
2.18k
    return Status::OK();
733
2.18k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
12.9k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
12.9k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
12.9k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
12.9k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
12.9k
    }
731
12.9k
    _closed = true;
732
12.9k
    return Status::OK();
733
12.9k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
257k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
257k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
257k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
257k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
257k
    }
731
257k
    _closed = true;
732
257k
    return Status::OK();
733
257k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
413k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
413k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
413k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
413k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
413k
    }
731
413k
    _closed = true;
732
413k
    return Status::OK();
733
413k
}
_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
8.31k
                                                          bool* eos) {
738
8.31k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
8.31k
    return pull(state, block, eos);
740
8.31k
}
_ZN5doris18StreamingOperatorXINS_23AssertNumRowsLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
37
                                                          bool* eos) {
738
37
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
37
    return pull(state, block, eos);
740
37
}
_ZN5doris18StreamingOperatorXINS_16SelectLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
8.27k
                                                          bool* eos) {
738
8.27k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
8.27k
    return pull(state, block, eos);
740
8.27k
}
741
742
template <typename LocalStateType>
743
Status StatefulOperatorX<LocalStateType>::get_block_impl(RuntimeState* state, Block* block,
744
556k
                                                         bool* eos) {
745
556k
    auto& local_state = get_local_state(state);
746
556k
    if (need_more_input_data(state)) {
747
523k
        local_state._child_block->clear_column_data(
748
523k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
523k
                        .num_slots());
750
523k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
523k
                state, local_state._child_block.get(), &local_state._child_eos));
752
523k
        *eos = local_state._child_eos;
753
523k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
68.7k
            return Status::OK();
755
68.7k
        }
756
455k
        {
757
455k
            SCOPED_TIMER(local_state.exec_time_counter());
758
455k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
455k
        }
760
455k
    }
761
762
487k
    if (!need_more_input_data(state)) {
763
457k
        SCOPED_TIMER(local_state.exec_time_counter());
764
457k
        bool new_eos = false;
765
457k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
457k
        if (new_eos) {
767
371k
            *eos = true;
768
371k
        } else if (!need_more_input_data(state)) {
769
25.6k
            *eos = false;
770
25.6k
        }
771
457k
    }
772
487k
    return Status::OK();
773
487k
}
_ZN5doris17StatefulOperatorXINS_23HashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
139k
                                                         bool* eos) {
745
139k
    auto& local_state = get_local_state(state);
746
139k
    if (need_more_input_data(state)) {
747
119k
        local_state._child_block->clear_column_data(
748
119k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
119k
                        .num_slots());
750
119k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
119k
                state, local_state._child_block.get(), &local_state._child_eos));
752
119k
        *eos = local_state._child_eos;
753
119k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
28.9k
            return Status::OK();
755
28.9k
        }
756
90.8k
        {
757
90.8k
            SCOPED_TIMER(local_state.exec_time_counter());
758
90.8k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
90.8k
        }
760
90.8k
    }
761
762
110k
    if (!need_more_input_data(state)) {
763
110k
        SCOPED_TIMER(local_state.exec_time_counter());
764
110k
        bool new_eos = false;
765
110k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
110k
        if (new_eos) {
767
44.4k
            *eos = true;
768
65.8k
        } else if (!need_more_input_data(state)) {
769
11.8k
            *eos = false;
770
11.8k
        }
771
110k
    }
772
110k
    return Status::OK();
773
110k
}
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_34PartitionedHashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
_ZN5doris17StatefulOperatorXINS_16RepeatLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
4.43k
                                                         bool* eos) {
745
4.43k
    auto& local_state = get_local_state(state);
746
4.43k
    if (need_more_input_data(state)) {
747
2.45k
        local_state._child_block->clear_column_data(
748
2.45k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
2.45k
                        .num_slots());
750
2.45k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
2.45k
                state, local_state._child_block.get(), &local_state._child_eos));
752
2.45k
        *eos = local_state._child_eos;
753
2.45k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
503
            return Status::OK();
755
503
        }
756
1.95k
        {
757
1.95k
            SCOPED_TIMER(local_state.exec_time_counter());
758
1.95k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
1.95k
        }
760
1.95k
    }
761
762
3.94k
    if (!need_more_input_data(state)) {
763
3.94k
        SCOPED_TIMER(local_state.exec_time_counter());
764
3.94k
        bool new_eos = false;
765
3.94k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
3.94k
        if (new_eos) {
767
1.38k
            *eos = true;
768
2.56k
        } else if (!need_more_input_data(state)) {
769
1.97k
            *eos = false;
770
1.97k
        }
771
3.94k
    }
772
3.93k
    return Status::OK();
773
3.93k
}
_ZN5doris17StatefulOperatorXINS_25MaterializationLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
1.88k
                                                         bool* eos) {
745
1.88k
    auto& local_state = get_local_state(state);
746
1.88k
    if (need_more_input_data(state)) {
747
1.88k
        local_state._child_block->clear_column_data(
748
1.88k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
1.88k
                        .num_slots());
750
1.88k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
1.88k
                state, local_state._child_block.get(), &local_state._child_eos));
752
1.88k
        *eos = local_state._child_eos;
753
1.88k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
789
            return Status::OK();
755
789
        }
756
1.09k
        {
757
1.09k
            SCOPED_TIMER(local_state.exec_time_counter());
758
1.09k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
1.09k
        }
760
1.09k
    }
761
762
1.09k
    if (!need_more_input_data(state)) {
763
1.09k
        SCOPED_TIMER(local_state.exec_time_counter());
764
1.09k
        bool new_eos = false;
765
1.09k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
1.09k
        if (new_eos) {
767
796
            *eos = true;
768
796
        } else if (!need_more_input_data(state)) {
769
0
            *eos = false;
770
0
        }
771
1.09k
    }
772
1.09k
    return Status::OK();
773
1.09k
}
_ZN5doris17StatefulOperatorXINS_22StreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
14.1k
                                                         bool* eos) {
745
14.1k
    auto& local_state = get_local_state(state);
746
14.1k
    if (need_more_input_data(state)) {
747
14.1k
        local_state._child_block->clear_column_data(
748
14.1k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
14.1k
                        .num_slots());
750
14.1k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
14.1k
                state, local_state._child_block.get(), &local_state._child_eos));
752
14.1k
        *eos = local_state._child_eos;
753
14.1k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
3.44k
            return Status::OK();
755
3.44k
        }
756
10.6k
        {
757
10.6k
            SCOPED_TIMER(local_state.exec_time_counter());
758
10.6k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
10.6k
        }
760
10.6k
    }
761
762
10.6k
    if (!need_more_input_data(state)) {
763
6.39k
        SCOPED_TIMER(local_state.exec_time_counter());
764
6.39k
        bool new_eos = false;
765
6.39k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
6.39k
        if (new_eos) {
767
6.31k
            *eos = true;
768
6.31k
        } else if (!need_more_input_data(state)) {
769
6
            *eos = false;
770
6
        }
771
6.39k
    }
772
10.6k
    return Status::OK();
773
10.6k
}
_ZN5doris17StatefulOperatorXINS_30DistinctStreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
366k
                                                         bool* eos) {
745
366k
    auto& local_state = get_local_state(state);
746
367k
    if (need_more_input_data(state)) {
747
367k
        local_state._child_block->clear_column_data(
748
367k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
367k
                        .num_slots());
750
367k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
367k
                state, local_state._child_block.get(), &local_state._child_eos));
752
367k
        *eos = local_state._child_eos;
753
367k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
33.6k
            return Status::OK();
755
33.6k
        }
756
333k
        {
757
333k
            SCOPED_TIMER(local_state.exec_time_counter());
758
333k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
333k
        }
760
333k
    }
761
762
332k
    if (!need_more_input_data(state)) {
763
308k
        SCOPED_TIMER(local_state.exec_time_counter());
764
308k
        bool new_eos = false;
765
308k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
308k
        if (new_eos) {
767
307k
            *eos = true;
768
307k
        } else if (!need_more_input_data(state)) {
769
0
            *eos = false;
770
0
        }
771
308k
    }
772
332k
    return Status::OK();
773
332k
}
_ZN5doris17StatefulOperatorXINS_29NestedLoopJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
22.1k
                                                         bool* eos) {
745
22.1k
    auto& local_state = get_local_state(state);
746
22.1k
    if (need_more_input_data(state)) {
747
10.7k
        local_state._child_block->clear_column_data(
748
10.7k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
10.7k
                        .num_slots());
750
10.7k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
10.7k
                state, local_state._child_block.get(), &local_state._child_eos));
752
10.7k
        *eos = local_state._child_eos;
753
10.7k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
1.01k
            return Status::OK();
755
1.01k
        }
756
9.68k
        {
757
9.68k
            SCOPED_TIMER(local_state.exec_time_counter());
758
9.68k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
9.68k
        }
760
9.68k
    }
761
762
21.1k
    if (!need_more_input_data(state)) {
763
20.5k
        SCOPED_TIMER(local_state.exec_time_counter());
764
20.5k
        bool new_eos = false;
765
20.5k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
20.5k
        if (new_eos) {
767
5.68k
            *eos = true;
768
14.9k
        } else if (!need_more_input_data(state)) {
769
11.4k
            *eos = false;
770
11.4k
        }
771
20.5k
    }
772
21.1k
    return Status::OK();
773
21.1k
}
_ZN5doris17StatefulOperatorXINS_23TableFunctionLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
7.71k
                                                         bool* eos) {
745
7.71k
    auto& local_state = get_local_state(state);
746
7.71k
    if (need_more_input_data(state)) {
747
7.35k
        local_state._child_block->clear_column_data(
748
7.35k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
7.35k
                        .num_slots());
750
7.35k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
7.35k
                state, local_state._child_block.get(), &local_state._child_eos));
752
7.35k
        *eos = local_state._child_eos;
753
7.35k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
394
            return Status::OK();
755
394
        }
756
6.96k
        {
757
6.96k
            SCOPED_TIMER(local_state.exec_time_counter());
758
6.96k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
6.96k
        }
760
6.96k
    }
761
762
7.32k
    if (!need_more_input_data(state)) {
763
7.32k
        SCOPED_TIMER(local_state.exec_time_counter());
764
7.32k
        bool new_eos = false;
765
7.32k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
7.32k
        if (new_eos) {
767
5.16k
            *eos = true;
768
5.16k
        } else if (!need_more_input_data(state)) {
769
366
            *eos = false;
770
366
        }
771
7.32k
    }
772
7.31k
    return Status::OK();
773
7.31k
}
774
775
template <typename Writer, typename Parent>
776
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
777
47.5k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
47.5k
    RETURN_IF_ERROR(Base::init(state, info));
779
47.5k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
47.5k
                                                         "AsyncWriterDependency", true);
781
47.5k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
47.5k
                             _finish_dependency));
783
784
47.5k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
47.5k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
47.5k
    return Status::OK();
787
47.5k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
362
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
362
    RETURN_IF_ERROR(Base::init(state, info));
779
362
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
362
                                                         "AsyncWriterDependency", true);
781
362
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
362
                             _finish_dependency));
783
784
362
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
362
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
362
    return Status::OK();
787
362
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
47.1k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
47.1k
    RETURN_IF_ERROR(Base::init(state, info));
779
47.1k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
47.1k
                                                         "AsyncWriterDependency", true);
781
47.1k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
47.1k
                             _finish_dependency));
783
784
47.1k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
47.1k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
47.1k
    return Status::OK();
787
47.1k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
28
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
28
    RETURN_IF_ERROR(Base::init(state, info));
779
28
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
28
                                                         "AsyncWriterDependency", true);
781
28
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
28
                             _finish_dependency));
783
784
28
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
28
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
28
    return Status::OK();
787
28
}
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
48.3k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
48.3k
    RETURN_IF_ERROR(Base::open(state));
793
48.3k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
368k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
319k
        RETURN_IF_ERROR(
796
319k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
319k
    }
798
48.3k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
48.3k
    return Status::OK();
800
48.3k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
368
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
368
    RETURN_IF_ERROR(Base::open(state));
793
368
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
1.88k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
1.52k
        RETURN_IF_ERROR(
796
1.52k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
1.52k
    }
798
368
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
368
    return Status::OK();
800
368
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
47.9k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
47.9k
    RETURN_IF_ERROR(Base::open(state));
793
47.9k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
365k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
317k
        RETURN_IF_ERROR(
796
317k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
317k
    }
798
47.9k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
47.9k
    return Status::OK();
800
47.9k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
28
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
28
    RETURN_IF_ERROR(Base::open(state));
793
28
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
504
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
476
        RETURN_IF_ERROR(
796
476
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
476
    }
798
28
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
28
    return Status::OK();
800
28
}
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
63.3k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
63.3k
    return _writer->sink(block, eos);
806
63.3k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
1.48k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
1.48k
    return _writer->sink(block, eos);
806
1.48k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
61.8k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
61.8k
    return _writer->sink(block, eos);
806
61.8k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
28
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
28
    return _writer->sink(block, eos);
806
28
}
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
48.4k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
48.4k
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
48.4k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
48.4k
    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
48.4k
    if (_writer) {
818
48.4k
        Status st = _writer->get_writer_status();
819
48.4k
        if (exec_status.ok()) {
820
48.3k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
48.3k
                                                       : Status::Cancelled("force close"));
822
48.3k
        } else {
823
116
            _writer->force_close(exec_status);
824
116
        }
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
48.4k
        RETURN_IF_ERROR(st);
829
48.4k
    }
830
48.3k
    return Base::close(state, exec_status);
831
48.4k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
356
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
356
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
356
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
356
    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
356
    if (_writer) {
818
356
        Status st = _writer->get_writer_status();
819
356
        if (exec_status.ok()) {
820
356
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
356
                                                       : Status::Cancelled("force close"));
822
356
        } 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
356
        RETURN_IF_ERROR(st);
829
356
    }
830
356
    return Base::close(state, exec_status);
831
356
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
48.0k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
48.0k
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
48.0k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
48.0k
    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
48.0k
    if (_writer) {
818
48.0k
        Status st = _writer->get_writer_status();
819
48.0k
        if (exec_status.ok()) {
820
47.9k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
47.9k
                                                       : Status::Cancelled("force close"));
822
47.9k
        } else {
823
116
            _writer->force_close(exec_status);
824
116
        }
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
48.0k
        RETURN_IF_ERROR(st);
829
48.0k
    }
830
47.9k
    return Base::close(state, exec_status);
831
48.0k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
28
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
28
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
28
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
28
    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
28
    if (_writer) {
818
28
        Status st = _writer->get_writer_status();
819
28
        if (exec_status.ok()) {
820
28
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
28
                                                       : Status::Cancelled("force close"));
822
28
        } 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
28
        RETURN_IF_ERROR(st);
829
28
    }
830
28
    return Base::close(state, exec_status);
831
28
}
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(PaimonTableSinkLocalState)
850
DECLARE_OPERATOR(SpillIcebergTableSinkLocalState)
851
DECLARE_OPERATOR(IcebergDeleteSinkLocalState)
852
DECLARE_OPERATOR(IcebergMergeSinkLocalState)
853
DECLARE_OPERATOR(MCTableSinkLocalState)
854
DECLARE_OPERATOR(AnalyticSinkLocalState)
855
DECLARE_OPERATOR(BlackholeSinkLocalState)
856
DECLARE_OPERATOR(SortSinkLocalState)
857
DECLARE_OPERATOR(SpillSortSinkLocalState)
858
DECLARE_OPERATOR(LocalExchangeSinkLocalState)
859
DECLARE_OPERATOR(AggSinkLocalState)
860
DECLARE_OPERATOR(BucketedAggSinkLocalState)
861
DECLARE_OPERATOR(PartitionedAggSinkLocalState)
862
DECLARE_OPERATOR(ExchangeSinkLocalState)
863
DECLARE_OPERATOR(NestedLoopJoinBuildSinkLocalState)
864
DECLARE_OPERATOR(UnionSinkLocalState)
865
DECLARE_OPERATOR(MultiCastDataStreamSinkLocalState)
866
DECLARE_OPERATOR(PartitionSortSinkLocalState)
867
DECLARE_OPERATOR(SetProbeSinkLocalState<true>)
868
DECLARE_OPERATOR(SetProbeSinkLocalState<false>)
869
DECLARE_OPERATOR(SetSinkLocalState<true>)
870
DECLARE_OPERATOR(SetSinkLocalState<false>)
871
DECLARE_OPERATOR(PartitionedHashJoinSinkLocalState)
872
DECLARE_OPERATOR(GroupCommitBlockSinkLocalState)
873
DECLARE_OPERATOR(CacheSinkLocalState)
874
DECLARE_OPERATOR(DictSinkLocalState)
875
DECLARE_OPERATOR(RecCTESinkLocalState)
876
DECLARE_OPERATOR(RecCTEAnchorSinkLocalState)
877
878
#undef DECLARE_OPERATOR
879
880
#define DECLARE_OPERATOR(LOCAL_STATE) template class OperatorX<LOCAL_STATE>;
881
DECLARE_OPERATOR(HashJoinProbeLocalState)
882
DECLARE_OPERATOR(OlapScanLocalState)
883
DECLARE_OPERATOR(GroupCommitLocalState)
884
DECLARE_OPERATOR(JDBCScanLocalState)
885
DECLARE_OPERATOR(FileScanLocalState)
886
DECLARE_OPERATOR(AnalyticLocalState)
887
DECLARE_OPERATOR(SortLocalState)
888
DECLARE_OPERATOR(SpillSortLocalState)
889
DECLARE_OPERATOR(LocalMergeSortLocalState)
890
DECLARE_OPERATOR(AggLocalState)
891
DECLARE_OPERATOR(BucketedAggLocalState)
892
DECLARE_OPERATOR(PartitionedAggLocalState)
893
DECLARE_OPERATOR(TableFunctionLocalState)
894
DECLARE_OPERATOR(ExchangeLocalState)
895
DECLARE_OPERATOR(RepeatLocalState)
896
DECLARE_OPERATOR(NestedLoopJoinProbeLocalState)
897
DECLARE_OPERATOR(AssertNumRowsLocalState)
898
DECLARE_OPERATOR(EmptySetLocalState)
899
DECLARE_OPERATOR(UnionSourceLocalState)
900
DECLARE_OPERATOR(MultiCastDataStreamSourceLocalState)
901
DECLARE_OPERATOR(PartitionSortSourceLocalState)
902
DECLARE_OPERATOR(SetSourceLocalState<true>)
903
DECLARE_OPERATOR(SetSourceLocalState<false>)
904
DECLARE_OPERATOR(DataGenLocalState)
905
DECLARE_OPERATOR(SchemaScanLocalState)
906
DECLARE_OPERATOR(MetaScanLocalState)
907
DECLARE_OPERATOR(LocalExchangeSourceLocalState)
908
DECLARE_OPERATOR(PartitionedHashJoinProbeLocalState)
909
DECLARE_OPERATOR(CacheSourceLocalState)
910
DECLARE_OPERATOR(RecCTESourceLocalState)
911
DECLARE_OPERATOR(RecCTEScanLocalState)
912
913
#ifdef BE_TEST
914
DECLARE_OPERATOR(MockLocalState)
915
DECLARE_OPERATOR(MockScanLocalState)
916
#endif
917
#undef DECLARE_OPERATOR
918
919
template class StreamingOperatorX<AssertNumRowsLocalState>;
920
template class StreamingOperatorX<SelectLocalState>;
921
922
template class StatefulOperatorX<HashJoinProbeLocalState>;
923
template class StatefulOperatorX<PartitionedHashJoinProbeLocalState>;
924
template class StatefulOperatorX<RepeatLocalState>;
925
template class StatefulOperatorX<MaterializationLocalState>;
926
template class StatefulOperatorX<StreamingAggLocalState>;
927
template class StatefulOperatorX<DistinctStreamingAggLocalState>;
928
template class StatefulOperatorX<NestedLoopJoinProbeLocalState>;
929
template class StatefulOperatorX<TableFunctionLocalState>;
930
931
template class PipelineXSinkLocalState<HashJoinSharedState>;
932
template class PipelineXSinkLocalState<PartitionedHashJoinSharedState>;
933
template class PipelineXSinkLocalState<SortSharedState>;
934
template class PipelineXSinkLocalState<SpillSortSharedState>;
935
template class PipelineXSinkLocalState<NestedLoopJoinSharedState>;
936
template class PipelineXSinkLocalState<AnalyticSharedState>;
937
template class PipelineXSinkLocalState<AggSharedState>;
938
template class PipelineXSinkLocalState<BucketedAggSharedState>;
939
template class PipelineXSinkLocalState<PartitionedAggSharedState>;
940
template class PipelineXSinkLocalState<FakeSharedState>;
941
template class PipelineXSinkLocalState<UnionSharedState>;
942
template class PipelineXSinkLocalState<PartitionSortNodeSharedState>;
943
template class PipelineXSinkLocalState<MultiCastSharedState>;
944
template class PipelineXSinkLocalState<SetSharedState>;
945
template class PipelineXSinkLocalState<LocalExchangeSharedState>;
946
template class PipelineXSinkLocalState<BasicSharedState>;
947
template class PipelineXSinkLocalState<DataQueueSharedState>;
948
template class PipelineXSinkLocalState<RecCTESharedState>;
949
950
template class PipelineXLocalState<HashJoinSharedState>;
951
template class PipelineXLocalState<PartitionedHashJoinSharedState>;
952
template class PipelineXLocalState<SortSharedState>;
953
template class PipelineXLocalState<SpillSortSharedState>;
954
template class PipelineXLocalState<NestedLoopJoinSharedState>;
955
template class PipelineXLocalState<AnalyticSharedState>;
956
template class PipelineXLocalState<AggSharedState>;
957
template class PipelineXLocalState<BucketedAggSharedState>;
958
template class PipelineXLocalState<PartitionedAggSharedState>;
959
template class PipelineXLocalState<FakeSharedState>;
960
template class PipelineXLocalState<UnionSharedState>;
961
template class PipelineXLocalState<DataQueueSharedState>;
962
template class PipelineXLocalState<MultiCastSharedState>;
963
template class PipelineXLocalState<PartitionSortNodeSharedState>;
964
template class PipelineXLocalState<SetSharedState>;
965
template class PipelineXLocalState<LocalExchangeSharedState>;
966
template class PipelineXLocalState<BasicSharedState>;
967
template class PipelineXLocalState<RecCTESharedState>;
968
969
template class AsyncWriterSink<doris::VFileResultWriter, ResultFileSinkOperatorX>;
970
template class AsyncWriterSink<doris::VJdbcTableWriter, JdbcTableSinkOperatorX>;
971
template class AsyncWriterSink<doris::VTabletWriter, OlapTableSinkOperatorX>;
972
template class AsyncWriterSink<doris::VTabletWriterV2, OlapTableSinkV2OperatorX>;
973
template class AsyncWriterSink<doris::VHiveTableWriter, HiveTableSinkOperatorX>;
974
template class AsyncWriterSink<doris::VIcebergTableWriter, IcebergTableSinkOperatorX>;
975
template class AsyncWriterSink<doris::VIcebergTableWriter, SpillIcebergTableSinkOperatorX>;
976
template class AsyncWriterSink<doris::VIcebergDeleteSink, IcebergDeleteSinkOperatorX>;
977
template class AsyncWriterSink<doris::VIcebergMergeSink, IcebergMergeSinkOperatorX>;
978
template class AsyncWriterSink<doris::VMCTableWriter, MCTableSinkOperatorX>;
979
template class AsyncWriterSink<doris::VTVFTableWriter, TVFTableSinkOperatorX>;
980
981
#ifdef BE_TEST
982
template class OperatorX<DummyOperatorLocalState>;
983
template class DataSinkOperatorX<DummySinkLocalState>;
984
#endif
985
986
} // namespace doris