Coverage Report

Created: 2026-11-05 21:41

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