Coverage Report

Created: 2026-06-09 18:13

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.17M
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
2.17M
    if (_parent->nereids_id() == -1) {
120
1.16M
        return fmt::format("(id={})", _parent->node_id());
121
1.16M
    } else {
122
1.01M
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
1.01M
    }
124
2.17M
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
66.5k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
66.5k
    if (_parent->nereids_id() == -1) {
120
0
        return fmt::format("(id={})", _parent->node_id());
121
66.5k
    } else {
122
66.5k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
66.5k
    }
124
66.5k
}
_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
267k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
267k
    if (_parent->nereids_id() == -1) {
120
12
        return fmt::format("(id={})", _parent->node_id());
121
267k
    } else {
122
267k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
267k
    }
124
267k
}
_ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
20
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
20
    if (_parent->nereids_id() == -1) {
120
0
        return fmt::format("(id={})", _parent->node_id());
121
20
    } else {
122
20
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
20
    }
124
20
}
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
9.20k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
9.20k
    if (_parent->nereids_id() == -1) {
120
0
        return fmt::format("(id={})", _parent->node_id());
121
9.20k
    } else {
122
9.20k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
9.20k
    }
124
9.20k
}
_ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
7.62k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
7.62k
    if (_parent->nereids_id() == -1) {
120
11
        return fmt::format("(id={})", _parent->node_id());
121
7.61k
    } else {
122
7.61k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
7.61k
    }
124
7.62k
}
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
147k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
147k
    if (_parent->nereids_id() == -1) {
120
29
        return fmt::format("(id={})", _parent->node_id());
121
147k
    } else {
122
147k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
147k
    }
124
147k
}
_ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
317
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
317
    if (_parent->nereids_id() == -1) {
120
0
        return fmt::format("(id={})", _parent->node_id());
121
317
    } else {
122
317
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
317
    }
124
317
}
_ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
79
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
79
    if (_parent->nereids_id() == -1) {
120
0
        return fmt::format("(id={})", _parent->node_id());
121
79
    } else {
122
79
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
79
    }
124
79
}
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
830k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
830k
    if (_parent->nereids_id() == -1) {
120
372k
        return fmt::format("(id={})", _parent->node_id());
121
457k
    } else {
122
457k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
457k
    }
124
830k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
55.1k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
55.1k
    if (_parent->nereids_id() == -1) {
120
2
        return fmt::format("(id={})", _parent->node_id());
121
55.1k
    } else {
122
55.1k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
55.1k
    }
124
55.1k
}
_ZNK5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
17
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
17
    if (_parent->nereids_id() == -1) {
120
17
        return fmt::format("(id={})", _parent->node_id());
121
17
    } else {
122
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
0
    }
124
17
}
_ZNK5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
10.6k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
10.6k
    if (_parent->nereids_id() == -1) {
120
10.6k
        return fmt::format("(id={})", _parent->node_id());
121
10.6k
    } else {
122
3
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
3
    }
124
10.6k
}
_ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
324
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
324
    if (_parent->nereids_id() == -1) {
120
102
        return fmt::format("(id={})", _parent->node_id());
121
222
    } else {
122
222
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
222
    }
124
324
}
_ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
4.90k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
4.90k
    if (_parent->nereids_id() == -1) {
120
13
        return fmt::format("(id={})", _parent->node_id());
121
4.89k
    } else {
122
4.89k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
4.89k
    }
124
4.90k
}
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
777k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
777k
    if (_parent->nereids_id() == -1) {
120
776k
        return fmt::format("(id={})", _parent->node_id());
121
776k
    } else {
122
817
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
817
    }
124
777k
}
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.37M
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
1.37M
    if (_parent->nereids_id() == -1) {
129
814k
        return fmt::format("(id={})", _parent->node_id());
130
814k
    } else {
131
555k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
555k
    }
133
1.37M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
114k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
114k
    if (_parent->nereids_id() == -1) {
129
0
        return fmt::format("(id={})", _parent->node_id());
130
114k
    } else {
131
114k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
114k
    }
133
114k
}
_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
268k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
268k
    if (_parent->nereids_id() == -1) {
129
9
        return fmt::format("(id={})", _parent->node_id());
130
268k
    } else {
131
268k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
268k
    }
133
268k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
27
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
27
    if (_parent->nereids_id() == -1) {
129
0
        return fmt::format("(id={})", _parent->node_id());
130
27
    } else {
131
27
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
27
    }
133
27
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
9.23k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
9.23k
    if (_parent->nereids_id() == -1) {
129
0
        return fmt::format("(id={})", _parent->node_id());
130
9.23k
    } else {
131
9.23k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
9.23k
    }
133
9.23k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
7.67k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
7.67k
    if (_parent->nereids_id() == -1) {
129
11
        return fmt::format("(id={})", _parent->node_id());
130
7.66k
    } else {
131
7.66k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
7.66k
    }
133
7.67k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
147k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
147k
    if (_parent->nereids_id() == -1) {
129
29
        return fmt::format("(id={})", _parent->node_id());
130
147k
    } else {
131
147k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
147k
    }
133
147k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
271
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
271
    if (_parent->nereids_id() == -1) {
129
0
        return fmt::format("(id={})", _parent->node_id());
130
271
    } else {
131
271
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
271
    }
133
271
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
89
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
89
    if (_parent->nereids_id() == -1) {
129
0
        return fmt::format("(id={})", _parent->node_id());
130
89
    } else {
131
89
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
89
    }
133
89
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
101
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
101
    if (_parent->nereids_id() == -1) {
129
101
        return fmt::format("(id={})", _parent->node_id());
130
101
    } else {
131
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
0
    }
133
101
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
6.90k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
6.90k
    if (_parent->nereids_id() == -1) {
129
3
        return fmt::format("(id={})", _parent->node_id());
130
6.90k
    } else {
131
6.90k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
6.90k
    }
133
6.90k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
325
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
325
    if (_parent->nereids_id() == -1) {
129
102
        return fmt::format("(id={})", _parent->node_id());
130
223
    } else {
131
223
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
223
    }
133
325
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
12.0k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
12.0k
    if (_parent->nereids_id() == -1) {
129
12.0k
        return fmt::format("(id={})", _parent->node_id());
130
12.0k
    } else {
131
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
0
    }
133
12.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
308k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
309k
    if (_parent->nereids_id() == -1) {
129
309k
        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
308k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
493k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
493k
    if (_parent->nereids_id() == -1) {
129
493k
        return fmt::format("(id={})", _parent->node_id());
130
493k
    } else {
131
550
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
550
    }
133
493k
}
_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
300
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
300
    if (_parent->nereids_id() == -1) {
129
0
        return fmt::format("(id={})", _parent->node_id());
130
300
    } else {
131
300
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
300
    }
133
300
}
134
135
template <typename SharedStateArg>
136
29.6k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
29.6k
    if (_terminated) {
138
1
        return Status::OK();
139
1
    }
140
29.6k
    _terminated = true;
141
29.6k
    return Status::OK();
142
29.6k
}
_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
566
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
566
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
566
    _terminated = true;
141
566
    return Status::OK();
142
566
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
7
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
7
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
7
    _terminated = true;
141
7
    return Status::OK();
142
7
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_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_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
2.97k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
2.97k
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
2.97k
    _terminated = true;
141
2.97k
    return Status::OK();
142
2.97k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
11
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
11
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
11
    _terminated = true;
141
11
    return Status::OK();
142
11
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
1.03k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
1.03k
    if (_terminated) {
138
1
        return Status::OK();
139
1
    }
140
1.03k
    _terminated = true;
141
1.03k
    return Status::OK();
142
1.03k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE9terminateEPNS_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_28PartitionSortNodeSharedStateEE9terminateEPNS_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_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
536
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
536
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
536
    _terminated = true;
141
536
    return Status::OK();
142
536
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE9terminateEPNS_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_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
286
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
286
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
286
    _terminated = true;
141
286
    return Status::OK();
142
286
}
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
773k
DataDistribution OperatorBase::required_data_distribution(RuntimeState* /*state*/) const {
145
773k
    return _child && _child->is_serial_operator() && !is_source()
146
773k
                   ? DataDistribution(ExchangeType::PASSTHROUGH)
147
773k
                   : DataDistribution(ExchangeType::NOOP);
148
773k
}
149
150
13.6k
bool OperatorBase::is_hash_shuffle(ExchangeType exchange_type) {
151
13.6k
    return exchange_type == ExchangeType::HASH_SHUFFLE ||
152
13.6k
           exchange_type == ExchangeType::BUCKET_HASH_SHUFFLE;
153
13.6k
}
154
155
85.2k
bool OperatorBase::child_breaks_local_key_distribution(RuntimeState* state) const {
156
85.2k
    if (!_child) {
157
28.9k
        return false;
158
28.9k
    }
159
56.3k
    if (_child->is_serial_operator()) {
160
41.8k
        return true;
161
41.8k
    }
162
14.4k
    const auto child_distribution = _child->required_data_distribution(state);
163
14.4k
    return child_distribution.need_local_exchange() &&
164
14.4k
           !is_hash_shuffle(child_distribution.distribution_type);
165
56.3k
}
166
167
81.6k
const RowDescriptor& OperatorBase::row_desc() const {
168
81.6k
    return _child->row_desc();
169
81.6k
}
170
171
template <typename SharedStateArg>
172
21.0k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
21.0k
    fmt::memory_buffer debug_string_buffer;
174
21.0k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
21.0k
    return fmt::to_string(debug_string_buffer);
176
21.0k
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
172
60
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
60
    fmt::memory_buffer debug_string_buffer;
174
60
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
60
    return fmt::to_string(debug_string_buffer);
176
60
}
_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
24
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
24
    fmt::memory_buffer debug_string_buffer;
174
24
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
24
    return fmt::to_string(debug_string_buffer);
176
24
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
172
6
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
6
    fmt::memory_buffer debug_string_buffer;
174
6
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
6
    return fmt::to_string(debug_string_buffer);
176
6
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
172
18
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
18
    fmt::memory_buffer debug_string_buffer;
174
18
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
18
    return fmt::to_string(debug_string_buffer);
176
18
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
172
20.1k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
20.1k
    fmt::memory_buffer debug_string_buffer;
174
20.1k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
20.1k
    return fmt::to_string(debug_string_buffer);
176
20.1k
}
_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
840
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
840
    fmt::memory_buffer debug_string_buffer;
174
840
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
840
    return fmt::to_string(debug_string_buffer);
176
840
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
177
178
template <typename SharedStateArg>
179
21.0k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
180
21.0k
    fmt::memory_buffer debug_string_buffer;
181
21.0k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
182
21.0k
    return fmt::to_string(debug_string_buffer);
183
21.0k
}
_ZNK5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
179
12
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
180
12
    fmt::memory_buffer debug_string_buffer;
181
12
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
182
12
    return fmt::to_string(debug_string_buffer);
183
12
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
179
24
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
180
24
    fmt::memory_buffer debug_string_buffer;
181
24
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
182
24
    return fmt::to_string(debug_string_buffer);
183
24
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
179
18
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
180
18
    fmt::memory_buffer debug_string_buffer;
181
18
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
182
18
    return fmt::to_string(debug_string_buffer);
183
18
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
179
804
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
180
804
    fmt::memory_buffer debug_string_buffer;
181
804
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
182
804
    return fmt::to_string(debug_string_buffer);
183
804
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
179
74
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
180
74
    fmt::memory_buffer debug_string_buffer;
181
74
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
182
74
    return fmt::to_string(debug_string_buffer);
183
74
}
_ZNK5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
179
20.0k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
180
20.0k
    fmt::memory_buffer debug_string_buffer;
181
20.0k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
182
20.0k
    return fmt::to_string(debug_string_buffer);
183
20.0k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
184
185
21.4k
std::string OperatorXBase::debug_string(int indentation_level) const {
186
21.4k
    fmt::memory_buffer debug_string_buffer;
187
21.4k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, parallel_tasks={}, _is_serial_operator={}",
188
21.4k
                   std::string(indentation_level * 2, ' '), _op_name, node_id(), _parallel_tasks,
189
21.4k
                   _is_serial_operator);
190
21.4k
    return fmt::to_string(debug_string_buffer);
191
21.4k
}
192
193
21.0k
std::string OperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
194
21.0k
    return state->get_local_state(operator_id())->debug_string(indentation_level);
195
21.0k
}
196
197
689k
Status OperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
198
689k
    std::string node_name = print_plan_node_type(tnode.node_type);
199
689k
    _nereids_id = tnode.nereids_id;
200
689k
    if (!tnode.intermediate_output_tuple_id_list.empty()) {
201
3.76k
        if (!tnode.__isset.output_tuple_id) {
202
0
            return Status::InternalError("no final output tuple id");
203
0
        }
204
3.76k
        if (tnode.intermediate_output_tuple_id_list.size() !=
205
3.76k
            tnode.intermediate_projections_list.size()) {
206
0
            return Status::InternalError(
207
0
                    "intermediate_output_tuple_id_list size:{} not match "
208
0
                    "intermediate_projections_list size:{}",
209
0
                    tnode.intermediate_output_tuple_id_list.size(),
210
0
                    tnode.intermediate_projections_list.size());
211
0
        }
212
3.76k
    }
213
689k
    auto substr = node_name.substr(0, node_name.find("_NODE"));
214
689k
    _op_name = substr + "_OPERATOR";
215
216
689k
    if (tnode.__isset.vconjunct) {
217
0
        return Status::InternalError("vconjunct is not supported yet");
218
689k
    } else if (tnode.__isset.conjuncts) {
219
449k
        for (const auto& conjunct : tnode.conjuncts) {
220
449k
            VExprContextSPtr context;
221
449k
            RETURN_IF_ERROR(VExpr::create_expr_tree(conjunct, context));
222
449k
            _conjuncts.emplace_back(context);
223
449k
        }
224
146k
    }
225
226
    // create the projections expr
227
689k
    if (tnode.__isset.projections) {
228
316k
        DCHECK(tnode.__isset.output_tuple_id);
229
316k
        RETURN_IF_ERROR(VExpr::create_expr_trees(tnode.projections, _projections));
230
316k
    }
231
689k
    if (!tnode.intermediate_projections_list.empty()) {
232
3.76k
        DCHECK(tnode.__isset.projections) << "no final projections";
233
3.76k
        _intermediate_projections.reserve(tnode.intermediate_projections_list.size());
234
7.79k
        for (const auto& tnode_projections : tnode.intermediate_projections_list) {
235
7.79k
            VExprContextSPtrs projections;
236
7.79k
            RETURN_IF_ERROR(VExpr::create_expr_trees(tnode_projections, projections));
237
7.79k
            _intermediate_projections.push_back(projections);
238
7.79k
        }
239
3.76k
    }
240
689k
    return Status::OK();
241
689k
}
242
243
722k
Status OperatorXBase::prepare(RuntimeState* state) {
244
722k
    for (auto& conjunct : _conjuncts) {
245
448k
        RETURN_IF_ERROR(conjunct->prepare(state, intermediate_row_desc()));
246
448k
    }
247
722k
    if (state->enable_adjust_conjunct_order_by_cost()) {
248
669k
        std::ranges::sort(_conjuncts, [](const auto& a, const auto& b) {
249
602k
            return a->execute_cost() < b->execute_cost();
250
602k
        });
251
669k
    };
252
253
730k
    for (int i = 0; i < _intermediate_projections.size(); i++) {
254
7.79k
        RETURN_IF_ERROR(
255
7.79k
                VExpr::prepare(_intermediate_projections[i], state, intermediate_row_desc(i)));
256
7.79k
    }
257
722k
    RETURN_IF_ERROR(VExpr::prepare(_projections, state, projections_row_desc()));
258
259
722k
    if (has_output_row_desc()) {
260
316k
        RETURN_IF_ERROR(VExpr::check_expr_output_type(_projections, *_output_row_descriptor));
261
316k
    }
262
263
722k
    for (auto& conjunct : _conjuncts) {
264
449k
        RETURN_IF_ERROR(conjunct->open(state));
265
449k
    }
266
722k
    RETURN_IF_ERROR(VExpr::open(_projections, state));
267
722k
    for (auto& projections : _intermediate_projections) {
268
7.79k
        RETURN_IF_ERROR(VExpr::open(projections, state));
269
7.79k
    }
270
722k
    if (_child && !is_source()) {
271
124k
        RETURN_IF_ERROR(_child->prepare(state));
272
124k
    }
273
274
722k
    if (VExpr::contains_blockable_function(_conjuncts) ||
275
722k
        VExpr::contains_blockable_function(_projections)) {
276
0
        _blockable = true;
277
0
    }
278
279
722k
    return Status::OK();
280
722k
}
281
282
6.81k
Status OperatorXBase::terminate(RuntimeState* state) {
283
6.81k
    if (_child && !is_source()) {
284
1.18k
        RETURN_IF_ERROR(_child->terminate(state));
285
1.18k
    }
286
6.81k
    auto result = state->get_local_state_result(operator_id());
287
6.81k
    if (!result) {
288
0
        return result.error();
289
0
    }
290
6.81k
    return result.value()->terminate(state);
291
6.81k
}
292
293
6.04M
Status OperatorXBase::close(RuntimeState* state) {
294
6.04M
    if (_child && !is_source()) {
295
1.04M
        RETURN_IF_ERROR(_child->close(state));
296
1.04M
    }
297
6.04M
    auto result = state->get_local_state_result(operator_id());
298
6.04M
    if (!result) {
299
0
        return result.error();
300
0
    }
301
6.04M
    return result.value()->close(state);
302
6.04M
}
303
304
274k
void PipelineXLocalStateBase::clear_origin_block() {
305
274k
    _origin_block.clear_column_data(_parent->intermediate_row_desc().num_materialized_slots());
306
274k
}
307
308
603k
Status PipelineXLocalStateBase::filter_block(const VExprContextSPtrs& expr_contexts, Block* block) {
309
603k
    RETURN_IF_ERROR(VExprContext::filter_block(expr_contexts, block, block->columns()));
310
311
603k
    _estimate_memory_usage += VExprContext::get_memory_usage(expr_contexts);
312
603k
    return Status::OK();
313
603k
}
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
275k
                                     Block* output_block) const {
322
275k
    auto* local_state = state->get_local_state(operator_id());
323
275k
    SCOPED_TIMER(local_state->exec_time_counter());
324
275k
    SCOPED_TIMER(local_state->_projection_timer);
325
275k
    const size_t rows = origin_block->rows();
326
275k
    if (rows == 0) {
327
140k
        return Status::OK();
328
140k
    }
329
134k
    Block input_block = *origin_block;
330
331
134k
    size_t bytes_usage = 0;
332
134k
    ColumnsWithTypeAndName new_columns;
333
134k
    for (const auto& projections : local_state->_intermediate_projections) {
334
1.10k
        if (projections.empty()) {
335
0
            return Status::InternalError("meet empty intermediate projection, node id: {}",
336
0
                                         node_id());
337
0
        }
338
1.10k
        new_columns.resize(projections.size());
339
8.21k
        for (int i = 0; i < projections.size(); i++) {
340
7.10k
            RETURN_IF_ERROR(projections[i]->execute(&input_block, new_columns[i]));
341
7.10k
            if (new_columns[i].column->size() != rows) {
342
0
                return Status::InternalError(
343
0
                        "intermediate projection result column size {} not equal input rows {}, "
344
0
                        "expr: {}",
345
0
                        new_columns[i].column->size(), rows,
346
0
                        projections[i]->root()->debug_string());
347
0
            }
348
7.10k
        }
349
1.10k
        Block tmp_block {new_columns};
350
1.10k
        bytes_usage += tmp_block.allocated_bytes();
351
1.10k
        input_block.swap(tmp_block);
352
1.10k
    }
353
354
134k
    if (input_block.rows() != rows) {
355
0
        return Status::InternalError(
356
0
                "after intermediate projections input block rows {} not equal origin rows {}, "
357
0
                "input_block: {}",
358
0
                input_block.rows(), rows, input_block.dump_structure());
359
0
    }
360
653k
    auto insert_column_datas = [&](auto& to, ColumnPtr& from, size_t rows) {
361
653k
        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
653k
        } else {
371
653k
            if (_keep_origin || !from->is_exclusive()) {
372
641k
                to->insert_range_from(*from, 0, rows);
373
641k
                bytes_usage += from->allocated_bytes();
374
641k
            } else {
375
11.2k
                to = from->assert_mutable();
376
11.2k
            }
377
653k
        }
378
653k
    };
