Coverage Report

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