Coverage Report

Created: 2026-06-24 22:26

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