Coverage Report

Created: 2026-11-04 21:24

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.08M
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
1.08M
    if (_parent->nereids_id() == -1) {
123
543k
        return fmt::format("(id={})", _parent->node_id());
124
546k
    } else {
125
546k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
546k
    }
127
1.08M
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
67.2k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
67.2k
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
67.2k
    } else {
125
67.2k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
67.2k
    }
127
67.2k
}
_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
148
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
148
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
148
    } else {
125
148
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
148
    }
127
148
}
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
5.58k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
5.58k
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
5.58k
    } else {
125
5.58k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
5.58k
    }
127
5.58k
}
_ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
9.25k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
9.25k
    if (_parent->nereids_id() == -1) {
123
60
        return fmt::format("(id={})", _parent->node_id());
124
9.19k
    } else {
125
9.19k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
9.19k
    }
127
9.25k
}
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
102k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
102k
    if (_parent->nereids_id() == -1) {
123
29
        return fmt::format("(id={})", _parent->node_id());
124
102k
    } else {
125
102k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
102k
    }
127
102k
}
_ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
1.74k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
1.74k
    if (_parent->nereids_id() == -1) {
123
2
        return fmt::format("(id={})", _parent->node_id());
124
1.74k
    } else {
125
1.74k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
1.74k
    }
127
1.74k
}
_ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
108
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
108
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
108
    } else {
125
108
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
108
    }
127
108
}
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
194k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
194k
    if (_parent->nereids_id() == -1) {
123
141k
        return fmt::format("(id={})", _parent->node_id());
124
141k
    } else {
125
52.6k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
52.6k
    }
127
194k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
56.3k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
56.3k
    if (_parent->nereids_id() == -1) {
123
2
        return fmt::format("(id={})", _parent->node_id());
124
56.3k
    } else {
125
56.3k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
56.3k
    }
127
56.3k
}
_ZNK5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
26
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
26
    if (_parent->nereids_id() == -1) {
123
26
        return fmt::format("(id={})", _parent->node_id());
124
26
    } else {
125
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
0
    }
127
26
}
_ZNK5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
5.95k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
5.96k
    if (_parent->nereids_id() == -1) {
123
5.96k
        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
5.95k
}
_ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
450
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
450
    if (_parent->nereids_id() == -1) {
123
102
        return fmt::format("(id={})", _parent->node_id());
124
348
    } else {
125
348
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
348
    }
127
450
}
_ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
1.10k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
1.10k
    if (_parent->nereids_id() == -1) {
123
13
        return fmt::format("(id={})", _parent->node_id());
124
1.08k
    } else {
125
1.08k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
1.08k
    }
127
1.10k
}
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
395k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
395k
    if (_parent->nereids_id() == -1) {
123
395k
        return fmt::format("(id={})", _parent->node_id());
124
395k
    } else {
125
132
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
132
    }
127
395k
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
_ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
171
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
171
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
171
    } else {
125
171
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
171
    }
127
171
}
128
129
template <typename SharedStateArg>
130
870k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
870k
    if (_parent->nereids_id() == -1) {
132
369k
        return fmt::format("(id={})", _parent->node_id());
133
501k
    } else {
134
501k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
501k
    }
136
870k
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
115k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
115k
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
115k
    } else {
134
115k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
115k
    }
136
115k
}
_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
254k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
254k
    if (_parent->nereids_id() == -1) {
132
9
        return fmt::format("(id={})", _parent->node_id());
133
254k
    } else {
134
254k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
254k
    }
136
254k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
161
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
161
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
161
    } else {
134
161
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
161
    }
136
161
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
5.58k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
5.58k
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
5.58k
    } else {
134
5.58k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
5.58k
    }
136
5.58k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
9.52k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
9.52k
    if (_parent->nereids_id() == -1) {
132
60
        return fmt::format("(id={})", _parent->node_id());
133
9.46k
    } else {
134
9.46k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
9.46k
    }
136
9.52k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
102k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
102k
    if (_parent->nereids_id() == -1) {
132
29
        return fmt::format("(id={})", _parent->node_id());
133
102k
    } else {
134
102k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
102k
    }
136
102k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
1.75k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
1.75k
    if (_parent->nereids_id() == -1) {
132
4
        return fmt::format("(id={})", _parent->node_id());
133
1.75k
    } else {
134
1.75k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
1.75k
    }
136
1.75k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
118
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
118
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
118
    } else {
134
118
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
118
    }
136
118
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
70
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
70
    if (_parent->nereids_id() == -1) {
132
70
        return fmt::format("(id={})", _parent->node_id());
133
70
    } else {
134
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
0
    }
136
70
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
10.0k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
10.0k
    if (_parent->nereids_id() == -1) {
132
3
        return fmt::format("(id={})", _parent->node_id());
133
10.0k
    } else {
134
10.0k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
10.0k
    }
136
10.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
450
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
450
    if (_parent->nereids_id() == -1) {
132
102
        return fmt::format("(id={})", _parent->node_id());
133
348
    } else {
134
348
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
348
    }
136
450
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
2.35k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
2.35k
    if (_parent->nereids_id() == -1) {
132
2.35k
        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
2.35k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
144k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
145k
    if (_parent->nereids_id() == -1) {
132
145k
        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
144k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
222k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
222k
    if (_parent->nereids_id() == -1) {
132
221k
        return fmt::format("(id={})", _parent->node_id());
133
221k
    } else {
134
460
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
460
    }
136
222k
}
_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
342
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
342
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
342
    } else {
134
342
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
342
    }
136
342
}
137
138
template <typename SharedStateArg>
139
31.6k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
31.6k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
31.6k
    _terminated = true;
144
31.6k
    return Status::OK();
145
31.6k
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
24.0k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
24.0k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
24.0k
    _terminated = true;
144
24.0k
    return Status::OK();
145
24.0k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
4.16k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
4.16k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
4.16k
    _terminated = true;
144
4.16k
    return Status::OK();
145
4.16k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_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
1.92k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
1.92k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
1.92k
    _terminated = true;
144
1.92k
    return Status::OK();
145
1.92k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
185
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
185
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
185
    _terminated = true;
144
185
    return Status::OK();
145
185
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
223
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
223
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
223
    _terminated = true;
144
223
    return Status::OK();
145
223
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
527
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
527
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
527
    _terminated = true;
144
527
    return Status::OK();
145
527
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
10
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
10
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
10
    _terminated = true;
144
10
    return Status::OK();
145
10
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
76
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
76
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
76
    _terminated = true;
144
76
    return Status::OK();
145
76
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
7
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
7
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
7
    _terminated = true;
144
7
    return Status::OK();
145
7
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
336
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
336
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
336
    _terminated = true;
144
336
    return Status::OK();
145
336
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
124
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
124
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
124
    _terminated = true;
144
124
    return Status::OK();
145
124
}
146
147
137k
DataDistribution OperatorBase::required_data_distribution(RuntimeState* /*state*/) const {
148
137k
    return _child && _child->is_serial_operator() && !is_source()
149
137k
                   ? DataDistribution(TLocalPartitionType::PASSTHROUGH)
150
137k
                   : DataDistribution(TLocalPartitionType::NOOP);
151
137k
}
152
153
11.3k
bool OperatorBase::child_breaks_local_key_distribution(RuntimeState* state) const {
154
11.3k
    if (!_child) {
155
10.6k
        return false;
156
10.6k
    }
157
674
    if (_child->is_serial_operator()) {
158
50
        return true;
159
50
    }
160
624
    const auto child_distribution = _child->required_data_distribution(state);
161
624
    return child_distribution.need_local_exchange() &&
162
624
           !is_shuffled_exchange(child_distribution.distribution_type);
163
674
}
164
165
template <typename SharedStateArg>
166
15.4k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
15.4k
    fmt::memory_buffer debug_string_buffer;
168
15.4k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
15.4k
    return fmt::to_string(debug_string_buffer);
170
15.4k
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
4
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
4
    fmt::memory_buffer debug_string_buffer;
168
4
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
4
    return fmt::to_string(debug_string_buffer);
170
4
}
_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
6
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
6
    fmt::memory_buffer debug_string_buffer;
168
6
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
6
    return fmt::to_string(debug_string_buffer);
170
6
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
26
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
26
    fmt::memory_buffer debug_string_buffer;
168
26
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
26
    return fmt::to_string(debug_string_buffer);
170
26
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
15.3k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
15.3k
    fmt::memory_buffer debug_string_buffer;
168
15.3k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
15.3k
    return fmt::to_string(debug_string_buffer);
170
15.3k
}
_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
16
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
16
    fmt::memory_buffer debug_string_buffer;
168
16
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
16
    return fmt::to_string(debug_string_buffer);
170
16
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
171
172
template <typename SharedStateArg>
173
15.4k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
15.4k
    fmt::memory_buffer debug_string_buffer;
175
15.4k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
15.4k
    return fmt::to_string(debug_string_buffer);
177
15.4k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
6
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
6
    fmt::memory_buffer debug_string_buffer;
175
6
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
6
    return fmt::to_string(debug_string_buffer);
177
6
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
26
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
26
    fmt::memory_buffer debug_string_buffer;
175
26
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
26
    return fmt::to_string(debug_string_buffer);
177
26
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
20
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
20
    fmt::memory_buffer debug_string_buffer;
175
20
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
20
    return fmt::to_string(debug_string_buffer);
177
20
}
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
11
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
11
    fmt::memory_buffer debug_string_buffer;
175
11
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
11
    return fmt::to_string(debug_string_buffer);
177
11
}
_ZNK5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
15.3k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
15.3k
    fmt::memory_buffer debug_string_buffer;
175
15.3k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
15.3k
    return fmt::to_string(debug_string_buffer);
177
15.3k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
178
179
15.4k
std::string OperatorXBase::debug_string(int indentation_level) const {
180
15.4k
    fmt::memory_buffer debug_string_buffer;
181
15.4k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, parallel_tasks={}, _is_serial_operator={}",
182
15.4k
                   std::string(indentation_level * 2, ' '), _op_name, node_id(), _parallel_tasks,
183
15.4k
                   _is_serial_operator);
184
15.4k
    return fmt::to_string(debug_string_buffer);
185
15.4k
}
186
187
15.4k
std::string OperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
188
15.4k
    return state->get_local_state(operator_id())->debug_string(indentation_level);
189
15.4k
}
190
191
502k
Status OperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
192
502k
    std::string node_name = print_plan_node_type(tnode.node_type);
193
502k
    _nereids_id = tnode.nereids_id;
