Coverage Report

Created: 2026-11-02 07:04

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.71M
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
1.71M
    if (_parent->nereids_id() == -1) {
123
873k
        return fmt::format("(id={})", _parent->node_id());
124
873k
    } else {
125
844k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
844k
    }
127
1.71M
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
67.8k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
67.8k
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
67.8k
    } else {
125
67.8k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
67.8k
    }
127
67.8k
}
_ZNK5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
4
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
4
    if (_parent->nereids_id() == -1) {
123
1
        return fmt::format("(id={})", _parent->node_id());
124
3
    } else {
125
3
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
3
    }
127
4
}
_ZNK5doris19PipelineXLocalStateINS_15SortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
249k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
249k
    if (_parent->nereids_id() == -1) {
123
12
        return fmt::format("(id={})", _parent->node_id());
124
249k
    } else {
125
249k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
249k
    }
127
249k
}
_ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
157
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
157
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
157
    } else {
125
157
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
157
    }
127
157
}
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
4.72k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
4.72k
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
4.72k
    } else {
125
4.72k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
4.72k
    }
127
4.72k
}
_ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
9.02k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
9.02k
    if (_parent->nereids_id() == -1) {
123
60
        return fmt::format("(id={})", _parent->node_id());
124
8.96k
    } else {
125
8.96k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
8.96k
    }
127
9.02k
}
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
106k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
106k
    if (_parent->nereids_id() == -1) {
123
29
        return fmt::format("(id={})", _parent->node_id());
124
106k
    } else {
125
106k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
106k
    }
127
106k
}
_ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
49.9k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
49.9k
    if (_parent->nereids_id() == -1) {
123
2
        return fmt::format("(id={})", _parent->node_id());
124
49.9k
    } else {
125
49.9k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
49.9k
    }
127
49.9k
}
_ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
111
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
111
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
111
    } else {
125
111
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
111
    }
127
111
}
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
571k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
571k
    if (_parent->nereids_id() == -1) {
123
276k
        return fmt::format("(id={})", _parent->node_id());
124
295k
    } else {
125
295k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
295k
    }
127
571k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
56.1k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
56.1k
    if (_parent->nereids_id() == -1) {
123
2
        return fmt::format("(id={})", _parent->node_id());
124
56.1k
    } else {
125
56.1k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
56.1k
    }
127
56.1k
}
_ZNK5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
26
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
26
    if (_parent->nereids_id() == -1) {
123
26
        return fmt::format("(id={})", _parent->node_id());
124
26
    } else {
125
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
0
    }
127
26
}
_ZNK5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
4.55k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
4.55k
    if (_parent->nereids_id() == -1) {
123
4.55k
        return fmt::format("(id={})", _parent->node_id());
124
4.55k
    } else {
125
2
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
2
    }
127
4.55k
}
_ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
423
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
423
    if (_parent->nereids_id() == -1) {
123
102
        return fmt::format("(id={})", _parent->node_id());
124
321
    } else {
125
321
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
321
    }
127
423
}
_ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
5.42k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
5.42k
    if (_parent->nereids_id() == -1) {
123
13
        return fmt::format("(id={})", _parent->node_id());
124
5.41k
    } else {
125
5.41k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
5.41k
    }
127
5.42k
}
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
592k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
592k
    if (_parent->nereids_id() == -1) {
123
592k
        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
592k
}
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.16M
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
1.16M
    if (_parent->nereids_id() == -1) {
132
617k
        return fmt::format("(id={})", _parent->node_id());
133
617k
    } else {
134
548k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
548k
    }
136
1.16M
}
_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
5
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
5
    if (_parent->nereids_id() == -1) {
132
1
        return fmt::format("(id={})", _parent->node_id());
133
4
    } else {
134
4
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
4
    }
136
5
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
251k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
251k
    if (_parent->nereids_id() == -1) {
132
9
        return fmt::format("(id={})", _parent->node_id());
133
251k
    } else {
134
251k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
251k
    }
136
251k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
164
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
164
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
164
    } else {
134
164
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
164
    }
136
164
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
4.74k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
4.74k
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
4.74k
    } else {
134
4.74k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
4.74k
    }
136
4.74k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
9.05k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
9.05k
    if (_parent->nereids_id() == -1) {
132
60
        return fmt::format("(id={})", _parent->node_id());
133
8.99k
    } else {
134
8.99k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
8.99k
    }
136
9.05k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
106k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
106k
    if (_parent->nereids_id() == -1) {
132
29
        return fmt::format("(id={})", _parent->node_id());
133
106k
    } else {
134
106k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
106k
    }
136
106k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
49.8k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
49.8k
    if (_parent->nereids_id() == -1) {
132
4
        return fmt::format("(id={})", _parent->node_id());
133
49.7k
    } else {
134
49.7k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
49.7k
    }
136
49.8k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
121
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
121
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
121
    } else {
134
121
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
121
    }
136
121
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
37
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
37
    if (_parent->nereids_id() == -1) {
132
37
        return fmt::format("(id={})", _parent->node_id());
133
37
    } else {
134
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
0
    }
136
37
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
10.2k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
10.2k
    if (_parent->nereids_id() == -1) {
132
3
        return fmt::format("(id={})", _parent->node_id());
133
10.2k
    } else {
134
10.2k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
10.2k
    }
136
10.2k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
424
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
424
    if (_parent->nereids_id() == -1) {
132
102
        return fmt::format("(id={})", _parent->node_id());
133
322
    } else {
134
322
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
322
    }
136
424
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
13.1k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
13.1k
    if (_parent->nereids_id() == -1) {
132
13.1k
        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
13.1k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
206k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
206k
    if (_parent->nereids_id() == -1) {
132
206k
        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
206k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
397k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
397k
    if (_parent->nereids_id() == -1) {
132
397k
        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
397k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
25
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
25
    if (_parent->nereids_id() == -1) {
132
25
        return fmt::format("(id={})", _parent->node_id());
133
25
    } else {
134
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
0
    }
136
25
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
338
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
338
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
338
    } else {
134
338
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
338
    }
136
338
}
137
138
template <typename SharedStateArg>
139
33.8k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
33.8k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
33.8k
    _terminated = true;
144
33.8k
    return Status::OK();
145
33.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
3.03k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
3.03k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
3.03k
    _terminated = true;
144
3.03k
    return Status::OK();
145
3.03k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_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_25NestedLoopJoinSharedStateEE9terminateEPNS_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_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
1
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
1
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
1
    _terminated = true;
144
1
    return Status::OK();
145
1
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
2.13k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
2.13k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
2.13k
    _terminated = true;
144
2.13k
    return Status::OK();
145
2.13k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
3.23k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
3.23k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
3.23k
    _terminated = true;
144
3.23k
    return Status::OK();
145
3.23k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
421
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
421
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
421
    _terminated = true;
144
421
    return Status::OK();
145
421
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
341
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
341
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
341
    _terminated = true;
144
341
    return Status::OK();
145
341
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
8
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
8
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
8
    _terminated = true;
144
8
    return Status::OK();
145
8
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
103
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
103
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
103
    _terminated = true;
144
103
    return Status::OK();
145
103
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
11
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
11
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
11
    _terminated = true;
144
11
    return Status::OK();
145
11
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
348
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
348
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
348
    _terminated = true;
144
348
    return Status::OK();
145
348
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
128
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
128
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
128
    _terminated = true;
144
128
    return Status::OK();
145
128
}
146
147
315k
DataDistribution OperatorBase::required_data_distribution(RuntimeState* /*state*/) const {
148
315k
    return _child && _child->is_serial_operator() && !is_source()
149
315k
                   ? DataDistribution(TLocalPartitionType::PASSTHROUGH)
150
315k
                   : DataDistribution(TLocalPartitionType::NOOP);
151
315k
}
152
153
26.8k
bool OperatorBase::child_breaks_local_key_distribution(RuntimeState* state) const {
154
26.8k
    if (!_child) {
155
26.1k
        return false;
156
26.1k
    }
157
661
    if (_child->is_serial_operator()) {
158
23
        return true;
159
23
    }
160
638
    const auto child_distribution = _child->required_data_distribution(state);
161
638
    return child_distribution.need_local_exchange() &&
162
638
           !is_shuffled_exchange(child_distribution.distribution_type);
163
661
}
164
165
template <typename SharedStateArg>
166
15.0k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
15.0k
    fmt::memory_buffer debug_string_buffer;
168
15.0k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
15.0k
    return fmt::to_string(debug_string_buffer);
170
15.0k
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
28
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
28
    fmt::memory_buffer debug_string_buffer;
168
28
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
28
    return fmt::to_string(debug_string_buffer);
170
28
}
_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
14
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
14
    fmt::memory_buffer debug_string_buffer;
168
14
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
14
    return fmt::to_string(debug_string_buffer);
170
14
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
14
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
14
    fmt::memory_buffer debug_string_buffer;
168
14
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
14
    return fmt::to_string(debug_string_buffer);
170
14
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
42
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
42
    fmt::memory_buffer debug_string_buffer;
168
42
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
42
    return fmt::to_string(debug_string_buffer);
170
42
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
14.9k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
14.9k
    fmt::memory_buffer debug_string_buffer;
168
14.9k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
14.9k
    return fmt::to_string(debug_string_buffer);
170
14.9k
}
_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
46
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
46
    fmt::memory_buffer debug_string_buffer;
168
46
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
46
    return fmt::to_string(debug_string_buffer);
170
46
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
171
172
template <typename SharedStateArg>
173
15.0k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
15.0k
    fmt::memory_buffer debug_string_buffer;
175
15.0k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
15.0k
    return fmt::to_string(debug_string_buffer);
177
15.0k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
14
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
14
    fmt::memory_buffer debug_string_buffer;
175
14
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
14
    return fmt::to_string(debug_string_buffer);
177
14
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
42
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
42
    fmt::memory_buffer debug_string_buffer;
175
42
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
42
    return fmt::to_string(debug_string_buffer);
177
42
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
38
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
38
    fmt::memory_buffer debug_string_buffer;
175
38
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
38
    return fmt::to_string(debug_string_buffer);
177
38
}
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
27
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
27
    fmt::memory_buffer debug_string_buffer;
175
27
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
27
    return fmt::to_string(debug_string_buffer);
177
27
}
_ZNK5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
14.9k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
14.9k
    fmt::memory_buffer debug_string_buffer;
175
14.9k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
14.9k
    return fmt::to_string(debug_string_buffer);
177
14.9k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
178
179
15.1k
std::string OperatorXBase::debug_string(int indentation_level) const {
180
15.1k
    fmt::memory_buffer debug_string_buffer;
181
15.1k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, parallel_tasks={}, _is_serial_operator={}",
182
15.1k
                   std::string(indentation_level * 2, ' '), _op_name, node_id(), _parallel_tasks,
183
15.1k
                   _is_serial_operator);
184
15.1k
    return fmt::to_string(debug_string_buffer);
185
15.1k
}
186
187
15.0k
std::string OperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
188
15.0k
    return state->get_local_state(operator_id())->debug_string(indentation_level);
189
15.0k
}
190
191
691k
Status OperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
192
691k
    std::string node_name = print_plan_node_type(tnode.node_type);
193
691k
    _nereids_id = tnode.nereids_id;
194
691k
    if (!tnode.intermediate_output_tuple_id_list.empty()) {
195
6.80k
        if (!has_projection()) {
196
0
            return Status::InternalError("no final output tuple id");
197
0
        }
198
6.80k
        if (tnode.intermediate_output_tuple_id_list.size() !=
199
6.80k
            tnode.intermediate_projections_list.size()) {
200
0
            return Status::InternalError(
201
0
                    "intermediate_output_tuple_id_list size:{} not match "
202
0
                    "intermediate_projections_list size:{}",
203
0
                    tnode.intermediate_output_tuple_id_list.size(),
204
0
                    tnode.intermediate_projections_list.size());
205
0
        }
206
6.80k
    }
207
691k
    auto substr = node_name.substr(0, node_name.find("_NODE"));
208
691k
    _op_name = substr + "_OPERATOR";
209
210
691k
    if (tnode.__isset.vconjunct) {
211
0
        return Status::InternalError("vconjunct is not supported yet");
212
691k
    } else if (tnode.__isset.conjuncts) {
213
286k
        for (const auto& conjunct : tnode.conjuncts) {
214
286k
            VExprContextSPtr context;
215
286k
            RETURN_IF_ERROR(VExpr::create_expr_tree(conjunct, context));
216
286k
            _conjuncts.emplace_back(context);
217
286k
        }
218
106k
    }
219
220
    // create the projections expr
221
691k
    if (tnode.__isset.projections) {
222
277k
        RETURN_IF_ERROR(VExpr::create_expr_trees(tnode.projections, _projection->projections));
223
277k
    }
224
691k
    if (!tnode.intermediate_projections_list.empty()) {
225
6.80k
        DCHECK(has_projection()) << "no final projections";
226
6.80k
        _projection->intermediate_projections.reserve(tnode.intermediate_projections_list.size());
227
12.2k
        for (const auto& tnode_projections : tnode.intermediate_projections_list) {
228
12.2k
            VExprContextSPtrs projections;
229
12.2k
            RETURN_IF_ERROR(VExpr::create_expr_trees(tnode_projections, projections));
230
12.2k
            _projection->intermediate_projections.push_back(projections);
231
12.2k
        }
232
6.80k
    }
233
691k
    return Status::OK();
234
691k
}
235
236
718k
Status OperatorXBase::prepare(RuntimeState* state) {
237
718k
    for (auto& conjunct : _conjuncts) {
238
285k
        RETURN_IF_ERROR(conjunct->prepare(state, operator_row_desc_before_projection()));
239
285k
    }
240
718k
    if (state->enable_adjust_conjunct_order_by_cost()) {
241
667k
        std::ranges::stable_sort(_conjuncts, [](const auto& a, const auto& b) {
242
348k
            return a->execute_cost() < b->execute_cost();
243
348k
        });
244
667k
    };
245
246
718k
    if (has_projection()) {
247
277k
        auto& projection = *_projection;
248
289k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
249
12.2k
            const auto& input_row_desc =
250
12.2k
                    i == 0 ? operator_row_desc_before_projection()
251
12.2k
                           : projection.intermediate_output_row_descriptors[i - 1];
252
12.2k
            RETURN_IF_ERROR(
253
12.2k
                    VExpr::prepare(projection.intermediate_projections[i], state, input_row_desc));
254
12.2k
        }
255
277k
        const auto& final_projection_input_row_desc =
256
277k
                projection.intermediate_output_row_descriptors.empty()
257
277k
                        ? operator_row_desc_before_projection()
258
277k
                        : projection.intermediate_output_row_descriptors.back();
259
277k
        RETURN_IF_ERROR(
260
277k
                VExpr::prepare(projection.projections, state, final_projection_input_row_desc));
261
277k
        RETURN_IF_ERROR(VExpr::check_expr_output_type(projection.projections,
262
277k
                                                      projection.output_row_descriptor));
263
277k
    }
264
265
718k
    for (auto& conjunct : _conjuncts) {
266
285k
        RETURN_IF_ERROR(conjunct->open(state));
267
285k
    }
268
718k
    if (has_projection()) {
269
277k
        RETURN_IF_ERROR(VExpr::open(_projection->projections, state));
270
277k
        for (auto& projections : _projection->intermediate_projections) {
271
12.2k
            RETURN_IF_ERROR(VExpr::open(projections, state));
272
12.2k
        }
273
277k
    }
274
717k
    if (_child && !is_source()) {
275
94.4k
        RETURN_IF_ERROR(_child->prepare(state));
276
94.4k
    }
277
278
717k
    if (VExpr::contains_blockable_function(_conjuncts) ||
279
717k
        (has_projection() && VExpr::contains_blockable_function(_projection->projections))) {
280
0
        _blockable = true;
281
0
    }
282
283
717k
    return Status::OK();