379
380
134k
    auto scoped_mutable_block = VectorizedUtils::build_scoped_mutable_mem_reuse_block(
381
134k
            output_block, *_output_row_descriptor);
382
134k
    auto& mutable_block = scoped_mutable_block.mutable_block();
383
134k
    auto& mutable_columns = mutable_block.mutable_columns();
384
134k
    if (rows != 0) {
385
134k
        DCHECK_EQ(mutable_columns.size(), local_state->_projections.size()) << debug_string();
386
788k
        for (int i = 0; i < mutable_columns.size(); ++i) {
387
653k
            ColumnPtr column_ptr;
388
653k
            RETURN_IF_ERROR(local_state->_projections[i]->execute(&input_block, column_ptr));
389
653k
            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
653k
            column_ptr = column_ptr->convert_to_full_column_if_const();
396
653k
            bytes_usage += column_ptr->allocated_bytes();
397
653k
            insert_column_datas(mutable_columns[i], column_ptr, rows);
398
653k
        }
399
134k
        DCHECK(mutable_block.rows() == rows);
400
134k
    }
401
134k
    local_state->_estimate_memory_usage += bytes_usage;
402
403
134k
    return Status::OK();
404
134k
}
405
406
4.71M
Status OperatorXBase::get_block_after_projects(RuntimeState* state, Block* block, bool* eos) {
407
4.71M
    DBUG_EXECUTE_IF("Pipeline::return_empty_block", {
408
4.71M
        if (this->_op_name == "AGGREGATION_OPERATOR" || this->_op_name == "HASH_JOIN_OPERATOR" ||
409
4.71M
            this->_op_name == "PARTITIONED_AGGREGATION_OPERATOR" ||
410
4.71M
            this->_op_name == "PARTITIONED_HASH_JOIN_OPERATOR" ||
411
4.71M
            this->_op_name == "CROSS_JOIN_OPERATOR" || this->_op_name == "SORT_OPERATOR") {
412
4.71M
            if (_debug_point_count++ % 2 == 0) {
413
4.71M
                return Status::OK();
414
4.71M
            }
415
4.71M
        }
416
4.71M
    });
417
418
4.71M
    Status status;
419
4.71M
    auto* local_state = state->get_local_state(operator_id());
420
4.71M
    Defer defer([&]() {
421
4.71M
        if (status.ok()) {
422
4.71M
            local_state->update_output_block_counters(*block);
423
4.71M
        }
424
4.71M
    });
425
4.71M
    if (_output_row_descriptor) {
426
274k
        local_state->clear_origin_block();
427
274k
        status = get_block(state, &local_state->_origin_block, eos);
428
274k
        if (UNLIKELY(!status.ok())) {
429
19
            return status;
430
19
        }
431
274k
        status = do_projections(state, &local_state->_origin_block, block);
432
274k
        return status;
433
274k
    }
434
4.43M
    status = get_block(state, block, eos);
435
4.43M
    RETURN_IF_ERROR(block->check_type_and_column());
436
4.43M
    return status;
437
4.43M
}
438
439
3.15M
void PipelineXLocalStateBase::reached_limit(Block* block, bool* eos) {
440
3.15M
    if (_parent->_limit != -1 and _num_rows_returned + block->rows() >= _parent->_limit) {
441
7.21k
        block->set_num_rows(_parent->_limit - _num_rows_returned);
442
7.21k
        *eos = true;
443
7.21k
    }
444
445
3.15M
    DBUG_EXECUTE_IF("Pipeline::reached_limit_early", {
446
3.15M
        auto op_name = to_lower(_parent->_op_name);
447
3.15M
        auto arg_op_name = dp->param<std::string>("op_name");
448
3.15M
        arg_op_name = to_lower(arg_op_name);
449
450
3.15M
        if (op_name == arg_op_name) {
451
3.15M
            *eos = true;
452
3.15M
        }
453
3.15M
    });
454
455
3.15M
    if (auto rows = block->rows()) {
456
871k
        _num_rows_returned += rows;
457
871k
        _state->get_query_ctx()->resource_ctx()->io_context()->update_process_rows(rows);
458
871k
    }
459
3.15M
}
460
461
29.6k
Status DataSinkOperatorXBase::terminate(RuntimeState* state) {
462
29.6k
    auto result = state->get_sink_local_state_result();
463
29.6k
    if (!result) {
464
0
        return result.error();
465
0
    }
466
29.6k
    return result.value()->terminate(state);
467
29.6k
}
468
469
21.3k
std::string DataSinkOperatorXBase::debug_string(int indentation_level) const {
470
21.3k
    fmt::memory_buffer debug_string_buffer;
471
472
21.3k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, _is_serial_operator={}",
473
21.3k
                   std::string(indentation_level * 2, ' '), _name, node_id(), _is_serial_operator);
474
21.3k
    return fmt::to_string(debug_string_buffer);
475
21.3k
}
476
477
21.0k
std::string DataSinkOperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
478
21.0k
    return state->get_sink_local_state()->debug_string(indentation_level);
479
21.0k
}
480
481
452k
Status DataSinkOperatorXBase::init(const TDataSink& tsink) {
482
452k
    std::string op_name = "UNKNOWN_SINK";
483
452k
    auto it = _TDataSinkType_VALUES_TO_NAMES.find(tsink.type);
484
485
452k
    if (it != _TDataSinkType_VALUES_TO_NAMES.end()) {
486
452k
        op_name = it->second;
487
452k
    }
488
452k
    _name = op_name + "_OPERATOR";
489
452k
    return Status::OK();
490
452k
}
491
492
190k
Status DataSinkOperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
493
190k
    std::string op_name = print_plan_node_type(tnode.node_type);
494
190k
    _nereids_id = tnode.nereids_id;
495
190k
    auto substr = op_name.substr(0, op_name.find("_NODE"));
496
190k
    _name = substr + "_SINK_OPERATOR";
497
190k
    return Status::OK();
498
190k
}
499
500
template <typename LocalStateType>
501
Status DataSinkOperatorX<LocalStateType>::setup_local_state(RuntimeState* state,
502
2.06M
                                                            LocalSinkStateInfo& info) {
503
2.06M
    auto local_state = LocalStateType::create_unique(this, state);
504
2.06M
    RETURN_IF_ERROR(local_state->init(state, info));
505
2.06M
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
2.06M
    return Status::OK();
507
2.06M
}
_ZN5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
114k
                                                            LocalSinkStateInfo& info) {
503
114k
    auto local_state = LocalStateType::create_unique(this, state);
504
114k
    RETURN_IF_ERROR(local_state->init(state, info));
505
114k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
114k
    return Status::OK();
507
114k
}
_ZN5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
429k
                                                            LocalSinkStateInfo& info) {
503
429k
    auto local_state = LocalStateType::create_unique(this, state);
504
429k
    RETURN_IF_ERROR(local_state->init(state, info));
505
429k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
429k
    return Status::OK();
507
429k
}
_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
518
                                                            LocalSinkStateInfo& info) {
503
518
    auto local_state = LocalStateType::create_unique(this, state);
504
518
    RETURN_IF_ERROR(local_state->init(state, info));
505
518
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
518
    return Status::OK();
507
518
}
_ZN5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
45.8k
                                                            LocalSinkStateInfo& info) {
503
45.8k
    auto local_state = LocalStateType::create_unique(this, state);
504
45.8k
    RETURN_IF_ERROR(local_state->init(state, info));
505
45.8k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
45.8k
    return Status::OK();
507
45.8k
}
_ZN5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
8.94k
                                                            LocalSinkStateInfo& info) {
503
8.94k
    auto local_state = LocalStateType::create_unique(this, state);
504
8.94k
    RETURN_IF_ERROR(local_state->init(state, info));
505
8.94k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
8.94k
    return Status::OK();
507
8.94k
}
_ZN5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
5.16k
                                                            LocalSinkStateInfo& info) {
503
5.16k
    auto local_state = LocalStateType::create_unique(this, state);
504
5.16k
    RETURN_IF_ERROR(local_state->init(state, info));
505
5.16k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
5.16k
    return Status::OK();
507
5.16k
}
_ZN5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
156
                                                            LocalSinkStateInfo& info) {
503
156
    auto local_state = LocalStateType::create_unique(this, state);
504
156
    RETURN_IF_ERROR(local_state->init(state, info));
505
156
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
156
    return Status::OK();
507
156
}
_ZN5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
3.38k
                                                            LocalSinkStateInfo& info) {
503
3.38k
    auto local_state = LocalStateType::create_unique(this, state);
504
3.38k
    RETURN_IF_ERROR(local_state->init(state, info));
505
3.38k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
3.38k
    return Status::OK();
507
3.38k
}
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
7.66k
                                                            LocalSinkStateInfo& info) {
503
7.66k
    auto local_state = LocalStateType::create_unique(this, state);
504
7.66k
    RETURN_IF_ERROR(local_state->init(state, info));
505
7.66k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
7.66k
    return Status::OK();
507
7.66k
}
_ZN5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
98
                                                            LocalSinkStateInfo& info) {
503
98
    auto local_state = LocalStateType::create_unique(this, state);
504
98
    RETURN_IF_ERROR(local_state->init(state, info));
505
98
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
98
    return Status::OK();
507
98
}
_ZN5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
269k
                                                            LocalSinkStateInfo& info) {
503
269k
    auto local_state = LocalStateType::create_unique(this, state);
504
269k
    RETURN_IF_ERROR(local_state->init(state, info));
505
269k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
269k
    return Status::OK();
507
269k
}
_ZN5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
27
                                                            LocalSinkStateInfo& info) {
503
27
    auto local_state = LocalStateType::create_unique(this, state);
504
27
    RETURN_IF_ERROR(local_state->init(state, info));
505
27
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
27
    return Status::OK();
507
27
}
_ZN5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
309k
                                                            LocalSinkStateInfo& info) {
503
309k
    auto local_state = LocalStateType::create_unique(this, state);
504
309k
    RETURN_IF_ERROR(local_state->init(state, info));
505
309k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
309k
    return Status::OK();
507
309k
}
_ZN5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
147k
                                                            LocalSinkStateInfo& info) {
503
147k
    auto local_state = LocalStateType::create_unique(this, state);
504
147k
    RETURN_IF_ERROR(local_state->init(state, info));
505
147k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
147k
    return Status::OK();
507
147k
}
_ZN5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
271
                                                            LocalSinkStateInfo& info) {
503
271
    auto local_state = LocalStateType::create_unique(this, state);
504
271
    RETURN_IF_ERROR(local_state->init(state, info));
505
271
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
271
    return Status::OK();
507
271
}
_ZN5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
89
                                                            LocalSinkStateInfo& info) {
503
89
    auto local_state = LocalStateType::create_unique(this, state);
504
89
    RETURN_IF_ERROR(local_state->init(state, info));
505
89
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
89
    return Status::OK();
507
89
}
_ZN5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
690k
                                                            LocalSinkStateInfo& info) {
503
690k
    auto local_state = LocalStateType::create_unique(this, state);
504
690k
    RETURN_IF_ERROR(local_state->init(state, info));
505
690k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
690k
    return Status::OK();
507
690k
}
_ZN5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
9.23k
                                                            LocalSinkStateInfo& info) {
503
9.23k
    auto local_state = LocalStateType::create_unique(this, state);
504
9.23k
    RETURN_IF_ERROR(local_state->init(state, info));
505
9.23k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
9.23k
    return Status::OK();
507
9.23k
}
_ZN5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
6.90k
                                                            LocalSinkStateInfo& info) {
503
6.90k
    auto local_state = LocalStateType::create_unique(this, state);
504
6.90k
    RETURN_IF_ERROR(local_state->init(state, info));
505
6.90k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
6.90k
    return Status::OK();
507
6.90k
}
_ZN5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
3.67k
                                                            LocalSinkStateInfo& info) {
503
3.67k
    auto local_state = LocalStateType::create_unique(this, state);
504
3.67k
    RETURN_IF_ERROR(local_state->init(state, info));
505
3.67k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
3.67k
    return Status::OK();
507
3.67k
}
_ZN5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
223
                                                            LocalSinkStateInfo& info) {
503
223
    auto local_state = LocalStateType::create_unique(this, state);
504
223
    RETURN_IF_ERROR(local_state->init(state, info));
505
223
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
223
    return Status::OK();
507
223
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
4.58k
                                                            LocalSinkStateInfo& info) {
503
4.58k
    auto local_state = LocalStateType::create_unique(this, state);
504
4.58k
    RETURN_IF_ERROR(local_state->init(state, info));
505
4.58k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
4.58k
    return Status::OK();
507
4.58k
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
2.49k
                                                            LocalSinkStateInfo& info) {
503
2.49k
    auto local_state = LocalStateType::create_unique(this, state);
504
2.49k
    RETURN_IF_ERROR(local_state->init(state, info));
505
2.49k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
2.49k
    return Status::OK();
507
2.49k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
2.40k
                                                            LocalSinkStateInfo& info) {
503
2.40k
    auto local_state = LocalStateType::create_unique(this, state);
504
2.40k
    RETURN_IF_ERROR(local_state->init(state, info));
505
2.40k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
2.40k
    return Status::OK();
507
2.40k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
2.46k
                                                            LocalSinkStateInfo& info) {
503
2.46k
    auto local_state = LocalStateType::create_unique(this, state);
504
2.46k
    RETURN_IF_ERROR(local_state->init(state, info));
505
2.46k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
2.46k
    return Status::OK();
507
2.46k
}
_ZN5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
1
                                                            LocalSinkStateInfo& info) {
503
1
    auto local_state = LocalStateType::create_unique(this, state);
504
1
    RETURN_IF_ERROR(local_state->init(state, info));
505
1
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
1
    return Status::OK();
507
1
}
_ZN5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
161
                                                            LocalSinkStateInfo& info) {
503
161
    auto local_state = LocalStateType::create_unique(this, state);
504
161
    RETURN_IF_ERROR(local_state->init(state, info));
505
161
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
161
    return Status::OK();
507
161
}
_ZN5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
14
                                                            LocalSinkStateInfo& info) {
503
14
    auto local_state = LocalStateType::create_unique(this, state);
504
14
    RETURN_IF_ERROR(local_state->init(state, info));
505
14
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
14
    return Status::OK();
507
14
}
_ZN5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
105
                                                            LocalSinkStateInfo& info) {
503
105
    auto local_state = LocalStateType::create_unique(this, state);
504
105
    RETURN_IF_ERROR(local_state->init(state, info));
505
105
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
105
    return Status::OK();
507
105
}
_ZN5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
151
                                                            LocalSinkStateInfo& info) {
503
151
    auto local_state = LocalStateType::create_unique(this, state);
504
151
    RETURN_IF_ERROR(local_state->init(state, info));
505
151
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
151
    return Status::OK();
507
151
}
_ZN5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
151
                                                            LocalSinkStateInfo& info) {
503
151
    auto local_state = LocalStateType::create_unique(this, state);
504
151
    RETURN_IF_ERROR(local_state->init(state, info));
505
151
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
151
    return Status::OK();
507
151
}
508
509
template <typename LocalStateType>
510
1.71M
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.71M
    } else {
518
1.71M
        auto ss = LocalStateType::SharedStateType::create_shared();
519
1.71M
        ss->id = operator_id();
520
1.71M
        for (auto& dest : dests_id()) {
521
1.70M
            ss->related_op_ids.insert(dest);
522
1.70M
        }
523
1.71M
        return ss;
524
1.71M
    }
