Coverage Report

Created: 2026-09-27 17:33

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