284
717k
}
285
286
10.6k
Status OperatorXBase::terminate(RuntimeState* state) {
287
10.6k
    if (_child && !is_source()) {
288
849
        RETURN_IF_ERROR(_child->terminate(state));
289
849
    }
290
10.6k
    auto result = state->get_local_state_result(operator_id());
291
10.6k
    if (!result) {
292
0
        return result.error();
293
0
    }
294
10.6k
    return result.value()->terminate(state);
295
10.6k
}
296
297
4.64M
Status OperatorXBase::close(RuntimeState* state) {
298
4.64M
    if (_child && !is_source()) {
299
715k
        RETURN_IF_ERROR(_child->close(state));
300
715k
    }
301
4.64M
    auto result = state->get_local_state_result(operator_id());
302
4.64M
    if (!result) {
303
0
        return result.error();
304
0
    }
305
4.64M
    return result.value()->close(state);
306
4.64M
}
307
308
295k
void PipelineXLocalStateBase::clear_origin_block() {
309
295k
    _origin_block.clear_column_data(_parent->operator_row_desc_before_projection().num_slots());
310
295k
}
311
312
565k
Status PipelineXLocalStateBase::filter_block(const VExprContextSPtrs& expr_contexts, Block* block) {
313
565k
    RETURN_IF_ERROR(VExprContext::filter_block(expr_contexts, block, block->columns()));
314
315
565k
    _estimate_memory_usage += VExprContext::get_memory_usage(expr_contexts);
316
565k
    return Status::OK();
317
565k
}
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
295k
                                     Block* output_block) const {
326
295k
    auto* local_state = state->get_local_state(operator_id());
327
295k
    SCOPED_TIMER(local_state->exec_time_counter());
328
295k
    SCOPED_TIMER(local_state->_projection_timer);
329
295k
    const size_t rows = origin_block->rows();
330
295k
    if (rows == 0) {
331
150k
        return Status::OK();
332
150k
    }
333
144k
    SCOPED_PEAK_MEM(&local_state->_estimate_memory_usage);
334
335
144k
    {
336
144k
        Block input_block = *origin_block;
337
338
144k
        ColumnsWithTypeAndName new_columns;
339
144k
        for (const auto& projections : local_state->_intermediate_projections) {
340
5.29k
            if (projections.empty()) {
341
0
                return Status::InternalError("meet empty intermediate projection, node id: {}",
342
0
                                             node_id());
343
0
            }
344
5.29k
            new_columns.resize(projections.size());
345
121k
            for (int i = 0; i < projections.size(); i++) {
346
116k
                RETURN_IF_ERROR(projections[i]->execute(&input_block, new_columns[i]));
347
116k
                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
116k
            }
355
5.27k
            Block tmp_block {new_columns};
356
5.27k
            input_block.swap(tmp_block);
357
5.27k
        }
358
359
144k
        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
144k
        auto scoped_mutable_block = VectorizedUtils::build_scoped_mutable_mem_reuse_block(
367
144k
                output_block, _projection->output_row_descriptor);
368
144k
        auto& mutable_columns = scoped_mutable_block.mutable_columns();
369
144k
        DCHECK_EQ(mutable_columns.size(), local_state->_projections.size()) << debug_string();
370
144k
        Columns shared_columns(mutable_columns.size());
371
372
821k
        for (int i = 0; i < mutable_columns.size(); ++i) {
373
676k
            ColumnPtr column_ptr;
374
676k
            RETURN_IF_ERROR(local_state->_projections[i]->execute(&input_block, column_ptr));
375
676k
            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
676k
            column_ptr = column_ptr->convert_to_full_column_if_const();
382
676k
            if (is_column_nullable(*mutable_columns[i]) && !is_column_nullable(*column_ptr)) {
383
0
                column_ptr = make_nullable(column_ptr, false);
384
0
            }
385
676k
            if (column_ptr->is_exclusive()) {
386
239k
                mutable_columns[i] = IColumn::mutate(std::move(column_ptr));
387
436k
            } else {
388
436k
                shared_columns[i] = std::move(column_ptr);
389
436k
            }
390
676k
        }
391
392
144k
        scoped_mutable_block.restore();
393
821k
        for (int i = 0; i < shared_columns.size(); ++i) {
394
676k
            if (shared_columns[i]) {
395
436k
                output_block->replace_by_position(i, std::move(shared_columns[i]));
396
436k
            }
397
676k
        }
398
144k
    }
399
400
0
    origin_block->clear_column_data(
401
144k
            local_state->_parent->operator_row_desc_before_projection().num_slots());
402
144k
    DCHECK_EQ(output_block->rows(), rows);
403
404
144k
    return Status::OK();
405
144k
}
406
407
3.99M
Status OperatorXBase::get_block_after_projects(RuntimeState* state, Block* block, bool* eos) {
408
3.99M
    DBUG_EXECUTE_IF("Pipeline::return_empty_block", {
409
3.99M
        if (this->_op_name == "AGGREGATION_OPERATOR" || this->_op_name == "HASH_JOIN_OPERATOR" ||
410
3.99M
            this->_op_name == "PARTITIONED_AGGREGATION_OPERATOR" ||
411
3.99M
            this->_op_name == "PARTITIONED_HASH_JOIN_OPERATOR" ||
412
3.99M
            this->_op_name == "CROSS_JOIN_OPERATOR" || this->_op_name == "SORT_OPERATOR") {
413
3.99M
            if (_debug_point_count++ % 2 == 0) {
414
3.99M
                return Status::OK();
415
3.99M
            }
416
3.99M
        }
417
3.99M
    });
418
419
3.99M
    Status status;
420
3.99M
    auto* local_state = state->get_local_state(operator_id());
421
3.99M
    Defer defer([&]() {
422
3.98M
        if (status.ok()) {
423
3.98M
            local_state->update_output_block_counters(*block);
424
3.98M
        }
425
3.98M
    });
426
3.99M
    if (has_projection()) {
427
295k
        local_state->clear_origin_block();
428
295k
        status = get_block(state, &local_state->_origin_block, eos);
429
295k
        if (UNLIKELY(!status.ok())) {
430
43
            return status;
431
43
        }
432
294k
        status = do_projections(state, &local_state->_origin_block, block);
433
294k
        return status;
434
295k
    }
435
3.69M
    status = get_block(state, block, eos);
436
3.69M
    RETURN_IF_ERROR(block->check_type_and_column());
437
3.69M
    return status;
438
3.69M
}
439
440
2.66M
void PipelineXLocalStateBase::reached_limit(Block* block, bool* eos) {
441
2.66M
    if (_parent->_limit != -1 and _num_rows_returned + block->rows() >= _parent->_limit) {
442
10.0k
        block->set_num_rows(_parent->_limit - _num_rows_returned);
443
10.0k
        *eos = true;
444
10.0k
    }
445
446
2.66M
    DBUG_EXECUTE_IF("Pipeline::reached_limit_early", {
447
2.66M
        auto op_name = to_lower(_parent->_op_name);
448
2.66M
        auto arg_op_name = dp->param<std::string>("op_name");
449
2.66M
        arg_op_name = to_lower(arg_op_name);
450
451
2.66M
        if (op_name == arg_op_name) {
452
2.66M
            *eos = true;
453
2.66M
        }
454
2.66M
    });
455
456
2.66M
    if (auto rows = block->rows()) {
457
815k
        _num_rows_returned += rows;
458
815k
        _state->get_query_ctx()->resource_ctx()->io_context()->update_process_rows(rows);
459
815k
    }
460
2.66M
}
461
462
33.8k
Status DataSinkOperatorXBase::terminate(RuntimeState* state) {
463
33.8k
    auto result = state->get_sink_local_state_result();
464
33.8k
    if (!result) {
465
0
        return result.error();
466
0
    }
467
33.8k
    return result.value()->terminate(state);
468
33.8k
}
469
470
15.0k
std::string DataSinkOperatorXBase::debug_string(int indentation_level) const {
471
15.0k
    fmt::memory_buffer debug_string_buffer;
472
473
15.0k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, _is_serial_operator={}",
474
15.0k
                   std::string(indentation_level * 2, ' '), _name, node_id(), _is_serial_operator);
475
15.0k
    return fmt::to_string(debug_string_buffer);
476
15.0k
}
477
478
15.0k
std::string DataSinkOperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
479
15.0k
    return state->get_sink_local_state()->debug_string(indentation_level);
480
15.0k
}
481
482
365k
Status DataSinkOperatorXBase::init(const TDataSink& tsink) {
483
365k
    std::string op_name = "UNKNOWN_SINK";
484
365k
    auto it = _TDataSinkType_VALUES_TO_NAMES.find(tsink.type);
485
486
365k
    if (it != _TDataSinkType_VALUES_TO_NAMES.end()) {
487
365k
        op_name = it->second;
488
365k
    }
489
365k
    _name = op_name + "_OPERATOR";
490
365k
    return Status::OK();
491
365k
}
492
493
305k
Status DataSinkOperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
494
305k
    std::string op_name = print_plan_node_type(tnode.node_type);
495
305k
    _nereids_id = tnode.nereids_id;
496
305k
    auto substr = op_name.substr(0, op_name.find("_NODE"));
497
305k
    _name = substr + "_SINK_OPERATOR";
498
305k
    return Status::OK();
499
305k
}
500
501
template <typename LocalStateType>
502
Status DataSinkOperatorX<LocalStateType>::setup_local_state(RuntimeState* state,
503
1.70M
                                                            LocalSinkStateInfo& info) {
504
1.70M
    auto local_state = LocalStateType::create_unique(this, state);
505
1.70M
    RETURN_IF_ERROR(local_state->init(state, info));
506
1.70M
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
1.70M
    return Status::OK();
508
1.70M
}
_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
348k
                                                            LocalSinkStateInfo& info) {
504
348k
    auto local_state = LocalStateType::create_unique(this, state);
505
348k
    RETURN_IF_ERROR(local_state->init(state, info));
506
348k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
348k
    return Status::OK();
508
348k
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
6
                                                            LocalSinkStateInfo& info) {
504
6
    auto local_state = LocalStateType::create_unique(this, state);
505
6
    RETURN_IF_ERROR(local_state->init(state, info));
506
6
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
6
    return Status::OK();
508
6
}
_ZN5doris17DataSinkOperatorXINS_24ResultFileSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
366
                                                            LocalSinkStateInfo& info) {
504
366
    auto local_state = LocalStateType::create_unique(this, state);
505
366
    RETURN_IF_ERROR(local_state->init(state, info));
506
366
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
366
    return Status::OK();
508
366
}
_ZN5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
49.8k
                                                            LocalSinkStateInfo& info) {
504
49.8k
    auto local_state = LocalStateType::create_unique(this, state);
505
49.8k
    RETURN_IF_ERROR(local_state->init(state, info));
506
49.8k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
49.8k
    return Status::OK();
508
49.8k
}
_ZN5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
18
                                                            LocalSinkStateInfo& info) {
504
18
    auto local_state = LocalStateType::create_unique(this, state);
505
18
    RETURN_IF_ERROR(local_state->init(state, info));
506
18
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
18
    return Status::OK();
508
18
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
16
                                                            LocalSinkStateInfo& info) {
504
16
    auto local_state = LocalStateType::create_unique(this, state);
505
16
    RETURN_IF_ERROR(local_state->init(state, info));
506
16
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
16
    return Status::OK();
508
16
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_25PaimonTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_27IcebergDeleteSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_26IcebergMergeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_21MCTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
8.98k
                                                            LocalSinkStateInfo& info) {
504
8.98k
    auto local_state = LocalStateType::create_unique(this, state);
505
8.98k
    RETURN_IF_ERROR(local_state->init(state, info));
506
8.98k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
8.98k
    return Status::OK();
508
8.98k
}
_ZN5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
15
                                                            LocalSinkStateInfo& info) {
504
15
    auto local_state = LocalStateType::create_unique(this, state);
505
15
    RETURN_IF_ERROR(local_state->init(state, info));
506
15
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
15
    return Status::OK();
508
15
}
_ZN5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
251k
                                                            LocalSinkStateInfo& info) {
504
251k
    auto local_state = LocalStateType::create_unique(this, state);
505
251k
    RETURN_IF_ERROR(local_state->init(state, info));
506
251k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
251k
    return Status::OK();
508
251k
}
_ZN5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
164
                                                            LocalSinkStateInfo& info) {
504
164
    auto local_state = LocalStateType::create_unique(this, state);
505
164
    RETURN_IF_ERROR(local_state->init(state, info));
506
164
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
164
    return Status::OK();
508
164
}
_ZN5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
206k
                                                            LocalSinkStateInfo& info) {
504
206k
    auto local_state = LocalStateType::create_unique(this, state);
505
206k
    RETURN_IF_ERROR(local_state->init(state, info));
506
206k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
206k
    return Status::OK();
508
206k
}
_ZN5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
106k
                                                            LocalSinkStateInfo& info) {
504
106k
    auto local_state = LocalStateType::create_unique(this, state);
505
106k
    RETURN_IF_ERROR(local_state->init(state, info));
506
106k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
106k
    return Status::OK();
508
106k
}
_ZN5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
49.8k
                                                            LocalSinkStateInfo& info) {
504
49.8k
    auto local_state = LocalStateType::create_unique(this, state);
505
49.8k
    RETURN_IF_ERROR(local_state->init(state, info));
506
49.8k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
49.8k
    return Status::OK();
508
49.8k
}
_ZN5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
121
                                                            LocalSinkStateInfo& info) {
504
121
    auto local_state = LocalStateType::create_unique(this, state);
505
121
    RETURN_IF_ERROR(local_state->init(state, info));
506
121
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
121
    return Status::OK();
508
121
}
_ZN5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
535k
                                                            LocalSinkStateInfo& info) {
504
535k
    auto local_state = LocalStateType::create_unique(this, state);
505
535k
    RETURN_IF_ERROR(local_state->init(state, info));
506
535k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
535k
    return Status::OK();
508
535k
}
_ZN5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
4.74k
                                                            LocalSinkStateInfo& info) {
504
4.74k
    auto local_state = LocalStateType::create_unique(this, state);
505
4.74k
    RETURN_IF_ERROR(local_state->init(state, info));
506
4.74k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
4.74k
    return Status::OK();
508
4.74k
}
_ZN5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
10.2k
                                                            LocalSinkStateInfo& info) {
504
10.2k
    auto local_state = LocalStateType::create_unique(this, state);
505
10.2k
    RETURN_IF_ERROR(local_state->init(state, info));
506
10.2k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
10.2k
    return Status::OK();
508
10.2k
}
_ZN5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
1.75k
                                                            LocalSinkStateInfo& info) {
504
1.75k
    auto local_state = LocalStateType::create_unique(this, state);
505
1.75k
    RETURN_IF_ERROR(local_state->init(state, info));
506
1.75k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
1.75k
    return Status::OK();
508
1.75k
}
_ZN5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
319
                                                            LocalSinkStateInfo& info) {
504
319
    auto local_state = LocalStateType::create_unique(this, state);
505
319
    RETURN_IF_ERROR(local_state->init(state, info));
506
319
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
319
    return Status::OK();
508
319
}
_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.73k
                                                            LocalSinkStateInfo& info) {
504
2.73k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.73k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.73k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.73k
    return Status::OK();
508
2.73k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.74k
                                                            LocalSinkStateInfo& info) {
504
2.74k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.74k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.74k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.74k
    return Status::OK();
508
2.74k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.64k
                                                            LocalSinkStateInfo& info) {
504
2.64k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.64k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.64k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.64k
    return Status::OK();
508
2.64k
}
_ZN5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
4
                                                            LocalSinkStateInfo& info) {
504
4
    auto local_state = LocalStateType::create_unique(this, state);
505
4
    RETURN_IF_ERROR(local_state->init(state, info));
506
4
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
4
    return Status::OK();
508
4
}
_ZN5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
559
                                                            LocalSinkStateInfo& info) {
504
559
    auto local_state = LocalStateType::create_unique(this, state);
505
559
    RETURN_IF_ERROR(local_state->init(state, info));
506
559
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
559
    return Status::OK();
508
559
}
_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
107
                                                            LocalSinkStateInfo& info) {
504
107
    auto local_state = LocalStateType::create_unique(this, state);
505
107
    RETURN_IF_ERROR(local_state->init(state, info));
506
107
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
107
    return Status::OK();
508
107
}
_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.41M
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.41M
    } else {
519
1.41M
        auto ss = LocalStateType::SharedStateType::create_shared();
520
1.41M
        ss->id = operator_id();
521
1.41M
        for (auto& dest : dests_id()) {
522
1.40M
            ss->related_op_ids.insert(dest);
523
1.40M
        }
524
1.41M
        return ss;
525
1.41M
    }