194
502k
    if (!tnode.intermediate_output_tuple_id_list.empty()) {
195
6.79k
        if (!has_projection()) {
196
0
            return Status::InternalError("no final output tuple id");
197
0
        }
198
6.79k
        if (tnode.intermediate_output_tuple_id_list.size() !=
199
6.79k
            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.79k
    }
207
502k
    auto substr = node_name.substr(0, node_name.find("_NODE"));
208
502k
    _op_name = substr + "_OPERATOR";
209
210
502k
    if (tnode.__isset.vconjunct) {
211
0
        return Status::InternalError("vconjunct is not supported yet");
212
502k
    } else if (tnode.__isset.conjuncts) {
213
266k
        for (const auto& conjunct : tnode.conjuncts) {
214
266k
            VExprContextSPtr context;
215
266k
            RETURN_IF_ERROR(VExpr::create_expr_tree(conjunct, context));
216
266k
            _conjuncts.emplace_back(context);
217
266k
        }
218
94.1k
    }
219
220
    // create the projections expr
221
502k
    if (tnode.__isset.projections) {
222
228k
        RETURN_IF_ERROR(VExpr::create_expr_trees(tnode.projections, _projection->projections));
223
228k
    }
224
502k
    if (!tnode.intermediate_projections_list.empty()) {
225
6.79k
        DCHECK(has_projection()) << "no final projections";
226
6.79k
        _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.79k
    }
233
502k
    return Status::OK();
234
502k
}
235
236
529k
Status OperatorXBase::prepare(RuntimeState* state) {
237
529k
    for (auto& conjunct : _conjuncts) {
238
266k
        RETURN_IF_ERROR(conjunct->prepare(state, operator_row_desc_before_projection()));
239
266k
    }
240
529k
    if (state->enable_adjust_conjunct_order_by_cost()) {
241
478k
        std::ranges::stable_sort(_conjuncts, [](const auto& a, const auto& b) {
242
335k
            return a->execute_cost() < b->execute_cost();
243
335k
        });
244
478k
    };
245
246
529k
    if (has_projection()) {
247
228k
        auto& projection = *_projection;
248
240k
        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
228k
        const auto& final_projection_input_row_desc =
256
228k
                projection.intermediate_output_row_descriptors.empty()
257
228k
                        ? operator_row_desc_before_projection()
258
228k
                        : projection.intermediate_output_row_descriptors.back();
259
228k
        RETURN_IF_ERROR(
260
228k
                VExpr::prepare(projection.projections, state, final_projection_input_row_desc));
261
228k
        RETURN_IF_ERROR(VExpr::check_expr_output_type(projection.projections,
262
228k
                                                      projection.output_row_descriptor));
263
228k
    }
264
265
529k
    for (auto& conjunct : _conjuncts) {
266
266k
        RETURN_IF_ERROR(conjunct->open(state));
267
266k
    }
268
529k
    if (has_projection()) {
269
228k
        RETURN_IF_ERROR(VExpr::open(_projection->projections, state));
270
228k
        for (auto& projections : _projection->intermediate_projections) {
271
12.2k
            RETURN_IF_ERROR(VExpr::open(projections, state));
272
12.2k
        }
273
228k
    }
274
529k
    if (_child && !is_source()) {
275
45.5k
        RETURN_IF_ERROR(_child->prepare(state));
276
45.5k
    }
277
278
529k
    if (VExpr::contains_blockable_function(_conjuncts) ||
279
529k
        (has_projection() && VExpr::contains_blockable_function(_projection->projections))) {
280
0
        _blockable = true;
281
0
    }
282
283
529k
    return Status::OK();
284
529k
}
285
286
8.34k
Status OperatorXBase::terminate(RuntimeState* state) {
287
8.34k
    if (_child && !is_source()) {
288
714
        RETURN_IF_ERROR(_child->terminate(state));
289
714
    }
290
8.34k
    auto result = state->get_local_state_result(operator_id());
291
8.34k
    if (!result) {
292
0
        return result.error();
293
0
    }
294
8.34k
    return result.value()->terminate(state);
295
8.34k
}
296
297
2.80M
Status OperatorXBase::close(RuntimeState* state) {
298
2.80M
    if (_child && !is_source()) {
299
225k
        RETURN_IF_ERROR(_child->close(state));
300
225k
    }
301
2.80M
    auto result = state->get_local_state_result(operator_id());
302
2.80M
    if (!result) {
303
0
        return result.error();
304
0
    }
305
2.80M
    return result.value()->close(state);
306
2.80M
}
307
308
300k
void PipelineXLocalStateBase::clear_origin_block() {
309
300k
    _origin_block.clear_column_data(_parent->operator_row_desc_before_projection().num_slots());
310
300k
}
311
312
261k
Status PipelineXLocalStateBase::filter_block(const VExprContextSPtrs& expr_contexts, Block* block) {
313
261k
    RETURN_IF_ERROR(VExprContext::filter_block(expr_contexts, block, block->columns()));
314
315
261k
    _estimate_memory_usage += VExprContext::get_memory_usage(expr_contexts);
316
261k
    return Status::OK();
317
261k
}
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
300k
                                     Block* output_block) const {
326
300k
    auto* local_state = state->get_local_state(operator_id());
327
300k
    SCOPED_TIMER(local_state->exec_time_counter());
328
300k
    SCOPED_TIMER(local_state->_projection_timer);
329
300k
    const size_t rows = origin_block->rows();
330
300k
    if (rows == 0) {
331
149k
        return Status::OK();
332
149k
    }
333
150k
    SCOPED_PEAK_MEM(&local_state->_estimate_memory_usage);
334
335
150k
    {
336
150k
        Block input_block = *origin_block;
337
338
150k
        ColumnsWithTypeAndName new_columns;
339
150k
        for (const auto& projections : local_state->_intermediate_projections) {
340
5.21k
            if (projections.empty()) {
341
0
                return Status::InternalError("meet empty intermediate projection, node id: {}",
342
0
                                             node_id());
343
0
            }
344
5.21k
            new_columns.resize(projections.size());
345
124k
            for (int i = 0; i < projections.size(); i++) {
346
119k
                RETURN_IF_ERROR(projections[i]->execute(&input_block, new_columns[i]));
347
119k
                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
119k
            }
355
5.20k
            Block tmp_block {new_columns};
356
5.20k
            input_block.swap(tmp_block);
357
5.20k
        }
358
359
150k
        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
150k
        auto scoped_mutable_block = VectorizedUtils::build_scoped_mutable_mem_reuse_block(
367
150k
                output_block, _projection->output_row_descriptor);
368
150k
        auto& mutable_columns = scoped_mutable_block.mutable_columns();
369
150k
        DCHECK_EQ(mutable_columns.size(), local_state->_projections.size()) << debug_string();
370
150k
        Columns shared_columns(mutable_columns.size());
371
372
830k
        for (int i = 0; i < mutable_columns.size(); ++i) {
373
679k
            ColumnPtr column_ptr;
374
679k
            RETURN_IF_ERROR(local_state->_projections[i]->execute(&input_block, column_ptr));
375
679k
            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
679k
            column_ptr = column_ptr->convert_to_full_column_if_const();
382
679k
            if (is_column_nullable(*mutable_columns[i]) && !is_column_nullable(*column_ptr)) {
383
0
                column_ptr = make_nullable(column_ptr, false);
384
0
            }
385
679k
            if (column_ptr->is_exclusive()) {
386
246k
                mutable_columns[i] = IColumn::mutate(std::move(column_ptr));
387
433k
            } else {
388
433k
                shared_columns[i] = std::move(column_ptr);
389
433k
            }
390
679k
        }
391
392
150k
        scoped_mutable_block.restore();
393
830k
        for (int i = 0; i < shared_columns.size(); ++i) {
394
679k
            if (shared_columns[i]) {
395
433k
                output_block->replace_by_position(i, std::move(shared_columns[i]));
396
433k
            }
397
679k
        }
398
150k
    }
399
400
0
    origin_block->clear_column_data(
401
150k
            local_state->_parent->operator_row_desc_before_projection().num_slots());
402
150k
    DCHECK_EQ(output_block->rows(), rows);
403
404
150k
    return Status::OK();
405
150k
}
406
407
3.21M
Status OperatorXBase::get_block_after_projects(RuntimeState* state, Block* block, bool* eos) {
408
3.21M
    DBUG_EXECUTE_IF("Pipeline::return_empty_block", {
409
3.21M
        if (this->_op_name == "AGGREGATION_OPERATOR" || this->_op_name == "HASH_JOIN_OPERATOR" ||
410
3.21M
            this->_op_name == "PARTITIONED_AGGREGATION_OPERATOR" ||
411
3.21M
            this->_op_name == "PARTITIONED_HASH_JOIN_OPERATOR" ||
412
3.21M
            this->_op_name == "CROSS_JOIN_OPERATOR" || this->_op_name == "SORT_OPERATOR") {
413
3.21M
            if (_debug_point_count++ % 2 == 0) {
414
3.21M
                return Status::OK();
415
3.21M
            }
416
3.21M
        }
417
3.21M
    });
418
419
3.21M
    Status status;
420
3.21M
    auto* local_state = state->get_local_state(operator_id());
421
3.21M
    Defer defer([&]() {
422
3.21M
        if (status.ok()) {
423
3.21M
            local_state->update_output_block_counters(*block);
424
3.21M
        }
425
3.21M
    });
426
3.21M
    if (has_projection()) {
427
300k
        local_state->clear_origin_block();
428
300k
        status = get_block(state, &local_state->_origin_block, eos);
429
300k
        if (UNLIKELY(!status.ok())) {
430
43
            return status;
431
43
        }
432
300k
        status = do_projections(state, &local_state->_origin_block, block);
433
300k
        return status;
434
300k
    }
435
2.91M
    status = get_block(state, block, eos);
436
2.91M
    RETURN_IF_ERROR(block->check_type_and_column());
437
2.91M
    return status;
438
2.91M
}
439
440
2.26M
void PipelineXLocalStateBase::reached_limit(Block* block, bool* eos) {
441
2.26M
    if (_parent->_limit != -1 and _num_rows_returned + block->rows() >= _parent->_limit) {
442
9.79k
        block->set_num_rows(_parent->_limit - _num_rows_returned);
443
9.79k
        *eos = true;
444
9.79k
    }
445
446
2.26M
    DBUG_EXECUTE_IF("Pipeline::reached_limit_early", {
447
2.26M
        auto op_name = to_lower(_parent->_op_name);
448
2.26M
        auto arg_op_name = dp->param<std::string>("op_name");
449
2.26M
        arg_op_name = to_lower(arg_op_name);
450
451
2.26M
        if (op_name == arg_op_name) {
452
2.26M
            *eos = true;
453
2.26M
        }
454
2.26M
    });
455
456
2.26M
    if (auto rows = block->rows()) {
457
779k
        _num_rows_returned += rows;
458
779k
        _state->get_query_ctx()->resource_ctx()->io_context()->update_process_rows(rows);
459
779k
    }
460
2.26M
}
461
462
31.6k
Status DataSinkOperatorXBase::terminate(RuntimeState* state) {
463
31.6k
    auto result = state->get_sink_local_state_result();
464
31.6k
    if (!result) {
465
0
        return result.error();
466
0
    }
467
31.6k
    return result.value()->terminate(state);
468
31.6k
}
469
470
15.4k
std::string DataSinkOperatorXBase::debug_string(int indentation_level) const {
471
15.4k
    fmt::memory_buffer debug_string_buffer;
472
473
15.4k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, _is_serial_operator={}",
474
15.4k
                   std::string(indentation_level * 2, ' '), _name, node_id(), _is_serial_operator);
475
15.4k
    return fmt::to_string(debug_string_buffer);
476
15.4k
}
477
478
15.4k
std::string DataSinkOperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
479
15.4k
    return state->get_sink_local_state()->debug_string(indentation_level);
480
15.4k
}
481
482
290k
Status DataSinkOperatorXBase::init(const TDataSink& tsink) {
483
290k
    std::string op_name = "UNKNOWN_SINK";
484
290k
    auto it = _TDataSinkType_VALUES_TO_NAMES.find(tsink.type);
485
486
291k
    if (it != _TDataSinkType_VALUES_TO_NAMES.end()) {
487
291k
        op_name = it->second;
488
291k
    }
489
290k
    _name = op_name + "_OPERATOR";
490
290k
    return Status::OK();
491
290k
}
492
493
239k
Status DataSinkOperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
494
239k
    std::string op_name = print_plan_node_type(tnode.node_type);
495
239k
    _nereids_id = tnode.nereids_id;
496
239k
    auto substr = op_name.substr(0, op_name.find("_NODE"));
497
239k
    _name = substr + "_SINK_OPERATOR";
498
239k
    return Status::OK();
499
239k
}
500
501
template <typename LocalStateType>
502
Status DataSinkOperatorX<LocalStateType>::setup_local_state(RuntimeState* state,
503
1.27M
                                                            LocalSinkStateInfo& info) {
504
1.27M
    auto local_state = LocalStateType::create_unique(this, state);
505
1.27M
    RETURN_IF_ERROR(local_state->init(state, info));
506
1.27M
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
1.27M
    return Status::OK();
508
1.27M
}
_ZN5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
115k
                                                            LocalSinkStateInfo& info) {
504
115k
    auto local_state = LocalStateType::create_unique(this, state);
505
115k
    RETURN_IF_ERROR(local_state->init(state, info));
506
115k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
115k
    return Status::OK();
508
115k
}
_ZN5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
171k
                                                            LocalSinkStateInfo& info) {
504
171k
    auto local_state = LocalStateType::create_unique(this, state);
505
171k
    RETURN_IF_ERROR(local_state->init(state, info));
506
171k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
171k
    return Status::OK();
508
171k
}
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
360
                                                            LocalSinkStateInfo& info) {
504
360
    auto local_state = LocalStateType::create_unique(this, state);
505
360
    RETURN_IF_ERROR(local_state->init(state, info));
506
360
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
360
    return Status::OK();
508
360
}
_ZN5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
49.9k
                                                            LocalSinkStateInfo& info) {
504
49.9k
    auto local_state = LocalStateType::create_unique(this, state);
505
49.9k
    RETURN_IF_ERROR(local_state->init(state, info));
506
49.9k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
49.9k
    return Status::OK();
508
49.9k
}
_ZN5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
8
                                                            LocalSinkStateInfo& info) {
504
8
    auto local_state = LocalStateType::create_unique(this, state);
505
8
    RETURN_IF_ERROR(local_state->init(state, info));
506
8
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
8
    return Status::OK();
508
8
}
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
9.50k
                                                            LocalSinkStateInfo& info) {
504
9.50k
    auto local_state = LocalStateType::create_unique(this, state);
505
9.50k
    RETURN_IF_ERROR(local_state->init(state, info));
506
9.50k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
9.50k
    return Status::OK();
508
9.50k
}
_ZN5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
48
                                                            LocalSinkStateInfo& info) {
504
48
    auto local_state = LocalStateType::create_unique(this, state);
505
48
    RETURN_IF_ERROR(local_state->init(state, info));
506
48
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
48
    return Status::OK();
508
48
}
_ZN5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
255k
                                                            LocalSinkStateInfo& info) {
504
255k
    auto local_state = LocalStateType::create_unique(this, state);
505
255k
    RETURN_IF_ERROR(local_state->init(state, info));
506
255k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
255k
    return Status::OK();
508
255k
}
_ZN5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
158
                                                            LocalSinkStateInfo& info) {
504
158
    auto local_state = LocalStateType::create_unique(this, state);
505
158
    RETURN_IF_ERROR(local_state->init(state, info));
506
158
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
158
    return Status::OK();
508
158
}
_ZN5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
144k
                                                            LocalSinkStateInfo& info) {
504
144k
    auto local_state = LocalStateType::create_unique(this, state);
505
144k
    RETURN_IF_ERROR(local_state->init(state, info));
506
144k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
144k
    return Status::OK();
508
144k
}
_ZN5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
103k
                                                            LocalSinkStateInfo& info) {
504
103k
    auto local_state = LocalStateType::create_unique(this, state);
505
103k
    RETURN_IF_ERROR(local_state->init(state, info));
506
103k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
103k
    return Status::OK();
508
103k
}
_ZN5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
1.74k
                                                            LocalSinkStateInfo& info) {
504
1.74k
    auto local_state = LocalStateType::create_unique(this, state);
505
1.74k
    RETURN_IF_ERROR(local_state->init(state, info));
506
1.74k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
1.74k
    return Status::OK();
508
1.74k
}
_ZN5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
115
                                                            LocalSinkStateInfo& info) {
504
115
    auto local_state = LocalStateType::create_unique(this, state);
505
115
    RETURN_IF_ERROR(local_state->init(state, info));
506
115
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
115
    return Status::OK();
508
115
}
_ZN5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
398k
                                                            LocalSinkStateInfo& info) {
504
398k
    auto local_state = LocalStateType::create_unique(this, state);
505
398k
    RETURN_IF_ERROR(local_state->init(state, info));
506
398k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
398k
    return Status::OK();
508
398k
}
_ZN5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
5.59k
                                                            LocalSinkStateInfo& info) {
504
5.59k
    auto local_state = LocalStateType::create_unique(this, state);
505
5.59k
    RETURN_IF_ERROR(local_state->init(state, info));
506
5.59k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
5.59k
    return Status::OK();
508
5.59k
}
_ZN5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
10.0k
                                                            LocalSinkStateInfo& info) {
504
10.0k
    auto local_state = LocalStateType::create_unique(this, state);
505
10.0k
    RETURN_IF_ERROR(local_state->init(state, info));
506
10.0k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
10.0k
    return Status::OK();
508
10.0k
}
_ZN5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.41k
                                                            LocalSinkStateInfo& info) {
504
2.41k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.41k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.41k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.41k
    return Status::OK();
508
2.41k
}
_ZN5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
348
                                                            LocalSinkStateInfo& info) {
504
348
    auto local_state = LocalStateType::create_unique(this, state);
505
348
    RETURN_IF_ERROR(local_state->init(state, info));
506
348
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
348
    return Status::OK();
508
348
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
663
                                                            LocalSinkStateInfo& info) {
504
663
    auto local_state = LocalStateType::create_unique(this, state);
505
663
    RETURN_IF_ERROR(local_state->init(state, info));
506
663
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
663
    return Status::OK();
508
663
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
582
                                                            LocalSinkStateInfo& info) {
504
582
    auto local_state = LocalStateType::create_unique(this, state);
505
582
    RETURN_IF_ERROR(local_state->init(state, info));
506
582
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
582
    return Status::OK();
508
582
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
595
                                                            LocalSinkStateInfo& info) {
504
595
    auto local_state = LocalStateType::create_unique(this, state);
505
595
    RETURN_IF_ERROR(local_state->init(state, info));
506
595
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
595
    return Status::OK();
508
595
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
495
                                                            LocalSinkStateInfo& info) {
504
495
    auto local_state = LocalStateType::create_unique(this, state);
505
495
    RETURN_IF_ERROR(local_state->init(state, info));
506
495
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
495
    return Status::OK();
508
495
}
_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
562
                                                            LocalSinkStateInfo& info) {
504
562
    auto local_state = LocalStateType::create_unique(this, state);
505
562
    RETURN_IF_ERROR(local_state->init(state, info));
506
562
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
562
    return Status::OK();
508
562
}
_ZN5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
14
                                                            LocalSinkStateInfo& info) {
504
14
    auto local_state = LocalStateType::create_unique(this, state);
505
14
    RETURN_IF_ERROR(local_state->init(state, info));
506
14
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
14
    return Status::OK();
508
14
}
_ZN5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
106
                                                            LocalSinkStateInfo& info) {
504
106
    auto local_state = LocalStateType::create_unique(this, state);
505
106
    RETURN_IF_ERROR(local_state->init(state, info));
506
106
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
106
    return Status::OK();
508
106
}
_ZN5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
171
                                                            LocalSinkStateInfo& info) {
504
171
    auto local_state = LocalStateType::create_unique(this, state);
505
171
    RETURN_IF_ERROR(local_state->init(state, info));
506
171
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
171
    return Status::OK();
508
171
}
_ZN5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
171
                                                            LocalSinkStateInfo& info) {
504
171
    auto local_state = LocalStateType::create_unique(this, state);
505
171
    RETURN_IF_ERROR(local_state->init(state, info));
506
171
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
171
    return Status::OK();
508
171
}
509
510
template <typename LocalStateType>
511
1.10M
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.10M
    } else {
519
1.10M
        auto ss = LocalStateType::SharedStateType::create_shared();
520
1.10M
        ss->id = operator_id();
521
1.10M
        for (auto& dest : dests_id()) {
522
1.09M
            ss->related_op_ids.insert(dest);
523
1.09M
        }
524
1.10M
        return ss;
525
1.10M
    }