525
1.71M
}
_ZNK5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
93.5k
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
93.5k
    } else {
518
93.5k
        auto ss = LocalStateType::SharedStateType::create_shared();
519
93.5k
        ss->id = operator_id();
520
93.5k
        for (auto& dest : dests_id()) {
521
93.4k
            ss->related_op_ids.insert(dest);
522
93.4k
        }
523
93.5k
        return ss;
524
93.5k
    }
525
93.5k
}
_ZNK5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
429k
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
429k
    } else {
518
429k
        auto ss = LocalStateType::SharedStateType::create_shared();
519
429k
        ss->id = operator_id();
520
429k
        for (auto& dest : dests_id()) {
521
426k
            ss->related_op_ids.insert(dest);
522
426k
        }
523
429k
        return ss;
524
429k
    }
525
429k
}
_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
518
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
518
    } else {
518
518
        auto ss = LocalStateType::SharedStateType::create_shared();
519
518
        ss->id = operator_id();
520
518
        for (auto& dest : dests_id()) {
521
518
            ss->related_op_ids.insert(dest);
522
518
        }
523
518
        return ss;
524
518
    }
525
518
}
_ZNK5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
45.8k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
511
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                 LocalExchangeSharedState>) {
513
        return nullptr;
514
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
515
                                        MultiCastSharedState>) {
516
        throw Exception(Status::FatalError("should not reach here!"));
517
45.8k
    } else {
518
45.8k
        auto ss = LocalStateType::SharedStateType::create_shared();
519
45.8k
        ss->id = operator_id();
520
45.8k
        for (auto& dest : dests_id()) {
521
45.6k
            ss->related_op_ids.insert(dest);
522
45.6k
        }
523
45.8k
        return ss;
524
45.8k
    }
525
45.8k
}
_ZNK5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE19create_shared_stateEv
Line
Count
Source
510
8.94k
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.94k
    } else {
518
8.94k
        auto ss = LocalStateType::SharedStateType::create_shared();
519
8.94k
        ss->id = operator_id();
520
8.94k
        for (auto& dest : dests_id()) {
521
8.94k
            ss->related_op_ids.insert(dest);
522
8.94k
        }
523
8.94k
        return ss;
524
8.94k
    }
525
8.94k
}
_ZNK5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
5.16k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
511
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                 LocalExchangeSharedState>) {
513
        return nullptr;
514
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
515
                                        MultiCastSharedState>) {
516
        throw Exception(Status::FatalError("should not reach here!"));
517
5.16k
    } else {
518
5.16k
        auto ss = LocalStateType::SharedStateType::create_shared();
519
5.16k
        ss->id = operator_id();
520
5.16k
        for (auto& dest : dests_id()) {
521
5.16k
            ss->related_op_ids.insert(dest);
522
5.16k
        }
523
5.16k
        return ss;
524
5.16k
    }
525
5.16k
}
_ZNK5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
156
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
511
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                 LocalExchangeSharedState>) {
513
        return nullptr;
514
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
515
                                        MultiCastSharedState>) {
516
        throw Exception(Status::FatalError("should not reach here!"));
517
156
    } else {
518
156
        auto ss = LocalStateType::SharedStateType::create_shared();
519
156
        ss->id = operator_id();
520
156
        for (auto& dest : dests_id()) {
521
156
            ss->related_op_ids.insert(dest);
522
156
        }
523
156
        return ss;
524
156
    }
525
156
}
_ZNK5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
3.38k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
511
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                 LocalExchangeSharedState>) {
513
        return nullptr;
514
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
515
                                        MultiCastSharedState>) {
516
        throw Exception(Status::FatalError("should not reach here!"));
517
3.38k
    } else {
518
3.38k
        auto ss = LocalStateType::SharedStateType::create_shared();
519
3.38k
        ss->id = operator_id();
520
3.38k
        for (auto& dest : dests_id()) {
521
3.38k
            ss->related_op_ids.insert(dest);
522
3.38k
        }
523
3.38k
        return ss;
524
3.38k
    }
525
3.38k
}
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
7.68k
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
7.68k
    } else {
518
7.68k
        auto ss = LocalStateType::SharedStateType::create_shared();
519
7.68k
        ss->id = operator_id();
520
7.68k
        for (auto& dest : dests_id()) {
521
7.67k
            ss->related_op_ids.insert(dest);
522
7.67k
        }
523
7.68k
        return ss;
524
7.68k
    }
525
7.68k
}
_ZNK5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
98
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
511
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                 LocalExchangeSharedState>) {
513
        return nullptr;
514
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
515
                                        MultiCastSharedState>) {
516
        throw Exception(Status::FatalError("should not reach here!"));
517
98
    } else {
518
98
        auto ss = LocalStateType::SharedStateType::create_shared();
519
98
        ss->id = operator_id();
520
98
        for (auto& dest : dests_id()) {
521
98
            ss->related_op_ids.insert(dest);
522
98
        }
523
98
        return ss;
524
98
    }
525
98
}
_ZNK5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
269k
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
269k
    } else {
518
269k
        auto ss = LocalStateType::SharedStateType::create_shared();
519
269k
        ss->id = operator_id();
520
269k
        for (auto& dest : dests_id()) {
521
269k
            ss->related_op_ids.insert(dest);
522
269k
        }
523
269k
        return ss;
524
269k
    }
525
269k
}
_ZNK5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
29
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
29
    } else {
518
29
        auto ss = LocalStateType::SharedStateType::create_shared();
519
29
        ss->id = operator_id();
520
29
        for (auto& dest : dests_id()) {
521
29
            ss->related_op_ids.insert(dest);
522
29
        }
523
29
        return ss;
524
29
    }
525
29
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
147k
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
147k
    } else {
518
147k
        auto ss = LocalStateType::SharedStateType::create_shared();
519
147k
        ss->id = operator_id();
520
147k
        for (auto& dest : dests_id()) {
521
147k
            ss->related_op_ids.insert(dest);
522
147k
        }
523
147k
        return ss;
524
147k
    }
525
147k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE19create_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_22ExchangeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
689k
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
689k
    } else {
518
689k
        auto ss = LocalStateType::SharedStateType::create_shared();
519
689k
        ss->id = operator_id();
520
689k
        for (auto& dest : dests_id()) {
521
684k
            ss->related_op_ids.insert(dest);
522
684k
        }
523
689k
        return ss;
524
689k
    }
525
689k
}
_ZNK5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
9.24k
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.24k
    } else {
518
9.24k
        auto ss = LocalStateType::SharedStateType::create_shared();
519
9.24k
        ss->id = operator_id();
520
9.24k
        for (auto& dest : dests_id()) {
521
9.23k
            ss->related_op_ids.insert(dest);
522
9.23k
        }
523
9.24k
        return ss;
524
9.24k
    }
525
9.24k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
325
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
325
    } else {
518
325
        auto ss = LocalStateType::SharedStateType::create_shared();
519
325
        ss->id = operator_id();
520
326
        for (auto& dest : dests_id()) {
521
326
            ss->related_op_ids.insert(dest);
522
326
        }
523
325
        return ss;
524
325
    }
525
325
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE19create_shared_stateEv
Line
Count
Source
510
2.40k
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.40k
    } else {
518
2.40k
        auto ss = LocalStateType::SharedStateType::create_shared();
519
2.40k
        ss->id = operator_id();
520
2.40k
        for (auto& dest : dests_id()) {
521
2.40k
            ss->related_op_ids.insert(dest);
522
2.40k
        }
523
2.40k
        return ss;
524
2.40k
    }
525
2.40k
}
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE19create_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.46k
        for (auto& dest : dests_id()) {
521
2.46k
            ss->related_op_ids.insert(dest);
522
2.46k
        }
523
2.46k
        return ss;
524
2.46k
    }
525
2.46k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
161
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
511
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                 LocalExchangeSharedState>) {
513
        return nullptr;
514
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
515
                                        MultiCastSharedState>) {
516
        throw Exception(Status::FatalError("should not reach here!"));
517
161
    } else {
518
161
        auto ss = LocalStateType::SharedStateType::create_shared();
519
161
        ss->id = operator_id();
520
161
        for (auto& dest : dests_id()) {
521
161
            ss->related_op_ids.insert(dest);
522
161
        }
523
161
        return ss;
524
161
    }
525
161
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
105
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
511
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                 LocalExchangeSharedState>) {
513
        return nullptr;
514
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
515
                                        MultiCastSharedState>) {
516
        throw Exception(Status::FatalError("should not reach here!"));
517
105
    } else {
518
105
        auto ss = LocalStateType::SharedStateType::create_shared();
519
105
        ss->id = operator_id();
520
105
        for (auto& dest : dests_id()) {
521
105
            ss->related_op_ids.insert(dest);
522
105
        }
523
105
        return ss;
524
105
    }
525
105
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE19create_shared_stateEv
526
527
template <typename LocalStateType>
528
2.52M
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
2.52M
    auto local_state = LocalStateType::create_unique(state, this);
530
2.52M
    RETURN_IF_ERROR(local_state->init(state, info));
531
2.52M
    state->emplace_local_state(operator_id(), std::move(local_state));
532
2.52M
    return Status::OK();
533
2.52M
}
_ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
66.5k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
66.5k
    auto local_state = LocalStateType::create_unique(state, this);
530
66.5k
    RETURN_IF_ERROR(local_state->init(state, info));
531
66.5k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
66.5k
    return Status::OK();
533
66.5k
}
_ZN5doris9OperatorXINS_18OlapScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
294k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
294k
    auto local_state = LocalStateType::create_unique(state, this);
530
294k
    RETURN_IF_ERROR(local_state->init(state, info));
531
294k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
294k
    return Status::OK();
533
294k
}
_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
34.0k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
34.0k
    auto local_state = LocalStateType::create_unique(state, this);
530
34.0k
    RETURN_IF_ERROR(local_state->init(state, info));
531
34.0k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
34.0k
    return Status::OK();
533
34.0k
}
_ZN5doris9OperatorXINS_18AnalyticLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
7.62k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
7.62k
    auto local_state = LocalStateType::create_unique(state, this);
530
7.62k
    RETURN_IF_ERROR(local_state->init(state, info));
531
7.62k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
7.62k
    return Status::OK();
533
7.62k
}
_ZN5doris9OperatorXINS_14SortLocalStateEE17setup_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_19SpillSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
20
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
20
    auto local_state = LocalStateType::create_unique(state, this);
530
20
    RETURN_IF_ERROR(local_state->init(state, info));
531
20
    state->emplace_local_state(operator_id(), std::move(local_state));
532
20
    return Status::OK();
533
20
}
_ZN5doris9OperatorXINS_24LocalMergeSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
260k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
260k
    auto local_state = LocalStateType::create_unique(state, this);
530
260k
    RETURN_IF_ERROR(local_state->init(state, info));
531
260k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
260k
    return Status::OK();
533
260k
}
_ZN5doris9OperatorXINS_13AggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
147k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
147k
    auto local_state = LocalStateType::create_unique(state, this);
530
147k
    RETURN_IF_ERROR(local_state->init(state, info));
531
147k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
147k
    return Status::OK();
533
147k
}
_ZN5doris9OperatorXINS_21BucketedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
316
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
316
    auto local_state = LocalStateType::create_unique(state, this);
530
316
    RETURN_IF_ERROR(local_state->init(state, info));
531
316
    state->emplace_local_state(operator_id(), std::move(local_state));
532
316
    return Status::OK();
533
316
}
_ZN5doris9OperatorXINS_24PartitionedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
79
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
79
    auto local_state = LocalStateType::create_unique(state, this);
530
79
    RETURN_IF_ERROR(local_state->init(state, info));
531
79
    state->emplace_local_state(operator_id(), std::move(local_state));
532
79
    return Status::OK();
533
79
}
_ZN5doris9OperatorXINS_23TableFunctionLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
4.45k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
4.45k
    auto local_state = LocalStateType::create_unique(state, this);
530
4.45k
    RETURN_IF_ERROR(local_state->init(state, info));
531
4.45k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
4.45k
    return Status::OK();
533
4.45k
}
_ZN5doris9OperatorXINS_18ExchangeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
375k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
375k
    auto local_state = LocalStateType::create_unique(state, this);
530
375k
    RETURN_IF_ERROR(local_state->init(state, info));
531
375k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
375k
    return Status::OK();
533
375k
}
_ZN5doris9OperatorXINS_16RepeatLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
1.16k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
1.16k
    auto local_state = LocalStateType::create_unique(state, this);
530
1.16k
    RETURN_IF_ERROR(local_state->init(state, info));
531
1.16k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
1.16k
    return Status::OK();
533
1.16k
}
_ZN5doris9OperatorXINS_29NestedLoopJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
9.22k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
9.22k
    auto local_state = LocalStateType::create_unique(state, this);
530
9.22k
    RETURN_IF_ERROR(local_state->init(state, info));
531
9.22k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
9.22k
    return Status::OK();
533
9.22k
}
_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.68k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
1.68k
    auto local_state = LocalStateType::create_unique(state, this);
530
1.68k
    RETURN_IF_ERROR(local_state->init(state, info));
531
1.68k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
1.68k
    return Status::OK();
533
1.68k
}
_ZN5doris9OperatorXINS_21UnionSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
55.2k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
55.2k
    auto local_state = LocalStateType::create_unique(state, this);
530
55.2k
    RETURN_IF_ERROR(local_state->init(state, info));
531
55.2k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
55.2k
    return Status::OK();
533
55.2k
}
_ZN5doris9OperatorXINS_35MultiCastDataStreamSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
10.6k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
10.6k
    auto local_state = LocalStateType::create_unique(state, this);
530
10.6k
    RETURN_IF_ERROR(local_state->init(state, info));
531
10.6k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
10.6k
    return Status::OK();
533
10.6k
}
_ZN5doris9OperatorXINS_29PartitionSortSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
224
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
224
    auto local_state = LocalStateType::create_unique(state, this);
530
224
    RETURN_IF_ERROR(local_state->init(state, info));
531
224
    state->emplace_local_state(operator_id(), std::move(local_state));
532
224
    return Status::OK();
533
224
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
2.41k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
2.41k
    auto local_state = LocalStateType::create_unique(state, this);
530
2.41k
    RETURN_IF_ERROR(local_state->init(state, info));
531
2.41k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
2.41k
    return Status::OK();
533
2.41k
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
2.48k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
2.48k
    auto local_state = LocalStateType::create_unique(state, this);
530
2.48k
    RETURN_IF_ERROR(local_state->init(state, info));
531
2.48k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
2.48k
    return Status::OK();
533
2.48k
}
_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.13k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
2.13k
    auto local_state = LocalStateType::create_unique(state, this);
530
2.13k
    RETURN_IF_ERROR(local_state->init(state, info));
531
2.13k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
2.13k
    return Status::OK();
533
2.13k
}
_ZN5doris9OperatorXINS_18MetaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
7.16k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
7.16k
    auto local_state = LocalStateType::create_unique(state, this);
530
7.16k
    RETURN_IF_ERROR(local_state->init(state, info));
531
7.16k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
7.16k
    return Status::OK();
533
7.16k
}
_ZN5doris9OperatorXINS_29LocalExchangeSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
783k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
783k
    auto local_state = LocalStateType::create_unique(state, this);
530
783k
    RETURN_IF_ERROR(local_state->init(state, info));
531
783k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
783k
    return Status::OK();
533
783k
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_34PartitionedHashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_21CacheSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
14
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
14
    auto local_state = LocalStateType::create_unique(state, this);
530
14
    RETURN_IF_ERROR(local_state->init(state, info));
531
14
    state->emplace_local_state(operator_id(), std::move(local_state));
532
14
    return Status::OK();
533
14
}
_ZN5doris9OperatorXINS_22RecCTESourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
151
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
151
    auto local_state = LocalStateType::create_unique(state, this);
530
151
    RETURN_IF_ERROR(local_state->init(state, info));
531
151
    state->emplace_local_state(operator_id(), std::move(local_state));
532
151
    return Status::OK();
533
151
}
_ZN5doris9OperatorXINS_20RecCTEScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
1.95k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
1.95k
    auto local_state = LocalStateType::create_unique(state, this);
530
1.95k
    RETURN_IF_ERROR(local_state->init(state, info));
531
1.95k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
1.95k
    return Status::OK();
533
1.95k
}
_ZN5doris9OperatorXINS_25MaterializationLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
1.64k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
1.64k
    auto local_state = LocalStateType::create_unique(state, this);
530
1.64k
    RETURN_IF_ERROR(local_state->init(state, info));
531
1.64k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
1.64k
    return Status::OK();
533
1.64k
}
_ZN5doris9OperatorXINS_16SelectLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
2.59k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
2.59k
    auto local_state = LocalStateType::create_unique(state, this);
530
2.59k
    RETURN_IF_ERROR(local_state->init(state, info));
531
2.59k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
2.59k
    return Status::OK();
533
2.59k
}
_ZN5doris9OperatorXINS_22StreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
10.7k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
10.7k
    auto local_state = LocalStateType::create_unique(state, this);
530
10.7k
    RETURN_IF_ERROR(local_state->init(state, info));
531
10.7k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
10.7k
    return Status::OK();
533
10.7k
}
_ZN5doris9OperatorXINS_30DistinctStreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
429k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
429k
    auto local_state = LocalStateType::create_unique(state, this);
530
429k
    RETURN_IF_ERROR(local_state->init(state, info));
531
429k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
429k
    return Status::OK();
