Coverage Report

Created: 2026-06-01 11:21

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