526
1.10M
}
_ZNK5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
101k
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
101k
    } else {
519
101k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
101k
        ss->id = operator_id();
521
101k
        for (auto& dest : dests_id()) {
522
101k
            ss->related_op_ids.insert(dest);
523
101k
        }
524
101k
        return ss;
525
101k
    }
526
101k
}
_ZNK5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
172k
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
172k
    } else {
519
172k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
172k
        ss->id = operator_id();
521
172k
        for (auto& dest : dests_id()) {
522
171k
            ss->related_op_ids.insert(dest);
523
171k
        }
524
172k
        return ss;
525
172k
    }
526
172k
}
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
360
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
360
    } else {
519
360
        auto ss = LocalStateType::SharedStateType::create_shared();
520
360
        ss->id = operator_id();
521
360
        for (auto& dest : dests_id()) {
522
360
            ss->related_op_ids.insert(dest);
523
360
        }
524
360
        return ss;
525
360
    }
526
360
}
_ZNK5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
50.1k
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
50.1k
    } else {
519
50.1k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
50.1k
        ss->id = operator_id();
521
50.1k
        for (auto& dest : dests_id()) {
522
49.6k
            ss->related_op_ids.insert(dest);
523
49.6k
        }
524
50.1k
        return ss;
525
50.1k
    }
526
50.1k
}
_ZNK5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE19create_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_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.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
9.63k
    } else {
519
9.63k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
9.63k
        ss->id = operator_id();
521
9.63k
        for (auto& dest : dests_id()) {
522
9.58k
            ss->related_op_ids.insert(dest);
523
9.58k
        }
524
9.63k
        return ss;
525
9.63k
    }
526
9.63k
}
_ZNK5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
48
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
48
    } else {
519
48
        auto ss = LocalStateType::SharedStateType::create_shared();
520
48
        ss->id = operator_id();
521
48
        for (auto& dest : dests_id()) {
522
48
            ss->related_op_ids.insert(dest);
523
48
        }
524
48
        return ss;
525
48
    }
526
48
}
_ZNK5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
256k
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
256k
    } else {
519
256k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
256k
        ss->id = operator_id();
521
257k
        for (auto& dest : dests_id()) {
522
257k
            ss->related_op_ids.insert(dest);
523
257k
        }
524
256k
        return ss;
525
256k
    }
526
256k
}
_ZNK5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
161
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
161
    } else {
519
161
        auto ss = LocalStateType::SharedStateType::create_shared();
520
161
        ss->id = operator_id();
521
162
        for (auto& dest : dests_id()) {
522
162
            ss->related_op_ids.insert(dest);
523
162
        }
524
161
        return ss;
525
161
    }
526
161
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
103k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
103k
    } else {
519
103k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
103k
        ss->id = operator_id();
521
103k
        for (auto& dest : dests_id()) {
522
103k
            ss->related_op_ids.insert(dest);
523
103k
        }
524
103k
        return ss;
525
103k
    }
526
103k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
114
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
114
    } else {
519
114
        auto ss = LocalStateType::SharedStateType::create_shared();
520
114
        ss->id = operator_id();
521
114
        for (auto& dest : dests_id()) {
522
114
            ss->related_op_ids.insert(dest);
523
114
        }
524
114
        return ss;
525
114
    }
526
114
}
_ZNK5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
401k
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
401k
    } else {
519
401k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
401k
        ss->id = operator_id();
521
401k
        for (auto& dest : dests_id()) {
522
394k
            ss->related_op_ids.insert(dest);
523
394k
        }
524
401k
        return ss;
525
401k
    }
526
401k
}
_ZNK5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
5.59k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
5.59k
    } else {
519
5.59k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
5.59k
        ss->id = operator_id();
521
5.59k
        for (auto& dest : dests_id()) {
522
5.59k
            ss->related_op_ids.insert(dest);
523
5.59k
        }
524
5.59k
        return ss;
525
5.59k
    }
526
5.59k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
450
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
450
    } else {
519
450
        auto ss = LocalStateType::SharedStateType::create_shared();
520
450
        ss->id = operator_id();
521
450
        for (auto& dest : dests_id()) {
522
450
            ss->related_op_ids.insert(dest);
523
450
        }
524
450
        return ss;
525
450
    }
526
450
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE19create_shared_stateEv
Line
Count
Source
511
600
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
600
    } else {
519
600
        auto ss = LocalStateType::SharedStateType::create_shared();
520
600
        ss->id = operator_id();
521
602
        for (auto& dest : dests_id()) {
522
602
            ss->related_op_ids.insert(dest);
523
602
        }
524
600
        return ss;
525
600
    }
526
600
}
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE19create_shared_stateEv
Line
Count
Source
511
504
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
504
    } else {
519
504
        auto ss = LocalStateType::SharedStateType::create_shared();
520
504
        ss->id = operator_id();
521
504
        for (auto& dest : dests_id()) {
522
502
            ss->related_op_ids.insert(dest);
523
502
        }
524
504
        return ss;
525
504
    }
526
504
}
_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
558
            ss->related_op_ids.insert(dest);
523
558
        }
524
566
        return ss;
525
566
    }
526
566
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
106
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
106
    } else {
519
106
        auto ss = LocalStateType::SharedStateType::create_shared();
520
106
        ss->id = operator_id();
521
106
        for (auto& dest : dests_id()) {
522
106
            ss->related_op_ids.insert(dest);
523
106
        }
524
106
        return ss;
525
106
    }
526
106
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE19create_shared_stateEv
527
528
template <typename LocalStateType>
529
1.31M
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.31M
    auto local_state = LocalStateType::create_unique(state, this);
531
1.31M
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.31M
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.31M
    return Status::OK();
534
1.31M
}
_ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
67.6k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
67.6k
    auto local_state = LocalStateType::create_unique(state, this);
531
67.6k
    RETURN_IF_ERROR(local_state->init(state, info));
532
67.6k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
67.6k
    return Status::OK();
534
67.6k
}
_ZN5doris9OperatorXINS_18OlapScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
204k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
204k
    auto local_state = LocalStateType::create_unique(state, this);
531
204k
    RETURN_IF_ERROR(local_state->init(state, info));
532
204k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
204k
    return Status::OK();
534
204k
}
_ZN5doris9OperatorXINS_21GroupCommitLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
132
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
132
    auto local_state = LocalStateType::create_unique(state, this);
531
132
    RETURN_IF_ERROR(local_state->init(state, info));
532
132
    state->emplace_local_state(operator_id(), std::move(local_state));
533
132
    return Status::OK();
534
132
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_18JDBCScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_18FileScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
3.33k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
3.33k
    auto local_state = LocalStateType::create_unique(state, this);
531
3.33k
    RETURN_IF_ERROR(local_state->init(state, info));
532
3.33k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
3.33k
    return Status::OK();
534
3.33k
}
_ZN5doris9OperatorXINS_18AnalyticLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
9.39k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
9.39k
    auto local_state = LocalStateType::create_unique(state, this);
531
9.39k
    RETURN_IF_ERROR(local_state->init(state, info));
532
9.39k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
9.39k
    return Status::OK();
534
9.39k
}
_ZN5doris9OperatorXINS_14SortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
8.71k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
8.71k
    auto local_state = LocalStateType::create_unique(state, this);
531
8.71k
    RETURN_IF_ERROR(local_state->init(state, info));
532
8.71k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
8.71k
    return Status::OK();
534
8.71k
}
_ZN5doris9OperatorXINS_19SpillSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
151
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
151
    auto local_state = LocalStateType::create_unique(state, this);
531
151
    RETURN_IF_ERROR(local_state->init(state, info));
532
151
    state->emplace_local_state(operator_id(), std::move(local_state));
533
151
    return Status::OK();
534
151
}
_ZN5doris9OperatorXINS_24LocalMergeSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
245k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
245k
    auto local_state = LocalStateType::create_unique(state, this);
531
245k
    RETURN_IF_ERROR(local_state->init(state, info));
532
245k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
245k
    return Status::OK();
534
245k
}
_ZN5doris9OperatorXINS_13AggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
102k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
102k
    auto local_state = LocalStateType::create_unique(state, this);
531
102k
    RETURN_IF_ERROR(local_state->init(state, info));
532
102k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
102k
    return Status::OK();
534
102k
}
_ZN5doris9OperatorXINS_21BucketedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.74k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.74k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.74k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.74k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.74k
    return Status::OK();
534
1.74k
}
_ZN5doris9OperatorXINS_24PartitionedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
108
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
108
    auto local_state = LocalStateType::create_unique(state, this);
531
108
    RETURN_IF_ERROR(local_state->init(state, info));
532
108
    state->emplace_local_state(operator_id(), std::move(local_state));
533
108
    return Status::OK();
534
108
}
_ZN5doris9OperatorXINS_23TableFunctionLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
6.42k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
6.42k
    auto local_state = LocalStateType::create_unique(state, this);
531
6.42k
    RETURN_IF_ERROR(local_state->init(state, info));
532
6.42k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
6.42k
    return Status::OK();
534
6.42k
}
_ZN5doris9OperatorXINS_18ExchangeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
142k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
142k
    auto local_state = LocalStateType::create_unique(state, this);
531
142k
    RETURN_IF_ERROR(local_state->init(state, info));
532
142k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
142k
    return Status::OK();
534
142k
}
_ZN5doris9OperatorXINS_16RepeatLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.16k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.16k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.16k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.16k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.16k
    return Status::OK();
534
1.16k
}
_ZN5doris9OperatorXINS_29NestedLoopJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
5.57k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
5.57k
    auto local_state = LocalStateType::create_unique(state, this);
531
5.57k
    RETURN_IF_ERROR(local_state->init(state, info));
532
5.57k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
5.57k
    return Status::OK();
534
5.57k
}
_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.38k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.38k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.38k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.38k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.38k
    return Status::OK();
534
1.38k
}
_ZN5doris9OperatorXINS_21UnionSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
56.4k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
56.4k
    auto local_state = LocalStateType::create_unique(state, this);
531
56.4k
    RETURN_IF_ERROR(local_state->init(state, info));
532
56.4k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
56.4k
    return Status::OK();
534
56.4k
}
_ZN5doris9OperatorXINS_35MultiCastDataStreamSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
5.97k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
5.97k
    auto local_state = LocalStateType::create_unique(state, this);
531
5.97k
    RETURN_IF_ERROR(local_state->init(state, info));
532
5.97k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
5.97k
    return Status::OK();
534
5.97k
}
_ZN5doris9OperatorXINS_29PartitionSortSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
348
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
348
    auto local_state = LocalStateType::create_unique(state, this);