533
429k
}
534
535
PipelineXSinkLocalStateBase::PipelineXSinkLocalStateBase(DataSinkOperatorXBase* parent,
536
                                                         RuntimeState* state)
537
2.06M
        : _parent(parent), _state(state) {}
538
539
PipelineXLocalStateBase::PipelineXLocalStateBase(RuntimeState* state, OperatorXBase* parent)
540
2.52M
        : _num_rows_returned(0),
541
2.52M
          _rows_returned_counter(nullptr),
542
2.52M
          _parent(parent),
543
2.52M
          _state(state),
544
2.52M
          _budget(state->batch_size(), state->preferred_block_size_bytes()) {}
545
546
template <typename SharedStateArg>
547
2.52M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
2.52M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
2.52M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
2.52M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
2.52M
    _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.52M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
2.52M
    _operator_profile->add_child(_common_profile.get(), true);
556
2.52M
    _operator_profile->add_child(_custom_profile.get(), true);
557
2.52M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
2.52M
    if constexpr (!is_fake_shared) {
559
1.35M
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
560
802k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
561
802k
                                    .first.get()
562
802k
                                    ->template cast<SharedStateArg>();
563
564
802k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
565
802k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
566
802k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
567
802k
        } else if (info.shared_state) {
568
491k
            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
491k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
491k
            _dependency = _shared_state->create_source_dependency(
575
491k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
491k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
491k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
491k
        } else {
579
64.4k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
5.16k
                DCHECK(false);
581
5.16k
            }
582
64.4k
        }
583
1.35M
    }
584
585
2.52M
    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.52M
    _rows_returned_counter =
590
2.52M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
2.52M
    _blocks_returned_counter =
592
2.52M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
2.52M
    _output_block_bytes_counter =
594
2.52M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
2.52M
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
2.52M
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
2.52M
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
2.52M
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
2.52M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
2.52M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
2.52M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
2.52M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
2.52M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
2.52M
    _memory_used_counter =
605
2.52M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
2.52M
    _common_profile->add_info_string("IsColocate",
607
2.52M
                                     std::to_string(_parent->is_colocated_operator()));
608
2.52M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
2.52M
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
2.52M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
2.52M
    return Status::OK();
612
2.52M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
66.7k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
66.7k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
66.7k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
66.7k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
66.7k
    _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
66.7k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
66.7k
    _operator_profile->add_child(_common_profile.get(), true);
556
66.7k
    _operator_profile->add_child(_custom_profile.get(), true);
557
66.7k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
66.7k
    if constexpr (!is_fake_shared) {
559
66.7k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
560
21.0k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
561
21.0k
                                    .first.get()
562
21.0k
                                    ->template cast<SharedStateArg>();
563
564
21.0k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
565
21.0k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
566
21.0k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
567
45.6k
        } else if (info.shared_state) {
568
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
569
                DCHECK(false);
570
            }
571
            // For UnionSourceOperator without children, there is no shared state.
572
45.1k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
45.1k
            _dependency = _shared_state->create_source_dependency(
575
45.1k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
45.1k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
45.1k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
45.1k
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
528
        }
583
66.7k
    }
584
585
66.7k
    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
66.7k
    _rows_returned_counter =
590
66.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
66.7k
    _blocks_returned_counter =
592
66.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
66.7k
    _output_block_bytes_counter =
594
66.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
66.7k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
66.7k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
66.7k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
66.7k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
66.7k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
66.7k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
66.7k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
66.7k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
66.7k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
66.7k
    _memory_used_counter =
605
66.7k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
66.7k
    _common_profile->add_info_string("IsColocate",
607
66.7k
                                     std::to_string(_parent->is_colocated_operator()));
608
66.7k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
66.7k
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
66.7k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
66.7k
    return Status::OK();
612
66.7k
}
_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
269k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
269k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
269k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
269k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
269k
    _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
269k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
269k
    _operator_profile->add_child(_common_profile.get(), true);
556
269k
    _operator_profile->add_child(_custom_profile.get(), true);
557
269k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
269k
    if constexpr (!is_fake_shared) {
559
269k
        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
269k
        } 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
264k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
264k
            _dependency = _shared_state->create_source_dependency(
575
264k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
264k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
264k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
264k
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
4.81k
        }
583
269k
    }
584
585
269k
    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
269k
    _rows_returned_counter =
590
269k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
269k
    _blocks_returned_counter =
592
269k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
269k
    _output_block_bytes_counter =
594
269k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
269k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
269k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
269k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
269k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
269k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
269k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
269k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
269k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
269k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
269k
    _memory_used_counter =
605
269k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
269k
    _common_profile->add_info_string("IsColocate",
607
269k
                                     std::to_string(_parent->is_colocated_operator()));
608
269k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
269k
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
269k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
269k
    return Status::OK();
612
269k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
20
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
20
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
20
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
20
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
20
    _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
20
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
20
    _operator_profile->add_child(_common_profile.get(), true);
556
20
    _operator_profile->add_child(_custom_profile.get(), true);
557
20
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
20
    if constexpr (!is_fake_shared) {
559
20
        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
20
        } 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
20
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
20
            _dependency = _shared_state->create_source_dependency(
575
20
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
20
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
20
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
20
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
0
        }
583
20
    }
584
585
20
    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
20
    _rows_returned_counter =
590
20
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
20
    _blocks_returned_counter =
592
20
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
20
    _output_block_bytes_counter =
594
20
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
20
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
20
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
20
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
20
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
20
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
20
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
20
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
20
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
20
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
20
    _memory_used_counter =
605
20
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
20
    _common_profile->add_info_string("IsColocate",
607
20
                                     std::to_string(_parent->is_colocated_operator()));
608
20
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
20
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
20
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
20
    return Status::OK();
612
20
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
9.23k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
9.23k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
9.23k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
9.23k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
9.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
9.23k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
9.23k
    _operator_profile->add_child(_common_profile.get(), true);
556
9.23k
    _operator_profile->add_child(_custom_profile.get(), true);
557
9.23k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
9.23k
    if constexpr (!is_fake_shared) {
559
9.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
9.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
9.20k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
9.20k
            _dependency = _shared_state->create_source_dependency(
575
9.20k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
9.20k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
9.20k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
9.20k
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
28
        }
583
9.23k
    }
584
585
9.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
9.23k
    _rows_returned_counter =
590
9.23k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
9.23k
    _blocks_returned_counter =
592
9.23k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
9.23k
    _output_block_bytes_counter =
594
9.23k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
9.23k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
9.23k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
9.23k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
9.23k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
9.23k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
9.23k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
9.23k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
9.23k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
9.23k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
9.23k
    _memory_used_counter =
605
9.23k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
9.23k
    _common_profile->add_info_string("IsColocate",
607
9.23k
                                     std::to_string(_parent->is_colocated_operator()));
608
9.23k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
9.23k
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
9.23k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
9.23k
    return Status::OK();
612
9.23k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
7.67k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
7.67k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
7.67k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
7.67k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
7.67k
    _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
7.67k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
7.67k
    _operator_profile->add_child(_common_profile.get(), true);
556
7.67k
    _operator_profile->add_child(_custom_profile.get(), true);
557
7.67k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
7.67k
    if constexpr (!is_fake_shared) {
559
7.67k
        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
7.67k
        } 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
7.58k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
7.58k
            _dependency = _shared_state->create_source_dependency(
575
7.58k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
7.58k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
7.58k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
7.58k
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
95
        }
583
7.67k
    }
584
585
7.67k
    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
7.67k
    _rows_returned_counter =
590
7.67k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
7.67k
    _blocks_returned_counter =
592
7.67k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
7.67k
    _output_block_bytes_counter =
594
7.67k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
7.67k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
7.67k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
7.67k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
7.67k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
7.67k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
7.67k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
7.67k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
7.67k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
7.67k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
7.67k
    _memory_used_counter =
605
7.67k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
7.67k
    _common_profile->add_info_string("IsColocate",
607
7.67k
                                     std::to_string(_parent->is_colocated_operator()));
608
7.67k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
7.67k
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
7.67k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
7.67k
    return Status::OK();
612
7.67k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
147k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
147k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
147k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
147k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
147k
    _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
147k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
147k
    _operator_profile->add_child(_common_profile.get(), true);
556
147k
    _operator_profile->add_child(_custom_profile.get(), true);
557
147k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
147k
    if constexpr (!is_fake_shared) {
559
147k
        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
147k
        } 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
145k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
145k
            _dependency = _shared_state->create_source_dependency(
575
145k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
145k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
145k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
145k
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
1.53k
        }
583
147k
    }
584
585
147k
    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
147k
    _rows_returned_counter =
590
147k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
147k
    _blocks_returned_counter =
592
147k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
147k
    _output_block_bytes_counter =
594
147k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
147k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
147k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
147k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
147k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
147k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
147k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
147k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
147k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
147k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
147k
    _memory_used_counter =
605
147k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
147k
    _common_profile->add_info_string("IsColocate",
607
147k
                                     std::to_string(_parent->is_colocated_operator()));
608
147k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
147k
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
147k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
147k
    return Status::OK();
612
147k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
321
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
321
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
321
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
321
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
321
    _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
321
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
321
    _operator_profile->add_child(_common_profile.get(), true);
556
321
    _operator_profile->add_child(_custom_profile.get(), true);
557
321
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
321
    if constexpr (!is_fake_shared) {
559
321
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
560
313
            _shared_state = info.shared_state_map.at(_parent->operator_id())
561
313
                                    .first.get()
562
313
                                    ->template cast<SharedStateArg>();
563
564
313
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
565
313
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
566
313
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
567
313
        } 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
8
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
8
        }
583
321
    }
584
585
321
    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
321
    _rows_returned_counter =
590
321
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
321
    _blocks_returned_counter =
592
321
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
321
    _output_block_bytes_counter =
594
321
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
321
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
321
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
321
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
321
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
321
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
321
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
321
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
321
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
321
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
321
    _memory_used_counter =
605
321
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
321
    _common_profile->add_info_string("IsColocate",
607
321
                                     std::to_string(_parent->is_colocated_operator()));
608
321
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
321
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
321
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
321
    return Status::OK();
612
321
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
79
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
79
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
79
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
79
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
79
    _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
79
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
79
    _operator_profile->add_child(_common_profile.get(), true);
556
79
    _operator_profile->add_child(_custom_profile.get(), true);
557
79
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
79
    if constexpr (!is_fake_shared) {
559
79
        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
79
        } 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
79
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
79
            _dependency = _shared_state->create_source_dependency(
575
79
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
79
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
79
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
79
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
0
        }
583
79
    }
584
585
79
    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
79
    _rows_returned_counter =
590
79
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
79
    _blocks_returned_counter =
592
79
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
79
    _output_block_bytes_counter =
594
79
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
79
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
79
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
79
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
79
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
79
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
79
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
79
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
79
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
79
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
79
    _memory_used_counter =
605
79
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
79
    _common_profile->add_info_string("IsColocate",
607
79
                                     std::to_string(_parent->is_colocated_operator()));
608
79
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
79
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
79
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
79
    return Status::OK();
612
79
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
1.16M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
1.16M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
1.16M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
1.16M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
1.16M
    _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.16M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
1.16M
    _operator_profile->add_child(_common_profile.get(), true);
556
1.16M
    _operator_profile->add_child(_custom_profile.get(), true);
557
1.16M
    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.16M
    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.16M
    _rows_returned_counter =
590
1.16M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
1.16M
    _blocks_returned_counter =
592
1.16M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
1.16M
    _output_block_bytes_counter =
594
1.16M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
1.16M
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
1.16M
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
1.16M
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
1.16M
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
1.16M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
1.16M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
1.16M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
1.16M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
1.16M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
1.16M
    _memory_used_counter =
605
1.16M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
1.16M
    _common_profile->add_info_string("IsColocate",
607
1.16M
                                     std::to_string(_parent->is_colocated_operator()));
608
1.16M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
1.16M
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
1.16M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
1.16M
    return Status::OK();
612
1.16M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
55.2k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
55.2k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
55.2k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
55.2k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
55.2k
    _operator_profile->set_metadata(_parent->node_id());
552
    // indent is false so that source operator will have same
553
    // indentation_level with its parent operator.
554
55.2k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
55.2k
    _operator_profile->add_child(_common_profile.get(), true);
556
55.2k
    _operator_profile->add_child(_custom_profile.get(), true);
557
55.2k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
55.2k
    if constexpr (!is_fake_shared) {
559
55.2k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
560
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
561
0
                                    .first.get()
562
0
                                    ->template cast<SharedStateArg>();
563
564
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
565
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
566
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
567
55.2k
        } else if (info.shared_state) {
568
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
569
                DCHECK(false);
570
            }
571
            // For UnionSourceOperator without children, there is no shared state.
572
3.01k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
3.01k
            _dependency = _shared_state->create_source_dependency(
575
3.01k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
3.01k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
3.01k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
52.2k
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
52.2k
        }
583
55.2k
    }
584
585
55.2k
    if (must_set_shared_state() && _shared_state == nullptr) {
586
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
587
0
    }
588
589
55.2k
    _rows_returned_counter =
590
55.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
55.2k
    _blocks_returned_counter =
592
55.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
55.2k
    _output_block_bytes_counter =
594
55.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
55.2k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
55.2k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
55.2k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
55.2k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
55.2k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
55.2k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
55.2k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
55.2k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
55.2k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
55.2k
    _memory_used_counter =
605
55.2k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
55.2k
    _common_profile->add_info_string("IsColocate",
607
55.2k
                                     std::to_string(_parent->is_colocated_operator()));
608
55.2k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
55.2k
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
55.2k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
55.2k
    return Status::OK();
612
55.2k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
17
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
17
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
17
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
17
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
17
    _operator_profile->set_metadata(_parent->node_id());
552
    // indent is false so that source operator will have same
553
    // indentation_level with its parent operator.
554
17
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
17
    _operator_profile->add_child(_common_profile.get(), true);
556
17
    _operator_profile->add_child(_custom_profile.get(), true);
557
17
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
17
    if constexpr (!is_fake_shared) {
559
17
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
560
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
561
0
                                    .first.get()
562
0
                                    ->template cast<SharedStateArg>();
563
564
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
565
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
566
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
567
17
        } else if (info.shared_state) {
568
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
569
                DCHECK(false);
570
            }
571
            // For UnionSourceOperator without children, there is no shared state.
572
17
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
17
            _dependency = _shared_state->create_source_dependency(
575
17
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
17
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
17
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
17
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
0
        }
583
17
    }
584
585
17
    if (must_set_shared_state() && _shared_state == nullptr) {
586
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
587
0
    }
588
589
17
    _rows_returned_counter =
590
17
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
17
    _blocks_returned_counter =
592
17
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
17
    _output_block_bytes_counter =
594
17
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
17
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
17
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
17
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
17
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
17
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
17
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
17
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
17
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
17
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
17
    _memory_used_counter =
605
17
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
17
    _common_profile->add_info_string("IsColocate",
607
17
                                     std::to_string(_parent->is_colocated_operator()));
608
17
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
17
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
17
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
17
    return Status::OK();
612
17
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
10.6k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
10.6k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
10.6k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
10.6k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
10.6k
    _operator_profile->set_metadata(_parent->node_id());
552
    // indent is false so that source operator will have same
553
    // indentation_level with its parent operator.
554
10.6k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
10.6k
    _operator_profile->add_child(_common_profile.get(), true);
556
10.6k
    _operator_profile->add_child(_custom_profile.get(), true);
557
10.6k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
10.6k
    if constexpr (!is_fake_shared) {
559
10.6k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
560
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
561
0
                                    .first.get()
562
0
                                    ->template cast<SharedStateArg>();
563
564
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
565
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
566
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
567
10.6k
        } else if (info.shared_state) {
568
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
569
                DCHECK(false);
570
            }
571
            // For UnionSourceOperator without children, there is no shared state.
572
10.6k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
10.6k
            _dependency = _shared_state->create_source_dependency(
575
10.6k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
10.6k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
10.6k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
10.6k
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
53
        }
583
10.6k
    }
584
585
10.6k
    if (must_set_shared_state() && _shared_state == nullptr) {
586
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
587
0
    }
588
589
10.6k
    _rows_returned_counter =
590
10.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
10.6k
    _blocks_returned_counter =
592
10.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
10.6k
    _output_block_bytes_counter =
594
10.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
10.6k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
10.6k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
10.6k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
10.6k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
10.6k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
10.6k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
10.6k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
10.6k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
10.6k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
10.6k
    _memory_used_counter =
605
10.6k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
10.6k
    _common_profile->add_info_string("IsColocate",
607
10.6k
                                     std::to_string(_parent->is_colocated_operator()));
608
10.6k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
10.6k
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
10.6k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
10.6k
    return Status::OK();
612
10.6k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
326
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
326
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
326
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
326
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
326
    _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
326
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
326
    _operator_profile->add_child(_common_profile.get(), true);
556
326
    _operator_profile->add_child(_custom_profile.get(), true);
557
326
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
326
    if constexpr (!is_fake_shared) {
559
326
        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
326
        } 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
2
        }
583
326
    }
584
585
326
    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
326
    _rows_returned_counter =
590
326
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
326
    _blocks_returned_counter =
592
326
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
326
    _output_block_bytes_counter =
594
326
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
326
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
326
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
326
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
326
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
326
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
326
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
326
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
326
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
326
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
326
    _memory_used_counter =
605
326
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
326
    _common_profile->add_info_string("IsColocate",
607
326
                                     std::to_string(_parent->is_colocated_operator()));
608
326
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
326
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
326
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
326
    return Status::OK();
612
326
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
4.92k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
4.92k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
4.92k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
4.92k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
4.92k
    _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.92k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
4.92k
    _operator_profile->add_child(_common_profile.get(), true);