526
1.41M
}
_ZNK5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
99.9k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
99.9k
    } else {
519
99.9k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
99.9k
        ss->id = operator_id();
521
99.9k
        for (auto& dest : dests_id()) {
522
99.7k
            ss->related_op_ids.insert(dest);
523
99.7k
        }
524
99.9k
        return ss;
525
99.9k
    }
526
99.9k
}
_ZNK5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
349k
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
349k
    } else {
519
349k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
349k
        ss->id = operator_id();
521
349k
        for (auto& dest : dests_id()) {
522
346k
            ss->related_op_ids.insert(dest);
523
346k
        }
524
349k
        return ss;
525
349k
    }
526
349k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
6
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
6
    } else {
519
6
        auto ss = LocalStateType::SharedStateType::create_shared();
520
6
        ss->id = operator_id();
521
6
        for (auto& dest : dests_id()) {
522
6
            ss->related_op_ids.insert(dest);
523
6
        }
524
6
        return ss;
525
6
    }
526
6
}
_ZNK5doris17DataSinkOperatorXINS_24ResultFileSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
365
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
365
    } else {
519
365
        auto ss = LocalStateType::SharedStateType::create_shared();
520
365
        ss->id = operator_id();
521
365
        for (auto& dest : dests_id()) {
522
364
            ss->related_op_ids.insert(dest);
523
364
        }
524
365
        return ss;
525
365
    }
526
365
}
_ZNK5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
49.8k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
49.8k
    } else {
519
49.8k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
49.8k
        ss->id = operator_id();
521
49.8k
        for (auto& dest : dests_id()) {
522
49.6k
            ss->related_op_ids.insert(dest);
523
49.6k
        }
524
49.8k
        return ss;
525
49.8k
    }
526
49.8k
}
_ZNK5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE19create_shared_stateEv
Line
Count
Source
511
18
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
18
    } else {
519
18
        auto ss = LocalStateType::SharedStateType::create_shared();
520
18
        ss->id = operator_id();
521
18
        for (auto& dest : dests_id()) {
522
18
            ss->related_op_ids.insert(dest);
523
18
        }
524
18
        return ss;
525
18
    }
526
18
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
16
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
16
    } else {
519
16
        auto ss = LocalStateType::SharedStateType::create_shared();
520
16
        ss->id = operator_id();
521
16
        for (auto& dest : dests_id()) {
522
16
            ss->related_op_ids.insert(dest);
523
16
        }
524
16
        return ss;
525
16
    }
526
16
}
_ZNK5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
8
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
8
    } else {
519
8
        auto ss = LocalStateType::SharedStateType::create_shared();
520
8
        ss->id = operator_id();
521
8
        for (auto& dest : dests_id()) {
522
8
            ss->related_op_ids.insert(dest);
523
8
        }
524
8
        return ss;
525
8
    }
526
8
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_25PaimonTableSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
8
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
8
    } else {
519
8
        auto ss = LocalStateType::SharedStateType::create_shared();
520
8
        ss->id = operator_id();
521
8
        for (auto& dest : dests_id()) {
522
8
            ss->related_op_ids.insert(dest);
523
8
        }
524
8
        return ss;
525
8
    }
526
8
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27IcebergDeleteSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26IcebergMergeSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_21MCTableSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
9.07k
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
9.07k
    } else {
519
9.07k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
9.07k
        ss->id = operator_id();
521
9.07k
        for (auto& dest : dests_id()) {
522
9.07k
            ss->related_op_ids.insert(dest);
523
9.07k
        }
524
9.07k
        return ss;
525
9.07k
    }
526
9.07k
}
_ZNK5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
15
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
15
    } else {
519
15
        auto ss = LocalStateType::SharedStateType::create_shared();
520
15
        ss->id = operator_id();
521
15
        for (auto& dest : dests_id()) {
522
15
            ss->related_op_ids.insert(dest);
523
15
        }
524
15
        return ss;
525
15
    }
526
15
}
_ZNK5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
252k
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
252k
    } else {
519
252k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
252k
        ss->id = operator_id();
521
252k
        for (auto& dest : dests_id()) {
522
252k
            ss->related_op_ids.insert(dest);
523
252k
        }
524
252k
        return ss;
525
252k
    }
526
252k
}
_ZNK5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
166
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
166
    } else {
519
166
        auto ss = LocalStateType::SharedStateType::create_shared();
520
166
        ss->id = operator_id();
521
166
        for (auto& dest : dests_id()) {
522
166
            ss->related_op_ids.insert(dest);
523
166
        }
524
166
        return ss;
525
166
    }
526
166
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
107k
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
107k
    } else {
519
107k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
107k
        ss->id = operator_id();
521
107k
        for (auto& dest : dests_id()) {
522
107k
            ss->related_op_ids.insert(dest);
523
107k
        }
524
107k
        return ss;
525
107k
    }
526
107k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
120
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
120
    } else {
519
120
        auto ss = LocalStateType::SharedStateType::create_shared();
520
120
        ss->id = operator_id();
521
120
        for (auto& dest : dests_id()) {
522
120
            ss->related_op_ids.insert(dest);
523
120
        }
524
120
        return ss;
525
120
    }
526
120
}
_ZNK5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
536k
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
536k
    } else {
519
536k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
536k
        ss->id = operator_id();
521
536k
        for (auto& dest : dests_id()) {
522
532k
            ss->related_op_ids.insert(dest);
523
532k
        }
524
536k
        return ss;
525
536k
    }
526
536k
}
_ZNK5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
4.75k
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
4.75k
    } else {
519
4.75k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
4.75k
        ss->id = operator_id();
521
4.75k
        for (auto& dest : dests_id()) {
522
4.75k
            ss->related_op_ids.insert(dest);
523
4.75k
        }
524
4.75k
        return ss;
525
4.75k
    }
526
4.75k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
425
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
425
    } else {
519
425
        auto ss = LocalStateType::SharedStateType::create_shared();
520
425
        ss->id = operator_id();
521
426
        for (auto& dest : dests_id()) {
522
426
            ss->related_op_ids.insert(dest);
523
426
        }
524
425
        return ss;
525
425
    }
526
425
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE19create_shared_stateEv
Line
Count
Source
511
2.74k
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.74k
    } else {
519
2.74k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
2.74k
        ss->id = operator_id();
521
2.74k
        for (auto& dest : dests_id()) {
522
2.74k
            ss->related_op_ids.insert(dest);
523
2.74k
        }
524
2.74k
        return ss;
525
2.74k
    }
526
2.74k
}
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE19create_shared_stateEv
Line
Count
Source
511
2.63k
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.63k
    } else {
519
2.63k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
2.63k
        ss->id = operator_id();
521
2.63k
        for (auto& dest : dests_id()) {
522
2.62k
            ss->related_op_ids.insert(dest);
523
2.62k
        }
524
2.63k
        return ss;
525
2.63k
    }
526
2.63k
}
_ZNK5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE19create_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_30GroupCommitBlockSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
566
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
566
    } else {
519
566
        auto ss = LocalStateType::SharedStateType::create_shared();
520
566
        ss->id = operator_id();
521
566
        for (auto& dest : dests_id()) {
522
554
            ss->related_op_ids.insert(dest);
523
554
        }
524
566
        return ss;
525
566
    }
526
566
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
107
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
107
    } else {
519
107
        auto ss = LocalStateType::SharedStateType::create_shared();
520
107
        ss->id = operator_id();
521
107
        for (auto& dest : dests_id()) {
522
107
            ss->related_op_ids.insert(dest);
523
107
        }
524
107
        return ss;
525
107
    }
526
107
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE19create_shared_stateEv
527
528
template <typename LocalStateType>
529
1.98M
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.98M
    auto local_state = LocalStateType::create_unique(state, this);
531
1.98M
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.98M
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.98M
    return Status::OK();
534
1.98M
}
_ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
68.2k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
68.2k
    auto local_state = LocalStateType::create_unique(state, this);
531
68.2k
    RETURN_IF_ERROR(local_state->init(state, info));
532
68.2k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
68.2k
    return Status::OK();
534
68.2k
}
_ZN5doris9OperatorXINS_18OlapScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
252k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
252k
    auto local_state = LocalStateType::create_unique(state, this);
531
252k
    RETURN_IF_ERROR(local_state->init(state, info));
532
252k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
252k
    return Status::OK();
534
252k
}
_ZN5doris9OperatorXINS_21GroupCommitLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
123
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
123
    auto local_state = LocalStateType::create_unique(state, this);
531
123
    RETURN_IF_ERROR(local_state->init(state, info));
532
123
    state->emplace_local_state(operator_id(), std::move(local_state));
533
123
    return Status::OK();
534
123
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_18JDBCScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_18FileScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
3.38k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
3.38k
    auto local_state = LocalStateType::create_unique(state, this);
531
3.38k
    RETURN_IF_ERROR(local_state->init(state, info));
532
3.38k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
3.38k
    return Status::OK();
534
3.38k
}
_ZN5doris9OperatorXINS_18AnalyticLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
8.98k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
8.98k
    auto local_state = LocalStateType::create_unique(state, this);
531
8.98k
    RETURN_IF_ERROR(local_state->init(state, info));
532
8.98k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
8.98k
    return Status::OK();
534
8.98k
}
_ZN5doris9OperatorXINS_14SortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
8.32k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
8.32k
    auto local_state = LocalStateType::create_unique(state, this);
531
8.32k
    RETURN_IF_ERROR(local_state->init(state, info));
532
8.32k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
8.32k
    return Status::OK();
534
8.32k
}
_ZN5doris9OperatorXINS_19SpillSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
157
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
157
    auto local_state = LocalStateType::create_unique(state, this);
531
157
    RETURN_IF_ERROR(local_state->init(state, info));
532
157
    state->emplace_local_state(operator_id(), std::move(local_state));
533
157
    return Status::OK();
534
157
}
_ZN5doris9OperatorXINS_24LocalMergeSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
242k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
242k
    auto local_state = LocalStateType::create_unique(state, this);
531
242k
    RETURN_IF_ERROR(local_state->init(state, info));
532
242k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
242k
    return Status::OK();
534
242k
}
_ZN5doris9OperatorXINS_13AggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
106k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
106k
    auto local_state = LocalStateType::create_unique(state, this);
531
106k
    RETURN_IF_ERROR(local_state->init(state, info));
532
106k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
106k
    return Status::OK();
534
106k
}
_ZN5doris9OperatorXINS_21BucketedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
50.0k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
50.0k
    auto local_state = LocalStateType::create_unique(state, this);
531
50.0k
    RETURN_IF_ERROR(local_state->init(state, info));
532
50.0k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
50.0k
    return Status::OK();
534
50.0k
}
_ZN5doris9OperatorXINS_24PartitionedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
111
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
111
    auto local_state = LocalStateType::create_unique(state, this);
531
111
    RETURN_IF_ERROR(local_state->init(state, info));
532
111
    state->emplace_local_state(operator_id(), std::move(local_state));
533
111
    return Status::OK();
534
111
}
_ZN5doris9OperatorXINS_23TableFunctionLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
4.09k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
4.09k
    auto local_state = LocalStateType::create_unique(state, this);
531
4.09k
    RETURN_IF_ERROR(local_state->init(state, info));
532
4.09k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
4.09k
    return Status::OK();
534
4.09k
}
_ZN5doris9OperatorXINS_18ExchangeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
278k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
278k
    auto local_state = LocalStateType::create_unique(state, this);
531
278k
    RETURN_IF_ERROR(local_state->init(state, info));
532
278k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
278k
    return Status::OK();
534
278k
}
_ZN5doris9OperatorXINS_16RepeatLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.43k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.43k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.43k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.43k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.43k
    return Status::OK();
534
1.43k
}
_ZN5doris9OperatorXINS_29NestedLoopJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
4.73k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
4.73k
    auto local_state = LocalStateType::create_unique(state, this);
531
4.73k
    RETURN_IF_ERROR(local_state->init(state, info));
532
4.73k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
4.73k
    return Status::OK();
534
4.73k
}
_ZN5doris9OperatorXINS_23AssertNumRowsLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
29
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
29
    auto local_state = LocalStateType::create_unique(state, this);
531
29
    RETURN_IF_ERROR(local_state->init(state, info));
532
29
    state->emplace_local_state(operator_id(), std::move(local_state));
533
29
    return Status::OK();
534
29
}
_ZN5doris9OperatorXINS_18EmptySetLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.59k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.59k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.59k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.59k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.59k
    return Status::OK();
534
1.59k
}
_ZN5doris9OperatorXINS_21UnionSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
56.2k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
56.2k
    auto local_state = LocalStateType::create_unique(state, this);
531
56.2k
    RETURN_IF_ERROR(local_state->init(state, info));
532
56.2k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
56.2k
    return Status::OK();
534
56.2k
}
_ZN5doris9OperatorXINS_35MultiCastDataStreamSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
4.55k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
4.55k
    auto local_state = LocalStateType::create_unique(state, this);
531
4.55k
    RETURN_IF_ERROR(local_state->init(state, info));
532
4.55k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
4.55k
    return Status::OK();
534
4.55k
}
_ZN5doris9OperatorXINS_29PartitionSortSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
316
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
316
    auto local_state = LocalStateType::create_unique(state, this);
531
316
    RETURN_IF_ERROR(local_state->init(state, info));
532
316
    state->emplace_local_state(operator_id(), std::move(local_state));
533
316
    return Status::OK();
534
316
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.75k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.75k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.75k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.75k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.75k
    return Status::OK();
534
2.75k
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.65k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.65k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.65k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.65k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.65k
    return Status::OK();
534
2.65k
}
_ZN5doris9OperatorXINS_17DataGenLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
607
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
607
    auto local_state = LocalStateType::create_unique(state, this);
531
607
    RETURN_IF_ERROR(local_state->init(state, info));
532
607
    state->emplace_local_state(operator_id(), std::move(local_state));
533
607
    return Status::OK();
534
607
}
_ZN5doris9OperatorXINS_20SchemaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.72k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.72k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.72k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.72k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.72k
    return Status::OK();
534
1.72k
}
_ZN5doris9OperatorXINS_18MetaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
10.9k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
10.9k
    auto local_state = LocalStateType::create_unique(state, this);
531
10.9k
    RETURN_IF_ERROR(local_state->init(state, info));
532
10.9k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
10.9k
    return Status::OK();
534
10.9k
}
_ZN5doris9OperatorXINS_29LocalExchangeSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
598k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
598k
    auto local_state = LocalStateType::create_unique(state, this);
531
598k
    RETURN_IF_ERROR(local_state->init(state, info));
532
598k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
598k
    return Status::OK();
534
598k
}
_ZN5doris9OperatorXINS_34PartitionedHashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
3
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
3
    auto local_state = LocalStateType::create_unique(state, this);
531
3
    RETURN_IF_ERROR(local_state->init(state, info));
532
3
    state->emplace_local_state(operator_id(), std::move(local_state));
533
3
    return Status::OK();
534
3
}
_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
812
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
812
    auto local_state = LocalStateType::create_unique(state, this);
531
812
    RETURN_IF_ERROR(local_state->init(state, info));
532
812
    state->emplace_local_state(operator_id(), std::move(local_state));
533
812
    return Status::OK();
534
812
}
_ZN5doris9OperatorXINS_16SelectLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
713
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
713
    auto local_state = LocalStateType::create_unique(state, this);
531
713
    RETURN_IF_ERROR(local_state->init(state, info));
532
713
    state->emplace_local_state(operator_id(), std::move(local_state));
533
713
    return Status::OK();
534
713
}
_ZN5doris9OperatorXINS_22StreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
8.14k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
8.14k
    auto local_state = LocalStateType::create_unique(state, this);
531
8.14k
    RETURN_IF_ERROR(local_state->init(state, info));
532
8.14k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
8.14k
    return Status::OK();