531
348
    RETURN_IF_ERROR(local_state->init(state, info));
532
348
    state->emplace_local_state(operator_id(), std::move(local_state));
533
348
    return Status::OK();
534
348
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
595
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
595
    auto local_state = LocalStateType::create_unique(state, this);
531
595
    RETURN_IF_ERROR(local_state->init(state, info));
532
595
    state->emplace_local_state(operator_id(), std::move(local_state));
533
595
    return Status::OK();
534
595
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
495
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
495
    auto local_state = LocalStateType::create_unique(state, this);
531
495
    RETURN_IF_ERROR(local_state->init(state, info));
532
495
    state->emplace_local_state(operator_id(), std::move(local_state));
533
495
    return Status::OK();
534
495
}
_ZN5doris9OperatorXINS_17DataGenLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
613
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
613
    auto local_state = LocalStateType::create_unique(state, this);
531
613
    RETURN_IF_ERROR(local_state->init(state, info));
532
613
    state->emplace_local_state(operator_id(), std::move(local_state));
533
613
    return Status::OK();
534
613
}
_ZN5doris9OperatorXINS_20SchemaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.70k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.70k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.70k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.70k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.70k
    return Status::OK();
534
1.70k
}
_ZN5doris9OperatorXINS_18MetaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
9.91k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
9.91k
    auto local_state = LocalStateType::create_unique(state, this);
531
9.91k
    RETURN_IF_ERROR(local_state->init(state, info));
532
9.91k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
9.91k
    return Status::OK();
534
9.91k
}
_ZN5doris9OperatorXINS_29LocalExchangeSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
403k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
403k
    auto local_state = LocalStateType::create_unique(state, this);
531
403k
    RETURN_IF_ERROR(local_state->init(state, info));
532
403k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
403k
    return Status::OK();
534
403k
}
_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
171
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
171
    auto local_state = LocalStateType::create_unique(state, this);
531
171
    RETURN_IF_ERROR(local_state->init(state, info));
532
171
    state->emplace_local_state(operator_id(), std::move(local_state));
533
171
    return Status::OK();
534
171
}
_ZN5doris9OperatorXINS_20RecCTEScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.21k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.21k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.21k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.21k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.21k
    return Status::OK();
534
2.21k
}
_ZN5doris9OperatorXINS_25MaterializationLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
652
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
652
    auto local_state = LocalStateType::create_unique(state, this);
531
652
    RETURN_IF_ERROR(local_state->init(state, info));
532
652
    state->emplace_local_state(operator_id(), std::move(local_state));
533
652
    return Status::OK();
534
652
}
_ZN5doris9OperatorXINS_16SelectLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
771
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
771
    auto local_state = LocalStateType::create_unique(state, this);
531
771
    RETURN_IF_ERROR(local_state->init(state, info));
532
771
    state->emplace_local_state(operator_id(), std::move(local_state));
533
771
    return Status::OK();
534
771
}
_ZN5doris9OperatorXINS_22StreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
7.65k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
7.65k
    auto local_state = LocalStateType::create_unique(state, this);
531
7.65k
    RETURN_IF_ERROR(local_state->init(state, info));
532
7.65k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
7.65k
    return Status::OK();
534
7.65k
}
_ZN5doris9OperatorXINS_30DistinctStreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
21.4k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
21.4k
    auto local_state = LocalStateType::create_unique(state, this);
531
21.4k
    RETURN_IF_ERROR(local_state->init(state, info));
532
21.4k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
21.4k
    return Status::OK();
534
21.4k
}
535
536
PipelineXSinkLocalStateBase::PipelineXSinkLocalStateBase(DataSinkOperatorXBase* parent,
537
                                                         RuntimeState* state)
538
1.27M
        : _parent(parent), _state(state) {}
539
540
PipelineXLocalStateBase::PipelineXLocalStateBase(RuntimeState* state, OperatorXBase* parent)
541
1.30M
        : _num_rows_returned(0),
542
1.30M
          _rows_returned_counter(nullptr),
543
1.30M
          _parent(parent),
544
1.30M
          _state(state),
545
1.30M
          _budget(state->batch_size(), state->preferred_block_size_bytes()) {}
546
547
template <typename SharedStateArg>
548
1.31M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
1.31M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
1.31M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
1.31M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
1.31M
    _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.31M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
1.31M
    _operator_profile->add_child(_common_profile.get(), true);
557
1.31M
    _operator_profile->add_child(_custom_profile.get(), true);
558
1.31M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
1.31M
    if constexpr (!is_fake_shared) {
560
914k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
410k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
410k
                                    .first.get()
563
410k
                                    ->template cast<SharedStateArg>();
564
565
410k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
410k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
410k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
504k
        } else if (info.shared_state) {
569
425k
            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
425k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
425k
            _dependency = _shared_state->create_source_dependency(
576
425k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
425k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
425k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
425k
        } else {
580
79.2k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
12.1k
                DCHECK(false);
582
12.1k
            }
583
79.2k
        }
584
914k
    }
585
586
1.31M
    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.31M
    _rows_returned_counter =
591
1.31M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
1.31M
    _blocks_returned_counter =
593
1.31M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
1.31M
    _output_block_bytes_counter =
595
1.31M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
1.31M
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
1.31M
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
1.31M
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
1.31M
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
1.31M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
1.31M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
1.31M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
1.31M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
1.31M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
1.31M
    _memory_used_counter =
606
1.31M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
1.31M
    _common_profile->add_info_string("IsColocate",
608
1.31M
                                     std::to_string(_parent->is_colocated_operator()));
609
1.31M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
1.31M
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
1.31M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
1.31M
    return Status::OK();
613
1.31M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
67.8k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
67.8k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
67.8k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
67.8k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
67.8k
    _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
67.8k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
67.8k
    _operator_profile->add_child(_common_profile.get(), true);
557
67.8k
    _operator_profile->add_child(_custom_profile.get(), true);
558
67.8k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
67.8k
    if constexpr (!is_fake_shared) {
560
67.8k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
14.1k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
14.1k
                                    .first.get()
563
14.1k
                                    ->template cast<SharedStateArg>();
564
565
14.1k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
14.1k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
14.1k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
53.6k
        } 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
52.7k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
52.7k
            _dependency = _shared_state->create_source_dependency(
576
52.7k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
52.7k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
52.7k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
52.7k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
902
        }
584
67.8k
    }
585
586
67.8k
    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
67.8k
    _rows_returned_counter =
591
67.8k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
67.8k
    _blocks_returned_counter =
593
67.8k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
67.8k
    _output_block_bytes_counter =
595
67.8k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
67.8k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
67.8k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
67.8k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
67.8k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
67.8k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
67.8k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
67.8k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
67.8k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
67.8k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
67.8k
    _memory_used_counter =
606
67.8k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
67.8k
    _common_profile->add_info_string("IsColocate",
608
67.8k
                                     std::to_string(_parent->is_colocated_operator()));
609
67.8k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
67.8k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
67.8k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
67.8k
    return Status::OK();
613
67.8k
}
_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
255k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
255k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
255k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
255k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
255k
    _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
255k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
255k
    _operator_profile->add_child(_common_profile.get(), true);
557
255k
    _operator_profile->add_child(_custom_profile.get(), true);
558
255k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
255k
    if constexpr (!is_fake_shared) {
560
255k
        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
255k
        } 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
243k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
243k
            _dependency = _shared_state->create_source_dependency(
576
243k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
243k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
243k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
243k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
12.0k
        }
584
255k
    }
585
586
255k
    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
255k
    _rows_returned_counter =
591
255k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
255k
    _blocks_returned_counter =
593
255k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
255k
    _output_block_bytes_counter =
595
255k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
255k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
255k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
255k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
255k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
255k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
255k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
255k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
255k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
255k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
255k
    _memory_used_counter =
606
255k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
255k
    _common_profile->add_info_string("IsColocate",
608
255k
                                     std::to_string(_parent->is_colocated_operator()));
609
255k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
255k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
255k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
255k
    return Status::OK();
613
255k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
152
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
152
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
152
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
152
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
152
    _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
152
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
152
    _operator_profile->add_child(_common_profile.get(), true);
557
152
    _operator_profile->add_child(_custom_profile.get(), true);
558
152
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
152
    if constexpr (!is_fake_shared) {
560
152
        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
152
        } 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
152
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
152
            _dependency = _shared_state->create_source_dependency(
576
152
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
152
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
152
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
152
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
152
    }
585
586
153
    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
152
    _rows_returned_counter =
591
152
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
152
    _blocks_returned_counter =
593
152
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
152
    _output_block_bytes_counter =
595
152
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
152
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
152
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
152
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
152
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
152
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
152
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
152
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
152
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
152
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
152
    _memory_used_counter =
606
152
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
152
    _common_profile->add_info_string("IsColocate",
608
152
                                     std::to_string(_parent->is_colocated_operator()));
609
152
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
152
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
152
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
152
    return Status::OK();
613
152
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
5.59k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
5.59k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
5.59k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
5.59k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
5.59k
    _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.59k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
5.59k
    _operator_profile->add_child(_common_profile.get(), true);
557
5.59k
    _operator_profile->add_child(_custom_profile.get(), true);
558
5.59k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
5.59k
    if constexpr (!is_fake_shared) {
560
5.59k
        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.59k
        } 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.55k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
5.55k
            _dependency = _shared_state->create_source_dependency(
576
5.55k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
5.55k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
5.55k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
5.55k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
43
        }
584
5.59k
    }
585
586
5.59k
    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.59k
    _rows_returned_counter =
591
5.59k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
5.59k
    _blocks_returned_counter =
593
5.59k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
5.59k
    _output_block_bytes_counter =
595
5.59k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
5.59k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
5.59k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
5.59k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
5.59k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
5.59k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
5.59k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
5.59k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
5.59k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
5.59k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
5.59k
    _memory_used_counter =
606
5.59k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
5.59k
    _common_profile->add_info_string("IsColocate",
608
5.59k
                                     std::to_string(_parent->is_colocated_operator()));
609
5.59k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
5.59k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
5.59k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
5.59k
    return Status::OK();
613
5.59k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
9.46k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
9.46k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
9.46k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
9.46k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
9.46k
    _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.46k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
9.46k
    _operator_profile->add_child(_common_profile.get(), true);
557
9.46k
    _operator_profile->add_child(_custom_profile.get(), true);
558
9.46k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
9.46k
    if constexpr (!is_fake_shared) {
560
9.46k
        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.46k
        } 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
9.20k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
9.20k
            _dependency = _shared_state->create_source_dependency(
576
9.20k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
9.20k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
9.20k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
9.20k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
255
        }
584
9.46k
    }
585
586
9.46k
    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.46k
    _rows_returned_counter =
591
9.46k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
9.46k
    _blocks_returned_counter =
593
9.46k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
9.46k
    _output_block_bytes_counter =
595
9.46k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
9.46k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
9.46k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
9.46k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
9.46k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
9.46k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
9.46k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
9.46k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
9.46k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
9.46k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
9.46k
    _memory_used_counter =
606
9.46k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
9.46k
    _common_profile->add_info_string("IsColocate",
608
9.46k
                                     std::to_string(_parent->is_colocated_operator()));
609
9.46k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
9.46k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
9.46k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
9.46k
    return Status::OK();
613
9.46k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
103k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
103k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
103k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
103k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
103k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
103k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
103k
    _operator_profile->add_child(_common_profile.get(), true);
557
103k
    _operator_profile->add_child(_custom_profile.get(), true);
558
103k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
103k
    if constexpr (!is_fake_shared) {
560
103k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
103k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
101k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
101k
            _dependency = _shared_state->create_source_dependency(
576
101k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
101k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
101k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
101k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
1.71k
        }
584
103k
    }
585
586
103k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
103k
    _rows_returned_counter =
591
103k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
103k
    _blocks_returned_counter =
593
103k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
103k
    _output_block_bytes_counter =
595
103k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
103k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
103k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
103k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
103k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
103k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
103k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
103k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
103k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
103k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
103k
    _memory_used_counter =
606
103k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
103k
    _common_profile->add_info_string("IsColocate",
608
103k
                                     std::to_string(_parent->is_colocated_operator()));
609
103k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
103k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
103k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
103k
    return Status::OK();
613
103k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
1.74k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
1.74k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
1.74k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
1.74k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
1.74k
    _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.74k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
1.74k
    _operator_profile->add_child(_common_profile.get(), true);
557
1.74k
    _operator_profile->add_child(_custom_profile.get(), true);
558
1.74k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
1.74k
    if constexpr (!is_fake_shared) {
560
1.76k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
1.76k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
1.76k
                                    .first.get()
563
1.76k
                                    ->template cast<SharedStateArg>();
564
565
1.76k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
1.76k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
1.76k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
18.4E
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
0
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
0
            _dependency = _shared_state->create_source_dependency(
576
0
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
18.4E
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
18.4E
        }
584
1.74k
    }
585
586
1.74k
    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.74k
    _rows_returned_counter =
591
1.74k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
1.74k
    _blocks_returned_counter =
593
1.74k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
1.74k
    _output_block_bytes_counter =
595
1.74k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
1.74k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
1.74k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
1.74k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
1.74k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
1.74k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
1.74k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
1.74k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
1.74k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
1.74k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
1.74k
    _memory_used_counter =
606
1.74k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
1.74k
    _common_profile->add_info_string("IsColocate",
608
1.74k
                                     std::to_string(_parent->is_colocated_operator()));
609
1.74k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
1.74k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
1.74k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
1.74k
    return Status::OK();
613
1.74k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
108
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
108
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
108
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
108
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
108
    _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
108
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
108
    _operator_profile->add_child(_common_profile.get(), true);
557
108
    _operator_profile->add_child(_custom_profile.get(), true);
558
108
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
108
    if constexpr (!is_fake_shared) {
560
108
        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
108
        } 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
108
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
108
            _dependency = _shared_state->create_source_dependency(
576
108
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
108
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
108
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
108
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
108
    }