556
4.92k
    _operator_profile->add_child(_custom_profile.get(), true);
557
4.92k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
4.92k
    if constexpr (!is_fake_shared) {
559
4.92k
        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.92k
        } 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.89k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
4.89k
            _dependency = _shared_state->create_source_dependency(
575
4.89k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
4.89k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
4.89k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
4.89k
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
24
        }
583
4.92k
    }
584
585
4.92k
    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.92k
    _rows_returned_counter =
590
4.92k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
4.92k
    _blocks_returned_counter =
592
4.92k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
4.92k
    _output_block_bytes_counter =
594
4.92k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
4.92k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
4.92k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
4.92k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
4.92k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
4.92k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
4.92k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
4.92k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
4.92k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
4.92k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
4.92k
    _memory_used_counter =
605
4.92k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
4.92k
    _common_profile->add_info_string("IsColocate",
607
4.92k
                                     std::to_string(_parent->is_colocated_operator()));
608
4.92k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
4.92k
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
4.92k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
4.92k
    return Status::OK();
612
4.92k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
786k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
786k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
786k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
786k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
786k
    _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
786k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
786k
    _operator_profile->add_child(_common_profile.get(), true);
556
786k
    _operator_profile->add_child(_custom_profile.get(), true);
557
786k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
786k
    if constexpr (!is_fake_shared) {
559
786k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
560
781k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
561
781k
                                    .first.get()
562
781k
                                    ->template cast<SharedStateArg>();
563
564
781k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
565
781k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
566
781k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
567
781k
        } 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
5.16k
        } else {
579
5.16k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
5.16k
                DCHECK(false);
581
5.16k
            }
582
5.16k
        }
583
786k
    }
584
585
786k
    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
786k
    _rows_returned_counter =
590
786k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
786k
    _blocks_returned_counter =
592
786k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
786k
    _output_block_bytes_counter =
594
786k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
786k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
786k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
786k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
786k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
786k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
786k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
786k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
786k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
786k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
786k
    _memory_used_counter =
605
786k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
786k
    _common_profile->add_info_string("IsColocate",
607
786k
                                     std::to_string(_parent->is_colocated_operator()));
608
786k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
786k
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
786k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
786k
    return Status::OK();
612
786k
}
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.53M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
2.53M
    _conjuncts.resize(_parent->_conjuncts.size());
617
2.53M
    _projections.resize(_parent->_projections.size());
618
3.03M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
499k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
499k
    }
621
5.19M
    for (size_t i = 0; i < _projections.size(); i++) {
622
2.66M
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
2.66M
    }
624
2.53M
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
2.54M
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
626
10.7k
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
627
72.0k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
628
61.3k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
629
61.3k
                    state, _intermediate_projections[i][j]));
630
61.3k
        }
631
10.7k
    }
632
2.53M
    return Status::OK();
633
2.53M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
66.7k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
66.7k
    _conjuncts.resize(_parent->_conjuncts.size());
617
66.7k
    _projections.resize(_parent->_projections.size());
618
67.8k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
1.07k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1.07k
    }
621
340k
    for (size_t i = 0; i < _projections.size(); i++) {
622
273k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
273k
    }
624
66.7k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
68.0k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
626
1.28k
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
627
14.1k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
628
12.8k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
629
12.8k
                    state, _intermediate_projections[i][j]));
630
12.8k
        }
631
1.28k
    }
632
66.7k
    return Status::OK();
633
66.7k
}
_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
270k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
270k
    _conjuncts.resize(_parent->_conjuncts.size());
617
270k
    _projections.resize(_parent->_projections.size());
618
270k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
270k
    for (size_t i = 0; i < _projections.size(); i++) {
622
359
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
359
    }
624
270k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
270k
    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
270k
    return Status::OK();
633
270k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
20
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
20
    _conjuncts.resize(_parent->_conjuncts.size());
617
20
    _projections.resize(_parent->_projections.size());
618
20
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
20
    for (size_t i = 0; i < _projections.size(); i++) {
622
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
0
    }
624
20
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
20
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
626
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
627
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
628
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
629
0
                    state, _intermediate_projections[i][j]));
630
0
        }
631
0
    }
632
20
    return Status::OK();
633
20
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
9.24k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
9.24k
    _conjuncts.resize(_parent->_conjuncts.size());
617
9.24k
    _projections.resize(_parent->_projections.size());
618
9.31k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
69
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
69
    }
621
60.9k
    for (size_t i = 0; i < _projections.size(); i++) {
622
51.6k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
51.6k
    }
624
9.24k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
9.38k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
626
144
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
627
925
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
628
781
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
629
781
                    state, _intermediate_projections[i][j]));
630
781
        }
631
144
    }
632
9.24k
    return Status::OK();
633
9.24k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
7.69k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
7.69k
    _conjuncts.resize(_parent->_conjuncts.size());
617
7.69k
    _projections.resize(_parent->_projections.size());
618
8.37k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
676
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
676
    }
621
21.1k
    for (size_t i = 0; i < _projections.size(); i++) {
622
13.4k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
13.4k
    }
624
7.69k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
7.78k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
626
90
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
627
687
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
628
597
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
629
597
                    state, _intermediate_projections[i][j]));
630
597
        }
631
90
    }
632
7.69k
    return Status::OK();
633
7.69k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
147k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
147k
    _conjuncts.resize(_parent->_conjuncts.size());
617
147k
    _projections.resize(_parent->_projections.size());
618
151k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
4.03k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
4.03k
    }
621
407k
    for (size_t i = 0; i < _projections.size(); i++) {
622
260k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
260k
    }
624
147k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
147k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
626
250
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
627
1.72k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
628
1.47k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
629
1.47k
                    state, _intermediate_projections[i][j]));
630
1.47k
        }
631
250
    }
632
147k
    return Status::OK();
633
147k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
326
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
326
    _conjuncts.resize(_parent->_conjuncts.size());
617
326
    _projections.resize(_parent->_projections.size());
618
335
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
9
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
9
    }
621
1.22k
    for (size_t i = 0; i < _projections.size(); i++) {
622
897
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
897
    }
624
326
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
326
    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
326
    return Status::OK();
633
326
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
83
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
83
    _conjuncts.resize(_parent->_conjuncts.size());
617
83
    _projections.resize(_parent->_projections.size());
618
83
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
219
    for (size_t i = 0; i < _projections.size(); i++) {
622
136
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
136
    }
624
83
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
83
    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
83
    return Status::OK();
633
83
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
1.17M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
1.17M
    _conjuncts.resize(_parent->_conjuncts.size());
617
1.17M
    _projections.resize(_parent->_projections.size());
618
1.66M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
489k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
489k
    }
621
3.13M
    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.17M
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
1.18M
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
626
8.96k
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
627
54.5k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
628
45.6k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
629
45.6k
                    state, _intermediate_projections[i][j]));
630
45.6k
        }
631
8.96k
    }
632
1.17M
    return Status::OK();
633
1.17M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
55.4k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
55.4k
    _conjuncts.resize(_parent->_conjuncts.size());
617
55.4k
    _projections.resize(_parent->_projections.size());
618
55.4k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
150k
    for (size_t i = 0; i < _projections.size(); i++) {
622
95.1k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
95.1k
    }
624
55.4k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
55.4k
    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.4k
    return Status::OK();
633
55.4k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
17
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
17
    _conjuncts.resize(_parent->_conjuncts.size());
617
17
    _projections.resize(_parent->_projections.size());
618
17
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
17
    for (size_t i = 0; i < _projections.size(); i++) {
622
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
0
    }
624
17
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
17
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
626
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
627
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
628
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
629
0
                    state, _intermediate_projections[i][j]));
630
0
        }
631
0
    }
632
17
    return Status::OK();
633
17
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
10.6k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
10.6k
    _conjuncts.resize(_parent->_conjuncts.size());
617
10.6k
    _projections.resize(_parent->_projections.size());
618
14.7k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
4.08k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
4.08k
    }
621
10.6k
    for (size_t i = 0; i < _projections.size(); i++) {
622
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
0
    }
624
10.6k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
10.6k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
626
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
627
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
628
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
629
0
                    state, _intermediate_projections[i][j]));
630
0
        }
631
0
    }
632
10.6k
    return Status::OK();
633
10.6k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
326
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
326
    _conjuncts.resize(_parent->_conjuncts.size());
617
326
    _projections.resize(_parent->_projections.size());
618
326
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
326
    for (size_t i = 0; i < _projections.size(); i++) {
622
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
0
    }
624
326
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
326
    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
326
    return Status::OK();
633
326
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
4.91k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
4.91k
    _conjuncts.resize(_parent->_conjuncts.size());
617
4.91k
    _projections.resize(_parent->_projections.size());
618
4.91k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
4.91k
    for (size_t i = 0; i < _projections.size(); i++) {
622
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
0
    }
624
4.91k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
4.91k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
626
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
627
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
628
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
629
0
                    state, _intermediate_projections[i][j]));
630
0
        }
631
0
    }
632
4.91k
    return Status::OK();
633
4.91k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
789k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
789k
    _conjuncts.resize(_parent->_conjuncts.size());
617
789k
    _projections.resize(_parent->_projections.size());
618
789k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
789k
    for (size_t i = 0; i < _projections.size(); i++) {
622
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
0
    }
624
789k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
789k
    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
789k
    return Status::OK();
633
789k
}
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
6.81k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
637
6.81k
    if (_terminated) {
638
2
        return Status::OK();
639
2
    }
640
6.81k
    _terminated = true;
641
6.81k
    return Status::OK();
642
6.81k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
636
338
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
637
338
    if (_terminated) {
638
0
        return Status::OK();
639
0
    }
640
338
    _terminated = true;
641
338
    return Status::OK();
642
338
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
636
101
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
637
101
    if (_terminated) {
638
0
        return Status::OK();
639
0
    }
640
101
    _terminated = true;
641
101
    return Status::OK();
642
101
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
636
69
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
637
69
    if (_terminated) {
638
0
        return Status::OK();
639
0
    }
640
69
    _terminated = true;
641
69
    return Status::OK();
642
69
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
636
292
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
637
292
    if (_terminated) {
638
0
        return Status::OK();
639
0
    }
640
292
    _terminated = true;
641
292
    return Status::OK();
642
292
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
636
4.75k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
637
4.75k
    if (_terminated) {
638
1
        return Status::OK();
639
1
    }
640
4.75k
    _terminated = true;
641
4.75k
    return Status::OK();
642
4.75k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
636
8
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
637
8
    if (_terminated) {
638
0
        return Status::OK();
639
0
    }
640
8
    _terminated = true;
641
8
    return Status::OK();
642
8
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
636
101
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
637
101
    if (_terminated) {
638
0
        return Status::OK();
639
0
    }
640
101
    _terminated = true;
641
101
    return Status::OK();
642
101
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
636
3
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
637
3
    if (_terminated) {
638
0
        return Status::OK();
639
0
    }
640
3
    _terminated = true;
641
3
    return Status::OK();
642
3
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
636
1.13k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
637
1.13k
    if (_terminated) {
638
1
        return Status::OK();
639
1
    }
640
1.12k
    _terminated = true;
641
1.12k
    return Status::OK();
642
1.13k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
636
16
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
637
16
    if (_terminated) {
638
0
        return Status::OK();
639
0
    }
640
16
    _terminated = true;
641
16
    return Status::OK();
642
16
}
643
644
template <typename SharedStateArg>
645
2.83M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
2.83M
    if (_closed) {
647
299k
        return Status::OK();
648
299k
    }
649
2.53M
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
1.36M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
1.36M
    }
652
2.53M
    _closed = true;
653
2.53M
    return Status::OK();
654
2.83M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
66.7k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
66.7k
    if (_closed) {
647
0
        return Status::OK();
648
0
    }
649
66.7k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
66.7k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
66.7k
    }
652
66.7k
    _closed = true;
653
66.7k
    return Status::OK();
654
66.7k
}
_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
536k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
536k
    if (_closed) {
647
268k
        return Status::OK();
648
268k
    }
649
268k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
268k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
268k
    }
652
268k
    _closed = true;
653
268k
    return Status::OK();
654
536k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
20
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
20
    if (_closed) {
647
0
        return Status::OK();
648
0
    }
649
20
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
20
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
20
    }
652
20
    _closed = true;
653
20
    return Status::OK();
654
20
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
9.24k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
9.24k
    if (_closed) {
647
0
        return Status::OK();
648
0
    }
649
9.24k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
9.24k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
9.24k
    }
652
9.24k
    _closed = true;
653
9.24k
    return Status::OK();
654
9.24k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
15.4k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
15.4k
    if (_closed) {
647
7.77k
        return Status::OK();
648
7.77k
    }
649
7.67k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
7.67k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
7.67k
    }
652
7.67k
    _closed = true;
653
7.67k
    return Status::OK();
654
15.4k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
147k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
147k
    if (_closed) {
647
0
        return Status::OK();
648
0
    }
649
147k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
147k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
147k
    }
652
147k
    _closed = true;
653
147k
    return Status::OK();
654
147k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
325
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
325
    if (_closed) {
647
0
        return Status::OK();
648
0
    }
649
325
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
325
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
325
    }
652
325
    _closed = true;
653
325
    return Status::OK();
654
325
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
78
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
78
    if (_closed) {
647
0
        return Status::OK();
648
0
    }
649
78
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
78
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
78
    }
652
78
    _closed = true;
653
78
    return Status::OK();
654
78
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
1.19M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
1.19M
    if (_closed) {
647
18.0k
        return Status::OK();
648
18.0k
    }
649
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
    }
652
1.17M
    _closed = true;
653
1.17M
    return Status::OK();
654
1.19M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
55.4k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
55.4k
    if (_closed) {
647
0
        return Status::OK();
648
0
    }
649
55.4k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
55.4k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
55.4k
    }
652
55.4k
    _closed = true;
653
55.4k
    return Status::OK();
654
55.4k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
28
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
28
    if (_closed) {
647
14
        return Status::OK();
648
14
    }
649
14
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
14
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
14
    }
652
14
    _closed = true;
653
14
    return Status::OK();
654
28
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
10.6k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
10.6k
    if (_closed) {
647
0
        return Status::OK();
648
0
    }
649
10.6k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
10.6k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
10.6k
    }
652
10.6k
    _closed = true;
653
10.6k
    return Status::OK();
654
10.6k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
444
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
444
    if (_closed) {
647
223
        return Status::OK();
648
223
    }
649
221
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
221
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
221
    }
652
221
    _closed = true;
653
221
    return Status::OK();
654
444
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
9.83k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
9.83k
    if (_closed) {
647
4.93k
        return Status::OK();
648
4.93k
    }
649
4.90k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
4.90k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
4.90k
    }
652
4.90k
    _closed = true;
653
4.90k
    return Status::OK();
654
9.83k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
790k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
790k
    if (_closed) {
647
0
        return Status::OK();
648
0
    }
649
790k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
790k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
790k
    }
652
790k
    _closed = true;
653
790k
    return Status::OK();
654
790k
}
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.06M
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
2.06M
    _operator_profile =
660
2.06M
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
2.06M
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
2.06M
    _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.06M
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
2.06M
    _operator_profile->add_child(_common_profile, true);
669
2.06M
    _operator_profile->add_child(_custom_profile, true);
670
671
2.06M
    _operator_profile->set_metadata(_parent->node_id());
672
2.06M
    _wait_for_finish_dependency_timer =
673
2.06M
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
2.06M
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
2.06M
    if constexpr (!is_fake_shared) {
676
1.37M
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
1.37M
            info.shared_state_map.end()) {
678
330k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
679
309k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
680
309k
            }
681
330k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
682
330k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
683
330k
                                                  ? 0
684
330k
                                                  : info.task_idx]
685
330k
                                  .get();
686
330k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
687
1.04M
        } else {
688
18.4E
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
18.4E
                DCHECK(false);
690
18.4E
            }
691
1.04M
            _shared_state = info.shared_state->template cast<SharedState>();
692
1.04M
            _dependency = _shared_state->create_sink_dependency(
693
1.04M
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
1.04M
        }
695
1.37M
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
1.37M
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
1.37M
    }
698
699
2.06M
    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.06M
    _rows_input_counter =
704
2.06M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
2.06M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
2.06M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
2.06M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
2.06M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
2.06M
    _memory_used_counter =
710
2.06M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
2.06M
    _common_profile->add_info_string("IsColocate",
712
2.06M
                                     std::to_string(_parent->is_colocated_operator()));
713
2.06M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
2.06M
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
2.06M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
2.06M
    return Status::OK();
717
2.06M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
114k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
114k
    _operator_profile =
660
114k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
114k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
114k
    _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
114k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
114k
    _operator_profile->add_child(_common_profile, true);
669
114k
    _operator_profile->add_child(_custom_profile, true);
670
671
114k
    _operator_profile->set_metadata(_parent->node_id());
672
114k
    _wait_for_finish_dependency_timer =
673
114k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
114k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
114k
    if constexpr (!is_fake_shared) {
676
114k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
114k
            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
21.2k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
682
21.2k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
683
21.2k
                                                  ? 0
684
21.2k
                                                  : info.task_idx]
685
21.2k
                                  .get();
686
21.2k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
687
93.5k
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
93.5k
            _shared_state = info.shared_state->template cast<SharedState>();
692
93.5k
            _dependency = _shared_state->create_sink_dependency(
693
93.5k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
93.5k
        }
695
114k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
114k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
114k
    }
698
699
114k
    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
114k
    _rows_input_counter =
704
114k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
114k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
114k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
114k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
114k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
114k
    _memory_used_counter =
710
114k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
114k
    _common_profile->add_info_string("IsColocate",
712
114k
                                     std::to_string(_parent->is_colocated_operator()));
713
114k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
114k
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
114k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
114k
    return Status::OK();
717
114k
}
_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
268k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
268k
    _operator_profile =