534
8.14k
}
_ZN5doris9OperatorXINS_30DistinctStreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
265k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
265k
    auto local_state = LocalStateType::create_unique(state, this);
531
265k
    RETURN_IF_ERROR(local_state->init(state, info));
532
265k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
265k
    return Status::OK();
534
265k
}
535
536
PipelineXSinkLocalStateBase::PipelineXSinkLocalStateBase(DataSinkOperatorXBase* parent,
537
                                                         RuntimeState* state)
538
1.70M
        : _parent(parent), _state(state) {}
539
540
PipelineXLocalStateBase::PipelineXLocalStateBase(RuntimeState* state, OperatorXBase* parent)
541
1.97M
        : _num_rows_returned(0),
542
1.97M
          _rows_returned_counter(nullptr),
543
1.97M
          _parent(parent),
544
1.97M
          _state(state),
545
1.97M
          _budget(state->batch_size(), state->preferred_block_size_bytes()) {}
546
547
template <typename SharedStateArg>
548
1.98M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
1.98M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
1.98M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
1.98M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
1.98M
    _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.98M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
1.98M
    _operator_profile->add_child(_common_profile.get(), true);
557
1.98M
    _operator_profile->add_child(_custom_profile.get(), true);
558
1.98M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
1.98M
    if constexpr (!is_fake_shared) {
560
1.15M
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
659k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
659k
                                    .first.get()
563
659k
                                    ->template cast<SharedStateArg>();
564
565
659k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
659k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
659k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
659k
        } else if (info.shared_state) {
569
431k
            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
431k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
431k
            _dependency = _shared_state->create_source_dependency(
576
431k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
431k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
431k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
431k
        } else {
580
67.1k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
7.17k
                DCHECK(false);
582
7.17k
            }
583
67.1k
        }
584
1.15M
    }
585
586
1.98M
    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.98M
    _rows_returned_counter =
591
1.98M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
1.98M
    _blocks_returned_counter =
593
1.98M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
1.98M
    _output_block_bytes_counter =
595
1.98M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
1.98M
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
1.98M
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
1.98M
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
1.98M
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
1.98M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
1.98M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
1.98M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
1.98M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
1.98M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
1.98M
    _memory_used_counter =
606
1.98M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
1.98M
    _common_profile->add_info_string("IsColocate",
608
1.98M
                                     std::to_string(_parent->is_colocated_operator()));
609
1.98M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
1.98M
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
1.98M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
1.98M
    return Status::OK();
613
1.98M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
68.4k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
68.4k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
68.4k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
68.4k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
68.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
68.4k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
68.4k
    _operator_profile->add_child(_common_profile.get(), true);
557
68.4k
    _operator_profile->add_child(_custom_profile.get(), true);
558
68.4k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
68.4k
    if constexpr (!is_fake_shared) {
560
68.4k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
16.3k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
16.3k
                                    .first.get()
563
16.3k
                                    ->template cast<SharedStateArg>();
564
565
16.3k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
16.3k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
16.3k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
52.0k
        } 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
51.3k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
51.3k
            _dependency = _shared_state->create_source_dependency(
576
51.3k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
51.3k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
51.3k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
51.3k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
736
        }
584
68.4k
    }
585
586
68.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
68.4k
    _rows_returned_counter =
591
68.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
68.4k
    _blocks_returned_counter =
593
68.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
68.4k
    _output_block_bytes_counter =
595
68.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
68.4k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
68.4k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
68.4k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
68.4k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
68.4k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
68.4k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
68.4k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
68.4k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
68.4k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
68.4k
    _memory_used_counter =
606
68.4k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
68.4k
    _common_profile->add_info_string("IsColocate",
608
68.4k
                                     std::to_string(_parent->is_colocated_operator()));
609
68.4k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
68.4k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
68.4k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
68.4k
    return Status::OK();
613
68.4k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
4
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
4
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
4
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
4
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
4
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
4
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
4
    _operator_profile->add_child(_common_profile.get(), true);
557
4
    _operator_profile->add_child(_custom_profile.get(), true);
558
4
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
4
    if constexpr (!is_fake_shared) {
560
4
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
4
        } 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
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
4
            _dependency = _shared_state->create_source_dependency(
576
4
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
4
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
4
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
4
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
4
    }
585
586
4
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
4
    _rows_returned_counter =
591
4
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
4
    _blocks_returned_counter =
593
4
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
4
    _output_block_bytes_counter =
595
4
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
4
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
4
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
4
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
4
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
4
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
4
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
4
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
4
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
4
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
4
    _memory_used_counter =
606
4
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
4
    _common_profile->add_info_string("IsColocate",
608
4
                                     std::to_string(_parent->is_colocated_operator()));
609
4
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
4
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
4
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
4
    return Status::OK();
613
4
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
251k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
251k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
251k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
251k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
251k
    _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
251k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
251k
    _operator_profile->add_child(_common_profile.get(), true);
557
251k
    _operator_profile->add_child(_custom_profile.get(), true);
558
251k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
251k
    if constexpr (!is_fake_shared) {
560
251k
        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
251k
        } 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
246k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
246k
            _dependency = _shared_state->create_source_dependency(
576
246k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
246k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
246k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
246k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
5.07k
        }
584
251k
    }
585
586
251k
    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
251k
    _rows_returned_counter =
591
251k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
251k
    _blocks_returned_counter =
593
251k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
251k
    _output_block_bytes_counter =
595
251k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
251k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
251k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
251k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
251k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
251k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
251k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
251k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
251k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
251k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
251k
    _memory_used_counter =
606
251k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
251k
    _common_profile->add_info_string("IsColocate",
608
251k
                                     std::to_string(_parent->is_colocated_operator()));
609
251k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
251k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
251k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
251k
    return Status::OK();
613
251k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
157
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
157
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
157
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
157
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
157
    _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
157
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
157
    _operator_profile->add_child(_common_profile.get(), true);
557
157
    _operator_profile->add_child(_custom_profile.get(), true);
558
157
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
157
    if constexpr (!is_fake_shared) {
560
157
        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
157
        } 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
157
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
157
            _dependency = _shared_state->create_source_dependency(
576
157
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
157
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
157
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
157
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
157
    }
585
586
157
    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
157
    _rows_returned_counter =
591
157
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
157
    _blocks_returned_counter =
593
157
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
157
    _output_block_bytes_counter =
595
157
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
157
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
157
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
157
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
157
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
157
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
157
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
157
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
157
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
157
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
157
    _memory_used_counter =
606
157
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
157
    _common_profile->add_info_string("IsColocate",
608
157
                                     std::to_string(_parent->is_colocated_operator()));
609
157
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
157
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
157
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
157
    return Status::OK();
613
157
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
4.75k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
4.75k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
4.75k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
4.75k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
4.75k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
4.75k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
4.75k
    _operator_profile->add_child(_common_profile.get(), true);
557
4.75k
    _operator_profile->add_child(_custom_profile.get(), true);
558
4.75k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
4.75k
    if constexpr (!is_fake_shared) {
560
4.75k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
4.75k
        } 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.71k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
4.71k
            _dependency = _shared_state->create_source_dependency(
576
4.71k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
4.71k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
4.71k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
4.71k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
41
        }
584
4.75k
    }
585
586
4.75k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
4.75k
    _rows_returned_counter =
591
4.75k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
4.75k
    _blocks_returned_counter =
593
4.75k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
4.75k
    _output_block_bytes_counter =
595
4.75k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
4.75k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
4.75k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
4.75k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
4.75k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
4.75k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
4.75k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
4.75k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
4.75k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
4.75k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
4.75k
    _memory_used_counter =
606
4.75k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
4.75k
    _common_profile->add_info_string("IsColocate",
608
4.75k
                                     std::to_string(_parent->is_colocated_operator()));
609
4.75k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
4.75k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
4.75k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
4.75k
    return Status::OK();
613
4.75k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
9.06k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
9.06k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
9.06k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
9.06k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
9.06k
    _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
9.06k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
9.06k
    _operator_profile->add_child(_common_profile.get(), true);
557
9.06k
    _operator_profile->add_child(_custom_profile.get(), true);
558
9.06k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
9.06k
    if constexpr (!is_fake_shared) {
560
9.06k
        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
9.06k
        } 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.99k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
8.99k
            _dependency = _shared_state->create_source_dependency(
576
8.99k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
8.99k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
8.99k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
8.99k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
76
        }
584
9.06k
    }
585
586
9.06k
    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
9.06k
    _rows_returned_counter =
591
9.06k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
9.06k
    _blocks_returned_counter =
593
9.06k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
9.06k
    _output_block_bytes_counter =
595
9.06k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
9.06k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
9.06k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
9.06k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
9.06k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
9.06k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
9.06k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
9.06k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
9.06k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
9.06k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
9.06k
    _memory_used_counter =
606
9.06k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
9.06k
    _common_profile->add_info_string("IsColocate",
608
9.06k
                                     std::to_string(_parent->is_colocated_operator()));
609
9.06k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
9.06k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
9.06k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
9.06k
    return Status::OK();
613
9.06k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
107k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
107k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
107k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
107k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
107k
    _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
107k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
107k
    _operator_profile->add_child(_common_profile.get(), true);
557
107k
    _operator_profile->add_child(_custom_profile.get(), true);
558
107k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
107k
    if constexpr (!is_fake_shared) {
560
107k
        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
107k
        } 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
105k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
105k
            _dependency = _shared_state->create_source_dependency(
576
105k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
105k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
105k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
105k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
1.93k
        }
584
107k
    }
585
586
107k
    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
107k
    _rows_returned_counter =
591
107k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
107k
    _blocks_returned_counter =
593
107k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
107k
    _output_block_bytes_counter =
595
107k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
107k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
107k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
107k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
107k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
107k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
107k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
107k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
107k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
107k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
107k
    _memory_used_counter =
606
107k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
107k
    _common_profile->add_info_string("IsColocate",
608
107k
                                     std::to_string(_parent->is_colocated_operator()));
609
107k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
107k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
107k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
107k
    return Status::OK();
613
107k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
50.0k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
50.0k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
50.0k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
50.0k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
50.0k
    _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
50.0k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
50.0k
    _operator_profile->add_child(_common_profile.get(), true);
557
50.0k
    _operator_profile->add_child(_custom_profile.get(), true);
558
50.0k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
50.0k
    if constexpr (!is_fake_shared) {
560
50.0k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
49.9k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
49.9k
                                    .first.get()
563
49.9k
                                    ->template cast<SharedStateArg>();
564
565
49.9k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
49.9k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
49.9k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
49.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
77
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
77
        }
584
50.0k
    }
585
586
50.0k
    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
50.0k
    _rows_returned_counter =
591
50.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
50.0k
    _blocks_returned_counter =
593
50.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
50.0k
    _output_block_bytes_counter =
595
50.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
50.0k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
50.0k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
50.0k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
50.0k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
50.0k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
50.0k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
50.0k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
50.0k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
50.0k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
50.0k
    _memory_used_counter =
606
50.0k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
50.0k
    _common_profile->add_info_string("IsColocate",
608
50.0k
                                     std::to_string(_parent->is_colocated_operator()));
609
50.0k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
50.0k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
50.0k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
50.0k
    return Status::OK();
613
50.0k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
111
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
111
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
111
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
111
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
111
    _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
111
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
111
    _operator_profile->add_child(_common_profile.get(), true);
557
111
    _operator_profile->add_child(_custom_profile.get(), true);
558
111
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
111
    if constexpr (!is_fake_shared) {
560
111
        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
111
        } 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
111
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
111
            _dependency = _shared_state->create_source_dependency(
576
111
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
111
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
111
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
111
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
111
    }
585
586
111
    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
111
    _rows_returned_counter =
591
111
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
111
    _blocks_returned_counter =
593
111
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
111
    _output_block_bytes_counter =
595
111
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
111
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
111
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
111
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
111
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
111
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
111
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
111
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
111
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
111
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
111
    _memory_used_counter =
606
111
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
111
    _common_profile->add_info_string("IsColocate",
608
111
                                     std::to_string(_parent->is_colocated_operator()));
609
111
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
111
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
111
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
111
    return Status::OK();
613
111
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
829k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
829k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
829k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
829k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
829k
    _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
829k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
829k
    _operator_profile->add_child(_common_profile.get(), true);
557
829k
    _operator_profile->add_child(_custom_profile.get(), true);
558
829k
    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
829k
    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
829k
    _rows_returned_counter =
591
829k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
829k
    _blocks_returned_counter =
593
829k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
829k
    _output_block_bytes_counter =
595
829k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
829k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
829k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
829k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
829k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
829k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
829k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
829k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
829k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
829k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
829k
    _memory_used_counter =
606
829k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
829k
    _common_profile->add_info_string("IsColocate",
608
829k
                                     std::to_string(_parent->is_colocated_operator()));
609
829k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
829k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
829k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
829k
    return Status::OK();
613
829k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
56.2k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
56.2k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
56.2k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
56.2k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
56.2k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
56.2k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
56.2k
    _operator_profile->add_child(_common_profile.get(), true);
557
56.2k
    _operator_profile->add_child(_custom_profile.get(), true);
558
56.2k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
56.2k
    if constexpr (!is_fake_shared) {
560
56.2k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
56.2k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
4.30k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
4.30k
            _dependency = _shared_state->create_source_dependency(
576
4.30k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
4.30k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
4.30k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
51.9k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
51.9k
        }
584
56.2k
    }
585
586
56.2k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
56.2k
    _rows_returned_counter =
591
56.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
56.2k
    _blocks_returned_counter =
593
56.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
56.2k
    _output_block_bytes_counter =
595
56.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
56.2k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
56.2k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
56.2k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
56.2k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
56.2k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
56.2k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
56.2k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
56.2k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
56.2k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
56.2k
    _memory_used_counter =
606
56.2k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
56.2k
    _common_profile->add_info_string("IsColocate",
608
56.2k
                                     std::to_string(_parent->is_colocated_operator()));
609
56.2k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
56.2k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
56.2k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
56.2k
    return Status::OK();
613
56.2k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
26
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
26
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
26
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
26
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
26
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
26
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
26
    _operator_profile->add_child(_common_profile.get(), true);
557
26
    _operator_profile->add_child(_custom_profile.get(), true);
558
26
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
26
    if constexpr (!is_fake_shared) {
560
26
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
26
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
26
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
26
            _dependency = _shared_state->create_source_dependency(
576
26
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
26
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
26
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
26
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
26
    }
585
586
26
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
26
    _rows_returned_counter =
591
26
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
26
    _blocks_returned_counter =
593
26
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
26
    _output_block_bytes_counter =
595
26
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
26
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
26
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
26
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
26
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
26
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
26
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
26
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
26
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
26
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
26
    _memory_used_counter =
606
26
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
26
    _common_profile->add_info_string("IsColocate",
608
26
                                     std::to_string(_parent->is_colocated_operator()));
609
26
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
26
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
26
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
26
    return Status::OK();
613
26
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
4.57k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
4.57k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
4.57k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
4.57k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
4.57k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
4.57k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
4.57k
    _operator_profile->add_child(_common_profile.get(), true);
557
4.57k
    _operator_profile->add_child(_custom_profile.get(), true);
558
4.57k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
4.57k
    if constexpr (!is_fake_shared) {
560
4.57k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
4.57k
        } 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.54k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
4.54k
            _dependency = _shared_state->create_source_dependency(
576
4.54k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
4.54k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
4.54k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
4.54k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
36
        }
584
4.57k
    }
585
586
4.57k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
4.57k
    _rows_returned_counter =
591
4.57k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
4.57k
    _blocks_returned_counter =
593
4.57k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
4.57k
    _output_block_bytes_counter =
595
4.57k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
4.57k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
4.57k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
4.57k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
4.57k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
4.57k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
4.57k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
4.57k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
4.57k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
4.57k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
4.57k
    _memory_used_counter =
606
4.57k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
4.57k
    _common_profile->add_info_string("IsColocate",
608
4.57k
                                     std::to_string(_parent->is_colocated_operator()));
609
4.57k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
4.57k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
4.57k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
4.57k
    return Status::OK();
613
4.57k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
422
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
422
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
422
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
422
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
422
    _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