585
586
108
    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
108
    _rows_returned_counter =
591
108
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
108
    _blocks_returned_counter =
593
108
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
108
    _output_block_bytes_counter =
595
108
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
108
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
108
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
108
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
108
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
108
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
108
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
108
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
108
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
108
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
108
    _memory_used_counter =
606
108
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
108
    _common_profile->add_info_string("IsColocate",
608
108
                                     std::to_string(_parent->is_colocated_operator()));
609
108
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
108
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
108
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
108
    return Status::OK();
613
108
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
403k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
403k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
403k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
403k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
403k
    _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
403k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
403k
    _operator_profile->add_child(_common_profile.get(), true);
557
403k
    _operator_profile->add_child(_custom_profile.get(), true);
558
403k
    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
403k
    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
403k
    _rows_returned_counter =
591
403k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
403k
    _blocks_returned_counter =
593
403k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
403k
    _output_block_bytes_counter =
595
403k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
403k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
403k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
403k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
403k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
403k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
403k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
403k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
403k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
403k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
403k
    _memory_used_counter =
606
403k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
403k
    _common_profile->add_info_string("IsColocate",
608
403k
                                     std::to_string(_parent->is_colocated_operator()));
609
403k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
403k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
403k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
403k
    return Status::OK();
613
403k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
56.4k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
56.4k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
56.4k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
56.4k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
56.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
56.4k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
56.4k
    _operator_profile->add_child(_common_profile.get(), true);
557
56.4k
    _operator_profile->add_child(_custom_profile.get(), true);
558
56.4k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
56.4k
    if constexpr (!is_fake_shared) {
560
56.4k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
56.4k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
4.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
52.1k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
52.1k
        }
584
56.4k
    }
585
586
56.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
56.4k
    _rows_returned_counter =
591
56.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
56.4k
    _blocks_returned_counter =
593
56.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
56.4k
    _output_block_bytes_counter =
595
56.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
56.4k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
56.4k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
56.4k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
56.4k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
56.4k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
56.4k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
56.4k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
56.4k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
56.4k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
56.4k
    _memory_used_counter =
606
56.4k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
56.4k
    _common_profile->add_info_string("IsColocate",
608
56.4k
                                     std::to_string(_parent->is_colocated_operator()));
609
56.4k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
56.4k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
56.4k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
56.4k
    return Status::OK();
613
56.4k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
26
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
26
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
26
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
26
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
26
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
26
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
26
    _operator_profile->add_child(_common_profile.get(), true);
557
26
    _operator_profile->add_child(_custom_profile.get(), true);
558
26
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
26
    if constexpr (!is_fake_shared) {
560
26
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
26
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
26
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
26
            _dependency = _shared_state->create_source_dependency(
576
26
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
26
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
26
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
26
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
26
    }
585
586
26
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
26
    _rows_returned_counter =
591
26
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
26
    _blocks_returned_counter =
593
26
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
26
    _output_block_bytes_counter =
595
26
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
26
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
26
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
26
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
26
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
26
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
26
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
26
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
26
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
26
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
26
    _memory_used_counter =
606
26
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
26
    _common_profile->add_info_string("IsColocate",
608
26
                                     std::to_string(_parent->is_colocated_operator()));
609
26
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
26
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
26
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
26
    return Status::OK();
613
26
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
5.97k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
5.97k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
5.97k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
5.97k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
5.97k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
5.97k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
5.97k
    _operator_profile->add_child(_common_profile.get(), true);
557
5.97k
    _operator_profile->add_child(_custom_profile.get(), true);
558
5.97k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
5.97k
    if constexpr (!is_fake_shared) {
560
5.97k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
5.97k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
5.93k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
5.93k
            _dependency = _shared_state->create_source_dependency(
576
5.93k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
5.93k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
5.93k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
5.93k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
44
        }
584
5.97k
    }
585
586
5.97k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
5.97k
    _rows_returned_counter =
591
5.97k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
5.97k
    _blocks_returned_counter =
593
5.97k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
5.97k
    _output_block_bytes_counter =
595
5.97k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
5.97k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
5.97k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
5.97k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
5.97k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
5.97k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
5.97k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
5.97k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
5.97k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
5.97k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
5.97k
    _memory_used_counter =
606
5.97k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
5.97k
    _common_profile->add_info_string("IsColocate",
608
5.97k
                                     std::to_string(_parent->is_colocated_operator()));
609
5.97k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
5.97k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
5.97k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
5.97k
    return Status::OK();
613
5.97k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
450
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
450
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
450
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
450
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
450
    _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
450
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
450
    _operator_profile->add_child(_common_profile.get(), true);
557
450
    _operator_profile->add_child(_custom_profile.get(), true);
558
450
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
450
    if constexpr (!is_fake_shared) {
560
450
        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
450
        } 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
450
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
450
            _dependency = _shared_state->create_source_dependency(
576
450
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
450
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
450
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
450
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
450
    }
585
586
450
    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
450
    _rows_returned_counter =
591
450
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
450
    _blocks_returned_counter =
593
450
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
450
    _output_block_bytes_counter =
595
450
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
450
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
450
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
450
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
450
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
450
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
450
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
450
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
450
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
450
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
450
    _memory_used_counter =
606
450
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
450
    _common_profile->add_info_string("IsColocate",
608
450
                                     std::to_string(_parent->is_colocated_operator()));
609
450
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
450
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
450
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
450
    return Status::OK();
613
450
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
1.10k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
1.10k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
1.10k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
1.10k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
1.10k
    _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.10k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
1.10k
    _operator_profile->add_child(_common_profile.get(), true);
557
1.10k
    _operator_profile->add_child(_custom_profile.get(), true);
558
1.10k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
1.10k
    if constexpr (!is_fake_shared) {
560
1.10k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
1.10k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
1.10k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
1.10k
            _dependency = _shared_state->create_source_dependency(
576
1.10k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
1.10k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
1.10k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
1.10k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
4
        }
584
1.10k
    }
585
586
1.10k
    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.10k
    _rows_returned_counter =
591
1.10k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
1.10k
    _blocks_returned_counter =
593
1.10k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
1.10k
    _output_block_bytes_counter =
595
1.10k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
1.10k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
1.10k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
1.10k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
1.10k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
1.10k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
1.10k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
1.10k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
1.10k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
1.10k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
1.10k
    _memory_used_counter =
606
1.10k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
1.10k
    _common_profile->add_info_string("IsColocate",
608
1.10k
                                     std::to_string(_parent->is_colocated_operator()));
609
1.10k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
1.10k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
1.10k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
1.10k
    return Status::OK();
613
1.10k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
406k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
406k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
406k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
406k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
406k
    _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
406k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
406k
    _operator_profile->add_child(_common_profile.get(), true);
557
406k
    _operator_profile->add_child(_custom_profile.get(), true);
558
406k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
406k
    if constexpr (!is_fake_shared) {
560
406k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
394k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
394k
                                    .first.get()
563
394k
                                    ->template cast<SharedStateArg>();
564
565
394k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
394k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
394k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
394k
        } 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
12.1k
        } else {
580
12.1k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
12.1k
                DCHECK(false);
582
12.1k
            }
583
12.1k
        }
584
406k
    }
585
586
406k
    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
406k
    _rows_returned_counter =
591
406k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
406k
    _blocks_returned_counter =
593
406k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
406k
    _output_block_bytes_counter =
595
406k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
406k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
406k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
406k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
406k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
406k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
406k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
406k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
406k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
406k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
406k
    _memory_used_counter =
606
406k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
406k
    _common_profile->add_info_string("IsColocate",
608
406k
                                     std::to_string(_parent->is_colocated_operator()));
609
406k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
406k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
406k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
406k
    return Status::OK();
613
406k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
171
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
171
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
171
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
171
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
171
    _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
171
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
171
    _operator_profile->add_child(_common_profile.get(), true);
557
171
    _operator_profile->add_child(_custom_profile.get(), true);
558
171
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
171
    if constexpr (!is_fake_shared) {
560
171
        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
171
        } 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
171
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
171
            _dependency = _shared_state->create_source_dependency(
576
171
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
171
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
171
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
171
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
171
    }
585
586
171
    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
171
    _rows_returned_counter =
591
171
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
171
    _blocks_returned_counter =
593
171
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
171
    _output_block_bytes_counter =
595
171
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
171
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
171
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
171
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
171
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
171
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
171
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
171
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
171
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
171
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
171
    _memory_used_counter =
606
171
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
171
    _common_profile->add_info_string("IsColocate",
608
171
                                     std::to_string(_parent->is_colocated_operator()));
609
171
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
171
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
171
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
171
    return Status::OK();
613
171
}
614
615
template <typename SharedStateArg>
616
1.32M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
1.32M
    _conjuncts.resize(_parent->_conjuncts.size());
618
1.62M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
296k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
296k
    }
621
1.32M
    if (_parent->has_projection()) {
622
347k
        const auto& projection = *_parent->_projection;
623
347k
        _projections.resize(projection.projections.size());
624
2.28M
        for (size_t i = 0; i < _projections.size(); i++) {
625
1.93M
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
1.93M
        }
627
347k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
371k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
23.8k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
423k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
400k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
400k
                        state, _intermediate_projections[i][j]));
633
400k
            }
634
23.8k
        }
635
347k
    }
636
1.32M
    return Status::OK();
637
1.32M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
68.1k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
68.1k
    _conjuncts.resize(_parent->_conjuncts.size());
618
69.7k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
1.63k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1.63k
    }
621
68.1k
    if (_parent->has_projection()) {
622
68.1k
        const auto& projection = *_parent->_projection;
623
68.1k
        _projections.resize(projection.projections.size());
624
336k
        for (size_t i = 0; i < _projections.size(); i++) {
625
268k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
268k
        }
627
68.1k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
79.4k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
11.3k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
348k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
336k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
336k
                        state, _intermediate_projections[i][j]));
633
336k
            }
634
11.3k
        }
635
68.1k
    }
636
68.1k
    return Status::OK();
637
68.1k
}
_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
258k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
258k
    _conjuncts.resize(_parent->_conjuncts.size());
618
258k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
258k
    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
258k
    return Status::OK();
637
258k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
148
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
148
    _conjuncts.resize(_parent->_conjuncts.size());
618
148
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
148
    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
148
    return Status::OK();
637
148
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
5.59k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
5.59k
    _conjuncts.resize(_parent->_conjuncts.size());
618
5.67k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
82
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
82
    }
621
5.59k
    if (_parent->has_projection()) {
622
5.59k
        const auto& projection = *_parent->_projection;
623
5.59k
        _projections.resize(projection.projections.size());
624
20.6k
        for (size_t i = 0; i < _projections.size(); i++) {
625
15.0k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
15.0k
        }
627
5.59k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
5.62k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
24
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
207
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
183
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
183
                        state, _intermediate_projections[i][j]));
633
183
            }
634
24
        }
635
5.59k
    }
636
5.59k
    return Status::OK();
637
5.59k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
9.68k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
9.68k
    _conjuncts.resize(_parent->_conjuncts.size());
618
10.5k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
841
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
841
    }
621
9.68k
    if (_parent->has_projection()) {
622
5.17k
        const auto& projection = *_parent->_projection;
623
5.17k
        _projections.resize(projection.projections.size());
624
21.2k
        for (size_t i = 0; i < _projections.size(); i++) {
625
16.0k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
16.0k
        }
627
5.17k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
5.26k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
86
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
654
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
568
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
568
                        state, _intermediate_projections[i][j]));
633
568
            }
634
86
        }
635
5.17k
    }
636
9.68k
    return Status::OK();
637
9.68k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
103k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
103k
    _conjuncts.resize(_parent->_conjuncts.size());
618
105k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
1.96k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1.96k
    }
621
103k
    if (_parent->has_projection()) {
622
34.0k
        const auto& projection = *_parent->_projection;
623
34.0k
        _projections.resize(projection.projections.size());
624
299k
        for (size_t i = 0; i < _projections.size(); i++) {
625
265k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
265k
        }
627
34.0k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
34.8k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
761
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
4.82k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
4.06k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
4.06k
                        state, _intermediate_projections[i][j]));
633
4.06k
            }
634
761
        }
635
34.0k
    }
636
103k
    return Status::OK();
637
103k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
1.76k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
1.76k
    _conjuncts.resize(_parent->_conjuncts.size());
618
1.79k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
37
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
37
    }
621
1.76k
    if (_parent->has_projection()) {
622
322
        const auto& projection = *_parent->_projection;
623
322
        _projections.resize(projection.projections.size());
624
1.37k
        for (size_t i = 0; i < _projections.size(); i++) {
625
1.05k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
1.05k
        }
627
322
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
324
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
2
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
11
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
9
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
9
                        state, _intermediate_projections[i][j]));
633
9
            }
634
2
        }
635
322
    }
636
1.76k
    return Status::OK();
637
1.76k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
112
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
112
    _conjuncts.resize(_parent->_conjuncts.size());
618
112
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
112
    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
112
    return Status::OK();
637
112
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
405k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
405k
    _conjuncts.resize(_parent->_conjuncts.size());
618
697k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
291k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
291k
    }
621
405k
    if (_parent->has_projection()) {
622
221k
        const auto& projection = *_parent->_projection;
623
221k
        _projections.resize(projection.projections.size());
624
1.48M
        for (size_t i = 0; i < _projections.size(); i++) {
625
1.26M
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
1.26M
        }
627
221k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
233k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
11.4k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
66.1k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
54.7k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
54.7k
                        state, _intermediate_projections[i][j]));
633
54.7k
            }
634
11.4k
        }
635
221k
    }
636
405k
    return Status::OK();
637
405k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
56.6k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
56.6k
    _conjuncts.resize(_parent->_conjuncts.size());