660
268k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
268k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
268k
    _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
268k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
268k
    _operator_profile->add_child(_common_profile, true);
669
268k
    _operator_profile->add_child(_custom_profile, true);
670
671
268k
    _operator_profile->set_metadata(_parent->node_id());
672
268k
    _wait_for_finish_dependency_timer =
673
268k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
268k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
268k
    if constexpr (!is_fake_shared) {
676
268k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
268k
            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
268k
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
268k
            _shared_state = info.shared_state->template cast<SharedState>();
692
268k
            _dependency = _shared_state->create_sink_dependency(
693
268k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
268k
        }
695
268k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
268k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
268k
    }
698
699
268k
    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
268k
    _rows_input_counter =
704
268k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
268k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
268k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
268k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
268k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
268k
    _memory_used_counter =
710
268k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
268k
    _common_profile->add_info_string("IsColocate",
712
268k
                                     std::to_string(_parent->is_colocated_operator()));
713
268k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
268k
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
268k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
268k
    return Status::OK();
717
268k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
27
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
27
    _operator_profile =
660
27
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
27
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
27
    _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
27
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
27
    _operator_profile->add_child(_common_profile, true);
669
27
    _operator_profile->add_child(_custom_profile, true);
670
671
27
    _operator_profile->set_metadata(_parent->node_id());
672
27
    _wait_for_finish_dependency_timer =
673
27
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
27
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
27
    if constexpr (!is_fake_shared) {
676
27
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
27
            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
27
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
27
            _shared_state = info.shared_state->template cast<SharedState>();
692
27
            _dependency = _shared_state->create_sink_dependency(
693
27
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
27
        }
695
27
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
27
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
27
    }
698
699
27
    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
27
    _rows_input_counter =
704
27
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
27
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
27
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
27
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
27
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
27
    _memory_used_counter =
710
27
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
27
    _common_profile->add_info_string("IsColocate",
712
27
                                     std::to_string(_parent->is_colocated_operator()));
713
27
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
27
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
27
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
27
    return Status::OK();
717
27
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
9.23k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
9.23k
    _operator_profile =
660
9.23k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
9.23k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
9.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
9.23k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
9.23k
    _operator_profile->add_child(_common_profile, true);
669
9.23k
    _operator_profile->add_child(_custom_profile, true);
670
671
9.23k
    _operator_profile->set_metadata(_parent->node_id());
672
9.23k
    _wait_for_finish_dependency_timer =
673
9.23k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
9.23k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
9.23k
    if constexpr (!is_fake_shared) {
676
9.23k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
9.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
9.23k
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
9.23k
            _shared_state = info.shared_state->template cast<SharedState>();
692
9.23k
            _dependency = _shared_state->create_sink_dependency(
693
9.23k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
9.23k
        }
695
9.23k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
9.23k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
9.23k
    }
698
699
9.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
9.23k
    _rows_input_counter =
704
9.23k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
9.23k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
9.23k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
9.23k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
9.23k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
9.23k
    _memory_used_counter =
710
9.23k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
9.23k
    _common_profile->add_info_string("IsColocate",
712
9.23k
                                     std::to_string(_parent->is_colocated_operator()));
713
9.23k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
9.23k
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
9.23k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
9.23k
    return Status::OK();
717
9.23k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
7.68k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
7.68k
    _operator_profile =
660
7.68k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
7.68k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
7.68k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
663
664
    // indentation is true
665
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
666
    // So we should set the indentation to true.
667
7.68k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
7.68k
    _operator_profile->add_child(_common_profile, true);
669
7.68k
    _operator_profile->add_child(_custom_profile, true);
670
671
7.68k
    _operator_profile->set_metadata(_parent->node_id());
672
7.68k
    _wait_for_finish_dependency_timer =
673
7.68k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
7.68k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
7.68k
    if constexpr (!is_fake_shared) {
676
7.68k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
7.68k
            info.shared_state_map.end()) {
678
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
679
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
680
            }
681
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
682
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
683
0
                                                  ? 0
684
0
                                                  : info.task_idx]
685
0
                                  .get();
686
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
687
7.68k
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
7.68k
            _shared_state = info.shared_state->template cast<SharedState>();
692
7.68k
            _dependency = _shared_state->create_sink_dependency(
693
7.68k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
7.68k
        }
695
7.68k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
7.68k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
7.68k
    }
698
699
7.68k
    if (must_set_shared_state() && _shared_state == nullptr) {
700
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
701
0
    }
702
703
7.68k
    _rows_input_counter =
704
7.68k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
7.68k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
7.68k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
7.68k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
7.68k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
7.68k
    _memory_used_counter =
710
7.68k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
7.68k
    _common_profile->add_info_string("IsColocate",
712
7.68k
                                     std::to_string(_parent->is_colocated_operator()));
713
7.68k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
7.68k
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
7.68k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
7.68k
    return Status::OK();
717
7.68k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
147k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
147k
    _operator_profile =
660
147k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
147k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
147k
    _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
147k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
147k
    _operator_profile->add_child(_common_profile, true);
669
147k
    _operator_profile->add_child(_custom_profile, true);
670
671
147k
    _operator_profile->set_metadata(_parent->node_id());
672
147k
    _wait_for_finish_dependency_timer =
673
147k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
147k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
147k
    if constexpr (!is_fake_shared) {
676
147k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
147k
            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
147k
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
147k
            _shared_state = info.shared_state->template cast<SharedState>();
692
147k
            _dependency = _shared_state->create_sink_dependency(
693
147k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
147k
        }
695
147k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
147k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
147k
    }
698
699
147k
    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
147k
    _rows_input_counter =
704
147k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
147k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
147k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
147k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
147k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
147k
    _memory_used_counter =
710
147k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
147k
    _common_profile->add_info_string("IsColocate",
712
147k
                                     std::to_string(_parent->is_colocated_operator()));
713
147k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
147k
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
147k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
147k
    return Status::OK();
717
147k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
270
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
270
    _operator_profile =
660
270
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
270
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
270
    _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
270
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
270
    _operator_profile->add_child(_common_profile, true);
669
270
    _operator_profile->add_child(_custom_profile, true);
670
671
270
    _operator_profile->set_metadata(_parent->node_id());
672
270
    _wait_for_finish_dependency_timer =
673
270
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
270
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
270
    if constexpr (!is_fake_shared) {
676
270
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
270
            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
269
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
682
269
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
683
269
                                                  ? 0
684
269
                                                  : info.task_idx]
685
269
                                  .get();
686
269
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
687
269
        } 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
270
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
270
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
270
    }
698
699
270
    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
270
    _rows_input_counter =
704
270
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
270
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
270
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
270
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
270
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
270
    _memory_used_counter =
710
270
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
270
    _common_profile->add_info_string("IsColocate",
712
270
                                     std::to_string(_parent->is_colocated_operator()));
713
270
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
270
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
270
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
270
    return Status::OK();
717
270
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
89
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
89
    _operator_profile =
660
89
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
89
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
89
    _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
89
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
89
    _operator_profile->add_child(_common_profile, true);
669
89
    _operator_profile->add_child(_custom_profile, true);
670
671
89
    _operator_profile->set_metadata(_parent->node_id());
672
89
    _wait_for_finish_dependency_timer =
673
89
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
89
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
89
    if constexpr (!is_fake_shared) {
676
89
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
89
            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
89
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
89
            _shared_state = info.shared_state->template cast<SharedState>();
692
89
            _dependency = _shared_state->create_sink_dependency(
693
89
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
89
        }
695
89
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
89
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
89
    }
698
699
89
    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
89
    _rows_input_counter =
704
89
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
89
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
89
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
89
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
89
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
89
    _memory_used_counter =
710
89
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
89
    _common_profile->add_info_string("IsColocate",
712
89
                                     std::to_string(_parent->is_colocated_operator()));
713
89
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
89
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
89
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
89
    return Status::OK();
717
89
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
693k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
693k
    _operator_profile =
660
693k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
693k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
693k
    _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
693k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
693k
    _operator_profile->add_child(_common_profile, true);
669
693k
    _operator_profile->add_child(_custom_profile, true);
670
671
693k
    _operator_profile->set_metadata(_parent->node_id());
672
693k
    _wait_for_finish_dependency_timer =
673
693k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
693k
    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
693k
    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
693k
    _rows_input_counter =
704
693k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
693k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
693k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
693k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
693k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
693k
    _memory_used_counter =
710
693k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
693k
    _common_profile->add_info_string("IsColocate",
712
693k
                                     std::to_string(_parent->is_colocated_operator()));
713
693k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
693k
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
693k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
693k
    return Status::OK();
717
693k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
6.90k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
6.90k
    _operator_profile =
660
6.90k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
6.90k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
6.90k
    _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.90k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
6.90k
    _operator_profile->add_child(_common_profile, true);
669
6.90k
    _operator_profile->add_child(_custom_profile, true);
670
671
6.90k
    _operator_profile->set_metadata(_parent->node_id());
672
6.90k
    _wait_for_finish_dependency_timer =
673
6.90k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
6.90k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
6.90k
    if constexpr (!is_fake_shared) {
676
6.90k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
6.90k
            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.90k
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
6.90k
            _shared_state = info.shared_state->template cast<SharedState>();
692
6.90k
            _dependency = _shared_state->create_sink_dependency(
693
6.90k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
6.90k
        }
695
6.90k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
6.90k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
6.90k
    }
698
699
6.90k
    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.90k
    _rows_input_counter =
704
6.90k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
6.90k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
6.90k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
6.90k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
6.90k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
6.90k
    _memory_used_counter =
710
6.90k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
6.90k
    _common_profile->add_info_string("IsColocate",
712
6.90k
                                     std::to_string(_parent->is_colocated_operator()));
713
6.90k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
6.90k
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
6.90k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
6.90k
    return Status::OK();
717
6.90k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
326
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
326
    _operator_profile =
660
326
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
326
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
326
    _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
326
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
326
    _operator_profile->add_child(_common_profile, true);
669
326
    _operator_profile->add_child(_custom_profile, true);
670
671
326
    _operator_profile->set_metadata(_parent->node_id());
672
326
    _wait_for_finish_dependency_timer =
673
326
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
326
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
326
    if constexpr (!is_fake_shared) {
676
326
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
326
            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
326
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
326
            _shared_state = info.shared_state->template cast<SharedState>();
692
326
            _dependency = _shared_state->create_sink_dependency(
693
326
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
326
        }
695
326
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
326
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
326
    }
698
699
326
    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
326
    _rows_input_counter =
704
326
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
326
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
326
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
326
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
326
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
326
    _memory_used_counter =
710
326
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
326
    _common_profile->add_info_string("IsColocate",
712
326
                                     std::to_string(_parent->is_colocated_operator()));
713
326
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
326
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
326
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
326
    return Status::OK();
717
326
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
3.66k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
3.66k
    _operator_profile =
660
3.66k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
3.66k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
3.66k
    _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.66k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
3.66k
    _operator_profile->add_child(_common_profile, true);
669
3.66k
    _operator_profile->add_child(_custom_profile, true);
670
671
3.66k
    _operator_profile->set_metadata(_parent->node_id());
672
3.66k
    _wait_for_finish_dependency_timer =
673
3.66k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
3.66k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
3.66k
    if constexpr (!is_fake_shared) {
676
3.66k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
3.66k
            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.66k
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
3.66k
            _shared_state = info.shared_state->template cast<SharedState>();
692
3.66k
            _dependency = _shared_state->create_sink_dependency(
693
3.66k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
3.66k
        }
695
3.66k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
3.66k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
3.66k
    }
698
699
3.66k
    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.66k
    _rows_input_counter =
704
3.66k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
3.66k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
3.66k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
3.66k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
3.66k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
3.66k
    _memory_used_counter =
710
3.66k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
3.66k
    _common_profile->add_info_string("IsColocate",
712
3.66k
                                     std::to_string(_parent->is_colocated_operator()));
713
3.66k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
3.66k
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
3.66k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
3.66k
    return Status::OK();
717
3.66k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
12.0k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
12.0k
    _operator_profile =
660
12.0k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
12.0k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
12.0k
    _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.0k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
12.0k
    _operator_profile->add_child(_common_profile, true);
669
12.0k
    _operator_profile->add_child(_custom_profile, true);
670
671
12.0k
    _operator_profile->set_metadata(_parent->node_id());
672
12.0k
    _wait_for_finish_dependency_timer =
673
12.0k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
12.0k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
12.0k
    if constexpr (!is_fake_shared) {
676
12.0k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
12.0k
            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.0k
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
12.0k
            _shared_state = info.shared_state->template cast<SharedState>();
692
12.0k
            _dependency = _shared_state->create_sink_dependency(
693
12.0k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
12.0k
        }
695
12.0k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
12.0k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
12.0k
    }
698
699
12.0k
    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.0k
    _rows_input_counter =
704
12.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
12.0k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
12.0k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
12.0k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
12.0k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
12.0k
    _memory_used_counter =
710
12.0k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
12.0k
    _common_profile->add_info_string("IsColocate",
712
12.0k
                                     std::to_string(_parent->is_colocated_operator()));
713
12.0k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
12.0k
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
12.0k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
12.0k
    return Status::OK();
717
12.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
309k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
309k
    _operator_profile =
660
309k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
309k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
309k
    _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
309k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
309k
    _operator_profile->add_child(_common_profile, true);
669
309k
    _operator_profile->add_child(_custom_profile, true);
670
671
309k
    _operator_profile->set_metadata(_parent->node_id());
672
309k
    _wait_for_finish_dependency_timer =
673
309k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
309k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
309k
    if constexpr (!is_fake_shared) {
676
309k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
309k
            info.shared_state_map.end()) {
678
309k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
679
309k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
680
309k
            }
681
309k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
682
309k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
683
309k
                                                  ? 0
684
309k
                                                  : info.task_idx]
685
309k
                                  .get();
686
309k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
687
18.4E
        } else {
688
18.4E
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
18.4E
                DCHECK(false);
690
18.4E
            }
691
18.4E
            _shared_state = info.shared_state->template cast<SharedState>();
692
18.4E
            _dependency = _shared_state->create_sink_dependency(
693
18.4E
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
18.4E
        }
695
309k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
309k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
309k
    }
698
699
309k
    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
309k
    _rows_input_counter =
704
309k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
309k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
309k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
309k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
309k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
309k
    _memory_used_counter =
710
309k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
309k
    _common_profile->add_info_string("IsColocate",
712
309k
                                     std::to_string(_parent->is_colocated_operator()));
713
309k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
309k
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
309k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
309k
    return Status::OK();
717
309k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
494k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
494k
    _operator_profile =
660
494k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
494k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
494k
    _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
494k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
494k
    _operator_profile->add_child(_common_profile, true);
669
494k
    _operator_profile->add_child(_custom_profile, true);
670
671
494k
    _operator_profile->set_metadata(_parent->node_id());
672
494k
    _wait_for_finish_dependency_timer =
673
494k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
494k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
494k
    if constexpr (!is_fake_shared) {
676
494k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
494k
            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
494k
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
494k
            _shared_state = info.shared_state->template cast<SharedState>();
692
494k
            _dependency = _shared_state->create_sink_dependency(
693
494k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
494k
        }
695
494k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
494k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
494k
    }
698
699
494k
    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
494k
    _rows_input_counter =
704
494k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
494k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
494k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
494k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
494k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
494k
    _memory_used_counter =
710
494k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
494k
    _common_profile->add_info_string("IsColocate",
712
494k
                                     std::to_string(_parent->is_colocated_operator()));
713
494k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
494k
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
494k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
494k
    return Status::OK();
717
494k
}
_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.07M
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
2.07M
    if (_closed) {
722
2
        return Status::OK();
723
2
    }
724
2.07M
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
1.38M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
1.38M
    }
727
2.07M
    _closed = true;
728
2.07M
    return Status::OK();
729
2.07M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
114k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
114k
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
114k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
114k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
114k
    }
727
114k
    _closed = true;
728
114k
    return Status::OK();
729
114k
}
_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
269k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
269k
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
269k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
269k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
269k
    }
727
269k
    _closed = true;
728
269k
    return Status::OK();
729
269k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
18
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
18
    if (_closed) {
722
2
        return Status::OK();
723
2
    }
724
16
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
16
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
16
    }
727
16
    _closed = true;
728
16
    return Status::OK();
729
18
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
9.22k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
9.22k
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
9.22k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
9.22k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
9.22k
    }
727
9.22k
    _closed = true;
728
9.22k
    return Status::OK();
729
9.22k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
7.67k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
7.67k
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
7.67k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
7.67k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
7.67k
    }
727
7.67k
    _closed = true;
728
7.67k
    return Status::OK();
729
7.67k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
147k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
147k
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
147k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
147k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
147k
    }
727
147k
    _closed = true;
728
147k
    return Status::OK();
729
147k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
272
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
272
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
272
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
272
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
272
    }
727
272
    _closed = true;
728
272
    return Status::OK();
729
272
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
78
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
78
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
78
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
78
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
78
    }
727
78
    _closed = true;
728
78
    return Status::OK();
729
78
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
693k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
693k
    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
693k
    _closed = true;
728
693k
    return Status::OK();
729
693k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
6.90k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
6.90k
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
6.90k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
6.90k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
6.90k
    }
727
6.90k
    _closed = true;
728
6.90k
    return Status::OK();
729
6.90k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
223
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
223
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
223
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
223
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
223
    }
727
223
    _closed = true;
728
223
    return Status::OK();
729
223
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
3.68k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
3.68k
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
3.68k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
3.68k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
3.68k
    }
727
3.68k
    _closed = true;
728
3.68k
    return Status::OK();
729
3.68k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
12.0k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
12.0k
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
12.0k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
12.0k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
12.0k
    }
727
12.0k
    _closed = true;
728
12.0k
    return Status::OK();