422
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
422
    _operator_profile->add_child(_common_profile.get(), true);
557
422
    _operator_profile->add_child(_custom_profile.get(), true);
558
422
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
422
    if constexpr (!is_fake_shared) {
560
422
        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
422
        } 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
419
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
419
            _dependency = _shared_state->create_source_dependency(
576
419
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
419
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
419
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
419
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
3
        }
584
422
    }
585
586
422
    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
422
    _rows_returned_counter =
591
422
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
422
    _blocks_returned_counter =
593
422
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
422
    _output_block_bytes_counter =
595
422
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
422
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
422
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
422
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
422
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
422
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
422
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
422
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
422
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
422
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
422
    _memory_used_counter =
606
422
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
422
    _common_profile->add_info_string("IsColocate",
608
422
                                     std::to_string(_parent->is_colocated_operator()));
609
422
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
422
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
422
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
422
    return Status::OK();
613
422
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
5.43k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
5.43k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
5.43k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
5.43k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
5.43k
    _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.43k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
5.43k
    _operator_profile->add_child(_common_profile.get(), true);
557
5.43k
    _operator_profile->add_child(_custom_profile.get(), true);
558
5.43k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
5.43k
    if constexpr (!is_fake_shared) {
560
5.43k
        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.43k
        } 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.39k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
5.39k
            _dependency = _shared_state->create_source_dependency(
576
5.39k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
5.39k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
5.39k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
5.39k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
43
        }
584
5.43k
    }
585
586
5.43k
    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.43k
    _rows_returned_counter =
591
5.43k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
5.43k
    _blocks_returned_counter =
593
5.43k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
5.43k
    _output_block_bytes_counter =
595
5.43k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
5.43k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
5.43k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
5.43k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
5.43k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
5.43k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
5.43k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
5.43k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
5.43k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
5.43k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
5.43k
    _memory_used_counter =
606
5.43k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
5.43k
    _common_profile->add_info_string("IsColocate",
608
5.43k
                                     std::to_string(_parent->is_colocated_operator()));
609
5.43k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
5.43k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
5.43k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
5.43k
    return Status::OK();
613
5.43k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
600k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
600k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
600k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
600k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
600k
    _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
600k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
600k
    _operator_profile->add_child(_common_profile.get(), true);
557
600k
    _operator_profile->add_child(_custom_profile.get(), true);
558
600k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
600k
    if constexpr (!is_fake_shared) {
560
600k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
593k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
593k
                                    .first.get()
563
593k
                                    ->template cast<SharedStateArg>();
564
565
593k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
593k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
593k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
593k
        } 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
7.17k
        } else {
580
7.17k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
7.17k
                DCHECK(false);
582
7.17k
            }
583
7.17k
        }
584
600k
    }
585
586
600k
    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
600k
    _rows_returned_counter =
591
600k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
600k
    _blocks_returned_counter =
593
600k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
600k
    _output_block_bytes_counter =
595
600k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
600k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
600k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
600k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
600k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
600k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
600k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
600k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
600k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
600k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
600k
    _memory_used_counter =
606
600k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
600k
    _common_profile->add_info_string("IsColocate",
608
600k
                                     std::to_string(_parent->is_colocated_operator()));
609
600k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
600k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
600k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
600k
    return Status::OK();
613
600k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
169
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
169
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
169
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
169
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
169
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
169
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
169
    _operator_profile->add_child(_common_profile.get(), true);
557
169
    _operator_profile->add_child(_custom_profile.get(), true);
558
169
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
169
    if constexpr (!is_fake_shared) {
560
169
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
169
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
169
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
169
            _dependency = _shared_state->create_source_dependency(
576
169
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
169
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
169
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
169
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
169
    }
585
586
169
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
169
    _rows_returned_counter =
591
169
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
169
    _blocks_returned_counter =
593
169
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
169
    _output_block_bytes_counter =
595
169
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
169
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
169
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
169
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
169
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
169
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
169
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
169
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
169
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
169
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
169
    _memory_used_counter =
606
169
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
169
    _common_profile->add_info_string("IsColocate",
608
169
                                     std::to_string(_parent->is_colocated_operator()));
609
169
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
169
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
169
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
169
    return Status::OK();
613
169
}
614
615
template <typename SharedStateArg>
616
1.99M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
1.99M
    _conjuncts.resize(_parent->_conjuncts.size());
618
2.31M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
313k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
313k
    }
621
1.99M
    if (_parent->has_projection()) {
622
394k
        const auto& projection = *_parent->_projection;
623
394k
        _projections.resize(projection.projections.size());
624
2.44M
        for (size_t i = 0; i < _projections.size(); i++) {
625
2.04M
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
2.04M
        }
627
394k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
420k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
25.8k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
454k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
428k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
428k
                        state, _intermediate_projections[i][j]));
633
428k
            }
634
25.8k
        }
635
394k
    }
636
1.99M
    return Status::OK();
637
1.99M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
68.5k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
68.5k
    _conjuncts.resize(_parent->_conjuncts.size());
618
70.1k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
1.61k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1.61k
    }
621
68.5k
    if (_parent->has_projection()) {
622
68.5k
        const auto& projection = *_parent->_projection;
623
68.5k
        _projections.resize(projection.projections.size());
624
362k
        for (size_t i = 0; i < _projections.size(); i++) {
625
293k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
293k
        }
627
68.5k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
79.9k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
11.4k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
368k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
356k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
356k
                        state, _intermediate_projections[i][j]));
633
356k
            }
634
11.4k
        }
635
68.5k
    }
636
68.5k
    return Status::OK();
637
68.5k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
6
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
6
    _conjuncts.resize(_parent->_conjuncts.size());
618
6
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
6
    if (_parent->has_projection()) {
622
3
        const auto& projection = *_parent->_projection;
623
3
        _projections.resize(projection.projections.size());
624
9
        for (size_t i = 0; i < _projections.size(); i++) {
625
6
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
6
        }
627
3
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
3
        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
3
    }
636
6
    return Status::OK();
637
6
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
252k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
252k
    _conjuncts.resize(_parent->_conjuncts.size());
618
252k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
252k
    if (_parent->has_projection()) {
622
134
        const auto& projection = *_parent->_projection;
623
134
        _projections.resize(projection.projections.size());
624
624
        for (size_t i = 0; i < _projections.size(); i++) {
625
490
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
490
        }
627
134
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
134
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
134
    }
636
252k
    return Status::OK();
637
252k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
154
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
154
    _conjuncts.resize(_parent->_conjuncts.size());
618
154
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
154
    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
154
    return Status::OK();
637
154
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
4.76k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
4.76k
    _conjuncts.resize(_parent->_conjuncts.size());
618
4.83k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
70
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
70
    }
621
4.76k
    if (_parent->has_projection()) {
622
4.76k
        const auto& projection = *_parent->_projection;
623
4.76k
        _projections.resize(projection.projections.size());
624
19.0k
        for (size_t i = 0; i < _projections.size(); i++) {
625
14.2k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
14.2k
        }
627
4.76k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
4.78k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
24
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
165
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
141
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
141
                        state, _intermediate_projections[i][j]));
633
141
            }
634
24
        }
635
4.76k
    }
636
4.76k
    return Status::OK();
637
4.76k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
9.07k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
9.07k
    _conjuncts.resize(_parent->_conjuncts.size());
618
9.82k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
746
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
746
    }
621
9.07k
    if (_parent->has_projection()) {
622
4.90k
        const auto& projection = *_parent->_projection;
623
4.90k
        _projections.resize(projection.projections.size());
624
20.4k
        for (size_t i = 0; i < _projections.size(); i++) {
625
15.5k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
15.5k
        }
627
4.90k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
4.99k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
83
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
619
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
536
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
536
                        state, _intermediate_projections[i][j]));
633
536
            }
634
83
        }
635
4.90k
    }
636
9.07k
    return Status::OK();
637
9.07k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
107k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
107k
    _conjuncts.resize(_parent->_conjuncts.size());
618
109k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
1.99k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1.99k
    }
621
107k
    if (_parent->has_projection()) {
622
34.0k
        const auto& projection = *_parent->_projection;
623
34.0k
        _projections.resize(projection.projections.size());
624
303k
        for (size_t i = 0; i < _projections.size(); i++) {
625
269k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
269k
        }
627
34.0k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
34.7k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
751
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
4.67k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
3.92k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
3.92k
                        state, _intermediate_projections[i][j]));
633
3.92k
            }
634
751
        }
635
34.0k
    }
636
107k
    return Status::OK();
637
107k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
50.0k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
50.0k
    _conjuncts.resize(_parent->_conjuncts.size());
618
50.1k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
45
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
45
    }
621
50.0k
    if (_parent->has_projection()) {
622
356
        const auto& projection = *_parent->_projection;
623
356
        _projections.resize(projection.projections.size());
624
1.66k
        for (size_t i = 0; i < _projections.size(); i++) {
625
1.30k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
1.30k
        }
627
356
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
357
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
1
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
11
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
10
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
10
                        state, _intermediate_projections[i][j]));
633
10
            }
634
1
        }
635
356
    }
636
50.0k
    return Status::OK();
637
50.0k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
115
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
115
    _conjuncts.resize(_parent->_conjuncts.size());
618
115
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
115
    if (_parent->has_projection()) {
622
3
        const auto& projection = *_parent->_projection;
623
3
        _projections.resize(projection.projections.size());
624
11
        for (size_t i = 0; i < _projections.size(); i++) {
625
8
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
8
        }
627
3
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
3
        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
3
    }
636
115
    return Status::OK();
637
115
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
836k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
836k
    _conjuncts.resize(_parent->_conjuncts.size());
618
1.14M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
308k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
308k
    }
621
836k
    if (_parent->has_projection()) {
622
269k
        const auto& projection = *_parent->_projection;
623
269k
        _projections.resize(projection.projections.size());
624
1.62M
        for (size_t i = 0; i < _projections.size(); i++) {
625
1.35M
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
1.35M
        }
627
269k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
283k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
13.4k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
78.9k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
65.4k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
65.4k
                        state, _intermediate_projections[i][j]));
633
65.4k
            }
634
13.4k
        }
635
269k
    }
636
836k
    return Status::OK();
637
836k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
56.3k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
56.3k
    _conjuncts.resize(_parent->_conjuncts.size());
618
56.3k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
56.3k
    if (_parent->has_projection()) {
622
11.8k
        const auto& projection = *_parent->_projection;
623
11.8k
        _projections.resize(projection.projections.size());
624
115k
        for (size_t i = 0; i < _projections.size(); i++) {
625
103k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
103k
        }
627
11.8k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
12.0k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
114
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
1.61k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
1.50k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
1.50k
                        state, _intermediate_projections[i][j]));
633
1.50k
            }
634
114
        }
635
11.8k
    }
636
56.3k
    return Status::OK();
637
56.3k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
25
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
25
    _conjuncts.resize(_parent->_conjuncts.size());
618
25
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
25
    if (_parent->has_projection()) {
622
0
        const auto& projection = *_parent->_projection;
623
0
        _projections.resize(projection.projections.size());
624
0
        for (size_t i = 0; i < _projections.size(); i++) {
625
0
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
0
        }
627
0
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
0
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
0
    }
636
25
    return Status::OK();
637
25
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
4.57k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
4.57k
    _conjuncts.resize(_parent->_conjuncts.size());
618
4.86k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
295
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
295
    }
621
4.57k
    if (_parent->has_projection()) {
622
0
        const auto& projection = *_parent->_projection;
623
0
        _projections.resize(projection.projections.size());
624
0
        for (size_t i = 0; i < _projections.size(); i++) {
625
0
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
0
        }
627
0
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
0
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
0
    }
636
4.57k
    return Status::OK();
637
4.57k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
426
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
426
    _conjuncts.resize(_parent->_conjuncts.size());
618
426
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
426
    if (_parent->has_projection()) {
622
0
        const auto& projection = *_parent->_projection;
623
0
        _projections.resize(projection.projections.size());
624
0
        for (size_t i = 0; i < _projections.size(); i++) {
625
0
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
0
        }
627
0
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
0
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
0
    }
636
426
    return Status::OK();
637
426
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
5.43k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
5.43k
    _conjuncts.resize(_parent->_conjuncts.size());
618
5.43k
    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.43k
    if (_parent->has_projection()) {
622
83
        const auto& projection = *_parent->_projection;
623
83
        _projections.resize(projection.projections.size());
624
274
        for (size_t i = 0; i < _projections.size(); i++) {
625
191
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
191
        }
627
83
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
83
        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
83
    }
636
5.43k
    return Status::OK();
637
5.43k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
603k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
603k
    _conjuncts.resize(_parent->_conjuncts.size());
618
603k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
603k
    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
603k
    return Status::OK();
637
603k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4openEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
169
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
169
    _conjuncts.resize(_parent->_conjuncts.size());
618
176
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
7
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
7
    }
621
169
    if (_parent->has_projection()) {
622
166
        const auto& projection = *_parent->_projection;
623
166
        _projections.resize(projection.projections.size());
624
491
        for (size_t i = 0; i < _projections.size(); i++) {
625
325
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
325
        }
627
166
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
169
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
3
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
11
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
8
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
8
                        state, _intermediate_projections[i][j]));
633
8
            }
634
3
        }
635
166
    }
636
169
    return Status::OK();
637
169
}
638
639
template <typename SharedStateArg>
640
10.6k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
10.6k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
10.6k
    _terminated = true;
645
10.6k
    return Status::OK();
646
10.6k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
557
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
557
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
557
    _terminated = true;
645
557
    return Status::OK();
646
557
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
44
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
44
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
44
    _terminated = true;
645
44
    return Status::OK();
646
44
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
94
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
94
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
94
    _terminated = true;
645
94
    return Status::OK();
646
94
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
4
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
4
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
4
    _terminated = true;
645
4
    return Status::OK();
646
4
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE9terminateEPNS_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
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
8.57k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
8.57k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
8.57k
    _terminated = true;
645
8.57k
    return Status::OK();
646
8.57k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
47
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
47
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
47
    _terminated = true;
645
47
    return Status::OK();
646
47
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
12
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
12
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
12
    _terminated = true;
645
12
    return Status::OK();
646
12
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
21
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
21
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
21
    _terminated = true;
645
21
    return Status::OK();
646
21
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
1.28k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
1.28k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
1.28k
    _terminated = true;
645
1.28k
    return Status::OK();
646
1.28k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
41
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
41
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
41
    _terminated = true;
645
41
    return Status::OK();
646
41
}
647
648
template <typename SharedStateArg>
649
2.26M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
2.26M
    if (_closed) {
651
272k
        return Status::OK();
652
272k
    }
653
1.99M
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
1.16M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
1.16M
    }
656
1.99M
    _closed = true;
657
1.99M
    return Status::OK();
658
2.26M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
68.4k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
68.4k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
68.4k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
68.4k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
68.4k
    }
656
68.4k
    _closed = true;
657
68.4k
    return Status::OK();
658
68.4k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
7
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
7
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
7
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
7
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
7
    }
656
7
    _closed = true;
657
7
    return Status::OK();
658
7
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
499k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
499k
    if (_closed) {
651
250k
        return Status::OK();
652
250k
    }
653
248k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
248k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
248k
    }
656
248k
    _closed = true;
657
248k
    return Status::OK();
658
499k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
157
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
157
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
157
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
157
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
157
    }
656
157
    _closed = true;
657
157
    return Status::OK();
658
157
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
4.75k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
4.75k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
4.75k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
4.75k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
4.75k
    }
656
4.75k
    _closed = true;
657
4.75k
    return Status::OK();
658
4.75k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
9.02k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
9.02k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
9.02k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
9.02k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
9.02k
    }
656
9.02k
    _closed = true;
657
9.02k
    return Status::OK();
658
9.02k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
107k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
107k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
107k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
107k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
107k
    }
656
107k
    _closed = true;
657
107k
    return Status::OK();
658
107k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
49.7k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
49.7k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
49.7k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
49.7k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
49.7k
    }
656
49.7k
    _closed = true;
657
49.7k
    return Status::OK();
658
49.7k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
110
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
110
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
110
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
110
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
110
    }
656
110
    _closed = true;
657
110
    return Status::OK();