618
56.6k
    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.6k
    if (_parent->has_projection()) {
622
12.3k
        const auto& projection = *_parent->_projection;
623
12.3k
        _projections.resize(projection.projections.size());
624
117k
        for (size_t i = 0; i < _projections.size(); i++) {
625
105k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
105k
        }
627
12.3k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
12.5k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
204
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
3.83k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
3.63k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
3.63k
                        state, _intermediate_projections[i][j]));
633
3.63k
            }
634
204
        }
635
12.3k
    }
636
56.6k
    return Status::OK();
637
56.6k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
25
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
25
    _conjuncts.resize(_parent->_conjuncts.size());
618
25
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
25
    if (_parent->has_projection()) {
622
0
        const auto& projection = *_parent->_projection;
623
0
        _projections.resize(projection.projections.size());
624
0
        for (size_t i = 0; i < _projections.size(); i++) {
625
0
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
0
        }
627
0
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
0
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
0
    }
636
25
    return Status::OK();
637
25
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
5.97k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
5.97k
    _conjuncts.resize(_parent->_conjuncts.size());
618
6.45k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
480
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
480
    }
621
5.97k
    if (_parent->has_projection()) {
622
0
        const auto& projection = *_parent->_projection;
623
0
        _projections.resize(projection.projections.size());
624
0
        for (size_t i = 0; i < _projections.size(); i++) {
625
0
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
0
        }
627
0
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
0
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
0
    }
636
5.97k
    return Status::OK();
637
5.97k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
450
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
450
    _conjuncts.resize(_parent->_conjuncts.size());
618
450
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
450
    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
450
    return Status::OK();
637
450
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
1.10k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
1.10k
    _conjuncts.resize(_parent->_conjuncts.size());
618
1.10k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
1.10k
    if (_parent->has_projection()) {
622
75
        const auto& projection = *_parent->_projection;
623
75
        _projections.resize(projection.projections.size());
624
257
        for (size_t i = 0; i < _projections.size(); i++) {
625
182
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
182
        }
627
75
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
75
        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
75
    }
636
1.10k
    return Status::OK();
637
1.10k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
410k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
410k
    _conjuncts.resize(_parent->_conjuncts.size());
618
410k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
410k
    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
410k
    return Status::OK();
637
410k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4openEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
171
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
171
    _conjuncts.resize(_parent->_conjuncts.size());
618
178
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
7
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
7
    }
621
171
    if (_parent->has_projection()) {
622
168
        const auto& projection = *_parent->_projection;
623
168
        _projections.resize(projection.projections.size());
624
497
        for (size_t i = 0; i < _projections.size(); i++) {
625
329
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
329
        }
627
168
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
171
        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
168
    }
636
171
    return Status::OK();
637
171
}
638
639
template <typename SharedStateArg>
640
8.34k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
8.34k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
8.34k
    _terminated = true;
645
8.34k
    return Status::OK();
646
8.34k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
437
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
437
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
437
    _terminated = true;
645
437
    return Status::OK();
646
437
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
27
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
27
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
27
    _terminated = true;
645
27
    return Status::OK();
646
27
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
74
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
74
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
74
    _terminated = true;
645
74
    return Status::OK();
646
74
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
2
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
2
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
2
    _terminated = true;
645
2
    return Status::OK();
646
2
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
76
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
76
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
76
    _terminated = true;
645
76
    return Status::OK();
646
76
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
1
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
1
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
1
    _terminated = true;
645
1
    return Status::OK();
646
1
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
6.82k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
6.82k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
6.82k
    _terminated = true;
645
6.82k
    return Status::OK();
646
6.82k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
61
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
61
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
61
    _terminated = true;
645
61
    return Status::OK();
646
61
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
10
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
10
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
10
    _terminated = true;
645
10
    return Status::OK();
646
10
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
797
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
797
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
797
    _terminated = true;
645
797
    return Status::OK();
646
797
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
42
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
42
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
42
    _terminated = true;
645
42
    return Status::OK();
646
42
}
647
648
template <typename SharedStateArg>
649
1.60M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
1.60M
    if (_closed) {
651
275k
        return Status::OK();
652
275k
    }
653
1.32M
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
917k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
917k
    }
656
1.32M
    _closed = true;
657
1.32M
    return Status::OK();
658
1.60M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
68.0k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
68.0k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
68.0k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
68.0k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
68.0k
    }
656
68.0k
    _closed = true;
657
68.0k
    return Status::OK();
658
68.0k
}
_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
510k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
510k
    if (_closed) {
651
256k
        return Status::OK();
652
256k
    }
653
253k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
253k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
253k
    }
656
253k
    _closed = true;
657
253k
    return Status::OK();
658
510k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
154
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
154
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
154
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
154
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
154
    }
656
154
    _closed = true;
657
154
    return Status::OK();
658
154
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
5.59k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
5.59k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
5.59k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
5.59k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
5.59k
    }
656
5.59k
    _closed = true;
657
5.59k
    return Status::OK();
658
5.59k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
9.62k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
9.62k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
9.62k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
9.62k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
9.62k
    }
656
9.62k
    _closed = true;
657
9.62k
    return Status::OK();
658
9.62k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
103k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
103k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
103k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
103k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
103k
    }
656
103k
    _closed = true;
657
103k
    return Status::OK();
658
103k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
1.75k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
1.75k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
1.75k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
1.75k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
1.75k
    }
656
1.75k
    _closed = true;
657
1.75k
    return Status::OK();
658
1.75k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
107
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
107
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
107
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
107
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
107
    }
656
107
    _closed = true;
657
107
    return Status::OK();
658
107
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
423k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
423k
    if (_closed) {
651
16.9k
        return Status::OK();
652
16.9k
    }
653
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
    }
656
406k
    _closed = true;
657
406k
    return Status::OK();
658
423k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
56.6k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
56.6k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
56.6k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
56.6k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
56.6k
    }
656
56.6k
    _closed = true;
657
56.6k
    return Status::OK();
658
56.6k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
28
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
28
    if (_closed) {
651
14
        return Status::OK();
652
14
    }
653
14
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
14
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
14
    }
656
14
    _closed = true;
657
14
    return Status::OK();
658
28
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
5.95k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
5.95k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
5.95k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
5.95k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
5.95k
    }
656
5.95k
    _closed = true;
657
5.95k
    return Status::OK();
658
5.95k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
690
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
690
    if (_closed) {
651
346
        return Status::OK();
652
346
    }
653
344
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
344
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
344
    }
656
344
    _closed = true;
657
344
    return Status::OK();
658
690
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
2.72k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
2.72k
    if (_closed) {
651
1.62k
        return Status::OK();
652
1.62k
    }
653
1.09k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
1.09k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
1.09k
    }
656
1.09k
    _closed = true;
657
1.09k
    return Status::OK();
658
2.72k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
411k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
411k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
411k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
411k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
411k
    }
656
411k
    _closed = true;
657
411k
    return Status::OK();
658
411k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
339
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
339
    if (_closed) {
651
177
        return Status::OK();
652
177
    }
653
162
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
162
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
162
    }
656
162
    _closed = true;
657
162
    return Status::OK();
658
339
}
659
660
template <typename SharedState>
661
1.27M
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
1.27M
    _operator_profile =
664
1.27M
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
1.27M
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
1.27M
    _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.27M
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
1.27M
    _operator_profile->add_child(_common_profile, true);
673
1.27M
    _operator_profile->add_child(_custom_profile, true);
674
675
1.27M
    _operator_profile->set_metadata(_parent->node_id());
676
1.27M
    _wait_for_finish_dependency_timer =
677
1.27M
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
1.27M
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
1.27M
    if constexpr (!is_fake_shared) {
680
877k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
877k
            info.shared_state_map.end()) {
682
161k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
144k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
144k
            }
685
161k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
161k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
161k
                                                  ? 0
688
161k
                                                  : info.task_idx]
689
161k
                                  .get();
690
161k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
716k
        } else {
692
716k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
485
                DCHECK(false);
694
485
            }
695
716k
            _shared_state = info.shared_state->template cast<SharedState>();
696
716k
            _dependency = _shared_state->create_sink_dependency(
697
716k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
716k
        }
699
877k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
877k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
877k
    }
702
703
1.27M
    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.27M
    _rows_input_counter =
708
1.27M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
1.27M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
1.27M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
1.27M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
1.27M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
1.27M
    _memory_used_counter =
714
1.27M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
1.27M
    _common_profile->add_info_string("IsColocate",
716
1.27M
                                     std::to_string(_parent->is_colocated_operator()));
717
1.27M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
1.27M
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
1.27M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
1.27M
    return Status::OK();
721
1.27M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
115k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
115k
    _operator_profile =
664
115k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
115k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
115k
    _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
115k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
115k
    _operator_profile->add_child(_common_profile, true);
673
115k
    _operator_profile->add_child(_custom_profile, true);
674
675
115k
    _operator_profile->set_metadata(_parent->node_id());
676
115k
    _wait_for_finish_dependency_timer =
677
115k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
115k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
115k
    if constexpr (!is_fake_shared) {
680
115k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
115k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
14.4k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
14.4k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
14.4k
                                                  ? 0
688
14.4k
                                                  : info.task_idx]
689
14.4k
                                  .get();
690
14.4k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
101k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
101k
            _shared_state = info.shared_state->template cast<SharedState>();
696
101k
            _dependency = _shared_state->create_sink_dependency(
697
101k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
101k
        }
699
115k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
115k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
115k
    }
702
703
115k
    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
115k
    _rows_input_counter =
708
115k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
115k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
115k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
115k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
115k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
115k
    _memory_used_counter =
714
115k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
115k
    _common_profile->add_info_string("IsColocate",
716
115k
                                     std::to_string(_parent->is_colocated_operator()));
717
115k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
115k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
115k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
115k
    return Status::OK();
721
115k
}
_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
257k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
257k
    _operator_profile =
664
257k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
257k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
257k
    _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
257k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
257k
    _operator_profile->add_child(_common_profile, true);
673
257k
    _operator_profile->add_child(_custom_profile, true);
674
675
257k
    _operator_profile->set_metadata(_parent->node_id());
676
257k
    _wait_for_finish_dependency_timer =
677
257k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
257k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
257k
    if constexpr (!is_fake_shared) {
680
257k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
257k
            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
257k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
257k
            _shared_state = info.shared_state->template cast<SharedState>();
696
257k
            _dependency = _shared_state->create_sink_dependency(
697
257k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
257k
        }
699
257k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
257k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
257k
    }
702
703
257k
    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
257k
    _rows_input_counter =
708
257k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
257k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
257k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
257k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
257k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
257k
    _memory_used_counter =
714
257k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
257k
    _common_profile->add_info_string("IsColocate",
716
257k
                                     std::to_string(_parent->is_colocated_operator()));
717
257k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
257k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
257k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
257k
    return Status::OK();
721
257k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
161
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
161
    _operator_profile =
664
161
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
161
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
161
    _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
161
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
161
    _operator_profile->add_child(_common_profile, true);
673
161
    _operator_profile->add_child(_custom_profile, true);
674
675
161
    _operator_profile->set_metadata(_parent->node_id());
676
161
    _wait_for_finish_dependency_timer =
677
161
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
161
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
161
    if constexpr (!is_fake_shared) {
680
161
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
161
            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
161
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
161
            _shared_state = info.shared_state->template cast<SharedState>();
696
161
            _dependency = _shared_state->create_sink_dependency(
697
161
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
161
        }
699
161
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
161
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
161
    }
702
703
161
    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
161
    _rows_input_counter =
708
161
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
161
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
161
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
161
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
161
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
161
    _memory_used_counter =
714
161
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
161
    _common_profile->add_info_string("IsColocate",
716
161
                                     std::to_string(_parent->is_colocated_operator()));
717
161
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
161
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
161
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
161
    return Status::OK();
721
161
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
5.59k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
5.59k
    _operator_profile =
664
5.59k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
5.59k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
5.59k
    _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.59k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
5.59k
    _operator_profile->add_child(_common_profile, true);
673
5.59k
    _operator_profile->add_child(_custom_profile, true);
674
675
5.59k
    _operator_profile->set_metadata(_parent->node_id());
676
5.59k
    _wait_for_finish_dependency_timer =
677
5.59k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
5.59k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
5.59k
    if constexpr (!is_fake_shared) {
680
5.59k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
5.59k
            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.59k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
5.59k
            _shared_state = info.shared_state->template cast<SharedState>();
696
5.59k
            _dependency = _shared_state->create_sink_dependency(
697
5.59k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
5.59k
        }
699
5.59k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
5.59k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
5.59k
    }
702
703
5.59k
    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.59k
    _rows_input_counter =
708
5.59k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
5.59k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
5.59k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
5.59k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
5.59k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
5.59k
    _memory_used_counter =
714
5.59k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
5.59k
    _common_profile->add_info_string("IsColocate",
716
5.59k
                                     std::to_string(_parent->is_colocated_operator()));
717
5.59k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
5.59k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
5.59k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
5.59k
    return Status::OK();
721
5.59k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
9.63k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
9.63k
    _operator_profile =
664
9.63k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
9.63k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
9.63k
    _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.63k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
9.63k
    _operator_profile->add_child(_common_profile, true);
673
9.63k
    _operator_profile->add_child(_custom_profile, true);
674
675
9.63k
    _operator_profile->set_metadata(_parent->node_id());
676
9.63k
    _wait_for_finish_dependency_timer =
677
9.63k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
9.63k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
9.63k
    if constexpr (!is_fake_shared) {
680
9.63k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
9.63k
            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.63k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
9.63k
            _shared_state = info.shared_state->template cast<SharedState>();
696
9.63k
            _dependency = _shared_state->create_sink_dependency(
697
9.63k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
9.63k
        }
699
9.63k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
9.63k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
9.63k
    }
702
703
9.63k
    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.63k
    _rows_input_counter =
708
9.63k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
9.63k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
9.63k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
9.63k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
9.63k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
9.63k
    _memory_used_counter =
714
9.63k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
9.63k
    _common_profile->add_info_string("IsColocate",
716
9.63k
                                     std::to_string(_parent->is_colocated_operator()));