729
12.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
310k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
310k
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
310k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
310k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
310k
    }
727
310k
    _closed = true;
728
310k
    return Status::OK();
729
310k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
498k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
498k
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
498k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
498k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
498k
    }
727
498k
    _closed = true;
728
498k
    return Status::OK();
729
498k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
14
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
14
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
14
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
14
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
14
    }
727
14
    _closed = true;
728
14
    return Status::OK();
729
14
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
302
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
302
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
302
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
302
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
302
    }
727
302
    _closed = true;
728
302
    return Status::OK();
729
302
}
730
731
template <typename LocalStateType>
732
Status StreamingOperatorX<LocalStateType>::get_block_impl(RuntimeState* state, Block* block,
733
9.91k
                                                          bool* eos) {
734
9.91k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
735
9.90k
    return pull(state, block, eos);
736
9.91k
}
_ZN5doris18StreamingOperatorXINS_23AssertNumRowsLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
733
431
                                                          bool* eos) {
734
431
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
735
431
    return pull(state, block, eos);
736
431
}
_ZN5doris18StreamingOperatorXINS_16SelectLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
733
9.48k
                                                          bool* eos) {
734
9.48k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
735
9.47k
    return pull(state, block, eos);
736
9.48k
}
737
738
template <typename LocalStateType>
739
Status StatefulOperatorX<LocalStateType>::get_block_impl(RuntimeState* state, Block* block,
740
674k
                                                         bool* eos) {
741
674k
    auto& local_state = get_local_state(state);
742
674k
    if (need_more_input_data(state)) {
743
649k
        local_state._child_block->clear_column_data(
744
649k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
745
649k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
746
649k
                state, local_state._child_block.get(), &local_state._child_eos));
747
649k
        *eos = local_state._child_eos;
748
649k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
749
54.9k
            return Status::OK();
750
54.9k
        }
751
594k
        {
752
594k
            SCOPED_TIMER(local_state.exec_time_counter());
753
594k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
754
594k
        }
755
594k
    }
756
757
620k
    if (!need_more_input_data(state)) {
758
575k
        SCOPED_TIMER(local_state.exec_time_counter());
759
575k
        bool new_eos = false;
760
575k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
761
575k
        if (new_eos) {
762
498k
            *eos = true;
763
498k
        } else if (!need_more_input_data(state)) {
764
20.8k
            *eos = false;
765
20.8k
        }
766
575k
    }
767
620k
    return Status::OK();
768
620k
}
_ZN5doris17StatefulOperatorXINS_23HashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
740
129k
                                                         bool* eos) {
741
129k
    auto& local_state = get_local_state(state);
742
129k
    if (need_more_input_data(state)) {
743
116k
        local_state._child_block->clear_column_data(
744
116k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
745
116k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
746
116k
                state, local_state._child_block.get(), &local_state._child_eos));
747
116k
        *eos = local_state._child_eos;
748
116k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
749
33.5k
            return Status::OK();
750
33.5k
        }
751
82.9k
        {
752
82.9k
            SCOPED_TIMER(local_state.exec_time_counter());
753
82.9k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
754
82.9k
        }
755
82.9k
    }
756
757
96.2k
    if (!need_more_input_data(state)) {
758
96.2k
        SCOPED_TIMER(local_state.exec_time_counter());
759
96.2k
        bool new_eos = false;
760
96.2k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
761
96.2k
        if (new_eos) {
762
42.4k
            *eos = true;
763
53.8k
        } else if (!need_more_input_data(state)) {
764
7.09k
            *eos = false;
765
7.09k
        }
766
96.2k
    }
767
96.1k
    return Status::OK();
768
96.1k
}
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_34PartitionedHashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
_ZN5doris17StatefulOperatorXINS_16RepeatLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
740
2.87k
                                                         bool* eos) {
741
2.87k
    auto& local_state = get_local_state(state);
742
2.87k
    if (need_more_input_data(state)) {
743
1.62k
        local_state._child_block->clear_column_data(
744
1.62k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
745
1.62k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
746
1.62k
                state, local_state._child_block.get(), &local_state._child_eos));
747
1.62k
        *eos = local_state._child_eos;
748
1.62k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
749
186
            return Status::OK();
750
186
        }
751
1.43k
        {
752
1.43k
            SCOPED_TIMER(local_state.exec_time_counter());
753
1.43k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
754
1.43k
        }
755
1.43k
    }
756
757
2.70k
    if (!need_more_input_data(state)) {
758
2.70k
        SCOPED_TIMER(local_state.exec_time_counter());
759
2.70k
        bool new_eos = false;
760
2.70k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
761
2.70k
        if (new_eos) {
762
1.15k
            *eos = true;
763
1.55k
        } else if (!need_more_input_data(state)) {
764
1.25k
            *eos = false;
765
1.25k
        }
766
2.70k
    }
767
2.68k
    return Status::OK();
768
2.68k
}
_ZN5doris17StatefulOperatorXINS_25MaterializationLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
740
4.72k
                                                         bool* eos) {
741
4.72k
    auto& local_state = get_local_state(state);
742
4.72k
    if (need_more_input_data(state)) {
743
4.72k
        local_state._child_block->clear_column_data(
744
4.72k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
745
4.72k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
746
4.72k
                state, local_state._child_block.get(), &local_state._child_eos));
747
4.72k
        *eos = local_state._child_eos;
748
4.72k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
749
1.60k
            return Status::OK();
750
1.60k
        }
751
3.11k
        {
752
3.11k
            SCOPED_TIMER(local_state.exec_time_counter());
753
3.11k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
754
3.11k
        }
755
3.11k
    }
756
757
3.11k
    if (!need_more_input_data(state)) {
758
3.11k
        SCOPED_TIMER(local_state.exec_time_counter());
759
3.11k
        bool new_eos = false;
760
3.11k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
761
3.11k
        if (new_eos) {
762
1.64k
            *eos = true;
763
1.64k
        } else if (!need_more_input_data(state)) {
764
0
            *eos = false;
765
0
        }
766
3.11k
    }
767
3.11k
    return Status::OK();
768
3.11k
}
_ZN5doris17StatefulOperatorXINS_22StreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
740
29.7k
                                                         bool* eos) {
741
29.7k
    auto& local_state = get_local_state(state);
742
29.7k
    if (need_more_input_data(state)) {
743
29.7k
        local_state._child_block->clear_column_data(
744
29.7k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
745
29.7k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
746
29.7k
                state, local_state._child_block.get(), &local_state._child_eos));
747
29.7k
        *eos = local_state._child_eos;
748
29.7k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
749
3.19k
            return Status::OK();
750
3.19k
        }
751
26.5k
        {
752
26.5k
            SCOPED_TIMER(local_state.exec_time_counter());
753
26.5k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
754
26.5k
        }
755
26.5k
    }
756
757
26.5k
    if (!need_more_input_data(state)) {
758
10.7k
        SCOPED_TIMER(local_state.exec_time_counter());
759
10.7k
        bool new_eos = false;
760
10.7k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
761
10.7k
        if (new_eos) {
762
10.6k
            *eos = true;
763
10.6k
        } else if (!need_more_input_data(state)) {
764
27
            *eos = false;
765
27
        }
766
10.7k
    }
767
26.5k
    return Status::OK();
768
26.5k
}
_ZN5doris17StatefulOperatorXINS_30DistinctStreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
740
471k
                                                         bool* eos) {
741
471k
    auto& local_state = get_local_state(state);
742
473k
    if (need_more_input_data(state)) {
743
473k
        local_state._child_block->clear_column_data(
744
473k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
745
473k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
746
473k
                state, local_state._child_block.get(), &local_state._child_eos));
747
473k
        *eos = local_state._child_eos;
748
473k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
749
12.9k
            return Status::OK();
750
12.9k
        }
751
460k
        {
752
460k
            SCOPED_TIMER(local_state.exec_time_counter());
753
460k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
754
460k
        }
755
460k
    }
756
757
459k
    if (!need_more_input_data(state)) {
758
430k
        SCOPED_TIMER(local_state.exec_time_counter());
759
430k
        bool new_eos = false;
760
430k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
761
430k
        if (new_eos) {
762
429k
            *eos = true;
763
429k
        } else if (!need_more_input_data(state)) {
764
0
            *eos = false;
765
0
        }
766
430k
    }
767
459k
    return Status::OK();
768
459k
}
_ZN5doris17StatefulOperatorXINS_29NestedLoopJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
740
28.9k
                                                         bool* eos) {
741
28.9k
    auto& local_state = get_local_state(state);
742
28.9k
    if (need_more_input_data(state)) {
743
16.8k
        local_state._child_block->clear_column_data(
744
16.8k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
745
16.8k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
746
16.8k
                state, local_state._child_block.get(), &local_state._child_eos));
747
16.8k
        *eos = local_state._child_eos;
748
16.8k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
749
2.93k
            return Status::OK();
750
2.93k
        }
751
13.8k
        {
752
13.8k
            SCOPED_TIMER(local_state.exec_time_counter());
753
13.8k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
754
13.8k
        }
755
13.8k
    }
756
757
26.0k
    if (!need_more_input_data(state)) {
758
25.4k
        SCOPED_TIMER(local_state.exec_time_counter());
759
25.4k
        bool new_eos = false;
760
25.4k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
761
25.4k
        if (new_eos) {
762
9.20k
            *eos = true;
763
16.2k
        } else if (!need_more_input_data(state)) {
764
12.1k
            *eos = false;
765
12.1k
        }
766
25.4k
    }
767
26.0k
    return Status::OK();
768
26.0k
}
_ZN5doris17StatefulOperatorXINS_23TableFunctionLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
740
7.01k
                                                         bool* eos) {
741
7.01k
    auto& local_state = get_local_state(state);
742
7.01k
    if (need_more_input_data(state)) {
743
6.65k
        local_state._child_block->clear_column_data(
744
6.65k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
745
6.65k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
746
6.65k
                state, local_state._child_block.get(), &local_state._child_eos));
747
6.65k
        *eos = local_state._child_eos;
748
6.65k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
749
517
            return Status::OK();
750
517
        }
751
6.13k
        {
752
6.13k
            SCOPED_TIMER(local_state.exec_time_counter());
753
6.13k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
754
6.13k
        }
755
6.13k
    }
756
757
6.49k
    if (!need_more_input_data(state)) {
758
6.49k
        SCOPED_TIMER(local_state.exec_time_counter());
759
6.49k
        bool new_eos = false;
760
6.49k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
761
6.49k
        if (new_eos) {
762
4.44k
            *eos = true;
763
4.44k
        } else if (!need_more_input_data(state)) {
764
366
            *eos = false;
765
366
        }
766
6.49k
    }
767
6.48k
    return Status::OK();
768
6.48k
}
769
770
template <typename Writer, typename Parent>
771
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
772
64.7k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
773
64.7k
    RETURN_IF_ERROR(Base::init(state, info));
774
64.7k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
775
64.7k
                                                         "AsyncWriterDependency", true);
776
64.7k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
777
64.7k
                             _finish_dependency));
778
779
64.7k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
780
64.7k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
781
64.7k
    return Status::OK();
782
64.7k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
772
518
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
773
518
    RETURN_IF_ERROR(Base::init(state, info));
774
518
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
775
518
                                                         "AsyncWriterDependency", true);
776
518
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
777
518
                             _finish_dependency));
778
779
518
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
780
518
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
781
518
    return Status::OK();
782
518
}
_ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
772
88
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
773
88
    RETURN_IF_ERROR(Base::init(state, info));
774
88
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
775
88
                                                         "AsyncWriterDependency", true);
776
88
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
777
88
                             _finish_dependency));
778
779
88
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
780
88
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
781
88
    return Status::OK();
782
88
}
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
772
45.6k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
773
45.6k
    RETURN_IF_ERROR(Base::init(state, info));
774
45.6k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
775
45.6k
                                                         "AsyncWriterDependency", true);
776
45.6k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
777
45.6k
                             _finish_dependency));
778
779
45.6k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
780
45.6k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
781
45.6k
    return Status::OK();
782
45.6k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
772
8.94k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
773
8.94k
    RETURN_IF_ERROR(Base::init(state, info));
774
8.94k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
775
8.94k
                                                         "AsyncWriterDependency", true);
776
8.94k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
777
8.94k
                             _finish_dependency));
778
779
8.94k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
780
8.94k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
781
8.94k
    return Status::OK();
782
8.94k
}
_ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
772
5.16k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
773
5.16k
    RETURN_IF_ERROR(Base::init(state, info));
774
5.16k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
775
5.16k
                                                         "AsyncWriterDependency", true);
776
5.16k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
777
5.16k
                             _finish_dependency));
778
779
5.16k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
780
5.16k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
781
5.16k
    return Status::OK();
782
5.16k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
772
3.38k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
773
3.38k
    RETURN_IF_ERROR(Base::init(state, info));
774
3.38k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
775
3.38k
                                                         "AsyncWriterDependency", true);
776
3.38k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
777
3.38k
                             _finish_dependency));
778
779
3.38k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
780
3.38k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
781
3.38k
    return Status::OK();
782
3.38k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
772
160
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
773
160
    RETURN_IF_ERROR(Base::init(state, info));
774
160
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
775
160
                                                         "AsyncWriterDependency", true);
776
160
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
777
160
                             _finish_dependency));
778
779
160
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
780
160
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
781
160
    return Status::OK();
782
160
}
_ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
772
640
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
773
640
    RETURN_IF_ERROR(Base::init(state, info));
774
640
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
775
640
                                                         "AsyncWriterDependency", true);
776
640
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
777
640
                             _finish_dependency));
778
779
640
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
780
640
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
781
640
    return Status::OK();
782
640
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
772
156
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
773
156
    RETURN_IF_ERROR(Base::init(state, info));
774
156
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
775
156
                                                         "AsyncWriterDependency", true);
776
156
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
777
156
                             _finish_dependency));
778
779
156
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
780
156
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
781
156
    return Status::OK();
782
156
}
783
784
template <typename Writer, typename Parent>
785
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
786
65.0k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
787
65.0k
    RETURN_IF_ERROR(Base::open(state));
788
65.0k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
789
578k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
790
513k
        RETURN_IF_ERROR(
791
513k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
792
513k
    }
793
65.0k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
794
65.0k
    return Status::OK();
795
65.0k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
786
518
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
787
518
    RETURN_IF_ERROR(Base::open(state));
788
518
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
789
2.78k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
790
2.26k
        RETURN_IF_ERROR(
791
2.26k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
792
2.26k
    }
793
518
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
794
518
    return Status::OK();
795
518
}
_ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
786
88
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
787
88
    RETURN_IF_ERROR(Base::open(state));
788
88
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
789
412
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
790
324
        RETURN_IF_ERROR(
791
324
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
792
324
    }
793
88
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
794
88
    return Status::OK();
795
88
}
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
786
46.0k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
787
46.0k
    RETURN_IF_ERROR(Base::open(state));
788
46.0k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
789
333k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
790
287k
        RETURN_IF_ERROR(
791
287k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
792
287k
    }
793
46.0k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
794
46.0k
    return Status::OK();
795
46.0k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
786
8.91k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
787
8.91k
    RETURN_IF_ERROR(Base::open(state));
788
8.91k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
789
55.3k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
790
46.4k
        RETURN_IF_ERROR(
791
46.4k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
792
46.4k
    }
793
8.91k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
794
8.91k
    return Status::OK();
795
8.91k
}
_ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
786
5.16k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
787
5.16k
    RETURN_IF_ERROR(Base::open(state));
788
5.16k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
789
138k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
790
133k
        RETURN_IF_ERROR(
791
133k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
792
133k
    }
793
5.16k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
794
5.16k
    return Status::OK();
795
5.16k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
786
3.38k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
787
3.38k
    RETURN_IF_ERROR(Base::open(state));
788
3.38k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
789
41.8k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
790
38.4k
        RETURN_IF_ERROR(
791
38.4k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
792
38.4k
    }
793
3.38k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
794
3.38k
    return Status::OK();
795
3.38k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
786
160
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
787
160
    RETURN_IF_ERROR(Base::open(state));
788
160
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
789
476
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
790
316
        RETURN_IF_ERROR(
791
316
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
792
316
    }
793
160
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
794
160
    return Status::OK();
795
160
}
_ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
786
640
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
787
640
    RETURN_IF_ERROR(Base::open(state));
788
640
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
789
4.38k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
790
3.74k
        RETURN_IF_ERROR(
791
3.74k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
792
3.74k
    }
793
640
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
794
640
    return Status::OK();
795
640
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
786
156
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
787
156
    RETURN_IF_ERROR(Base::open(state));
788
156
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
789
786
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
790
630
        RETURN_IF_ERROR(
791
630
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
792
630
    }
793
156
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
794
156
    return Status::OK();
795
156
}
796
797
template <typename Writer, typename Parent>
798
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
799
88.7k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
800
88.7k
    return _writer->sink(block, eos);
801
88.7k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
799
2.62k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
800
2.62k
    return _writer->sink(block, eos);
801
2.62k
}
_ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
799
112
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
800
112
    return _writer->sink(block, eos);
801
112
}
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
799
61.4k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
800
61.4k
    return _writer->sink(block, eos);
801
61.4k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
799
10.3k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
800
10.3k
    return _writer->sink(block, eos);
801
10.3k
}
_ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
799
7.53k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
800
7.53k
    return _writer->sink(block, eos);
801
7.53k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
799
5.37k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
800
5.37k
    return _writer->sink(block, eos);
801
5.37k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
799
180
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
800
180
    return _writer->sink(block, eos);
801
180
}
_ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
799
792
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
800
792
    return _writer->sink(block, eos);
801
792
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
799
310
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
800
310
    return _writer->sink(block, eos);
801
310
}
802
803
template <typename Writer, typename Parent>
804
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
805
65.0k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
806
65.0k
    if (_closed) {
807
0
        return Status::OK();
808
0
    }