658
110
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
851k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
851k
    if (_closed) {
651
14.7k
        return Status::OK();
652
14.7k
    }
653
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
    }
656
837k
    _closed = true;
657
837k
    return Status::OK();
658
851k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
56.3k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
56.3k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
56.3k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
56.3k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
56.3k
    }
656
56.3k
    _closed = true;
657
56.3k
    return Status::OK();
658
56.3k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
28
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
28
    if (_closed) {
651
14
        return Status::OK();
652
14
    }
653
14
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
14
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
14
    }
656
14
    _closed = true;
657
14
    return Status::OK();
658
28
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
4.55k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
4.55k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
4.55k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
4.55k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
4.55k
    }
656
4.55k
    _closed = true;
657
4.55k
    return Status::OK();
658
4.55k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
646
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
646
    if (_closed) {
651
323
        return Status::OK();
652
323
    }
653
323
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
323
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
323
    }
656
323
    _closed = true;
657
323
    return Status::OK();
658
646
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
11.3k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
11.3k
    if (_closed) {
651
5.96k
        return Status::OK();
652
5.96k
    }
653
5.42k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
5.42k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
5.42k
    }
656
5.42k
    _closed = true;
657
5.42k
    return Status::OK();
658
11.3k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
605k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
605k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
605k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
605k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
605k
    }
656
605k
    _closed = true;
657
605k
    return Status::OK();
658
605k
}
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.70M
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
1.70M
    _operator_profile =
664
1.70M
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
1.70M
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
1.70M
    _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.70M
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
1.70M
    _operator_profile->add_child(_common_profile, true);
673
1.70M
    _operator_profile->add_child(_custom_profile, true);
674
675
1.70M
    _operator_profile->set_metadata(_parent->node_id());
676
1.70M
    _wait_for_finish_dependency_timer =
677
1.70M
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
1.70M
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
1.70M
    if constexpr (!is_fake_shared) {
680
1.17M
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
1.17M
            info.shared_state_map.end()) {
682
273k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
206k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
206k
            }
685
273k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
273k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
273k
                                                  ? 0
688
273k
                                                  : info.task_idx]
689
273k
                                  .get();
690
273k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
897k
        } else {
692
18.4E
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
18.4E
                DCHECK(false);
694
18.4E
            }
695
897k
            _shared_state = info.shared_state->template cast<SharedState>();
696
897k
            _dependency = _shared_state->create_sink_dependency(
697
897k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
897k
        }
699
1.17M
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
1.17M
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
1.17M
    }
702
703
1.70M
    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.70M
    _rows_input_counter =
708
1.70M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
1.70M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
1.70M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
1.70M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
1.70M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
1.70M
    _memory_used_counter =
714
1.70M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
1.70M
    _common_profile->add_info_string("IsColocate",
716
1.70M
                                     std::to_string(_parent->is_colocated_operator()));
717
1.70M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
1.70M
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
1.70M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
1.70M
    return Status::OK();
721
1.70M
}
_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
16.6k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
16.6k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
16.6k
                                                  ? 0
688
16.6k
                                                  : info.task_idx]
689
16.6k
                                  .get();
690
16.6k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
99.8k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
99.8k
            _shared_state = info.shared_state->template cast<SharedState>();
696
99.8k
            _dependency = _shared_state->create_sink_dependency(
697
99.8k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
99.8k
        }
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
5
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
5
    _operator_profile =
664
5
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
5
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
5
    _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
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
5
    _operator_profile->add_child(_common_profile, true);
673
5
    _operator_profile->add_child(_custom_profile, true);
674
675
5
    _operator_profile->set_metadata(_parent->node_id());
676
5
    _wait_for_finish_dependency_timer =
677
5
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
5
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
5
    if constexpr (!is_fake_shared) {
680
5
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
5
            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
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
5
            _shared_state = info.shared_state->template cast<SharedState>();
696
5
            _dependency = _shared_state->create_sink_dependency(
697
5
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
5
        }
699
5
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
5
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
5
    }
702
703
5
    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
    _rows_input_counter =
708
5
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
5
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
5
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
5
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
5
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
5
    _memory_used_counter =
714
5
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
5
    _common_profile->add_info_string("IsColocate",
716
5
                                     std::to_string(_parent->is_colocated_operator()));
717
5
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
5
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
5
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
5
    return Status::OK();
721
5
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
251k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
251k
    _operator_profile =
664
251k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
251k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
251k
    _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
251k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
251k
    _operator_profile->add_child(_common_profile, true);
673
251k
    _operator_profile->add_child(_custom_profile, true);
674
675
251k
    _operator_profile->set_metadata(_parent->node_id());
676
251k
    _wait_for_finish_dependency_timer =
677
251k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
251k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
251k
    if constexpr (!is_fake_shared) {
680
251k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
251k
            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
251k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
251k
            _shared_state = info.shared_state->template cast<SharedState>();
696
251k
            _dependency = _shared_state->create_sink_dependency(
697
251k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
251k
        }
699
251k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
251k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
251k
    }
702
703
251k
    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
251k
    _rows_input_counter =
708
251k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
251k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
251k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
251k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
251k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
251k
    _memory_used_counter =
714
251k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
251k
    _common_profile->add_info_string("IsColocate",
716
251k
                                     std::to_string(_parent->is_colocated_operator()));
717
251k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
251k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
251k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
251k
    return Status::OK();
721
251k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
164
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
164
    _operator_profile =
664
164
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
164
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
164
    _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
164
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
164
    _operator_profile->add_child(_common_profile, true);
673
164
    _operator_profile->add_child(_custom_profile, true);
674
675
164
    _operator_profile->set_metadata(_parent->node_id());
676
164
    _wait_for_finish_dependency_timer =
677
164
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
164
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
164
    if constexpr (!is_fake_shared) {
680
164
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
164
            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
164
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
164
            _shared_state = info.shared_state->template cast<SharedState>();
696
164
            _dependency = _shared_state->create_sink_dependency(
697
164
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
164
        }
699
164
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
164
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
164
    }
702
703
164
    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
164
    _rows_input_counter =
708
164
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
164
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
164
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
164
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
164
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
164
    _memory_used_counter =
714
164
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
164
    _common_profile->add_info_string("IsColocate",
716
164
                                     std::to_string(_parent->is_colocated_operator()));
717
164
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
164
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
164
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
164
    return Status::OK();
721
164
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
4.76k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
4.76k
    _operator_profile =
664
4.76k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
4.76k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
4.76k
    _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
4.76k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
4.76k
    _operator_profile->add_child(_common_profile, true);
673
4.76k
    _operator_profile->add_child(_custom_profile, true);
674
675
4.76k
    _operator_profile->set_metadata(_parent->node_id());
676
4.76k
    _wait_for_finish_dependency_timer =
677
4.76k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
4.76k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
4.76k
    if constexpr (!is_fake_shared) {
680
4.76k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
4.76k
            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
4.76k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
4.76k
            _shared_state = info.shared_state->template cast<SharedState>();
696
4.76k
            _dependency = _shared_state->create_sink_dependency(
697
4.76k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
4.76k
        }
699
4.76k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
4.76k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
4.76k
    }
702
703
4.76k
    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
4.76k
    _rows_input_counter =
708
4.76k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
4.76k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
4.76k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
4.76k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
4.76k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
4.76k
    _memory_used_counter =
714
4.76k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
4.76k
    _common_profile->add_info_string("IsColocate",
716
4.76k
                                     std::to_string(_parent->is_colocated_operator()));
717
4.76k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
4.76k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
4.76k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
4.76k
    return Status::OK();
721
4.76k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
9.08k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
9.08k
    _operator_profile =
664
9.08k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
9.08k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
9.08k
    _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
9.08k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
9.08k
    _operator_profile->add_child(_common_profile, true);
673
9.08k
    _operator_profile->add_child(_custom_profile, true);
674
675
9.08k
    _operator_profile->set_metadata(_parent->node_id());
676
9.08k
    _wait_for_finish_dependency_timer =
677
9.08k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
9.08k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
9.08k
    if constexpr (!is_fake_shared) {
680
9.08k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
9.08k
            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
9.08k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
9.08k
            _shared_state = info.shared_state->template cast<SharedState>();
696
9.08k
            _dependency = _shared_state->create_sink_dependency(
697
9.08k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
9.08k
        }
699
9.08k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
9.08k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
9.08k
    }
702
703
9.08k
    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
9.08k
    _rows_input_counter =
708
9.08k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
9.08k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
9.08k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
9.08k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
9.08k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
9.08k
    _memory_used_counter =
714
9.08k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
9.08k
    _common_profile->add_info_string("IsColocate",
716
9.08k
                                     std::to_string(_parent->is_colocated_operator()));
717
9.08k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
9.08k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
9.08k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
9.08k
    return Status::OK();
721
9.08k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
107k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
107k
    _operator_profile =
664
107k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
107k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
107k
    _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
107k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
107k
    _operator_profile->add_child(_common_profile, true);
673
107k
    _operator_profile->add_child(_custom_profile, true);
674
675
107k
    _operator_profile->set_metadata(_parent->node_id());
676
107k
    _wait_for_finish_dependency_timer =
677
107k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
107k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
107k
    if constexpr (!is_fake_shared) {
680
107k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
107k
            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
107k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
107k
            _shared_state = info.shared_state->template cast<SharedState>();
696
107k
            _dependency = _shared_state->create_sink_dependency(
697
107k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
107k
        }
699
107k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
107k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
107k
    }
702
703
107k
    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
107k
    _rows_input_counter =
708
107k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
107k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
107k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
107k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
107k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
107k
    _memory_used_counter =
714
107k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
107k
    _common_profile->add_info_string("IsColocate",
716
107k
                                     std::to_string(_parent->is_colocated_operator()));
717
107k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
107k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
107k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
107k
    return Status::OK();
721
107k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
49.9k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
49.9k
    _operator_profile =
664
49.9k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
49.9k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
49.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
49.9k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
49.9k
    _operator_profile->add_child(_common_profile, true);
673
49.9k
    _operator_profile->add_child(_custom_profile, true);
674
675
49.9k
    _operator_profile->set_metadata(_parent->node_id());
676
49.9k
    _wait_for_finish_dependency_timer =
677
49.9k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
49.9k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
49.9k
    if constexpr (!is_fake_shared) {
680
49.9k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
49.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
49.9k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
49.9k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
49.9k
                                                  ? 0
688
49.9k
                                                  : info.task_idx]
689
49.9k
                                  .get();
690
49.9k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
49.9k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
74
            _shared_state = info.shared_state->template cast<SharedState>();
696
74
            _dependency = _shared_state->create_sink_dependency(
697
74
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
74
        }
699
49.9k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
49.9k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
49.9k
    }
702
703
49.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
49.9k
    _rows_input_counter =
708
49.9k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
49.9k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
49.9k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
49.9k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
49.9k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
49.9k
    _memory_used_counter =
714
49.9k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
49.9k
    _common_profile->add_info_string("IsColocate",
716
49.9k
                                     std::to_string(_parent->is_colocated_operator()));
717
49.9k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
49.9k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
49.9k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
49.9k
    return Status::OK();
721
49.9k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
121
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
121
    _operator_profile =
664
121
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
121
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
121
    _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
121
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
121
    _operator_profile->add_child(_common_profile, true);
673
121
    _operator_profile->add_child(_custom_profile, true);
674
675
121
    _operator_profile->set_metadata(_parent->node_id());
676
121
    _wait_for_finish_dependency_timer =
677
121
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
121
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
121
    if constexpr (!is_fake_shared) {
680
121
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
121
            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
121
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
121
            _shared_state = info.shared_state->template cast<SharedState>();
696
121
            _dependency = _shared_state->create_sink_dependency(
697
121
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
121
        }
699
121
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
121
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
121
    }
702
703
121
    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
121
    _rows_input_counter =
708
121
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
121
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
121
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
121
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
121
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
121
    _memory_used_counter =
714
121
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
121
    _common_profile->add_info_string("IsColocate",
716
121
                                     std::to_string(_parent->is_colocated_operator()));
717
121
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
121
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
121
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
121
    return Status::OK();
721
121
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
538k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
538k
    _operator_profile =
664
538k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
538k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
538k
    _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
538k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
538k
    _operator_profile->add_child(_common_profile, true);
673
538k
    _operator_profile->add_child(_custom_profile, true);
674
675
538k
    _operator_profile->set_metadata(_parent->node_id());
676
538k
    _wait_for_finish_dependency_timer =
677
538k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
538k
    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
538k
    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
538k
    _rows_input_counter =
708
538k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
538k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
538k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
538k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
538k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
538k
    _memory_used_counter =
714
538k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
538k
    _common_profile->add_info_string("IsColocate",
716
538k
                                     std::to_string(_parent->is_colocated_operator()));
717
538k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
538k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
538k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
538k
    return Status::OK();
721
538k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
10.2k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
10.2k
    _operator_profile =
664
10.2k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
10.2k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
10.2k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
10.2k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
10.2k
    _operator_profile->add_child(_common_profile, true);
673
10.2k
    _operator_profile->add_child(_custom_profile, true);
674
675
10.2k
    _operator_profile->set_metadata(_parent->node_id());
676
10.2k
    _wait_for_finish_dependency_timer =
677
10.2k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
10.2k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
10.2k
    if constexpr (!is_fake_shared) {
680
10.2k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
10.2k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
10.2k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
10.2k
            _shared_state = info.shared_state->template cast<SharedState>();
696
10.2k
            _dependency = _shared_state->create_sink_dependency(
697
10.2k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
10.2k
        }
699
10.2k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
10.2k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
10.2k
    }
702
703
10.2k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
10.2k
    _rows_input_counter =
708
10.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
10.2k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
10.2k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
10.2k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
10.2k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
10.2k
    _memory_used_counter =
714
10.2k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
10.2k
    _common_profile->add_info_string("IsColocate",
716
10.2k
                                     std::to_string(_parent->is_colocated_operator()));
717
10.2k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
10.2k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
10.2k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
10.2k
    return Status::OK();
721
10.2k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
426
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
426
    _operator_profile =
664
426
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
426
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
426
    _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
426
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
426
    _operator_profile->add_child(_common_profile, true);
673
426
    _operator_profile->add_child(_custom_profile, true);
674
675
426
    _operator_profile->set_metadata(_parent->node_id());
676
426
    _wait_for_finish_dependency_timer =
677
426
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
426
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
426
    if constexpr (!is_fake_shared) {
680
426
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
426
            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
426
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
426
            _shared_state = info.shared_state->template cast<SharedState>();
696
426
            _dependency = _shared_state->create_sink_dependency(
697
426
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
426
        }
699
426
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
426
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
426
    }
702
703
426
    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
426
    _rows_input_counter =
708
426
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
426
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
426
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
426
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
426
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
426
    _memory_used_counter =
714
426
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
426
    _common_profile->add_info_string("IsColocate",
716
426
                                     std::to_string(_parent->is_colocated_operator()));
717
426
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
426
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
426
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
426
    return Status::OK();
721
426
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
1.75k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
1.75k
    _operator_profile =
664
1.75k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
1.75k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
1.75k
    _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.75k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
1.75k
    _operator_profile->add_child(_common_profile, true);
673
1.75k
    _operator_profile->add_child(_custom_profile, true);
674
675
1.75k
    _operator_profile->set_metadata(_parent->node_id());
676
1.75k
    _wait_for_finish_dependency_timer =
677
1.75k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
1.75k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
1.75k
    if constexpr (!is_fake_shared) {
680
1.75k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
1.75k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
1.75k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
1.75k
            _shared_state = info.shared_state->template cast<SharedState>();
696
1.75k
            _dependency = _shared_state->create_sink_dependency(
697
1.75k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
1.75k
        }
699
1.75k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
1.75k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
1.75k
    }
702
703
1.75k
    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.75k
    _rows_input_counter =
708
1.75k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
1.75k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
1.75k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
1.75k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
1.75k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
1.75k
    _memory_used_counter =
714
1.75k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
1.75k
    _common_profile->add_info_string("IsColocate",
716
1.75k
                                     std::to_string(_parent->is_colocated_operator()));
717
1.75k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
1.75k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
1.75k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
1.75k
    return Status::OK();