717
9.63k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
9.63k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
9.63k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
9.63k
    return Status::OK();
721
9.63k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
103k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
103k
    _operator_profile =
664
103k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
103k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
103k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
103k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
103k
    _operator_profile->add_child(_common_profile, true);
673
103k
    _operator_profile->add_child(_custom_profile, true);
674
675
103k
    _operator_profile->set_metadata(_parent->node_id());
676
103k
    _wait_for_finish_dependency_timer =
677
103k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
103k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
103k
    if constexpr (!is_fake_shared) {
680
103k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
103k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
103k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
103k
            _shared_state = info.shared_state->template cast<SharedState>();
696
103k
            _dependency = _shared_state->create_sink_dependency(
697
103k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
103k
        }
699
103k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
103k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
103k
    }
702
703
103k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
103k
    _rows_input_counter =
708
103k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
103k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
103k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
103k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
103k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
103k
    _memory_used_counter =
714
103k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
103k
    _common_profile->add_info_string("IsColocate",
716
103k
                                     std::to_string(_parent->is_colocated_operator()));
717
103k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
103k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
103k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
103k
    return Status::OK();
721
103k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
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.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
1.76k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
1.76k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
1.76k
                                                  ? 0
688
1.76k
                                                  : info.task_idx]
689
1.76k
                                  .get();
690
1.76k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
18.4E
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
18.4E
            _shared_state = info.shared_state->template cast<SharedState>();
696
18.4E
            _dependency = _shared_state->create_sink_dependency(
697
18.4E
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
18.4E
        }
699
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_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
117
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
117
    _operator_profile =
664
117
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
117
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
117
    _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
117
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
117
    _operator_profile->add_child(_common_profile, true);
673
117
    _operator_profile->add_child(_custom_profile, true);
674
675
117
    _operator_profile->set_metadata(_parent->node_id());
676
117
    _wait_for_finish_dependency_timer =
677
117
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
117
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
117
    if constexpr (!is_fake_shared) {
680
117
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
117
            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
117
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
117
            _shared_state = info.shared_state->template cast<SharedState>();
696
117
            _dependency = _shared_state->create_sink_dependency(
697
117
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
117
        }
699
117
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
117
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
117
    }
702
703
117
    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
117
    _rows_input_counter =
708
117
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
117
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
117
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
117
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
117
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
117
    _memory_used_counter =
714
117
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
117
    _common_profile->add_info_string("IsColocate",
716
117
                                     std::to_string(_parent->is_colocated_operator()));
717
117
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
117
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
117
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
117
    return Status::OK();
721
117
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
401k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
401k
    _operator_profile =
664
401k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
401k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
401k
    _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
401k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
401k
    _operator_profile->add_child(_common_profile, true);
673
401k
    _operator_profile->add_child(_custom_profile, true);
674
675
401k
    _operator_profile->set_metadata(_parent->node_id());
676
401k
    _wait_for_finish_dependency_timer =
677
401k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
401k
    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
401k
    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
401k
    _rows_input_counter =
708
401k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
401k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
401k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
401k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
401k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
401k
    _memory_used_counter =
714
401k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
401k
    _common_profile->add_info_string("IsColocate",
716
401k
                                     std::to_string(_parent->is_colocated_operator()));
717
401k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
401k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
401k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
401k
    return Status::OK();
721
401k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
10.0k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
10.0k
    _operator_profile =
664
10.0k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
10.0k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
10.0k
    _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.0k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
10.0k
    _operator_profile->add_child(_common_profile, true);
673
10.0k
    _operator_profile->add_child(_custom_profile, true);
674
675
10.0k
    _operator_profile->set_metadata(_parent->node_id());
676
10.0k
    _wait_for_finish_dependency_timer =
677
10.0k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
10.0k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
10.0k
    if constexpr (!is_fake_shared) {
680
10.0k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
10.0k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
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.0k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
10.0k
            _shared_state = info.shared_state->template cast<SharedState>();
696
10.0k
            _dependency = _shared_state->create_sink_dependency(
697
10.0k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
10.0k
        }
699
10.0k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
10.0k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
10.0k
    }
702
703
10.0k
    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.0k
    _rows_input_counter =
708
10.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
10.0k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
10.0k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
10.0k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
10.0k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
10.0k
    _memory_used_counter =
714
10.0k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
10.0k
    _common_profile->add_info_string("IsColocate",
716
10.0k
                                     std::to_string(_parent->is_colocated_operator()));
717
10.0k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
10.0k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
10.0k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
10.0k
    return Status::OK();
721
10.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
450
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
450
    _operator_profile =
664
450
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
450
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
450
    _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
450
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
450
    _operator_profile->add_child(_common_profile, true);
673
450
    _operator_profile->add_child(_custom_profile, true);
674
675
450
    _operator_profile->set_metadata(_parent->node_id());
676
450
    _wait_for_finish_dependency_timer =
677
450
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
450
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
450
    if constexpr (!is_fake_shared) {
680
450
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
450
            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
450
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
450
            _shared_state = info.shared_state->template cast<SharedState>();
696
450
            _dependency = _shared_state->create_sink_dependency(
697
450
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
450
        }
699
450
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
450
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
450
    }
702
703
450
    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
450
    _rows_input_counter =
708
450
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
450
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
450
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
450
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
450
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
450
    _memory_used_counter =
714
450
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
450
    _common_profile->add_info_string("IsColocate",
716
450
                                     std::to_string(_parent->is_colocated_operator()));
717
450
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
450
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
450
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
450
    return Status::OK();
721
450
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
2.39k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
2.39k
    _operator_profile =
664
2.39k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
2.39k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
2.39k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
2.39k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
2.39k
    _operator_profile->add_child(_common_profile, true);
673
2.39k
    _operator_profile->add_child(_custom_profile, true);
674
675
2.39k
    _operator_profile->set_metadata(_parent->node_id());
676
2.39k
    _wait_for_finish_dependency_timer =
677
2.39k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
2.39k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
2.39k
    if constexpr (!is_fake_shared) {
680
2.39k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
2.39k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
2.39k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
2.39k
            _shared_state = info.shared_state->template cast<SharedState>();
696
2.39k
            _dependency = _shared_state->create_sink_dependency(
697
2.39k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
2.39k
        }
699
2.39k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
2.39k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
2.39k
    }
702
703
2.39k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
2.39k
    _rows_input_counter =
708
2.39k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
2.39k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
2.39k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
2.39k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
2.39k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
2.39k
    _memory_used_counter =
714
2.39k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
2.39k
    _common_profile->add_info_string("IsColocate",
716
2.39k
                                     std::to_string(_parent->is_colocated_operator()));
717
2.39k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
2.39k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
2.39k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
2.39k
    return Status::OK();
721
2.39k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
2.36k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
2.36k
    _operator_profile =
664
2.36k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
2.36k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
2.36k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
2.36k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
2.36k
    _operator_profile->add_child(_common_profile, true);
673
2.36k
    _operator_profile->add_child(_custom_profile, true);
674
675
2.36k
    _operator_profile->set_metadata(_parent->node_id());
676
2.36k
    _wait_for_finish_dependency_timer =
677
2.36k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
2.36k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
2.36k
    if constexpr (!is_fake_shared) {
680
2.36k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
2.36k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
2.36k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
2.36k
            _shared_state = info.shared_state->template cast<SharedState>();
696
2.36k
            _dependency = _shared_state->create_sink_dependency(
697
2.36k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
2.36k
        }
699
2.36k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
2.36k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
2.36k
    }
702
703
2.36k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
2.36k
    _rows_input_counter =
708
2.36k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
2.36k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
2.36k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
2.36k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
2.36k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
2.36k
    _memory_used_counter =
714
2.36k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
2.36k
    _common_profile->add_info_string("IsColocate",
716
2.36k
                                     std::to_string(_parent->is_colocated_operator()));
717
2.36k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
2.36k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
2.36k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
2.36k
    return Status::OK();
721
2.36k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
145k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
145k
    _operator_profile =
664
145k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
145k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
145k
    _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
145k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
145k
    _operator_profile->add_child(_common_profile, true);
673
145k
    _operator_profile->add_child(_custom_profile, true);
674
675
145k
    _operator_profile->set_metadata(_parent->node_id());
676
145k
    _wait_for_finish_dependency_timer =
677
145k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
145k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
145k
    if constexpr (!is_fake_shared) {
680
145k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
145k
            info.shared_state_map.end()) {
682
144k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
144k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
144k
            }
685
144k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
144k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
144k
                                                  ? 0
688
144k
                                                  : info.task_idx]
689
144k
                                  .get();
690
144k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
144k
        } else {
692
485
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
485
                DCHECK(false);
694
485
            }
695
485
            _shared_state = info.shared_state->template cast<SharedState>();
696
485
            _dependency = _shared_state->create_sink_dependency(
697
485
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
485
        }
699
145k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
145k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
145k
    }
702
703
145k
    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
145k
    _rows_input_counter =
708
145k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
145k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
145k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
145k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
145k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
145k
    _memory_used_counter =
714
145k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
145k
    _common_profile->add_info_string("IsColocate",
716
145k
                                     std::to_string(_parent->is_colocated_operator()));
717
145k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
145k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
145k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
145k
    return Status::OK();
721
145k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
222k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
222k
    _operator_profile =
664
222k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
222k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
222k
    _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
222k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
222k
    _operator_profile->add_child(_common_profile, true);
673
222k
    _operator_profile->add_child(_custom_profile, true);
674
675
222k
    _operator_profile->set_metadata(_parent->node_id());
676
222k
    _wait_for_finish_dependency_timer =
677
222k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
222k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
222k
    if constexpr (!is_fake_shared) {
680
222k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
222k
            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
222k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
222k
            _shared_state = info.shared_state->template cast<SharedState>();
696
222k
            _dependency = _shared_state->create_sink_dependency(
697
222k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
222k
        }
699
222k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
222k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
222k
    }
702
703
222k
    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
222k
    _rows_input_counter =
708
222k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
222k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
222k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
222k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
222k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
222k
    _memory_used_counter =
714
222k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
222k
    _common_profile->add_info_string("IsColocate",
716
222k
                                     std::to_string(_parent->is_colocated_operator()));
717
222k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
222k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
222k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
222k
    return Status::OK();
721
222k
}
_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
342
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
342
    _operator_profile =
664
342
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
342
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
342
    _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
342
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
342
    _operator_profile->add_child(_common_profile, true);
673
342
    _operator_profile->add_child(_custom_profile, true);
674
675
342
    _operator_profile->set_metadata(_parent->node_id());
676
342
    _wait_for_finish_dependency_timer =
677
342
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
342
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
342
    if constexpr (!is_fake_shared) {
680
342
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
342
            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
342
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
342
            _shared_state = info.shared_state->template cast<SharedState>();
696
342
            _dependency = _shared_state->create_sink_dependency(
697
342
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
342
        }
699
342
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
342
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
342
    }
702
703
342
    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
342
    _rows_input_counter =
708
342
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
342
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
342
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
342
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
342
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
342
    _memory_used_counter =
714
342
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
342
    _common_profile->add_info_string("IsColocate",
716
342
                                     std::to_string(_parent->is_colocated_operator()));
717
342
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
342
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
342
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
342
    return Status::OK();
721
342
}
722
723
template <typename SharedState>
724
1.28M
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
1.28M
    if (_closed) {
726
2
        return Status::OK();
727
2
    }
728
1.28M
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
876k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
876k
    }
731
1.28M
    _closed = true;
732
1.28M
    return Status::OK();
733
1.28M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
115k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
115k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
115k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
115k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
115k
    }
731
115k
    _closed = true;
732
115k
    return Status::OK();
733
115k
}
_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
256k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
256k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
256k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
256k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
256k
    }
731
256k
    _closed = true;
732
256k
    return Status::OK();
733
256k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
152
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
152
    if (_closed) {
726
2
        return Status::OK();
727
2
    }
728
150
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
150
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
150
    }
731
150
    _closed = true;
732
150
    return Status::OK();
733
152
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
5.57k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
5.57k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
5.57k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
5.57k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
5.57k
    }
731
5.57k
    _closed = true;
732
5.57k
    return Status::OK();
733
5.57k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
9.61k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
9.61k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
9.61k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
9.61k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
9.61k
    }
731
9.61k
    _closed = true;
732
9.61k
    return Status::OK();
733
9.61k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
103k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
103k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
103k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
103k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
103k
    }
731
103k
    _closed = true;
732
103k
    return Status::OK();
733
103k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
1.75k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
1.75k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
1.75k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
1.75k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
1.75k
    }
731
1.75k
    _closed = true;
732
1.75k
    return Status::OK();
733
1.75k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
107
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
107
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
107
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
107
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
107
    }
731
107
    _closed = true;
732
107
    return Status::OK();
733
107
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
405k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
405k
    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
405k
    _closed = true;
732
405k
    return Status::OK();
733
405k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
10.0k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
10.0k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
10.0k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
10.0k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
10.0k
    }
731
10.0k
    _closed = true;
732
10.0k
    return Status::OK();
733
10.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
345
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
345
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
345
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
345
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
345
    }
731
345
    _closed = true;
732
345
    return Status::OK();
733
345
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
2.43k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
2.43k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
2.43k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
2.43k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
2.43k
    }
731
2.43k
    _closed = true;
732
2.43k
    return Status::OK();
733
2.43k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
2.33k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
2.33k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
2.33k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
2.33k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
2.33k
    }
731
2.33k
    _closed = true;
732
2.33k
    return Status::OK();
733
2.33k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
145k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
145k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
145k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
145k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
145k
    }
731
145k
    _closed = true;
732
145k
    return Status::OK();
733
145k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
221k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
221k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
221k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
221k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
221k
    }
731
221k
    _closed = true;
732
221k
    return Status::OK();
733
221k
}
_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
342
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
342
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
342
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
342
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
342
    }
731
342
    _closed = true;
732
342
    return Status::OK();