809
65.0k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
810
65.0k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
811
    // if the init failed, the _writer may be nullptr. so here need check
812
65.1k
    if (_writer) {
813
65.1k
        Status st = _writer->get_writer_status();
814
65.1k
        if (exec_status.ok()) {
815
65.0k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
816
65.0k
                                                       : Status::Cancelled("force close"));
817
65.0k
        } else {
818
104
            _writer->force_close(exec_status);
819
104
        }
820
        // If there is an error in process_block thread, then we should get the writer
821
        // status before call force_close. For example, the thread may failed in commit
822
        // transaction.
823
65.1k
        RETURN_IF_ERROR(st);
824
65.1k
    }
825
65.0k
    return Base::close(state, exec_status);
826
65.0k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
805
506
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
806
506
    if (_closed) {
807
0
        return Status::OK();
808
0
    }
809
506
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
810
506
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
811
    // if the init failed, the _writer may be nullptr. so here need check
812
506
    if (_writer) {
813
506
        Status st = _writer->get_writer_status();
814
506
        if (exec_status.ok()) {
815
506
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
816
506
                                                       : Status::Cancelled("force close"));
817
506
        } else {
818
0
            _writer->force_close(exec_status);
819
0
        }
820
        // If there is an error in process_block thread, then we should get the writer
821
        // status before call force_close. For example, the thread may failed in commit
822
        // transaction.
823
506
        RETURN_IF_ERROR(st);
824
506
    }
825
506
    return Base::close(state, exec_status);
826
506
}
_ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
805
88
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
806
88
    if (_closed) {
807
0
        return Status::OK();
808
0
    }
809
88
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
810
88
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
811
    // if the init failed, the _writer may be nullptr. so here need check
812
88
    if (_writer) {
813
88
        Status st = _writer->get_writer_status();
814
88
        if (exec_status.ok()) {
815
88
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
816
88
                                                       : Status::Cancelled("force close"));
817
88
        } else {
818
0
            _writer->force_close(exec_status);
819
0
        }
820
        // If there is an error in process_block thread, then we should get the writer
821
        // status before call force_close. For example, the thread may failed in commit
822
        // transaction.
823
88
        RETURN_IF_ERROR(st);
824
88
    }
825
80
    return Base::close(state, exec_status);
826
88
}
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
805
46.0k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
806
46.0k
    if (_closed) {
807
0
        return Status::OK();
808
0
    }
809
46.0k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
810
46.0k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
811
    // if the init failed, the _writer may be nullptr. so here need check
812
46.1k
    if (_writer) {
813
46.1k
        Status st = _writer->get_writer_status();
814
46.1k
        if (exec_status.ok()) {
815
46.0k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
816
46.0k
                                                       : Status::Cancelled("force close"));
817
46.0k
        } else {
818
70
            _writer->force_close(exec_status);
819
70
        }
820
        // If there is an error in process_block thread, then we should get the writer
821
        // status before call force_close. For example, the thread may failed in commit
822
        // transaction.
823
46.1k
        RETURN_IF_ERROR(st);
824
46.1k
    }
825
46.0k
    return Base::close(state, exec_status);
826
46.0k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
805
8.92k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
806
8.92k
    if (_closed) {
807
0
        return Status::OK();
808
0
    }
809
8.92k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
810
8.92k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
811
    // if the init failed, the _writer may be nullptr. so here need check
812
8.94k
    if (_writer) {
813
8.94k
        Status st = _writer->get_writer_status();
814
8.94k
        if (exec_status.ok()) {
815
8.90k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
816
8.90k
                                                       : Status::Cancelled("force close"));
817
8.90k
        } else {
818
32
            _writer->force_close(exec_status);
819
32
        }
820
        // If there is an error in process_block thread, then we should get the writer
821
        // status before call force_close. For example, the thread may failed in commit
822
        // transaction.
823
8.94k
        RETURN_IF_ERROR(st);
824
8.94k
    }
825
8.92k
    return Base::close(state, exec_status);
826
8.92k
}
_ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
805
5.16k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
806
5.16k
    if (_closed) {
807
0
        return Status::OK();
808
0
    }
809
5.16k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
810
5.16k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
811
    // if the init failed, the _writer may be nullptr. so here need check
812
5.16k
    if (_writer) {
813
5.16k
        Status st = _writer->get_writer_status();
814
5.16k
        if (exec_status.ok()) {
815
5.16k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
816
5.16k
                                                       : Status::Cancelled("force close"));
817
5.16k
        } else {
818
0
            _writer->force_close(exec_status);
819
0
        }
820
        // If there is an error in process_block thread, then we should get the writer
821
        // status before call force_close. For example, the thread may failed in commit
822
        // transaction.
823
5.16k
        RETURN_IF_ERROR(st);
824
5.16k
    }
825
5.16k
    return Base::close(state, exec_status);
826
5.16k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
805
3.38k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
806
3.38k
    if (_closed) {
807
0
        return Status::OK();
808
0
    }
809
3.38k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
810
3.38k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
811
    // if the init failed, the _writer may be nullptr. so here need check
812
3.38k
    if (_writer) {
813
3.38k
        Status st = _writer->get_writer_status();
814
3.38k
        if (exec_status.ok()) {
815
3.38k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
816
3.38k
                                                       : Status::Cancelled("force close"));
817
3.38k
        } else {
818
2
            _writer->force_close(exec_status);
819
2
        }
820
        // If there is an error in process_block thread, then we should get the writer
821
        // status before call force_close. For example, the thread may failed in commit
822
        // transaction.
823
3.38k
        RETURN_IF_ERROR(st);
824
3.38k
    }
825
3.38k
    return Base::close(state, exec_status);
826
3.38k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
805
160
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
806
160
    if (_closed) {
807
0
        return Status::OK();
808
0
    }
809
160
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
810
160
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
811
    // if the init failed, the _writer may be nullptr. so here need check
812
160
    if (_writer) {
813
160
        Status st = _writer->get_writer_status();
814
160
        if (exec_status.ok()) {
815
160
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
816
160
                                                       : Status::Cancelled("force close"));
817
160
        } else {
818
0
            _writer->force_close(exec_status);
819
0
        }
820
        // If there is an error in process_block thread, then we should get the writer
821
        // status before call force_close. For example, the thread may failed in commit
822
        // transaction.
823
160
        RETURN_IF_ERROR(st);
824
160
    }
825
160
    return Base::close(state, exec_status);
826
160
}
_ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
805
640
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
806
640
    if (_closed) {
807
0
        return Status::OK();
808
0
    }
809
640
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
810
640
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
811
    // if the init failed, the _writer may be nullptr. so here need check
812
640
    if (_writer) {
813
640
        Status st = _writer->get_writer_status();
814
640
        if (exec_status.ok()) {
815
640
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
816
640
                                                       : Status::Cancelled("force close"));
817
640
        } else {
818
0
            _writer->force_close(exec_status);
819
0
        }
820
        // If there is an error in process_block thread, then we should get the writer
821
        // status before call force_close. For example, the thread may failed in commit
822
        // transaction.
823
640
        RETURN_IF_ERROR(st);
824
640
    }
825
640
    return Base::close(state, exec_status);
826
640
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
805
156
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
806
156
    if (_closed) {
807
0
        return Status::OK();
808
0
    }
809
156
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
810
156
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
811
    // if the init failed, the _writer may be nullptr. so here need check
812
156
    if (_writer) {
813
156
        Status st = _writer->get_writer_status();
814
156
        if (exec_status.ok()) {
815
156
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
816
156
                                                       : Status::Cancelled("force close"));
817
156
        } else {
818
0
            _writer->force_close(exec_status);
819
0
        }
820
        // If there is an error in process_block thread, then we should get the writer
821
        // status before call force_close. For example, the thread may failed in commit
822
        // transaction.
823
156
        RETURN_IF_ERROR(st);
824
156
    }
825
156
    return Base::close(state, exec_status);
826
156
}
827
828
#define DECLARE_OPERATOR(LOCAL_STATE) template class DataSinkOperatorX<LOCAL_STATE>;
829
DECLARE_OPERATOR(HashJoinBuildSinkLocalState)
830
DECLARE_OPERATOR(ResultSinkLocalState)
831
DECLARE_OPERATOR(JdbcTableSinkLocalState)
832
DECLARE_OPERATOR(MemoryScratchSinkLocalState)
833
DECLARE_OPERATOR(ResultFileSinkLocalState)
834
DECLARE_OPERATOR(OlapTableSinkLocalState)
835
DECLARE_OPERATOR(OlapTableSinkV2LocalState)
836
DECLARE_OPERATOR(HiveTableSinkLocalState)
837
DECLARE_OPERATOR(TVFTableSinkLocalState)
838
DECLARE_OPERATOR(IcebergTableSinkLocalState)
839
DECLARE_OPERATOR(SpillIcebergTableSinkLocalState)
840
DECLARE_OPERATOR(IcebergDeleteSinkLocalState)
841
DECLARE_OPERATOR(IcebergMergeSinkLocalState)
842
DECLARE_OPERATOR(MCTableSinkLocalState)
843
DECLARE_OPERATOR(AnalyticSinkLocalState)
844
DECLARE_OPERATOR(BlackholeSinkLocalState)
845
DECLARE_OPERATOR(SortSinkLocalState)
846
DECLARE_OPERATOR(SpillSortSinkLocalState)
847
DECLARE_OPERATOR(LocalExchangeSinkLocalState)
848
DECLARE_OPERATOR(AggSinkLocalState)
849
DECLARE_OPERATOR(BucketedAggSinkLocalState)
850
DECLARE_OPERATOR(PartitionedAggSinkLocalState)
851
DECLARE_OPERATOR(ExchangeSinkLocalState)
852
DECLARE_OPERATOR(NestedLoopJoinBuildSinkLocalState)
853
DECLARE_OPERATOR(UnionSinkLocalState)
854
DECLARE_OPERATOR(MultiCastDataStreamSinkLocalState)
855
DECLARE_OPERATOR(PartitionSortSinkLocalState)
856
DECLARE_OPERATOR(SetProbeSinkLocalState<true>)
857
DECLARE_OPERATOR(SetProbeSinkLocalState<false>)
858
DECLARE_OPERATOR(SetSinkLocalState<true>)
859
DECLARE_OPERATOR(SetSinkLocalState<false>)
860
DECLARE_OPERATOR(PartitionedHashJoinSinkLocalState)
861
DECLARE_OPERATOR(GroupCommitBlockSinkLocalState)
862
DECLARE_OPERATOR(CacheSinkLocalState)
863
DECLARE_OPERATOR(DictSinkLocalState)
864
DECLARE_OPERATOR(RecCTESinkLocalState)
865
DECLARE_OPERATOR(RecCTEAnchorSinkLocalState)
866
867
#undef DECLARE_OPERATOR
868
869
#define DECLARE_OPERATOR(LOCAL_STATE) template class OperatorX<LOCAL_STATE>;
870
DECLARE_OPERATOR(HashJoinProbeLocalState)
871
DECLARE_OPERATOR(OlapScanLocalState)
872
DECLARE_OPERATOR(GroupCommitLocalState)
873
DECLARE_OPERATOR(JDBCScanLocalState)
874
DECLARE_OPERATOR(FileScanLocalState)
875
DECLARE_OPERATOR(AnalyticLocalState)
876
DECLARE_OPERATOR(SortLocalState)
877
DECLARE_OPERATOR(SpillSortLocalState)
878
DECLARE_OPERATOR(LocalMergeSortLocalState)
879
DECLARE_OPERATOR(AggLocalState)
880
DECLARE_OPERATOR(BucketedAggLocalState)
881
DECLARE_OPERATOR(PartitionedAggLocalState)
882
DECLARE_OPERATOR(TableFunctionLocalState)
883
DECLARE_OPERATOR(ExchangeLocalState)
884
DECLARE_OPERATOR(RepeatLocalState)
885
DECLARE_OPERATOR(NestedLoopJoinProbeLocalState)
886
DECLARE_OPERATOR(AssertNumRowsLocalState)
887
DECLARE_OPERATOR(EmptySetLocalState)
888
DECLARE_OPERATOR(UnionSourceLocalState)
889
DECLARE_OPERATOR(MultiCastDataStreamSourceLocalState)
890
DECLARE_OPERATOR(PartitionSortSourceLocalState)
891
DECLARE_OPERATOR(SetSourceLocalState<true>)
892
DECLARE_OPERATOR(SetSourceLocalState<false>)
893
DECLARE_OPERATOR(DataGenLocalState)
894
DECLARE_OPERATOR(SchemaScanLocalState)
895
DECLARE_OPERATOR(MetaScanLocalState)
896
DECLARE_OPERATOR(LocalExchangeSourceLocalState)
897
DECLARE_OPERATOR(PartitionedHashJoinProbeLocalState)
898
DECLARE_OPERATOR(CacheSourceLocalState)
899
DECLARE_OPERATOR(RecCTESourceLocalState)
900
DECLARE_OPERATOR(RecCTEScanLocalState)
901
902
#ifdef BE_TEST
903
DECLARE_OPERATOR(MockLocalState)
904
DECLARE_OPERATOR(MockScanLocalState)
905
#endif
906
#undef DECLARE_OPERATOR
907
908
template class StreamingOperatorX<AssertNumRowsLocalState>;
909
template class StreamingOperatorX<SelectLocalState>;
910
911
template class StatefulOperatorX<HashJoinProbeLocalState>;
912
template class StatefulOperatorX<PartitionedHashJoinProbeLocalState>;
913
template class StatefulOperatorX<RepeatLocalState>;
914
template class StatefulOperatorX<MaterializationLocalState>;
915
template class StatefulOperatorX<StreamingAggLocalState>;
916
template class StatefulOperatorX<DistinctStreamingAggLocalState>;
917
template class StatefulOperatorX<NestedLoopJoinProbeLocalState>;
918
template class StatefulOperatorX<TableFunctionLocalState>;
919
920
template class PipelineXSinkLocalState<HashJoinSharedState>;
921
template class PipelineXSinkLocalState<PartitionedHashJoinSharedState>;
922
template class PipelineXSinkLocalState<SortSharedState>;
923
template class PipelineXSinkLocalState<SpillSortSharedState>;
924
template class PipelineXSinkLocalState<NestedLoopJoinSharedState>;
925
template class PipelineXSinkLocalState<AnalyticSharedState>;
926
template class PipelineXSinkLocalState<AggSharedState>;
927
template class PipelineXSinkLocalState<BucketedAggSharedState>;
928
template class PipelineXSinkLocalState<PartitionedAggSharedState>;
929
template class PipelineXSinkLocalState<FakeSharedState>;
930
template class PipelineXSinkLocalState<UnionSharedState>;
931
template class PipelineXSinkLocalState<PartitionSortNodeSharedState>;
932
template class PipelineXSinkLocalState<MultiCastSharedState>;
933
template class PipelineXSinkLocalState<SetSharedState>;
934
template class PipelineXSinkLocalState<LocalExchangeSharedState>;
935
template class PipelineXSinkLocalState<BasicSharedState>;
936
template class PipelineXSinkLocalState<DataQueueSharedState>;
937
template class PipelineXSinkLocalState<RecCTESharedState>;
938
939
template class PipelineXLocalState<HashJoinSharedState>;
940
template class PipelineXLocalState<PartitionedHashJoinSharedState>;
941
template class PipelineXLocalState<SortSharedState>;
942
template class PipelineXLocalState<SpillSortSharedState>;
943
template class PipelineXLocalState<NestedLoopJoinSharedState>;
944
template class PipelineXLocalState<AnalyticSharedState>;
945
template class PipelineXLocalState<AggSharedState>;
946
template class PipelineXLocalState<BucketedAggSharedState>;
947
template class PipelineXLocalState<PartitionedAggSharedState>;
948
template class PipelineXLocalState<FakeSharedState>;
949
template class PipelineXLocalState<UnionSharedState>;
950
template class PipelineXLocalState<DataQueueSharedState>;
951
template class PipelineXLocalState<MultiCastSharedState>;
952
template class PipelineXLocalState<PartitionSortNodeSharedState>;
953
template class PipelineXLocalState<SetSharedState>;
954
template class PipelineXLocalState<LocalExchangeSharedState>;
955
template class PipelineXLocalState<BasicSharedState>;
956
template class PipelineXLocalState<RecCTESharedState>;
957
958
template class AsyncWriterSink<doris::VFileResultWriter, ResultFileSinkOperatorX>;
959
template class AsyncWriterSink<doris::VJdbcTableWriter, JdbcTableSinkOperatorX>;
960
template class AsyncWriterSink<doris::VTabletWriter, OlapTableSinkOperatorX>;
961
template class AsyncWriterSink<doris::VTabletWriterV2, OlapTableSinkV2OperatorX>;
962
template class AsyncWriterSink<doris::VHiveTableWriter, HiveTableSinkOperatorX>;
963
template class AsyncWriterSink<doris::VIcebergTableWriter, IcebergTableSinkOperatorX>;
964
template class AsyncWriterSink<doris::VIcebergTableWriter, SpillIcebergTableSinkOperatorX>;
965
template class AsyncWriterSink<doris::VIcebergDeleteSink, IcebergDeleteSinkOperatorX>;
966
template class AsyncWriterSink<doris::VIcebergMergeSink, IcebergMergeSinkOperatorX>;
967
template class AsyncWriterSink<doris::VMCTableWriter, MCTableSinkOperatorX>;
968
template class AsyncWriterSink<doris::VTVFTableWriter, TVFTableSinkOperatorX>;
969
970
#ifdef BE_TEST
971
template class OperatorX<DummyOperatorLocalState>;
972
template class DataSinkOperatorX<DummySinkLocalState>;
973
#endif
974
975
} // namespace doris