721
1.75k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
13.1k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
13.1k
    _operator_profile =
664
13.1k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
13.1k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
13.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
13.1k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
13.1k
    _operator_profile->add_child(_common_profile, true);
673
13.1k
    _operator_profile->add_child(_custom_profile, true);
674
675
13.1k
    _operator_profile->set_metadata(_parent->node_id());
676
13.1k
    _wait_for_finish_dependency_timer =
677
13.1k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
13.1k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
13.1k
    if constexpr (!is_fake_shared) {
680
13.1k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
13.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
13.1k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
13.1k
            _shared_state = info.shared_state->template cast<SharedState>();
696
13.1k
            _dependency = _shared_state->create_sink_dependency(
697
13.1k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
13.1k
        }
699
13.1k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
13.1k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
13.1k
    }
702
703
13.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
13.1k
    _rows_input_counter =
708
13.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
13.1k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
13.1k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
13.1k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
13.1k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
13.1k
    _memory_used_counter =
714
13.1k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
13.1k
    _common_profile->add_info_string("IsColocate",
716
13.1k
                                     std::to_string(_parent->is_colocated_operator()));
717
13.1k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
13.1k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
13.1k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
13.1k
    return Status::OK();
721
13.1k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
206k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
206k
    _operator_profile =
664
206k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
206k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
206k
    _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
206k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
206k
    _operator_profile->add_child(_common_profile, true);
673
206k
    _operator_profile->add_child(_custom_profile, true);
674
675
206k
    _operator_profile->set_metadata(_parent->node_id());
676
206k
    _wait_for_finish_dependency_timer =
677
206k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
206k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
206k
    if constexpr (!is_fake_shared) {
680
206k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
206k
            info.shared_state_map.end()) {
682
206k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
206k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
206k
            }
685
206k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
206k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
206k
                                                  ? 0
688
206k
                                                  : info.task_idx]
689
206k
                                  .get();
690
206k
            _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
206k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
206k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
206k
    }
702
703
206k
    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
206k
    _rows_input_counter =
708
206k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
206k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
206k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
206k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
206k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
206k
    _memory_used_counter =
714
206k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
206k
    _common_profile->add_info_string("IsColocate",
716
206k
                                     std::to_string(_parent->is_colocated_operator()));
717
206k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
206k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
206k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
206k
    return Status::OK();
721
206k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
398k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
398k
    _operator_profile =
664
398k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
398k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
398k
    _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
398k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
398k
    _operator_profile->add_child(_common_profile, true);
673
398k
    _operator_profile->add_child(_custom_profile, true);
674
675
398k
    _operator_profile->set_metadata(_parent->node_id());
676
398k
    _wait_for_finish_dependency_timer =
677
398k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
398k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
398k
    if constexpr (!is_fake_shared) {
680
398k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
398k
            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
398k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
398k
            _shared_state = info.shared_state->template cast<SharedState>();
696
398k
            _dependency = _shared_state->create_sink_dependency(
697
398k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
398k
        }
699
398k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
398k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
398k
    }
702
703
398k
    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
398k
    _rows_input_counter =
708
398k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
398k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
398k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
398k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
398k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
398k
    _memory_used_counter =
714
398k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
398k
    _common_profile->add_info_string("IsColocate",
716
398k
                                     std::to_string(_parent->is_colocated_operator()));
717
398k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
398k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
398k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
398k
    return Status::OK();
721
398k
}
_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.70M
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
1.70M
    if (_closed) {
726
2
        return Status::OK();
727
2
    }
728
1.70M
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
1.17M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
1.17M
    }
731
1.70M
    _closed = true;
732
1.70M
    return Status::OK();
733
1.70M
}
_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
4
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
4
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
4
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
4
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
4
    }
731
4
    _closed = true;
732
4
    return Status::OK();
733
4
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
250k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
250k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
250k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
250k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
250k
    }
731
250k
    _closed = true;
732
250k
    return Status::OK();
733
250k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
155
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
155
    if (_closed) {
726
2
        return Status::OK();
727
2
    }
728
153
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
153
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
153
    }
731
153
    _closed = true;
732
153
    return Status::OK();
733
155
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
4.74k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
4.74k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
4.74k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
4.74k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
4.74k
    }
731
4.74k
    _closed = true;
732
4.74k
    return Status::OK();
733
4.74k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
9.02k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
9.02k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
9.02k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
9.02k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
9.02k
    }
731
9.02k
    _closed = true;
732
9.02k
    return Status::OK();
733
9.02k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
106k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
106k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
106k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
106k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
106k
    }
731
106k
    _closed = true;
732
106k
    return Status::OK();
733
106k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
49.8k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
49.8k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
49.8k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
49.8k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
49.8k
    }
731
49.8k
    _closed = true;
732
49.8k
    return Status::OK();
733
49.8k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
109
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
109
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
109
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
109
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
109
    }
731
109
    _closed = true;
732
109
    return Status::OK();
733
109
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
537k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
537k
    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
537k
    _closed = true;
732
537k
    return Status::OK();
733
537k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
10.2k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
10.2k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
10.2k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
10.2k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
10.2k
    }
731
10.2k
    _closed = true;
732
10.2k
    return Status::OK();
733
10.2k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
323
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
323
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
323
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
323
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
323
    }
731
323
    _closed = true;
732
323
    return Status::OK();
733
323
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
1.76k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
1.76k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
1.76k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
1.76k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
1.76k
    }
731
1.76k
    _closed = true;
732
1.76k
    return Status::OK();
733
1.76k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
13.1k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
13.1k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
13.1k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
13.1k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
13.1k
    }
731
13.1k
    _closed = true;
732
13.1k
    return Status::OK();
733
13.1k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
207k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
207k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
207k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
207k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
207k
    }
731
207k
    _closed = true;
732
207k
    return Status::OK();
733
207k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
400k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
400k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
400k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
400k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
400k
    }
731
400k
    _closed = true;
732
400k
    return Status::OK();
733
400k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
14
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
14
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
14
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
14
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
14
    }
731
14
    _closed = true;
732
14
    return Status::OK();
733
14
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
338
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
338
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
338
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
338
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
338
    }
731
338
    _closed = true;
732
338
    return Status::OK();
733
338
}
734
735
template <typename LocalStateType>
736
Status StreamingOperatorX<LocalStateType>::get_block_impl(RuntimeState* state, Block* block,
737
1.25k
                                                          bool* eos) {
738
1.25k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
1.25k
    return pull(state, block, eos);
740
1.25k
}
_ZN5doris18StreamingOperatorXINS_23AssertNumRowsLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
38
                                                          bool* eos) {
738
38
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
38
    return pull(state, block, eos);
740
38
}
_ZN5doris18StreamingOperatorXINS_16SelectLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
1.21k
                                                          bool* eos) {
738
1.21k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
1.21k
    return pull(state, block, eos);
740
1.21k
}
741
742
template <typename LocalStateType>
743
Status StatefulOperatorX<LocalStateType>::get_block_impl(RuntimeState* state, Block* block,
744
492k
                                                         bool* eos) {
745
492k
    auto& local_state = get_local_state(state);
746
492k
    if (need_more_input_data(state)) {
747
460k
        local_state._child_block->clear_column_data(
748
460k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
460k
                        .num_slots());
750
460k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
460k
                state, local_state._child_block.get(), &local_state._child_eos));
752
460k
        *eos = local_state._child_eos;
753
460k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
55.9k
            return Status::OK();
755
55.9k
        }
756
404k
        {
757
404k
            SCOPED_TIMER(local_state.exec_time_counter());
758
404k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
404k
        }
760
404k
    }
761
762
436k
    if (!need_more_input_data(state)) {
763
407k
        SCOPED_TIMER(local_state.exec_time_counter());
764
407k
        bool new_eos = false;
765
407k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
407k
        if (new_eos) {
767
329k
            *eos = true;
768
329k
        } else if (!need_more_input_data(state)) {
769
24.7k
            *eos = false;
770
24.7k
        }
771
407k
    }
772
436k
    return Status::OK();
773
436k
}
_ZN5doris17StatefulOperatorXINS_23HashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
135k
                                                         bool* eos) {
745
135k
    auto& local_state = get_local_state(state);
746
135k
    if (need_more_input_data(state)) {
747
115k
        local_state._child_block->clear_column_data(
748
115k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
115k
                        .num_slots());
750
115k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
115k
                state, local_state._child_block.get(), &local_state._child_eos));
752
115k
        *eos = local_state._child_eos;
753
115k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
34.2k
            return Status::OK();
755
34.2k
        }
756
81.7k
        {
757
81.7k
            SCOPED_TIMER(local_state.exec_time_counter());
758
81.7k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
81.7k
        }
760
81.7k
    }
761
762
101k
    if (!need_more_input_data(state)) {
763
101k
        SCOPED_TIMER(local_state.exec_time_counter());
764
101k
        bool new_eos = false;
765
101k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
101k
        if (new_eos) {
767
44.0k
            *eos = true;
768
57.2k
        } else if (!need_more_input_data(state)) {
769
11.7k
            *eos = false;
770
11.7k
        }
771
101k
    }
772
101k
    return Status::OK();
773
101k
}
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_34PartitionedHashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
_ZN5doris17StatefulOperatorXINS_16RepeatLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
4.32k
                                                         bool* eos) {
745
4.32k
    auto& local_state = get_local_state(state);
746
4.32k
    if (need_more_input_data(state)) {
747
2.39k
        local_state._child_block->clear_column_data(
748
2.39k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
2.39k
                        .num_slots());
750
2.39k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
2.39k
                state, local_state._child_block.get(), &local_state._child_eos));
752
2.39k
        *eos = local_state._child_eos;
753
2.39k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
366
            return Status::OK();
755
366
        }
756
2.02k
        {
757
2.02k
            SCOPED_TIMER(local_state.exec_time_counter());
758
2.02k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
2.02k
        }
760
2.02k
    }
761
762
3.96k
    if (!need_more_input_data(state)) {
763
3.96k
        SCOPED_TIMER(local_state.exec_time_counter());
764
3.96k
        bool new_eos = false;
765
3.96k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
3.96k
        if (new_eos) {
767
1.44k
            *eos = true;
768
2.51k
        } else if (!need_more_input_data(state)) {
769
1.92k
            *eos = false;
770
1.92k
        }
771
3.96k
    }
772
3.95k
    return Status::OK();
773
3.95k
}
_ZN5doris17StatefulOperatorXINS_25MaterializationLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
1.95k
                                                         bool* eos) {
745
1.95k
    auto& local_state = get_local_state(state);
746
1.95k
    if (need_more_input_data(state)) {
747
1.95k
        local_state._child_block->clear_column_data(
748
1.95k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
1.95k
                        .num_slots());
750
1.95k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
1.95k
                state, local_state._child_block.get(), &local_state._child_eos));
752
1.95k
        *eos = local_state._child_eos;
753
1.95k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
808
            return Status::OK();
755
808
        }
756
1.14k
        {
757
1.14k
            SCOPED_TIMER(local_state.exec_time_counter());
758
1.14k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
1.14k
        }
760
1.14k
    }
761
762
1.14k
    if (!need_more_input_data(state)) {
763
1.14k
        SCOPED_TIMER(local_state.exec_time_counter());
764
1.14k
        bool new_eos = false;
765
1.14k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
1.14k
        if (new_eos) {
767
812
            *eos = true;
768
812
        } else if (!need_more_input_data(state)) {
769
0
            *eos = false;
770
0
        }
771
1.14k
    }
772
1.14k
    return Status::OK();
773
1.14k
}
_ZN5doris17StatefulOperatorXINS_22StreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
17.2k
                                                         bool* eos) {
745
17.2k
    auto& local_state = get_local_state(state);
746
17.2k
    if (need_more_input_data(state)) {
747
17.2k
        local_state._child_block->clear_column_data(
748
17.2k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
17.2k
                        .num_slots());
750
17.2k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
17.2k
                state, local_state._child_block.get(), &local_state._child_eos));
752
17.2k
        *eos = local_state._child_eos;
753
17.2k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
2.68k
            return Status::OK();
755
2.68k
        }
756
14.5k
        {
757
14.5k
            SCOPED_TIMER(local_state.exec_time_counter());
758
14.5k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
14.5k
        }
760
14.5k
    }
761
762
14.5k
    if (!need_more_input_data(state)) {
763
8.30k
        SCOPED_TIMER(local_state.exec_time_counter());
764
8.30k
        bool new_eos = false;
765
8.30k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
8.30k
        if (new_eos) {
767
8.12k
            *eos = true;
768
8.12k
        } else if (!need_more_input_data(state)) {
769
13
            *eos = false;
770
13
        }
771
8.30k
    }
772
14.5k
    return Status::OK();
773
14.5k
}
_ZN5doris17StatefulOperatorXINS_30DistinctStreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
306k
                                                         bool* eos) {
745
306k
    auto& local_state = get_local_state(state);
746
306k
    if (need_more_input_data(state)) {
747
306k
        local_state._child_block->clear_column_data(
748
306k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
306k
                        .num_slots());
750
306k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
306k
                state, local_state._child_block.get(), &local_state._child_eos));
752
306k
        *eos = local_state._child_eos;
753
306k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
16.2k
            return Status::OK();
755
16.2k
        }
756
290k
        {
757
290k
            SCOPED_TIMER(local_state.exec_time_counter());
758
290k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
290k
        }
760
290k
    }
761
762
290k
    if (!need_more_input_data(state)) {
763
267k
        SCOPED_TIMER(local_state.exec_time_counter());
764
267k
        bool new_eos = false;
765
267k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
267k
        if (new_eos) {
767
266k
            *eos = true;
768
266k
        } else if (!need_more_input_data(state)) {
769
5
            *eos = false;
770
5
        }
771
267k
    }
772
290k
    return Status::OK();
773
290k
}
_ZN5doris17StatefulOperatorXINS_29NestedLoopJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
20.2k
                                                         bool* eos) {
745
20.2k
    auto& local_state = get_local_state(state);
746
20.2k
    if (need_more_input_data(state)) {
747
9.57k
        local_state._child_block->clear_column_data(
748
9.57k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
9.57k
                        .num_slots());
750
9.57k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
9.57k
                state, local_state._child_block.get(), &local_state._child_eos));
752
9.57k
        *eos = local_state._child_eos;
753
9.57k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
919
            return Status::OK();
755
919
        }
756
8.65k
        {
757
8.65k
            SCOPED_TIMER(local_state.exec_time_counter());
758
8.65k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
8.65k
        }
760
8.65k
    }
761
762
19.2k
    if (!need_more_input_data(state)) {
763
18.7k
        SCOPED_TIMER(local_state.exec_time_counter());
764
18.7k
        bool new_eos = false;
765
18.7k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
18.7k
        if (new_eos) {
767
4.73k
            *eos = true;
768
14.0k
        } else if (!need_more_input_data(state)) {
769
10.6k
            *eos = false;
770
10.6k
        }
771
18.7k
    }
772
19.2k
    return Status::OK();
773
19.2k
}
_ZN5doris17StatefulOperatorXINS_23TableFunctionLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
7.29k
                                                         bool* eos) {
745
7.29k
    auto& local_state = get_local_state(state);
746
7.29k
    if (need_more_input_data(state)) {
747
6.93k
        local_state._child_block->clear_column_data(
748
6.93k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
6.93k
                        .num_slots());
750
6.93k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
6.93k
                state, local_state._child_block.get(), &local_state._child_eos));
752
6.93k
        *eos = local_state._child_eos;
753
6.93k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
696
            return Status::OK();
755
696
        }
756
6.23k
        {
757
6.23k
            SCOPED_TIMER(local_state.exec_time_counter());
758
6.23k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
6.23k
        }
760
6.23k
    }
761
762
6.60k
    if (!need_more_input_data(state)) {
763
6.60k
        SCOPED_TIMER(local_state.exec_time_counter());
764
6.60k
        bool new_eos = false;
765
6.60k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
6.60k
        if (new_eos) {
767
4.05k
            *eos = true;
768
4.05k
        } else if (!need_more_input_data(state)) {
769
366
            *eos = false;
770
366
        }
771
6.60k
    }