733
342
}
734
735
template <typename LocalStateType>
736
Status StreamingOperatorX<LocalStateType>::get_block_impl(RuntimeState* state, Block* block,
737
1.16k
                                                          bool* eos) {
738
1.16k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
1.15k
    return pull(state, block, eos);
740
1.16k
}
_ZN5doris18StreamingOperatorXINS_23AssertNumRowsLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
40
                                                          bool* eos) {
738
40
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
40
    return pull(state, block, eos);
740
40
}
_ZN5doris18StreamingOperatorXINS_16SelectLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
1.12k
                                                          bool* eos) {
738
1.12k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
1.11k
    return pull(state, block, eos);
740
1.12k
}
741
742
template <typename LocalStateType>
743
Status StatefulOperatorX<LocalStateType>::get_block_impl(RuntimeState* state, Block* block,
744
234k
                                                         bool* eos) {
745
234k
    auto& local_state = get_local_state(state);
746
234k
    if (need_more_input_data(state)) {
747
201k
        local_state._child_block->clear_column_data(
748
201k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
201k
                        .num_slots());
750
201k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
201k
                state, local_state._child_block.get(), &local_state._child_eos));
752
201k
        *eos = local_state._child_eos;
753
201k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
46.6k
            return Status::OK();
755
46.6k
        }
756
154k
        {
757
154k
            SCOPED_TIMER(local_state.exec_time_counter());
758
154k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
154k
        }
760
154k
    }
761
762
188k
    if (!need_more_input_data(state)) {
763
170k
        SCOPED_TIMER(local_state.exec_time_counter());
764
170k
        bool new_eos = false;
765
170k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
170k
        if (new_eos) {
767
86.0k
            *eos = true;
768
86.0k
        } else if (!need_more_input_data(state)) {
769
27.1k
            *eos = false;
770
27.1k
        }
771
170k
    }
772
188k
    return Status::OK();
773
188k
}
_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
116k
        local_state._child_block->clear_column_data(
748
116k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
116k
                        .num_slots());
750
116k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
116k
                state, local_state._child_block.get(), &local_state._child_eos));
752
116k
        *eos = local_state._child_eos;
753
116k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
29.1k
            return Status::OK();
755
29.1k
        }
756
87.4k
        {
757
87.4k
            SCOPED_TIMER(local_state.exec_time_counter());
758
87.4k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
87.4k
        }
760
87.4k
    }
761
762
106k
    if (!need_more_input_data(state)) {
763
106k
        SCOPED_TIMER(local_state.exec_time_counter());
764
106k
        bool new_eos = false;
765
106k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
106k
        if (new_eos) {
767
43.5k
            *eos = true;
768
63.2k
        } else if (!need_more_input_data(state)) {
769
12.6k
            *eos = false;
770
12.6k
        }
771
106k
    }
772
106k
    return Status::OK();
773
106k
}
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_34PartitionedHashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
_ZN5doris17StatefulOperatorXINS_16RepeatLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
4.42k
                                                         bool* eos) {
745
4.42k
    auto& local_state = get_local_state(state);
746
4.42k
    if (need_more_input_data(state)) {
747
2.50k
        local_state._child_block->clear_column_data(
748
2.50k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
2.50k
                        .num_slots());
750
2.50k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
2.50k
                state, local_state._child_block.get(), &local_state._child_eos));
752
2.50k
        *eos = local_state._child_eos;
753
2.50k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
640
            return Status::OK();
755
640
        }
756
1.86k
        {
757
1.86k
            SCOPED_TIMER(local_state.exec_time_counter());
758
1.86k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
1.86k
        }
760
1.86k
    }
761
762
3.79k
    if (!need_more_input_data(state)) {
763
3.79k
        SCOPED_TIMER(local_state.exec_time_counter());
764
3.79k
        bool new_eos = false;
765
3.79k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
3.79k
        if (new_eos) {
767
1.16k
            *eos = true;
768
2.63k
        } else if (!need_more_input_data(state)) {
769
1.92k
            *eos = false;
770
1.92k
        }
771
3.79k
    }
772
3.78k
    return Status::OK();
773
3.78k
}
_ZN5doris17StatefulOperatorXINS_25MaterializationLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
1.60k
                                                         bool* eos) {
745
1.60k
    auto& local_state = get_local_state(state);
746
1.60k
    if (need_more_input_data(state)) {
747
1.60k
        local_state._child_block->clear_column_data(
748
1.60k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
1.60k
                        .num_slots());
750
1.60k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
1.60k
                state, local_state._child_block.get(), &local_state._child_eos));
752
1.60k
        *eos = local_state._child_eos;
753
1.60k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
647
            return Status::OK();
755
647
        }
756
955
        {
757
955
            SCOPED_TIMER(local_state.exec_time_counter());
758
955
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
955
        }
760
955
    }
761
762
955
    if (!need_more_input_data(state)) {
763
955
        SCOPED_TIMER(local_state.exec_time_counter());
764
955
        bool new_eos = false;
765
955
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
955
        if (new_eos) {
767
651
            *eos = true;
768
651
        } else if (!need_more_input_data(state)) {
769
0
            *eos = false;
770
0
        }
771
955
    }
772
955
    return Status::OK();
773
955
}
_ZN5doris17StatefulOperatorXINS_22StreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
21.5k
                                                         bool* eos) {
745
21.5k
    auto& local_state = get_local_state(state);
746
21.5k
    if (need_more_input_data(state)) {
747
21.5k
        local_state._child_block->clear_column_data(
748
21.5k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
21.5k
                        .num_slots());
750
21.5k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
21.5k
                state, local_state._child_block.get(), &local_state._child_eos));
752
21.5k
        *eos = local_state._child_eos;
753
21.5k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
5.81k
            return Status::OK();
755
5.81k
        }
756
15.7k
        {
757
15.7k
            SCOPED_TIMER(local_state.exec_time_counter());
758
15.7k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
15.7k
        }
760
15.7k
    }
761
762
15.7k
    if (!need_more_input_data(state)) {
763
7.77k
        SCOPED_TIMER(local_state.exec_time_counter());
764
7.77k
        bool new_eos = false;
765
7.77k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
7.77k
        if (new_eos) {
767
7.59k
            *eos = true;
768
7.59k
        } else if (!need_more_input_data(state)) {
769
5
            *eos = false;
770
5
        }
771
7.77k
    }
772
15.7k
    return Status::OK();
773
15.7k
}
_ZN5doris17StatefulOperatorXINS_30DistinctStreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
39.0k
                                                         bool* eos) {
745
39.0k
    auto& local_state = get_local_state(state);
746
39.1k
    if (need_more_input_data(state)) {
747
39.1k
        local_state._child_block->clear_column_data(
748
39.1k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
39.1k
                        .num_slots());
750
39.1k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
39.1k
                state, local_state._child_block.get(), &local_state._child_eos));
752
39.1k
        *eos = local_state._child_eos;
753
39.1k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
8.74k
            return Status::OK();
755
8.74k
        }
756
30.3k
        {
757
30.3k
            SCOPED_TIMER(local_state.exec_time_counter());
758
30.3k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
30.3k
        }
760
30.3k
    }
761
762
30.3k
    if (!need_more_input_data(state)) {
763
21.6k
        SCOPED_TIMER(local_state.exec_time_counter());
764
21.6k
        bool new_eos = false;
765
21.6k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
21.6k
        if (new_eos) {
767
21.1k
            *eos = true;
768
21.1k
        } else if (!need_more_input_data(state)) {
769
6
            *eos = false;
770
6
        }
771
21.6k
    }
772
30.3k
    return Status::OK();
773
30.3k
}
_ZN5doris17StatefulOperatorXINS_29NestedLoopJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
22.6k
                                                         bool* eos) {
745
22.6k
    auto& local_state = get_local_state(state);
746
22.6k
    if (need_more_input_data(state)) {
747
10.4k
        local_state._child_block->clear_column_data(
748
10.4k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
10.4k
                        .num_slots());
750
10.4k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
10.4k
                state, local_state._child_block.get(), &local_state._child_eos));
752
10.4k
        *eos = local_state._child_eos;
753
10.4k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
1.02k
            return Status::OK();
755
1.02k
        }
756
9.39k
        {
757
9.39k
            SCOPED_TIMER(local_state.exec_time_counter());
758
9.39k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
9.39k
        }
760
9.39k
    }
761
762
21.5k
    if (!need_more_input_data(state)) {
763
20.9k
        SCOPED_TIMER(local_state.exec_time_counter());
764
20.9k
        bool new_eos = false;
765
20.9k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
20.9k
        if (new_eos) {
767
5.56k
            *eos = true;
768
15.3k
        } else if (!need_more_input_data(state)) {
769
12.1k
            *eos = false;
770
12.1k
        }
771
20.9k
    }
772
21.5k
    return Status::OK();
773
21.5k
}
_ZN5doris17StatefulOperatorXINS_23TableFunctionLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
9.61k
                                                         bool* eos) {
745
9.61k
    auto& local_state = get_local_state(state);
746
9.61k
    if (need_more_input_data(state)) {
747
9.27k
        local_state._child_block->clear_column_data(
748
9.27k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
9.27k
                        .num_slots());
750
9.27k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
9.27k
                state, local_state._child_block.get(), &local_state._child_eos));
752
9.27k
        *eos = local_state._child_eos;
753
9.27k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
598
            return Status::OK();
755
598
        }
756
8.67k
        {
757
8.67k
            SCOPED_TIMER(local_state.exec_time_counter());
758
8.67k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
8.67k
        }
760
8.67k
    }
761
762
9.01k
    if (!need_more_input_data(state)) {
763
9.01k
        SCOPED_TIMER(local_state.exec_time_counter());
764
9.01k
        bool new_eos = false;
765
9.01k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
9.01k
        if (new_eos) {
767
6.38k
            *eos = true;
768
6.38k
        } else if (!need_more_input_data(state)) {
769
366
            *eos = false;
770
366
        }
771
9.01k
    }
772
9.00k
    return Status::OK();
773
9.00k
}
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
360
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
360
    RETURN_IF_ERROR(Base::init(state, info));
779
360
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
360
                                                         "AsyncWriterDependency", true);
781
360
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
360
                             _finish_dependency));
783
784
360
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
360
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
360
    return Status::OK();
787
360
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
49.4k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
49.4k
    RETURN_IF_ERROR(Base::init(state, info));
779
49.4k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
49.4k
                                                         "AsyncWriterDependency", true);
781
49.4k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
49.4k
                             _finish_dependency));
783
784
49.4k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
49.4k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
49.4k
    return Status::OK();
787
49.4k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
8
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
8
    RETURN_IF_ERROR(Base::init(state, info));
779
8
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
8
                                                         "AsyncWriterDependency", true);
781
8
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
8
                             _finish_dependency));
783
784
8
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
8
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
8
    return Status::OK();
787
8
}
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.6k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
50.6k
    RETURN_IF_ERROR(Base::open(state));
793
50.6k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
389k
    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
50.6k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
50.6k
    return Status::OK();
800
50.6k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
360
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
360
    RETURN_IF_ERROR(Base::open(state));
793
360
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
1.83k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
1.47k
        RETURN_IF_ERROR(
796
1.47k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
1.47k
    }
798
360
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
360
    return Status::OK();
800
360
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
50.2k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
50.2k
    RETURN_IF_ERROR(Base::open(state));
793
50.2k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
387k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
336k
        RETURN_IF_ERROR(
796
336k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
336k
    }
798
50.2k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
50.2k
    return Status::OK();
800
50.2k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
8
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
8
    RETURN_IF_ERROR(Base::open(state));
793
8
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
144
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
136
        RETURN_IF_ERROR(
796
136
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
136
    }
798
8
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
8
    return Status::OK();
800
8
}
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.70k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
1.70k
    return _writer->sink(block, eos);
806
1.70k
}
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
8
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
8
    return _writer->sink(block, eos);
806
8
}
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.7k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
50.7k
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
50.7k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
50.7k
    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.7k
    if (_writer) {
818
50.7k
        Status st = _writer->get_writer_status();
819
50.7k
        if (exec_status.ok()) {
820
50.6k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
50.6k
                                                       : Status::Cancelled("force close"));
822
50.6k
        } else {
823
127
            _writer->force_close(exec_status);
824
127
        }
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.7k
        RETURN_IF_ERROR(st);
829
50.7k
    }
830
50.6k
    return Base::close(state, exec_status);
831
50.7k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
349
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
349
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
349
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
349
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
816
    // if the init failed, the _writer may be nullptr. so here need check
817
349
    if (_writer) {
818
349
        Status st = _writer->get_writer_status();
819
349
        if (exec_status.ok()) {
820
349
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
349
                                                       : Status::Cancelled("force close"));
822
349
        } else {
823
0
            _writer->force_close(exec_status);
824
0
        }
825
        // If there is an error in process_block thread, then we should get the writer
826
        // status before call force_close. For example, the thread may failed in commit
827
        // transaction.
828
349
        RETURN_IF_ERROR(st);
829
349
    }
830
349
    return Base::close(state, exec_status);
831
349
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
50.3k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
50.3k
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
50.3k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
50.3k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
816
    // if the init failed, the _writer may be nullptr. so here need check
817
50.4k
    if (_writer) {
818
50.4k
        Status st = _writer->get_writer_status();
819
50.4k
        if (exec_status.ok()) {
820
50.2k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
50.2k
                                                       : Status::Cancelled("force close"));
822
50.2k
        } else {
823
127
            _writer->force_close(exec_status);
824
127
        }
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.4k
        RETURN_IF_ERROR(st);
829
50.4k
    }
830
50.3k
    return Base::close(state, exec_status);
831
50.3k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
8
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
8
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
8
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
8
    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
8
    if (_writer) {
818
8
        Status st = _writer->get_writer_status();
819
8
        if (exec_status.ok()) {
820
8
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
8
                                                       : Status::Cancelled("force close"));
822
8
        } 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
8
        RETURN_IF_ERROR(st);
829
8
    }
830
8
    return Base::close(state, exec_status);
831
8
}
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