772
6.59k
    return Status::OK();
773
6.59k
}
774
775
template <typename Writer, typename Parent>
776
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
777
49.8k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
49.8k
    RETURN_IF_ERROR(Base::init(state, info));
779
49.8k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
49.8k
                                                         "AsyncWriterDependency", true);
781
49.8k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
49.8k
                             _finish_dependency));
783
784
49.8k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
49.8k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
49.8k
    return Status::OK();
787
49.8k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
364
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
364
    RETURN_IF_ERROR(Base::init(state, info));
779
364
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
364
                                                         "AsyncWriterDependency", true);
781
364
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
364
                             _finish_dependency));
783
784
364
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
364
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
364
    return Status::OK();
787
364
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
49.5k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
49.5k
    RETURN_IF_ERROR(Base::init(state, info));
779
49.5k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
49.5k
                                                         "AsyncWriterDependency", true);
781
49.5k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
49.5k
                             _finish_dependency));
783
784
49.5k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
49.5k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
49.5k
    return Status::OK();
787
49.5k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
18
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
18
    RETURN_IF_ERROR(Base::init(state, info));
779
18
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
18
                                                         "AsyncWriterDependency", true);
781
18
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
18
                             _finish_dependency));
783
784
18
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
18
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
18
    return Status::OK();
787
18
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
16
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
16
    RETURN_IF_ERROR(Base::init(state, info));
779
16
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
16
                                                         "AsyncWriterDependency", true);
781
16
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
16
                             _finish_dependency));
783
784
16
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
16
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
16
    return Status::OK();
787
16
}
788
789
template <typename Writer, typename Parent>
790
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
791
50.3k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
50.3k
    RETURN_IF_ERROR(Base::open(state));
793
50.3k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
390k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
339k
        RETURN_IF_ERROR(
796
339k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
339k
    }
798
50.3k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
50.3k
    return Status::OK();
800
50.3k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
366
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
366
    RETURN_IF_ERROR(Base::open(state));
793
366
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
1.85k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
1.48k
        RETURN_IF_ERROR(
796
1.48k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
1.48k
    }
798
366
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
366
    return Status::OK();
800
366
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
49.9k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
49.9k
    RETURN_IF_ERROR(Base::open(state));
793
49.9k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
388k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
338k
        RETURN_IF_ERROR(
796
338k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
338k
    }
798
49.9k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
49.9k
    return Status::OK();
800
49.9k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
18
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
18
    RETURN_IF_ERROR(Base::open(state));
793
18
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
324
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
306
        RETURN_IF_ERROR(
796
306
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
306
    }
798
18
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
18
    return Status::OK();
800
18
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
16
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
16
    RETURN_IF_ERROR(Base::open(state));
793
16
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
33
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
17
        RETURN_IF_ERROR(
796
17
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
17
    }
798
16
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
16
    return Status::OK();
800
16
}
801
802
template <typename Writer, typename Parent>
803
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
804
66.4k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
66.4k
    return _writer->sink(block, eos);
806
66.4k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
1.76k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
1.76k
    return _writer->sink(block, eos);
806
1.76k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
64.6k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
64.6k
    return _writer->sink(block, eos);
806
64.6k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
18
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
18
    return _writer->sink(block, eos);
806
18
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
52
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
52
    return _writer->sink(block, eos);
806
52
}
807
808
template <typename Writer, typename Parent>
809
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
810
50.4k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
50.4k
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
50.4k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
50.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
50.5k
    if (_writer) {
818
50.5k
        Status st = _writer->get_writer_status();
819
50.5k
        if (exec_status.ok()) {
820
50.3k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
50.3k
                                                       : Status::Cancelled("force close"));
822
50.3k
        } else {
823
176
            _writer->force_close(exec_status);
824
176
        }
825
        // If there is an error in process_block thread, then we should get the writer
826
        // status before call force_close. For example, the thread may failed in commit
827
        // transaction.
828
50.5k
        RETURN_IF_ERROR(st);
829
50.5k
    }
830
50.3k
    return Base::close(state, exec_status);
831
50.4k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
355
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
355
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
355
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
355
    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
355
    if (_writer) {
818
355
        Status st = _writer->get_writer_status();
819
355
        if (exec_status.ok()) {
820
355
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
355
                                                       : Status::Cancelled("force close"));
822
355
        } 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
355
        RETURN_IF_ERROR(st);
829
355
    }
830
355
    return Base::close(state, exec_status);
831
355
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
50.0k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
50.0k
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
50.0k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
50.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
50.1k
    if (_writer) {
818
50.1k
        Status st = _writer->get_writer_status();
819
50.1k
        if (exec_status.ok()) {
820
49.9k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
49.9k
                                                       : Status::Cancelled("force close"));
822
49.9k
        } else {
823
176
            _writer->force_close(exec_status);
824
176
        }
825
        // If there is an error in process_block thread, then we should get the writer
826
        // status before call force_close. For example, the thread may failed in commit
827
        // transaction.
828
50.1k
        RETURN_IF_ERROR(st);
829
50.1k
    }
830
50.0k
    return Base::close(state, exec_status);
831
50.0k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
18
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
18
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
18
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
18
    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
18
    if (_writer) {
818
18
        Status st = _writer->get_writer_status();
819
18
        if (exec_status.ok()) {
820
18
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
18
                                                       : Status::Cancelled("force close"));
822
18
        } 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
18
        RETURN_IF_ERROR(st);
829
18
    }
830
18
    return Base::close(state, exec_status);
831
18
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
16
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
16
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
16
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
16
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
816
    // if the init failed, the _writer may be nullptr. so here need check
817
16
    if (_writer) {
818
16
        Status st = _writer->get_writer_status();
819
16
        if (exec_status.ok()) {
820
16
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
16
                                                       : Status::Cancelled("force close"));
822
16
        } else {
823
0
            _writer->force_close(exec_status);
824
0
        }
825
        // If there is an error in process_block thread, then we should get the writer
826
        // status before call force_close. For example, the thread may failed in commit
827
        // transaction.
828
16
        RETURN_IF_ERROR(st);
829
16
    }
830
16
    return Base::close(state, exec_status);
831
16
}
832
833
// An instantiation added outside the macros below needs the matching
834
// 'extern template' declaration in the operator's header (enforced by
835
// build-support/check-extern-template-pairing.py). Instantiations expanded
836
// through DECLARE_OPERATOR are invisible to that check -- macro bodies are
837
// skipped -- so their extern pairing has to be kept in sync by hand.
838
#define DECLARE_OPERATOR(LOCAL_STATE) template class DataSinkOperatorX<LOCAL_STATE>;
839
DECLARE_OPERATOR(HashJoinBuildSinkLocalState)
840
DECLARE_OPERATOR(ResultSinkLocalState)
841
DECLARE_OPERATOR(JdbcTableSinkLocalState)
842
DECLARE_OPERATOR(MemoryScratchSinkLocalState)
843
DECLARE_OPERATOR(ResultFileSinkLocalState)
844
DECLARE_OPERATOR(OlapTableSinkLocalState)
845
DECLARE_OPERATOR(OlapTableSinkV2LocalState)
846
DECLARE_OPERATOR(HiveTableSinkLocalState)
847
DECLARE_OPERATOR(TVFTableSinkLocalState)
848
DECLARE_OPERATOR(IcebergTableSinkLocalState)
849
DECLARE_OPERATOR(PaimonTableSinkLocalState)
850
DECLARE_OPERATOR(SpillIcebergTableSinkLocalState)
851
DECLARE_OPERATOR(IcebergDeleteSinkLocalState)
852
DECLARE_OPERATOR(IcebergMergeSinkLocalState)
853
DECLARE_OPERATOR(MCTableSinkLocalState)
854
DECLARE_OPERATOR(AnalyticSinkLocalState)
855
DECLARE_OPERATOR(BlackholeSinkLocalState)
856
DECLARE_OPERATOR(SortSinkLocalState)
857
DECLARE_OPERATOR(SpillSortSinkLocalState)
858
DECLARE_OPERATOR(LocalExchangeSinkLocalState)
859
DECLARE_OPERATOR(AggSinkLocalState)
860
DECLARE_OPERATOR(BucketedAggSinkLocalState)
861
DECLARE_OPERATOR(PartitionedAggSinkLocalState)
862
DECLARE_OPERATOR(ExchangeSinkLocalState)
863
DECLARE_OPERATOR(NestedLoopJoinBuildSinkLocalState)
864
DECLARE_OPERATOR(UnionSinkLocalState)
865
DECLARE_OPERATOR(MultiCastDataStreamSinkLocalState)
866
DECLARE_OPERATOR(PartitionSortSinkLocalState)
867
DECLARE_OPERATOR(SetProbeSinkLocalState<true>)
868
DECLARE_OPERATOR(SetProbeSinkLocalState<false>)
869
DECLARE_OPERATOR(SetSinkLocalState<true>)
870
DECLARE_OPERATOR(SetSinkLocalState<false>)
871
DECLARE_OPERATOR(PartitionedHashJoinSinkLocalState)
872
DECLARE_OPERATOR(GroupCommitBlockSinkLocalState)
873
DECLARE_OPERATOR(CacheSinkLocalState)
874
DECLARE_OPERATOR(DictSinkLocalState)
875
DECLARE_OPERATOR(RecCTESinkLocalState)
876
DECLARE_OPERATOR(RecCTEAnchorSinkLocalState)
877
878
#undef DECLARE_OPERATOR
879
880
#define DECLARE_OPERATOR(LOCAL_STATE) template class OperatorX<LOCAL_STATE>;
881
DECLARE_OPERATOR(HashJoinProbeLocalState)
882
DECLARE_OPERATOR(OlapScanLocalState)
883
DECLARE_OPERATOR(GroupCommitLocalState)
884
DECLARE_OPERATOR(JDBCScanLocalState)
885
DECLARE_OPERATOR(FileScanLocalState)
886
DECLARE_OPERATOR(AnalyticLocalState)
887
DECLARE_OPERATOR(SortLocalState)
888
DECLARE_OPERATOR(SpillSortLocalState)
889
DECLARE_OPERATOR(LocalMergeSortLocalState)
890
DECLARE_OPERATOR(AggLocalState)
891
DECLARE_OPERATOR(BucketedAggLocalState)
892
DECLARE_OPERATOR(PartitionedAggLocalState)
893
DECLARE_OPERATOR(TableFunctionLocalState)
894
DECLARE_OPERATOR(ExchangeLocalState)
895
DECLARE_OPERATOR(RepeatLocalState)
896
DECLARE_OPERATOR(NestedLoopJoinProbeLocalState)
897
DECLARE_OPERATOR(AssertNumRowsLocalState)
898
DECLARE_OPERATOR(EmptySetLocalState)
899
DECLARE_OPERATOR(UnionSourceLocalState)
900
DECLARE_OPERATOR(MultiCastDataStreamSourceLocalState)
901
DECLARE_OPERATOR(PartitionSortSourceLocalState)
902
DECLARE_OPERATOR(SetSourceLocalState<true>)
903
DECLARE_OPERATOR(SetSourceLocalState<false>)
904
DECLARE_OPERATOR(DataGenLocalState)
905
DECLARE_OPERATOR(SchemaScanLocalState)
906
DECLARE_OPERATOR(MetaScanLocalState)
907
DECLARE_OPERATOR(LocalExchangeSourceLocalState)
908
DECLARE_OPERATOR(PartitionedHashJoinProbeLocalState)
909
DECLARE_OPERATOR(CacheSourceLocalState)
910
DECLARE_OPERATOR(RecCTESourceLocalState)
911
DECLARE_OPERATOR(RecCTEScanLocalState)
912
913
#ifdef BE_TEST
914
DECLARE_OPERATOR(MockLocalState)
915
DECLARE_OPERATOR(MockScanLocalState)
916
#endif
917
#undef DECLARE_OPERATOR
918
919
template class StreamingOperatorX<AssertNumRowsLocalState>;
920
template class StreamingOperatorX<SelectLocalState>;
921
922
template class StatefulOperatorX<HashJoinProbeLocalState>;
923
template class StatefulOperatorX<PartitionedHashJoinProbeLocalState>;
924
template class StatefulOperatorX<RepeatLocalState>;
925
template class StatefulOperatorX<MaterializationLocalState>;
926
template class StatefulOperatorX<StreamingAggLocalState>;
927
template class StatefulOperatorX<DistinctStreamingAggLocalState>;
928
template class StatefulOperatorX<NestedLoopJoinProbeLocalState>;
929
template class StatefulOperatorX<TableFunctionLocalState>;
930
931
template class PipelineXSinkLocalState<HashJoinSharedState>;
932
template class PipelineXSinkLocalState<PartitionedHashJoinSharedState>;
933
template class PipelineXSinkLocalState<SortSharedState>;
934
template class PipelineXSinkLocalState<SpillSortSharedState>;
935
template class PipelineXSinkLocalState<NestedLoopJoinSharedState>;
936
template class PipelineXSinkLocalState<AnalyticSharedState>;
937
template class PipelineXSinkLocalState<AggSharedState>;
938
template class PipelineXSinkLocalState<BucketedAggSharedState>;
939
template class PipelineXSinkLocalState<PartitionedAggSharedState>;
940
template class PipelineXSinkLocalState<FakeSharedState>;
941
template class PipelineXSinkLocalState<UnionSharedState>;
942
template class PipelineXSinkLocalState<PartitionSortNodeSharedState>;
943
template class PipelineXSinkLocalState<MultiCastSharedState>;
944
template class PipelineXSinkLocalState<SetSharedState>;
945
template class PipelineXSinkLocalState<LocalExchangeSharedState>;
946
template class PipelineXSinkLocalState<BasicSharedState>;
947
template class PipelineXSinkLocalState<DataQueueSharedState>;
948
template class PipelineXSinkLocalState<RecCTESharedState>;
949
950
template class PipelineXLocalState<HashJoinSharedState>;
951
template class PipelineXLocalState<PartitionedHashJoinSharedState>;
952
template class PipelineXLocalState<SortSharedState>;
953
template class PipelineXLocalState<SpillSortSharedState>;
954
template class PipelineXLocalState<NestedLoopJoinSharedState>;
955
template class PipelineXLocalState<AnalyticSharedState>;
956
template class PipelineXLocalState<AggSharedState>;
957
template class PipelineXLocalState<BucketedAggSharedState>;
958
template class PipelineXLocalState<PartitionedAggSharedState>;
959
template class PipelineXLocalState<FakeSharedState>;
960
template class PipelineXLocalState<UnionSharedState>;
961
template class PipelineXLocalState<DataQueueSharedState>;
962
template class PipelineXLocalState<MultiCastSharedState>;
963
template class PipelineXLocalState<PartitionSortNodeSharedState>;
964
template class PipelineXLocalState<SetSharedState>;
965
template class PipelineXLocalState<LocalExchangeSharedState>;
966
template class PipelineXLocalState<BasicSharedState>;
967
template class PipelineXLocalState<RecCTESharedState>;
968
969
template class AsyncWriterSink<doris::VFileResultWriter, ResultFileSinkOperatorX>;
970
template class AsyncWriterSink<doris::VJdbcTableWriter, JdbcTableSinkOperatorX>;
971
template class AsyncWriterSink<doris::VTabletWriter, OlapTableSinkOperatorX>;
972
template class AsyncWriterSink<doris::VTabletWriterV2, OlapTableSinkV2OperatorX>;
973
template class AsyncWriterSink<doris::VHiveTableWriter, HiveTableSinkOperatorX>;
974
template class AsyncWriterSink<doris::VIcebergDeleteSink, IcebergDeleteSinkOperatorX>;
975
template class AsyncWriterSink<doris::VIcebergMergeSink, IcebergMergeSinkOperatorX>;
976
template class AsyncWriterSink<doris::VMCTableWriter, MCTableSinkOperatorX>;
977
template class AsyncWriterSink<doris::VTVFTableWriter, TVFTableSinkOperatorX>;
978
979
#ifdef BE_TEST
980
template class OperatorX<DummyOperatorLocalState>;
981
template class DataSinkOperatorX<DummySinkLocalState>;
982
#endif
983
984
} // namespace doris