Coverage Report

Created: 2026-05-27 06:37

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.18M
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
2.18M
    if (_parent->nereids_id() == -1) {
120
1.13M
        return fmt::format("(id={})", _parent->node_id());
121
1.13M
    } else {
122
1.04M
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
1.04M
    }
124
2.18M
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
66.1k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
66.1k
    if (_parent->nereids_id() == -1) {
120
0
        return fmt::format("(id={})", _parent->node_id());
121
66.1k
    } else {
122
66.1k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
66.1k
    }
124
66.1k
}
_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
250k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
250k
    if (_parent->nereids_id() == -1) {
120
12
        return fmt::format("(id={})", _parent->node_id());
121
249k
    } else {
122
249k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
249k
    }
124
250k
}
_ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
22
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
22
    if (_parent->nereids_id() == -1) {
120
0
        return fmt::format("(id={})", _parent->node_id());
121
22
    } else {
122
22
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
22
    }
124
22
}
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
30.7k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
30.7k
    if (_parent->nereids_id() == -1) {
120
0
        return fmt::format("(id={})", _parent->node_id());
121
30.7k
    } else {
122
30.7k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
30.7k
    }
124
30.7k
}
_ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
8.91k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
8.91k
    if (_parent->nereids_id() == -1) {
120
9
        return fmt::format("(id={})", _parent->node_id());
121
8.90k
    } else {
122
8.90k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
8.90k
    }
124
8.91k
}
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
207k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
207k
    if (_parent->nereids_id() == -1) {
120
29
        return fmt::format("(id={})", _parent->node_id());
121
207k
    } else {
122
207k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
207k
    }
124
207k
}
_ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
251
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
251
    if (_parent->nereids_id() == -1) {
120
0
        return fmt::format("(id={})", _parent->node_id());
121
251
    } else {
122
251
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
251
    }
124
251
}
_ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
141
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
141
    if (_parent->nereids_id() == -1) {
120
0
        return fmt::format("(id={})", _parent->node_id());
121
141
    } else {
122
141
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
141
    }
124
141
}
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
855k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
855k
    if (_parent->nereids_id() == -1) {
120
430k
        return fmt::format("(id={})", _parent->node_id());
121
430k
    } else {
122
424k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
424k
    }
124
855k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
54.8k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
54.8k
    if (_parent->nereids_id() == -1) {
120
2
        return fmt::format("(id={})", _parent->node_id());
121
54.8k
    } else {
122
54.8k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
54.8k
    }
124
54.8k
}
_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
42.3k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
42.3k
    if (_parent->nereids_id() == -1) {
120
42.3k
        return fmt::format("(id={})", _parent->node_id());
121
42.3k
    } else {
122
14
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
14
    }
124
42.3k
}
_ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
464
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
464
    if (_parent->nereids_id() == -1) {
120
102
        return fmt::format("(id={})", _parent->node_id());
121
362
    } else {
122
362
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
362
    }
124
464
}
_ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
4.79k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
4.79k
    if (_parent->nereids_id() == -1) {
120
13
        return fmt::format("(id={})", _parent->node_id());
121
4.78k
    } else {
122
4.78k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
4.78k
    }
124
4.79k
}
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
665k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
665k
    if (_parent->nereids_id() == -1) {
120
665k
        return fmt::format("(id={})", _parent->node_id());
121
665k
    } else {
122
10
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
10
    }
124
665k
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
_ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
151
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
151
    if (_parent->nereids_id() == -1) {
120
0
        return fmt::format("(id={})", _parent->node_id());
121
151
    } else {
122
151
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
151
    }
124
151
}
125
126
template <typename SharedStateArg>
127
1.35M
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
1.35M
    if (_parent->nereids_id() == -1) {
129
734k
        return fmt::format("(id={})", _parent->node_id());
130
734k
    } else {
131
619k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
619k
    }
133
1.35M
}
_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
250k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
250k
    if (_parent->nereids_id() == -1) {
129
9
        return fmt::format("(id={})", _parent->node_id());
130
250k
    } else {
131
250k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
250k
    }
133
250k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
28
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
28
    if (_parent->nereids_id() == -1) {
129
0
        return fmt::format("(id={})", _parent->node_id());
130
28
    } else {
131
28
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
28
    }
133
28
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
30.7k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
30.7k
    if (_parent->nereids_id() == -1) {
129
0
        return fmt::format("(id={})", _parent->node_id());
130
30.7k
    } else {
131
30.7k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
30.7k
    }
133
30.7k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
8.93k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
8.93k
    if (_parent->nereids_id() == -1) {
129
9
        return fmt::format("(id={})", _parent->node_id());
130
8.92k
    } else {
131
8.92k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
8.92k
    }
133
8.93k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
208k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
208k
    if (_parent->nereids_id() == -1) {
129
29
        return fmt::format("(id={})", _parent->node_id());
130
208k
    } else {
131
208k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
208k
    }
133
208k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
218
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
218
    if (_parent->nereids_id() == -1) {
129
0
        return fmt::format("(id={})", _parent->node_id());
130
218
    } else {
131
218
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
218
    }
133
218
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
151
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
151
    if (_parent->nereids_id() == -1) {
129
0
        return fmt::format("(id={})", _parent->node_id());
130
151
    } else {
131
151
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
151
    }
133
151
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
95
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
95
    if (_parent->nereids_id() == -1) {
129
95
        return fmt::format("(id={})", _parent->node_id());
130
95
    } else {
131
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
0
    }
133
95
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
6.37k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
6.37k
    if (_parent->nereids_id() == -1) {
129
3
        return fmt::format("(id={})", _parent->node_id());
130
6.36k
    } else {
131
6.36k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
6.36k
    }
133
6.37k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
464
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
464
    if (_parent->nereids_id() == -1) {
129
102
        return fmt::format("(id={})", _parent->node_id());
130
362
    } else {
131
362
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
362
    }
133
464
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
11.9k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
11.9k
    if (_parent->nereids_id() == -1) {
129
11.9k
        return fmt::format("(id={})", _parent->node_id());
130
11.9k
    } else {
131
1
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
1
    }
133
11.9k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
261k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
261k
    if (_parent->nereids_id() == -1) {
129
261k
        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
261k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
460k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
460k
    if (_parent->nereids_id() == -1) {
129
460k
        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
460k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
17
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
17
    if (_parent->nereids_id() == -1) {
129
17
        return fmt::format("(id={})", _parent->node_id());
130
17
    } else {
131
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
0
    }
133
17
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
302
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
302
    if (_parent->nereids_id() == -1) {
129
0
        return fmt::format("(id={})", _parent->node_id());
130
302
    } else {
131
302
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
302
    }
133
302
}
134
135
template <typename SharedStateArg>
136
35.1k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
35.1k
    if (_terminated) {
138
2
        return Status::OK();
139
2
    }
140
35.1k
    _terminated = true;
141
35.1k
    return Status::OK();
142
35.1k
}
_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
1.65k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
1.65k
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
1.65k
    _terminated = true;
141
1.65k
    return Status::OK();
142
1.65k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
13
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
13
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
13
    _terminated = true;
141
13
    return Status::OK();
142
13
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
1
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
1
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
1
    _terminated = true;
141
1
    return Status::OK();
142
1
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
4.77k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
4.77k
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
4.77k
    _terminated = true;
141
4.77k
    return Status::OK();
142
4.77k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
3
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
3
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
3
    _terminated = true;
141
3
    return Status::OK();
142
3
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
913
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
913
    if (_terminated) {
138
2
        return Status::OK();
139
2
    }
140
911
    _terminated = true;
141
911
    return Status::OK();
142
913
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
4
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
4
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
4
    _terminated = true;
141
4
    return Status::OK();
142
4
}
_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
3.40k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
3.40k
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
3.40k
    _terminated = true;
141
3.40k
    return Status::OK();
142
3.40k
}
_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
156
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
156
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
156
    _terminated = true;
141
156
    return Status::OK();
142
156
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
142
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
142
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
142
    _terminated = true;
141
142
    return Status::OK();
142
142
}
143
144
1.13M
DataDistribution OperatorBase::required_data_distribution(RuntimeState* /*state*/) const {
145
1.13M
    return _child && _child->is_serial_operator() && !is_source()
146
1.13M
                   ? DataDistribution(ExchangeType::PASSTHROUGH)
147
1.13M
                   : DataDistribution(ExchangeType::NOOP);
148
1.13M
}
149
150
81.6k
const RowDescriptor& OperatorBase::row_desc() const {
151
81.6k
    return _child->row_desc();
152
81.6k
}
153
154
template <typename SharedStateArg>
155
21.0k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
156
21.0k
    fmt::memory_buffer debug_string_buffer;
157
21.0k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
158
21.0k
    return fmt::to_string(debug_string_buffer);
159
21.0k
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
155
84
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
156
84
    fmt::memory_buffer debug_string_buffer;
157
84
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
158
84
    return fmt::to_string(debug_string_buffer);
159
84
}
_ZNK5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
155
3
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
156
3
    fmt::memory_buffer debug_string_buffer;
157
3
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
158
3
    return fmt::to_string(debug_string_buffer);
159
3
}
_ZNK5doris19PipelineXLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
155
28
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
156
28
    fmt::memory_buffer debug_string_buffer;
157
28
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
158
28
    return fmt::to_string(debug_string_buffer);
159
28
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
155
3
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
156
3
    fmt::memory_buffer debug_string_buffer;
157
3
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
158
3
    return fmt::to_string(debug_string_buffer);
159
3
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
155
24
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
156
24
    fmt::memory_buffer debug_string_buffer;
157
24
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
158
24
    return fmt::to_string(debug_string_buffer);
159
24
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
155
20.6k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
156
20.6k
    fmt::memory_buffer debug_string_buffer;
157
20.6k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
158
20.6k
    return fmt::to_string(debug_string_buffer);
159
20.6k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
155
1
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
156
1
    fmt::memory_buffer debug_string_buffer;
157
1
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
158
1
    return fmt::to_string(debug_string_buffer);
159
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
155
265
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
156
265
    fmt::memory_buffer debug_string_buffer;
157
265
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
158
265
    return fmt::to_string(debug_string_buffer);
159
265
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
160
161
template <typename SharedStateArg>
162
20.9k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
163
20.9k
    fmt::memory_buffer debug_string_buffer;
164
20.9k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
165
20.9k
    return fmt::to_string(debug_string_buffer);
166
20.9k
}
_ZNK5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
162
24
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
163
24
    fmt::memory_buffer debug_string_buffer;
164
24
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
165
24
    return fmt::to_string(debug_string_buffer);
166
24
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
162
28
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
163
28
    fmt::memory_buffer debug_string_buffer;
164
28
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
165
28
    return fmt::to_string(debug_string_buffer);
166
28
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
162
24
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
163
24
    fmt::memory_buffer debug_string_buffer;
164
24
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
165
24
    return fmt::to_string(debug_string_buffer);
166
24
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
162
130
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
163
130
    fmt::memory_buffer debug_string_buffer;
164
130
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
165
130
    return fmt::to_string(debug_string_buffer);
166
130
}
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
162
121
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
163
121
    fmt::memory_buffer debug_string_buffer;
164
121
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
165
121
    return fmt::to_string(debug_string_buffer);
166
121
}
_ZNK5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
162
20.5k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
163
20.5k
    fmt::memory_buffer debug_string_buffer;
164
20.5k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
165
20.5k
    return fmt::to_string(debug_string_buffer);
166
20.5k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
167
168
21.3k
std::string OperatorXBase::debug_string(int indentation_level) const {
169
21.3k
    fmt::memory_buffer debug_string_buffer;
170
21.3k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, parallel_tasks={}, _is_serial_operator={}",
171
21.3k
                   std::string(indentation_level * 2, ' '), _op_name, node_id(), _parallel_tasks,
172
21.3k
                   _is_serial_operator);
173
21.3k
    return fmt::to_string(debug_string_buffer);
174
21.3k
}
175
176
21.0k
std::string OperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
177
21.0k
    return state->get_local_state(operator_id())->debug_string(indentation_level);
178
21.0k
}
179
180
900k
Status OperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
181
900k
    std::string node_name = print_plan_node_type(tnode.node_type);
182
900k
    _nereids_id = tnode.nereids_id;
183
900k
    if (!tnode.intermediate_output_tuple_id_list.empty()) {
184
5.81k
        if (!tnode.__isset.output_tuple_id) {
185
0
            return Status::InternalError("no final output tuple id");
186
0
        }
187
5.81k
        if (tnode.intermediate_output_tuple_id_list.size() !=
188
5.81k
            tnode.intermediate_projections_list.size()) {
189
0
            return Status::InternalError(
190
0
                    "intermediate_output_tuple_id_list size:{} not match "
191
0
                    "intermediate_projections_list size:{}",
192
0
                    tnode.intermediate_output_tuple_id_list.size(),
193
0
                    tnode.intermediate_projections_list.size());
194
0
        }
195
5.81k
    }
196
900k
    auto substr = node_name.substr(0, node_name.find("_NODE"));
197
900k
    _op_name = substr + "_OPERATOR";
198
199
900k
    if (tnode.__isset.vconjunct) {
200
0
        return Status::InternalError("vconjunct is not supported yet");
201
900k
    } else if (tnode.__isset.conjuncts) {
202
444k
        for (const auto& conjunct : tnode.conjuncts) {
203
444k
            VExprContextSPtr context;
204
444k
            RETURN_IF_ERROR(VExpr::create_expr_tree(conjunct, context));
205
444k
            _conjuncts.emplace_back(context);
206
444k
        }
207
144k
    }
208
209
    // create the projections expr
210
900k
    if (tnode.__isset.projections) {
211
356k
        DCHECK(tnode.__isset.output_tuple_id);
212
356k
        RETURN_IF_ERROR(VExpr::create_expr_trees(tnode.projections, _projections));
213
356k
    }
214
900k
    if (!tnode.intermediate_projections_list.empty()) {
215
5.81k
        DCHECK(tnode.__isset.projections) << "no final projections";
216
5.81k
        _intermediate_projections.reserve(tnode.intermediate_projections_list.size());
217
18.0k
        for (const auto& tnode_projections : tnode.intermediate_projections_list) {
218
18.0k
            VExprContextSPtrs projections;
219
18.0k
            RETURN_IF_ERROR(VExpr::create_expr_trees(tnode_projections, projections));
220
18.0k
            _intermediate_projections.push_back(projections);
221
18.0k
        }
222
5.81k
    }
223
900k
    return Status::OK();
224
900k
}
225
226
964k
Status OperatorXBase::prepare(RuntimeState* state) {
227
964k
    for (auto& conjunct : _conjuncts) {
228
443k
        RETURN_IF_ERROR(conjunct->prepare(state, intermediate_row_desc()));
229
443k
    }
230
964k
    if (state->enable_adjust_conjunct_order_by_cost()) {
231
913k
        std::ranges::sort(_conjuncts, [](const auto& a, const auto& b) {
232
598k
            return a->execute_cost() < b->execute_cost();
233
598k
        });
234
913k
    };
235
236
982k
    for (int i = 0; i < _intermediate_projections.size(); i++) {
237
18.0k
        RETURN_IF_ERROR(
238
18.0k
                VExpr::prepare(_intermediate_projections[i], state, intermediate_row_desc(i)));
239
18.0k
    }
240
964k
    RETURN_IF_ERROR(VExpr::prepare(_projections, state, projections_row_desc()));
241
242
964k
    if (has_output_row_desc()) {
243
356k
        RETURN_IF_ERROR(VExpr::check_expr_output_type(_projections, *_output_row_descriptor));
244
356k
    }
245
246
964k
    for (auto& conjunct : _conjuncts) {
247
443k
        RETURN_IF_ERROR(conjunct->open(state));
248
443k
    }
249
964k
    RETURN_IF_ERROR(VExpr::open(_projections, state));
250
964k
    for (auto& projections : _intermediate_projections) {
251
18.0k
        RETURN_IF_ERROR(VExpr::open(projections, state));
252
18.0k
    }
253
964k
    if (_child && !is_source()) {
254
177k
        RETURN_IF_ERROR(_child->prepare(state));
255
177k
    }
256
257
964k
    if (VExpr::contains_blockable_function(_conjuncts) ||
258
964k
        VExpr::contains_blockable_function(_projections)) {
259
0
        _blockable = true;
260
0
    }
261
262
964k
    return Status::OK();
263
964k
}
264
265
15.9k
Status OperatorXBase::terminate(RuntimeState* state) {
266
15.9k
    if (_child && !is_source()) {
267
4.83k
        RETURN_IF_ERROR(_child->terminate(state));
268
4.83k
    }
269
15.9k
    auto result = state->get_local_state_result(operator_id());
270
15.9k
    if (!result) {
271
0
        return result.error();
272
0
    }
273
15.9k
    return result.value()->terminate(state);
274
15.9k
}
275
276
6.01M
Status OperatorXBase::close(RuntimeState* state) {
277
6.01M
    if (_child && !is_source()) {
278
1.02M
        RETURN_IF_ERROR(_child->close(state));
279
1.02M
    }
280
6.01M
    auto result = state->get_local_state_result(operator_id());
281
6.01M
    if (!result) {
282
0
        return result.error();
283
0
    }
284
6.01M
    return result.value()->close(state);
285
6.01M
}
286
287
348k
void PipelineXLocalStateBase::clear_origin_block() {
288
348k
    _origin_block.clear_column_data(_parent->intermediate_row_desc().num_materialized_slots());
289
348k
}
290
291
746k
Status PipelineXLocalStateBase::filter_block(const VExprContextSPtrs& expr_contexts, Block* block) {
292
746k
    RETURN_IF_ERROR(VExprContext::filter_block(expr_contexts, block, block->columns()));
293
294
746k
    _estimate_memory_usage += VExprContext::get_memory_usage(expr_contexts);
295
746k
    return Status::OK();
296
746k
}
297
298
0
bool PipelineXLocalStateBase::is_blockable() const {
299
0
    return std::any_of(_projections.begin(), _projections.end(),
300
0
                       [&](VExprContextSPtr expr) -> bool { return expr->is_blockable(); });
301
0
}
302
303
Status OperatorXBase::do_projections(RuntimeState* state, Block* origin_block,
304
348k
                                     Block* output_block) const {
305
348k
    auto* local_state = state->get_local_state(operator_id());
306
348k
    SCOPED_TIMER(local_state->exec_time_counter());
307
348k
    SCOPED_TIMER(local_state->_projection_timer);
308
348k
    const size_t rows = origin_block->rows();
309
348k
    if (rows == 0) {
310
167k
        return Status::OK();
311
167k
    }
312
181k
    Block input_block = *origin_block;
313
314
181k
    size_t bytes_usage = 0;
315
181k
    ColumnsWithTypeAndName new_columns;
316
181k
    for (const auto& projections : local_state->_intermediate_projections) {
317
1.21k
        if (projections.empty()) {
318
0
            return Status::InternalError("meet empty intermediate projection, node id: {}",
319
0
                                         node_id());
320
0
        }
321
1.21k
        new_columns.resize(projections.size());
322
8.53k
        for (int i = 0; i < projections.size(); i++) {
323
7.31k
            RETURN_IF_ERROR(projections[i]->execute(&input_block, new_columns[i]));
324
7.31k
            if (new_columns[i].column->size() != rows) {
325
0
                return Status::InternalError(
326
0
                        "intermediate projection result column size {} not equal input rows {}, "
327
0
                        "expr: {}",
328
0
                        new_columns[i].column->size(), rows,
329
0
                        projections[i]->root()->debug_string());
330
0
            }
331
7.31k
        }
332
1.21k
        Block tmp_block {new_columns};
333
1.21k
        bytes_usage += tmp_block.allocated_bytes();
334
1.21k
        input_block.swap(tmp_block);
335
1.21k
    }
336
337
181k
    if (input_block.rows() != rows) {
338
0
        return Status::InternalError(
339
0
                "after intermediate projections input block rows {} not equal origin rows {}, "
340
0
                "input_block: {}",
341
0
                input_block.rows(), rows, input_block.dump_structure());
342
0
    }
343
847k
    auto insert_column_datas = [&](auto& to, ColumnPtr& from, size_t rows) {
344
847k
        if (to->is_nullable() && !from->is_nullable()) {
345
0
            if (_keep_origin || !from->is_exclusive()) {
346
0
                auto& null_column = reinterpret_cast<ColumnNullable&>(*to);
347
0
                null_column.get_nested_column().insert_range_from(*from, 0, rows);
348
0
                null_column.get_null_map_column().get_data().resize_fill(rows, 0);
349
0
                bytes_usage += null_column.allocated_bytes();
350
0
            } else {
351
0
                to = make_nullable(from, false)->assert_mutable();
352
0
            }
353
847k
        } else {
354
847k
            if (_keep_origin || !from->is_exclusive()) {
355
824k
                to->insert_range_from(*from, 0, rows);
356
824k
                bytes_usage += from->allocated_bytes();
357
824k
            } else {
358
22.4k
                to = from->assert_mutable();
359
22.4k
            }
360
847k
        }
361
847k
    };
362
363
181k
    auto scoped_mutable_block = VectorizedUtils::build_scoped_mutable_mem_reuse_block(
364
181k
            output_block, *_output_row_descriptor);
365
181k
    auto& mutable_block = scoped_mutable_block.mutable_block();
366
181k
    auto& mutable_columns = mutable_block.mutable_columns();
367
181k
    if (rows != 0) {
368
181k
        DCHECK_EQ(mutable_columns.size(), local_state->_projections.size()) << debug_string();
369
1.02M
        for (int i = 0; i < mutable_columns.size(); ++i) {
370
847k
            ColumnPtr column_ptr;
371
847k
            RETURN_IF_ERROR(local_state->_projections[i]->execute(&input_block, column_ptr));
372
847k
            if (column_ptr->size() != rows) {
373
0
                return Status::InternalError(
374
0
                        "projection result column size {} not equal input rows {}, expr: {}",
375
0
                        column_ptr->size(), rows,
376
0
                        local_state->_projections[i]->root()->debug_string());
377
0
            }
378
847k
            column_ptr = column_ptr->convert_to_full_column_if_const();
379
847k
            bytes_usage += column_ptr->allocated_bytes();
380
847k
            insert_column_datas(mutable_columns[i], column_ptr, rows);
381
847k
        }
382
181k
        DCHECK(mutable_block.rows() == rows);
383
181k
    }
384
181k
    local_state->_estimate_memory_usage += bytes_usage;
385
386
181k
    return Status::OK();
387
181k
}
388
389
5.15M
Status OperatorXBase::get_block_after_projects(RuntimeState* state, Block* block, bool* eos) {
390
5.15M
    DBUG_EXECUTE_IF("Pipeline::return_empty_block", {
391
5.15M
        if (this->_op_name == "AGGREGATION_OPERATOR" || this->_op_name == "HASH_JOIN_OPERATOR" ||
392
5.15M
            this->_op_name == "PARTITIONED_AGGREGATION_OPERATOR" ||
393
5.15M
            this->_op_name == "PARTITIONED_HASH_JOIN_OPERATOR" ||
394
5.15M
            this->_op_name == "CROSS_JOIN_OPERATOR" || this->_op_name == "SORT_OPERATOR") {
395
5.15M
            if (_debug_point_count++ % 2 == 0) {
396
5.15M
                return Status::OK();
397
5.15M
            }
398
5.15M
        }
399
5.15M
    });
400
401
5.15M
    Status status;
402
5.15M
    auto* local_state = state->get_local_state(operator_id());
403
5.15M
    Defer defer([&]() {
404
5.15M
        if (status.ok()) {
405
5.15M
            local_state->update_output_block_counters(*block);
406
5.15M
        }
407
5.15M
    });
408
5.15M
    if (_output_row_descriptor) {
409
348k
        local_state->clear_origin_block();
410
348k
        status = get_block(state, &local_state->_origin_block, eos);
411
348k
        if (UNLIKELY(!status.ok())) {
412
19
            return status;
413
19
        }
414
348k
        status = do_projections(state, &local_state->_origin_block, block);
415
348k
        return status;
416
348k
    }
417
4.80M
    status = get_block(state, block, eos);
418
4.80M
    RETURN_IF_ERROR(block->check_type_and_column());
419
4.80M
    return status;
420
4.80M
}
421
422
3.13M
void PipelineXLocalStateBase::reached_limit(Block* block, bool* eos) {
423
3.13M
    if (_parent->_limit != -1 and _num_rows_returned + block->rows() >= _parent->_limit) {
424
7.44k
        block->set_num_rows(_parent->_limit - _num_rows_returned);
425
7.44k
        *eos = true;
426
7.44k
    }
427
428
3.13M
    DBUG_EXECUTE_IF("Pipeline::reached_limit_early", {
429
3.13M
        auto op_name = to_lower(_parent->_op_name);
430
3.13M
        auto arg_op_name = dp->param<std::string>("op_name");
431
3.13M
        arg_op_name = to_lower(arg_op_name);
432
433
3.13M
        if (op_name == arg_op_name) {
434
3.13M
            *eos = true;
435
3.13M
        }
436
3.13M
    });
437
438
3.13M
    if (auto rows = block->rows()) {
439
913k
        _num_rows_returned += rows;
440
913k
        _state->get_query_ctx()->resource_ctx()->io_context()->update_process_rows(rows);
441
913k
    }
442
3.13M
}
443
444
35.1k
Status DataSinkOperatorXBase::terminate(RuntimeState* state) {
445
35.1k
    auto result = state->get_sink_local_state_result();
446
35.1k
    if (!result) {
447
0
        return result.error();
448
0
    }
449
35.1k
    return result.value()->terminate(state);
450
35.1k
}
451
452
21.1k
std::string DataSinkOperatorXBase::debug_string(int indentation_level) const {
453
21.1k
    fmt::memory_buffer debug_string_buffer;
454
455
21.1k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, _is_serial_operator={}",
456
21.1k
                   std::string(indentation_level * 2, ' '), _name, node_id(), _is_serial_operator);
457
21.1k
    return fmt::to_string(debug_string_buffer);
458
21.1k
}
459
460
20.9k
std::string DataSinkOperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
461
20.9k
    return state->get_sink_local_state()->debug_string(indentation_level);
462
20.9k
}
463
464
546k
Status DataSinkOperatorXBase::init(const TDataSink& tsink) {
465
546k
    std::string op_name = "UNKNOWN_SINK";
466
546k
    auto it = _TDataSinkType_VALUES_TO_NAMES.find(tsink.type);
467
468
547k
    if (it != _TDataSinkType_VALUES_TO_NAMES.end()) {
469
547k
        op_name = it->second;
470
547k
    }
471
546k
    _name = op_name + "_OPERATOR";
472
546k
    return Status::OK();
473
546k
}
474
475
285k
Status DataSinkOperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
476
285k
    std::string op_name = print_plan_node_type(tnode.node_type);
477
285k
    _nereids_id = tnode.nereids_id;
478
285k
    auto substr = op_name.substr(0, op_name.find("_NODE"));
479
285k
    _name = substr + "_SINK_OPERATOR";
480
285k
    return Status::OK();
481
285k
}
482
483
template <typename LocalStateType>
484
Status DataSinkOperatorX<LocalStateType>::setup_local_state(RuntimeState* state,
485
2.08M
                                                            LocalSinkStateInfo& info) {
486
2.08M
    auto local_state = LocalStateType::create_unique(this, state);
487
2.08M
    RETURN_IF_ERROR(local_state->init(state, info));
488
2.08M
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
489
2.08M
    return Status::OK();
490
2.08M
}
_ZN5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
485
114k
                                                            LocalSinkStateInfo& info) {
486
114k
    auto local_state = LocalStateType::create_unique(this, state);
487
114k
    RETURN_IF_ERROR(local_state->init(state, info));
488
114k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
489
114k
    return Status::OK();
490
114k
}
_ZN5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
485
396k
                                                            LocalSinkStateInfo& info) {
486
396k
    auto local_state = LocalStateType::create_unique(this, state);
487
396k
    RETURN_IF_ERROR(local_state->init(state, info));
488
396k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
489
396k
    return Status::OK();
490
396k
}
_ZN5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
485
88
                                                            LocalSinkStateInfo& info) {
486
88
    auto local_state = LocalStateType::create_unique(this, state);
487
88
    RETURN_IF_ERROR(local_state->init(state, info));
488
88
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
489
88
    return Status::OK();
490
88
}
_ZN5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
485
3
                                                            LocalSinkStateInfo& info) {
486
3
    auto local_state = LocalStateType::create_unique(this, state);
487
3
    RETURN_IF_ERROR(local_state->init(state, info));
488
3
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
489
3
    return Status::OK();
490
3
}
_ZN5doris17DataSinkOperatorXINS_24ResultFileSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
485
520
                                                            LocalSinkStateInfo& info) {
486
520
    auto local_state = LocalStateType::create_unique(this, state);
487
520
    RETURN_IF_ERROR(local_state->init(state, info));
488
520
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
489
520
    return Status::OK();
490
520
}
_ZN5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
485
45.1k
                                                            LocalSinkStateInfo& info) {
486
45.1k
    auto local_state = LocalStateType::create_unique(this, state);
487
45.1k
    RETURN_IF_ERROR(local_state->init(state, info));
488
45.1k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
489
45.1k
    return Status::OK();
490
45.1k
}
_ZN5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
485
8.92k
                                                            LocalSinkStateInfo& info) {
486
8.92k
    auto local_state = LocalStateType::create_unique(this, state);
487
8.92k
    RETURN_IF_ERROR(local_state->init(state, info));
488
8.92k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
489
8.92k
    return Status::OK();
490
8.92k
}
_ZN5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
485
5.15k
                                                            LocalSinkStateInfo& info) {
486
5.15k
    auto local_state = LocalStateType::create_unique(this, state);
487
5.15k
    RETURN_IF_ERROR(local_state->init(state, info));
488
5.15k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
489
5.15k
    return Status::OK();
490
5.15k
}
_ZN5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
485
156
                                                            LocalSinkStateInfo& info) {
486
156
    auto local_state = LocalStateType::create_unique(this, state);
487
156
    RETURN_IF_ERROR(local_state->init(state, info));
488
156
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
489
156
    return Status::OK();
490
156
}
_ZN5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
485
3.38k
                                                            LocalSinkStateInfo& info) {
486
3.38k
    auto local_state = LocalStateType::create_unique(this, state);
487
3.38k
    RETURN_IF_ERROR(local_state->init(state, info));
488
3.38k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
489
3.38k
    return Status::OK();
490
3.38k
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_27IcebergDeleteSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
485
160
                                                            LocalSinkStateInfo& info) {
486
160
    auto local_state = LocalStateType::create_unique(this, state);
487
160
    RETURN_IF_ERROR(local_state->init(state, info));
488
160
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
489
160
    return Status::OK();
490
160
}
_ZN5doris17DataSinkOperatorXINS_26IcebergMergeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
485
640
                                                            LocalSinkStateInfo& info) {
486
640
    auto local_state = LocalStateType::create_unique(this, state);
487
640
    RETURN_IF_ERROR(local_state->init(state, info));
488
640
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
489
640
    return Status::OK();
490
640
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_21MCTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
485
8.93k
                                                            LocalSinkStateInfo& info) {
486
8.93k
    auto local_state = LocalStateType::create_unique(this, state);
487
8.93k
    RETURN_IF_ERROR(local_state->init(state, info));
488
8.93k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
489
8.93k
    return Status::OK();
490
8.93k
}
_ZN5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
485
92
                                                            LocalSinkStateInfo& info) {
486
92
    auto local_state = LocalStateType::create_unique(this, state);
487
92
    RETURN_IF_ERROR(local_state->init(state, info));
488
92
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
489
92
    return Status::OK();
490
92
}
_ZN5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
485
251k
                                                            LocalSinkStateInfo& info) {
486
251k
    auto local_state = LocalStateType::create_unique(this, state);
487
251k
    RETURN_IF_ERROR(local_state->init(state, info));
488
251k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
489
251k
    return Status::OK();
490
251k
}
_ZN5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
485
28
                                                            LocalSinkStateInfo& info) {
486
28
    auto local_state = LocalStateType::create_unique(this, state);
487
28
    RETURN_IF_ERROR(local_state->init(state, info));
488
28
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
489
28
    return Status::OK();
490
28
}
_ZN5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
485
261k
                                                            LocalSinkStateInfo& info) {
486
261k
    auto local_state = LocalStateType::create_unique(this, state);
487
261k
    RETURN_IF_ERROR(local_state->init(state, info));
488
261k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
489
261k
    return Status::OK();
490
261k
}
_ZN5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
485
208k
                                                            LocalSinkStateInfo& info) {
486
208k
    auto local_state = LocalStateType::create_unique(this, state);
487
208k
    RETURN_IF_ERROR(local_state->init(state, info));
488
208k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
489
208k
    return Status::OK();
490
208k
}
_ZN5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
485
217
                                                            LocalSinkStateInfo& info) {
486
217
    auto local_state = LocalStateType::create_unique(this, state);
487
217
    RETURN_IF_ERROR(local_state->init(state, info));
488
217
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
489
217
    return Status::OK();
490
217
}
_ZN5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
485
151
                                                            LocalSinkStateInfo& info) {
486
151
    auto local_state = LocalStateType::create_unique(this, state);
487
151
    RETURN_IF_ERROR(local_state->init(state, info));
488
151
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
489
151
    return Status::OK();
490
151
}
_ZN5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
485
711k
                                                            LocalSinkStateInfo& info) {
486
711k
    auto local_state = LocalStateType::create_unique(this, state);
487
711k
    RETURN_IF_ERROR(local_state->init(state, info));
488
711k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
489
711k
    return Status::OK();
490
711k
}
_ZN5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
485
30.7k
                                                            LocalSinkStateInfo& info) {
486
30.7k
    auto local_state = LocalStateType::create_unique(this, state);
487
30.7k
    RETURN_IF_ERROR(local_state->init(state, info));
488
30.7k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
489
30.7k
    return Status::OK();
490
30.7k
}
_ZN5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
485
6.37k
                                                            LocalSinkStateInfo& info) {
486
6.37k
    auto local_state = LocalStateType::create_unique(this, state);
487
6.37k
    RETURN_IF_ERROR(local_state->init(state, info));
488
6.37k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
489
6.37k
    return Status::OK();
490
6.37k
}
_ZN5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
485
14.7k
                                                            LocalSinkStateInfo& info) {
486
14.7k
    auto local_state = LocalStateType::create_unique(this, state);
487
14.7k
    RETURN_IF_ERROR(local_state->init(state, info));
488
14.7k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
489
14.7k
    return Status::OK();
490
14.7k
}
_ZN5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
485
362
                                                            LocalSinkStateInfo& info) {
486
362
    auto local_state = LocalStateType::create_unique(this, state);
487
362
    RETURN_IF_ERROR(local_state->init(state, info));
488
362
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
489
362
    return Status::OK();
490
362
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
485
4.55k
                                                            LocalSinkStateInfo& info) {
486
4.55k
    auto local_state = LocalStateType::create_unique(this, state);
487
4.55k
    RETURN_IF_ERROR(local_state->init(state, info));
488
4.55k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
489
4.55k
    return Status::OK();
490
4.55k
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
485
2.52k
                                                            LocalSinkStateInfo& info) {
486
2.52k
    auto local_state = LocalStateType::create_unique(this, state);
487
2.52k
    RETURN_IF_ERROR(local_state->init(state, info));
488
2.52k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
489
2.52k
    return Status::OK();
490
2.52k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
485
2.37k
                                                            LocalSinkStateInfo& info) {
486
2.37k
    auto local_state = LocalStateType::create_unique(this, state);
487
2.37k
    RETURN_IF_ERROR(local_state->init(state, info));
488
2.37k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
489
2.37k
    return Status::OK();
490
2.37k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
485
2.48k
                                                            LocalSinkStateInfo& info) {
486
2.48k
    auto local_state = LocalStateType::create_unique(this, state);
487
2.48k
    RETURN_IF_ERROR(local_state->init(state, info));
488
2.48k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
489
2.48k
    return Status::OK();
490
2.48k
}
_ZN5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
485
1
                                                            LocalSinkStateInfo& info) {
486
1
    auto local_state = LocalStateType::create_unique(this, state);
487
1
    RETURN_IF_ERROR(local_state->init(state, info));
488
1
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
489
1
    return Status::OK();
490
1
}
_ZN5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
485
165
                                                            LocalSinkStateInfo& info) {
486
165
    auto local_state = LocalStateType::create_unique(this, state);
487
165
    RETURN_IF_ERROR(local_state->init(state, info));
488
165
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
489
165
    return Status::OK();
490
165
}
_ZN5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
485
14
                                                            LocalSinkStateInfo& info) {
486
14
    auto local_state = LocalStateType::create_unique(this, state);
487
14
    RETURN_IF_ERROR(local_state->init(state, info));
488
14
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
489
14
    return Status::OK();
490
14
}
_ZN5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
485
105
                                                            LocalSinkStateInfo& info) {
486
105
    auto local_state = LocalStateType::create_unique(this, state);
487
105
    RETURN_IF_ERROR(local_state->init(state, info));
488
105
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
489
105
    return Status::OK();
490
105
}
_ZN5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
485
151
                                                            LocalSinkStateInfo& info) {
486
151
    auto local_state = LocalStateType::create_unique(this, state);
487
151
    RETURN_IF_ERROR(local_state->init(state, info));
488
151
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
489
151
    return Status::OK();
490
151
}
_ZN5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
485
151
                                                            LocalSinkStateInfo& info) {
486
151
    auto local_state = LocalStateType::create_unique(this, state);
487
151
    RETURN_IF_ERROR(local_state->init(state, info));
488
151
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
489
151
    return Status::OK();
490
151
}
491
492
template <typename LocalStateType>
493
1.77M
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
494
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
495
0
                                 LocalExchangeSharedState>) {
496
0
        return nullptr;
497
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
0
                                        MultiCastSharedState>) {
499
0
        throw Exception(Status::FatalError("should not reach here!"));
500
1.77M
    } else {
501
1.77M
        auto ss = LocalStateType::SharedStateType::create_shared();
502
1.77M
        ss->id = operator_id();
503
1.77M
        for (auto& dest : dests_id()) {
504
1.77M
            ss->related_op_ids.insert(dest);
505
1.77M
        }
506
1.77M
        return ss;
507
1.77M
    }
508
1.77M
}
_ZNK5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
493
97.0k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
494
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
495
                                 LocalExchangeSharedState>) {
496
        return nullptr;
497
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                        MultiCastSharedState>) {
499
        throw Exception(Status::FatalError("should not reach here!"));
500
97.0k
    } else {
501
97.0k
        auto ss = LocalStateType::SharedStateType::create_shared();
502
97.0k
        ss->id = operator_id();
503
97.0k
        for (auto& dest : dests_id()) {
504
96.9k
            ss->related_op_ids.insert(dest);
505
96.9k
        }
506
97.0k
        return ss;
507
97.0k
    }
508
97.0k
}
_ZNK5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
493
396k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
494
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
495
                                 LocalExchangeSharedState>) {
496
        return nullptr;
497
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                        MultiCastSharedState>) {
499
        throw Exception(Status::FatalError("should not reach here!"));
500
396k
    } else {
501
396k
        auto ss = LocalStateType::SharedStateType::create_shared();
502
396k
        ss->id = operator_id();
503
396k
        for (auto& dest : dests_id()) {
504
395k
            ss->related_op_ids.insert(dest);
505
395k
        }
506
396k
        return ss;
507
396k
    }
508
396k
}
_ZNK5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
493
88
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
494
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
495
                                 LocalExchangeSharedState>) {
496
        return nullptr;
497
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                        MultiCastSharedState>) {
499
        throw Exception(Status::FatalError("should not reach here!"));
500
88
    } else {
501
88
        auto ss = LocalStateType::SharedStateType::create_shared();
502
88
        ss->id = operator_id();
503
88
        for (auto& dest : dests_id()) {
504
88
            ss->related_op_ids.insert(dest);
505
88
        }
506
88
        return ss;
507
88
    }
508
88
}
_ZNK5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
493
3
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
494
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
495
                                 LocalExchangeSharedState>) {
496
        return nullptr;
497
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                        MultiCastSharedState>) {
499
        throw Exception(Status::FatalError("should not reach here!"));
500
3
    } else {
501
3
        auto ss = LocalStateType::SharedStateType::create_shared();
502
3
        ss->id = operator_id();
503
3
        for (auto& dest : dests_id()) {
504
3
            ss->related_op_ids.insert(dest);
505
3
        }
506
3
        return ss;
507
3
    }
508
3
}
_ZNK5doris17DataSinkOperatorXINS_24ResultFileSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
493
519
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
494
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
495
                                 LocalExchangeSharedState>) {
496
        return nullptr;
497
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                        MultiCastSharedState>) {
499
        throw Exception(Status::FatalError("should not reach here!"));
500
519
    } else {
501
519
        auto ss = LocalStateType::SharedStateType::create_shared();
502
519
        ss->id = operator_id();
503
519
        for (auto& dest : dests_id()) {
504
519
            ss->related_op_ids.insert(dest);
505
519
        }
506
519
        return ss;
507
519
    }
508
519
}
_ZNK5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
493
45.0k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
494
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
495
                                 LocalExchangeSharedState>) {
496
        return nullptr;
497
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                        MultiCastSharedState>) {
499
        throw Exception(Status::FatalError("should not reach here!"));
500
45.0k
    } else {
501
45.0k
        auto ss = LocalStateType::SharedStateType::create_shared();
502
45.0k
        ss->id = operator_id();
503
45.0k
        for (auto& dest : dests_id()) {
504
44.9k
            ss->related_op_ids.insert(dest);
505
44.9k
        }
506
45.0k
        return ss;
507
45.0k
    }
508
45.0k
}
_ZNK5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE19create_shared_stateEv
Line
Count
Source
493
8.92k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
494
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
495
                                 LocalExchangeSharedState>) {
496
        return nullptr;
497
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                        MultiCastSharedState>) {
499
        throw Exception(Status::FatalError("should not reach here!"));
500
8.92k
    } else {
501
8.92k
        auto ss = LocalStateType::SharedStateType::create_shared();
502
8.92k
        ss->id = operator_id();
503
8.92k
        for (auto& dest : dests_id()) {
504
8.92k
            ss->related_op_ids.insert(dest);
505
8.92k
        }
506
8.92k
        return ss;
507
8.92k
    }
508
8.92k
}
_ZNK5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
493
5.14k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
494
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
495
                                 LocalExchangeSharedState>) {
496
        return nullptr;
497
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                        MultiCastSharedState>) {
499
        throw Exception(Status::FatalError("should not reach here!"));
500
5.14k
    } else {
501
5.14k
        auto ss = LocalStateType::SharedStateType::create_shared();
502
5.14k
        ss->id = operator_id();
503
5.14k
        for (auto& dest : dests_id()) {
504
5.14k
            ss->related_op_ids.insert(dest);
505
5.14k
        }
506
5.14k
        return ss;
507
5.14k
    }
508
5.14k
}
_ZNK5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
493
156
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
494
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
495
                                 LocalExchangeSharedState>) {
496
        return nullptr;
497
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                        MultiCastSharedState>) {
499
        throw Exception(Status::FatalError("should not reach here!"));
500
156
    } else {
501
156
        auto ss = LocalStateType::SharedStateType::create_shared();
502
156
        ss->id = operator_id();
503
156
        for (auto& dest : dests_id()) {
504
156
            ss->related_op_ids.insert(dest);
505
156
        }
506
156
        return ss;
507
156
    }
508
156
}
_ZNK5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
493
3.38k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
494
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
495
                                 LocalExchangeSharedState>) {
496
        return nullptr;
497
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                        MultiCastSharedState>) {
499
        throw Exception(Status::FatalError("should not reach here!"));
500
3.38k
    } else {
501
3.38k
        auto ss = LocalStateType::SharedStateType::create_shared();
502
3.38k
        ss->id = operator_id();
503
3.38k
        for (auto& dest : dests_id()) {
504
3.38k
            ss->related_op_ids.insert(dest);
505
3.38k
        }
506
3.38k
        return ss;
507
3.38k
    }
508
3.38k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27IcebergDeleteSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
493
160
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
494
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
495
                                 LocalExchangeSharedState>) {
496
        return nullptr;
497
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                        MultiCastSharedState>) {
499
        throw Exception(Status::FatalError("should not reach here!"));
500
160
    } else {
501
160
        auto ss = LocalStateType::SharedStateType::create_shared();
502
160
        ss->id = operator_id();
503
160
        for (auto& dest : dests_id()) {
504
160
            ss->related_op_ids.insert(dest);
505
160
        }
506
160
        return ss;
507
160
    }
508
160
}
_ZNK5doris17DataSinkOperatorXINS_26IcebergMergeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
493
640
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
494
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
495
                                 LocalExchangeSharedState>) {
496
        return nullptr;
497
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                        MultiCastSharedState>) {
499
        throw Exception(Status::FatalError("should not reach here!"));
500
640
    } else {
501
640
        auto ss = LocalStateType::SharedStateType::create_shared();
502
640
        ss->id = operator_id();
503
640
        for (auto& dest : dests_id()) {
504
640
            ss->related_op_ids.insert(dest);
505
640
        }
506
640
        return ss;
507
640
    }
508
640
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_21MCTableSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
493
8.94k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
494
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
495
                                 LocalExchangeSharedState>) {
496
        return nullptr;
497
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                        MultiCastSharedState>) {
499
        throw Exception(Status::FatalError("should not reach here!"));
500
8.94k
    } else {
501
8.94k
        auto ss = LocalStateType::SharedStateType::create_shared();
502
8.94k
        ss->id = operator_id();
503
8.94k
        for (auto& dest : dests_id()) {
504
8.94k
            ss->related_op_ids.insert(dest);
505
8.94k
        }
506
8.94k
        return ss;
507
8.94k
    }
508
8.94k
}
_ZNK5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
493
92
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
494
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
495
                                 LocalExchangeSharedState>) {
496
        return nullptr;
497
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                        MultiCastSharedState>) {
499
        throw Exception(Status::FatalError("should not reach here!"));
500
92
    } else {
501
92
        auto ss = LocalStateType::SharedStateType::create_shared();
502
92
        ss->id = operator_id();
503
92
        for (auto& dest : dests_id()) {
504
92
            ss->related_op_ids.insert(dest);
505
92
        }
506
92
        return ss;
507
92
    }
508
92
}
_ZNK5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
493
251k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
494
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
495
                                 LocalExchangeSharedState>) {
496
        return nullptr;
497
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                        MultiCastSharedState>) {
499
        throw Exception(Status::FatalError("should not reach here!"));
500
251k
    } else {
501
251k
        auto ss = LocalStateType::SharedStateType::create_shared();
502
251k
        ss->id = operator_id();
503
251k
        for (auto& dest : dests_id()) {
504
251k
            ss->related_op_ids.insert(dest);
505
251k
        }
506
251k
        return ss;
507
251k
    }
508
251k
}
_ZNK5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
493
30
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
494
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
495
                                 LocalExchangeSharedState>) {
496
        return nullptr;
497
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                        MultiCastSharedState>) {
499
        throw Exception(Status::FatalError("should not reach here!"));
500
30
    } else {
501
30
        auto ss = LocalStateType::SharedStateType::create_shared();
502
30
        ss->id = operator_id();
503
30
        for (auto& dest : dests_id()) {
504
30
            ss->related_op_ids.insert(dest);
505
30
        }
506
30
        return ss;
507
30
    }
508
30
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
493
208k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
494
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
495
                                 LocalExchangeSharedState>) {
496
        return nullptr;
497
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                        MultiCastSharedState>) {
499
        throw Exception(Status::FatalError("should not reach here!"));
500
208k
    } else {
501
208k
        auto ss = LocalStateType::SharedStateType::create_shared();
502
208k
        ss->id = operator_id();
503
208k
        for (auto& dest : dests_id()) {
504
208k
            ss->related_op_ids.insert(dest);
505
208k
        }
506
208k
        return ss;
507
208k
    }
508
208k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
493
150
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
494
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
495
                                 LocalExchangeSharedState>) {
496
        return nullptr;
497
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                        MultiCastSharedState>) {
499
        throw Exception(Status::FatalError("should not reach here!"));
500
150
    } else {
501
150
        auto ss = LocalStateType::SharedStateType::create_shared();
502
150
        ss->id = operator_id();
503
150
        for (auto& dest : dests_id()) {
504
150
            ss->related_op_ids.insert(dest);
505
150
        }
506
150
        return ss;
507
150
    }
508
150
}
_ZNK5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
493
711k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
494
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
495
                                 LocalExchangeSharedState>) {
496
        return nullptr;
497
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                        MultiCastSharedState>) {
499
        throw Exception(Status::FatalError("should not reach here!"));
500
711k
    } else {
501
711k
        auto ss = LocalStateType::SharedStateType::create_shared();
502
711k
        ss->id = operator_id();
503
711k
        for (auto& dest : dests_id()) {
504
709k
            ss->related_op_ids.insert(dest);
505
709k
        }
506
711k
        return ss;
507
711k
    }
508
711k
}
_ZNK5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
493
30.7k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
494
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
495
                                 LocalExchangeSharedState>) {
496
        return nullptr;
497
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                        MultiCastSharedState>) {
499
        throw Exception(Status::FatalError("should not reach here!"));
500
30.7k
    } else {
501
30.7k
        auto ss = LocalStateType::SharedStateType::create_shared();
502
30.7k
        ss->id = operator_id();
503
30.7k
        for (auto& dest : dests_id()) {
504
30.7k
            ss->related_op_ids.insert(dest);
505
30.7k
        }
506
30.7k
        return ss;
507
30.7k
    }
508
30.7k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
493
465
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
494
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
495
                                 LocalExchangeSharedState>) {
496
        return nullptr;
497
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                        MultiCastSharedState>) {
499
        throw Exception(Status::FatalError("should not reach here!"));
500
465
    } else {
501
465
        auto ss = LocalStateType::SharedStateType::create_shared();
502
465
        ss->id = operator_id();
503
465
        for (auto& dest : dests_id()) {
504
465
            ss->related_op_ids.insert(dest);
505
465
        }
506
465
        return ss;
507
465
    }
508
465
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE19create_shared_stateEv
Line
Count
Source
493
2.39k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
494
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
495
                                 LocalExchangeSharedState>) {
496
        return nullptr;
497
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                        MultiCastSharedState>) {
499
        throw Exception(Status::FatalError("should not reach here!"));
500
2.39k
    } else {
501
2.39k
        auto ss = LocalStateType::SharedStateType::create_shared();
502
2.39k
        ss->id = operator_id();
503
2.40k
        for (auto& dest : dests_id()) {
504
2.40k
            ss->related_op_ids.insert(dest);
505
2.40k
        }
506
2.39k
        return ss;
507
2.39k
    }
508
2.39k
}
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE19create_shared_stateEv
Line
Count
Source
493
2.50k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
494
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
495
                                 LocalExchangeSharedState>) {
496
        return nullptr;
497
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                        MultiCastSharedState>) {
499
        throw Exception(Status::FatalError("should not reach here!"));
500
2.50k
    } else {
501
2.50k
        auto ss = LocalStateType::SharedStateType::create_shared();
502
2.50k
        ss->id = operator_id();
503
2.50k
        for (auto& dest : dests_id()) {
504
2.50k
            ss->related_op_ids.insert(dest);
505
2.50k
        }
506
2.50k
        return ss;
507
2.50k
    }
508
2.50k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
493
165
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
494
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
495
                                 LocalExchangeSharedState>) {
496
        return nullptr;
497
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                        MultiCastSharedState>) {
499
        throw Exception(Status::FatalError("should not reach here!"));
500
165
    } else {
501
165
        auto ss = LocalStateType::SharedStateType::create_shared();
502
165
        ss->id = operator_id();
503
165
        for (auto& dest : dests_id()) {
504
165
            ss->related_op_ids.insert(dest);
505
165
        }
506
165
        return ss;
507
165
    }
508
165
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
493
105
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
494
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
495
                                 LocalExchangeSharedState>) {
496
        return nullptr;
497
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                        MultiCastSharedState>) {
499
        throw Exception(Status::FatalError("should not reach here!"));
500
105
    } else {
501
105
        auto ss = LocalStateType::SharedStateType::create_shared();
502
105
        ss->id = operator_id();
503
105
        for (auto& dest : dests_id()) {
504
105
            ss->related_op_ids.insert(dest);
505
105
        }
506
105
        return ss;
507
105
    }
508
105
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE19create_shared_stateEv
509
510
template <typename LocalStateType>
511
2.52M
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
512
2.52M
    auto local_state = LocalStateType::create_unique(state, this);
513
2.52M
    RETURN_IF_ERROR(local_state->init(state, info));
514
2.52M
    state->emplace_local_state(operator_id(), std::move(local_state));
515
2.52M
    return Status::OK();
516
2.52M
}
_ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
511
66.1k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
512
66.1k
    auto local_state = LocalStateType::create_unique(state, this);
513
66.1k
    RETURN_IF_ERROR(local_state->init(state, info));
514
66.1k
    state->emplace_local_state(operator_id(), std::move(local_state));
515
66.1k
    return Status::OK();
516
66.1k
}
_ZN5doris9OperatorXINS_18OlapScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
511
291k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
512
291k
    auto local_state = LocalStateType::create_unique(state, this);
513
291k
    RETURN_IF_ERROR(local_state->init(state, info));
514
291k
    state->emplace_local_state(operator_id(), std::move(local_state));
515
291k
    return Status::OK();
516
291k
}
_ZN5doris9OperatorXINS_21GroupCommitLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
511
78
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
512
78
    auto local_state = LocalStateType::create_unique(state, this);
513
78
    RETURN_IF_ERROR(local_state->init(state, info));
514
78
    state->emplace_local_state(operator_id(), std::move(local_state));
515
78
    return Status::OK();
516
78
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_18JDBCScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_18FileScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
511
33.3k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
512
33.3k
    auto local_state = LocalStateType::create_unique(state, this);
513
33.3k
    RETURN_IF_ERROR(local_state->init(state, info));
514
33.3k
    state->emplace_local_state(operator_id(), std::move(local_state));
515
33.3k
    return Status::OK();
516
33.3k
}
_ZN5doris9OperatorXINS_18AnalyticLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
511
8.90k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
512
8.90k
    auto local_state = LocalStateType::create_unique(state, this);
513
8.90k
    RETURN_IF_ERROR(local_state->init(state, info));
514
8.90k
    state->emplace_local_state(operator_id(), std::move(local_state));
515
8.90k
    return Status::OK();
516
8.90k
}
_ZN5doris9OperatorXINS_14SortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
511
9.30k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
512
9.30k
    auto local_state = LocalStateType::create_unique(state, this);
513
9.30k
    RETURN_IF_ERROR(local_state->init(state, info));
514
9.30k
    state->emplace_local_state(operator_id(), std::move(local_state));
515
9.30k
    return Status::OK();
516
9.30k
}
_ZN5doris9OperatorXINS_19SpillSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
511
22
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
512
22
    auto local_state = LocalStateType::create_unique(state, this);
513
22
    RETURN_IF_ERROR(local_state->init(state, info));
514
22
    state->emplace_local_state(operator_id(), std::move(local_state));
515
22
    return Status::OK();
516
22
}
_ZN5doris9OperatorXINS_24LocalMergeSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
511
241k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
512
241k
    auto local_state = LocalStateType::create_unique(state, this);
513
241k
    RETURN_IF_ERROR(local_state->init(state, info));
514
241k
    state->emplace_local_state(operator_id(), std::move(local_state));
515
241k
    return Status::OK();
516
241k
}
_ZN5doris9OperatorXINS_13AggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
511
208k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
512
208k
    auto local_state = LocalStateType::create_unique(state, this);
513
208k
    RETURN_IF_ERROR(local_state->init(state, info));
514
208k
    state->emplace_local_state(operator_id(), std::move(local_state));
515
208k
    return Status::OK();
516
208k
}
_ZN5doris9OperatorXINS_21BucketedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
511
249
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
512
249
    auto local_state = LocalStateType::create_unique(state, this);
513
249
    RETURN_IF_ERROR(local_state->init(state, info));
514
249
    state->emplace_local_state(operator_id(), std::move(local_state));
515
249
    return Status::OK();
516
249
}
_ZN5doris9OperatorXINS_24PartitionedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
511
141
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
512
141
    auto local_state = LocalStateType::create_unique(state, this);
513
141
    RETURN_IF_ERROR(local_state->init(state, info));
514
141
    state->emplace_local_state(operator_id(), std::move(local_state));
515
141
    return Status::OK();
516
141
}
_ZN5doris9OperatorXINS_23TableFunctionLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
511
4.86k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
512
4.86k
    auto local_state = LocalStateType::create_unique(state, this);
513
4.86k
    RETURN_IF_ERROR(local_state->init(state, info));
514
4.86k
    state->emplace_local_state(operator_id(), std::move(local_state));
515
4.86k
    return Status::OK();
516
4.86k
}
_ZN5doris9OperatorXINS_18ExchangeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
511
430k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
512
430k
    auto local_state = LocalStateType::create_unique(state, this);
513
430k
    RETURN_IF_ERROR(local_state->init(state, info));
514
430k
    state->emplace_local_state(operator_id(), std::move(local_state));
515
430k
    return Status::OK();
516
430k
}
_ZN5doris9OperatorXINS_16RepeatLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
511
1.18k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
512
1.18k
    auto local_state = LocalStateType::create_unique(state, this);
513
1.18k
    RETURN_IF_ERROR(local_state->init(state, info));
514
1.18k
    state->emplace_local_state(operator_id(), std::move(local_state));
515
1.18k
    return Status::OK();
516
1.18k
}
_ZN5doris9OperatorXINS_29NestedLoopJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
511
30.7k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
512
30.7k
    auto local_state = LocalStateType::create_unique(state, this);
513
30.7k
    RETURN_IF_ERROR(local_state->init(state, info));
514
30.7k
    state->emplace_local_state(operator_id(), std::move(local_state));
515
30.7k
    return Status::OK();
516
30.7k
}
_ZN5doris9OperatorXINS_23AssertNumRowsLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
511
221
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
512
221
    auto local_state = LocalStateType::create_unique(state, this);
513
221
    RETURN_IF_ERROR(local_state->init(state, info));
514
221
    state->emplace_local_state(operator_id(), std::move(local_state));
515
221
    return Status::OK();
516
221
}
_ZN5doris9OperatorXINS_18EmptySetLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
511
2.01k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
512
2.01k
    auto local_state = LocalStateType::create_unique(state, this);
513
2.01k
    RETURN_IF_ERROR(local_state->init(state, info));
514
2.01k
    state->emplace_local_state(operator_id(), std::move(local_state));
515
2.01k
    return Status::OK();
516
2.01k
}
_ZN5doris9OperatorXINS_21UnionSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
511
54.9k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
512
54.9k
    auto local_state = LocalStateType::create_unique(state, this);
513
54.9k
    RETURN_IF_ERROR(local_state->init(state, info));
514
54.9k
    state->emplace_local_state(operator_id(), std::move(local_state));
515
54.9k
    return Status::OK();
516
54.9k
}
_ZN5doris9OperatorXINS_35MultiCastDataStreamSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
511
42.3k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
512
42.3k
    auto local_state = LocalStateType::create_unique(state, this);
513
42.3k
    RETURN_IF_ERROR(local_state->init(state, info));
514
42.3k
    state->emplace_local_state(operator_id(), std::move(local_state));
515
42.3k
    return Status::OK();
516
42.3k
}
_ZN5doris9OperatorXINS_29PartitionSortSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
511
361
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
512
361
    auto local_state = LocalStateType::create_unique(state, this);
513
361
    RETURN_IF_ERROR(local_state->init(state, info));
514
361
    state->emplace_local_state(operator_id(), std::move(local_state));
515
361
    return Status::OK();
516
361
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
511
2.37k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
512
2.37k
    auto local_state = LocalStateType::create_unique(state, this);
513
2.37k
    RETURN_IF_ERROR(local_state->init(state, info));
514
2.37k
    state->emplace_local_state(operator_id(), std::move(local_state));
515
2.37k
    return Status::OK();
516
2.37k
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
511
2.47k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
512
2.47k
    auto local_state = LocalStateType::create_unique(state, this);
513
2.47k
    RETURN_IF_ERROR(local_state->init(state, info));
514
2.47k
    state->emplace_local_state(operator_id(), std::move(local_state));
515
2.47k
    return Status::OK();
516
2.47k
}
_ZN5doris9OperatorXINS_17DataGenLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
511
467
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
512
467
    auto local_state = LocalStateType::create_unique(state, this);
513
467
    RETURN_IF_ERROR(local_state->init(state, info));
514
467
    state->emplace_local_state(operator_id(), std::move(local_state));
515
467
    return Status::OK();
516
467
}
_ZN5doris9OperatorXINS_20SchemaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
511
2.05k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
512
2.05k
    auto local_state = LocalStateType::create_unique(state, this);
513
2.05k
    RETURN_IF_ERROR(local_state->init(state, info));
514
2.05k
    state->emplace_local_state(operator_id(), std::move(local_state));
515
2.05k
    return Status::OK();
516
2.05k
}
_ZN5doris9OperatorXINS_18MetaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
511
6.73k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
512
6.73k
    auto local_state = LocalStateType::create_unique(state, this);
513
6.73k
    RETURN_IF_ERROR(local_state->init(state, info));
514
6.73k
    state->emplace_local_state(operator_id(), std::move(local_state));
515
6.73k
    return Status::OK();
516
6.73k
}
_ZN5doris9OperatorXINS_29LocalExchangeSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
511
668k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
512
668k
    auto local_state = LocalStateType::create_unique(state, this);
513
668k
    RETURN_IF_ERROR(local_state->init(state, info));
514
668k
    state->emplace_local_state(operator_id(), std::move(local_state));
515
668k
    return Status::OK();
516
668k
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_34PartitionedHashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_21CacheSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
511
14
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
512
14
    auto local_state = LocalStateType::create_unique(state, this);
513
14
    RETURN_IF_ERROR(local_state->init(state, info));
514
14
    state->emplace_local_state(operator_id(), std::move(local_state));
515
14
    return Status::OK();
516
14
}
_ZN5doris9OperatorXINS_22RecCTESourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
511
151
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
512
151
    auto local_state = LocalStateType::create_unique(state, this);
513
151
    RETURN_IF_ERROR(local_state->init(state, info));
514
151
    state->emplace_local_state(operator_id(), std::move(local_state));
515
151
    return Status::OK();
516
151
}
_ZN5doris9OperatorXINS_20RecCTEScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
511
1.95k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
512
1.95k
    auto local_state = LocalStateType::create_unique(state, this);
513
1.95k
    RETURN_IF_ERROR(local_state->init(state, info));
514
1.95k
    state->emplace_local_state(operator_id(), std::move(local_state));
515
1.95k
    return Status::OK();
516
1.95k
}
_ZN5doris9OperatorXINS_25MaterializationLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
511
1.60k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
512
1.60k
    auto local_state = LocalStateType::create_unique(state, this);
513
1.60k
    RETURN_IF_ERROR(local_state->init(state, info));
514
1.60k
    state->emplace_local_state(operator_id(), std::move(local_state));
515
1.60k
    return Status::OK();
516
1.60k
}
_ZN5doris9OperatorXINS_16SelectLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
511
13.2k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
512
13.2k
    auto local_state = LocalStateType::create_unique(state, this);
513
13.2k
    RETURN_IF_ERROR(local_state->init(state, info));
514
13.2k
    state->emplace_local_state(operator_id(), std::move(local_state));
515
13.2k
    return Status::OK();
516
13.2k
}
_ZN5doris9OperatorXINS_22StreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
511
18.9k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
512
18.9k
    auto local_state = LocalStateType::create_unique(state, this);
513
18.9k
    RETURN_IF_ERROR(local_state->init(state, info));
514
18.9k
    state->emplace_local_state(operator_id(), std::move(local_state));
515
18.9k
    return Status::OK();
516
18.9k
}
_ZN5doris9OperatorXINS_30DistinctStreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
511
375k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
512
375k
    auto local_state = LocalStateType::create_unique(state, this);
513
375k
    RETURN_IF_ERROR(local_state->init(state, info));
514
375k
    state->emplace_local_state(operator_id(), std::move(local_state));
515
375k
    return Status::OK();
516
375k
}
517
518
PipelineXSinkLocalStateBase::PipelineXSinkLocalStateBase(DataSinkOperatorXBase* parent,
519
                                                         RuntimeState* state)
520
2.08M
        : _parent(parent), _state(state) {}
521
522
PipelineXLocalStateBase::PipelineXLocalStateBase(RuntimeState* state, OperatorXBase* parent)
523
2.52M
        : _num_rows_returned(0),
524
2.52M
          _rows_returned_counter(nullptr),
525
2.52M
          _parent(parent),
526
2.52M
          _state(state),
527
2.52M
          _budget(state->batch_size(), state->preferred_block_size_bytes()) {}
528
529
template <typename SharedStateArg>
530
2.52M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
531
2.52M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
532
2.52M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
533
2.52M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
534
2.52M
    _operator_profile->set_metadata(_parent->node_id());
535
    // indent is false so that source operator will have same
536
    // indentation_level with its parent operator.
537
2.52M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
538
2.52M
    _operator_profile->add_child(_common_profile.get(), true);
539
2.52M
    _operator_profile->add_child(_custom_profile.get(), true);
540
2.52M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
541
2.52M
    if constexpr (!is_fake_shared) {
542
1.33M
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
543
685k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
544
685k
                                    .first.get()
545
685k
                                    ->template cast<SharedStateArg>();
546
547
685k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
548
685k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
549
685k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
550
685k
        } else if (info.shared_state) {
551
594k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
552
0
                DCHECK(false);
553
0
            }
554
            // For UnionSourceOperator without children, there is no shared state.
555
594k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
556
557
594k
            _dependency = _shared_state->create_source_dependency(
558
594k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
559
594k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
560
594k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
561
594k
        } else {
562
59.5k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
563
3.14k
                DCHECK(false);
564
3.14k
            }
565
59.5k
        }
566
1.33M
    }
567
568
2.52M
    if (must_set_shared_state() && _shared_state == nullptr) {
569
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
570
0
    }
571
572
2.52M
    _rows_returned_counter =
573
2.52M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
574
2.52M
    _blocks_returned_counter =
575
2.52M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
576
2.52M
    _output_block_bytes_counter =
577
2.52M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
578
2.52M
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
579
2.52M
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
580
2.52M
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
581
2.52M
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
582
2.52M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
583
2.52M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
584
2.52M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
585
2.52M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
586
2.52M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
587
2.52M
    _memory_used_counter =
588
2.52M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
589
2.52M
    _common_profile->add_info_string("IsColocate",
590
2.52M
                                     std::to_string(_parent->is_colocated_operator()));
591
2.52M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
592
2.52M
    _common_profile->add_info_string("FollowedByShuffledOperator",
593
2.52M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
594
2.52M
    return Status::OK();
595
2.52M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
530
66.2k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
531
66.2k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
532
66.2k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
533
66.2k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
534
66.2k
    _operator_profile->set_metadata(_parent->node_id());
535
    // indent is false so that source operator will have same
536
    // indentation_level with its parent operator.
537
66.2k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
538
66.2k
    _operator_profile->add_child(_common_profile.get(), true);
539
66.2k
    _operator_profile->add_child(_custom_profile.get(), true);
540
66.2k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
541
66.2k
    if constexpr (!is_fake_shared) {
542
66.2k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
543
17.2k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
544
17.2k
                                    .first.get()
545
17.2k
                                    ->template cast<SharedStateArg>();
546
547
17.2k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
548
17.2k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
549
17.2k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
550
49.0k
        } else if (info.shared_state) {
551
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
552
                DCHECK(false);
553
            }
554
            // For UnionSourceOperator without children, there is no shared state.
555
48.7k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
556
557
48.7k
            _dependency = _shared_state->create_source_dependency(
558
48.7k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
559
48.7k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
560
48.7k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
561
48.7k
        } else {
562
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
563
                DCHECK(false);
564
            }
565
350
        }
566
66.2k
    }
567
568
66.2k
    if (must_set_shared_state() && _shared_state == nullptr) {
569
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
570
0
    }
571
572
66.2k
    _rows_returned_counter =
573
66.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
574
66.2k
    _blocks_returned_counter =
575
66.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
576
66.2k
    _output_block_bytes_counter =
577
66.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
578
66.2k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
579
66.2k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
580
66.2k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
581
66.2k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
582
66.2k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
583
66.2k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
584
66.2k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
585
66.2k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
586
66.2k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
587
66.2k
    _memory_used_counter =
588
66.2k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
589
66.2k
    _common_profile->add_info_string("IsColocate",
590
66.2k
                                     std::to_string(_parent->is_colocated_operator()));
591
66.2k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
592
66.2k
    _common_profile->add_info_string("FollowedByShuffledOperator",
593
66.2k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
594
66.2k
    return Status::OK();
595
66.2k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
530
1
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
531
1
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
532
1
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
533
1
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
534
1
    _operator_profile->set_metadata(_parent->node_id());
535
    // indent is false so that source operator will have same
536
    // indentation_level with its parent operator.
537
1
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
538
1
    _operator_profile->add_child(_common_profile.get(), true);
539
1
    _operator_profile->add_child(_custom_profile.get(), true);
540
1
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
541
1
    if constexpr (!is_fake_shared) {
542
1
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
543
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
544
0
                                    .first.get()
545
0
                                    ->template cast<SharedStateArg>();
546
547
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
548
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
549
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
550
1
        } else if (info.shared_state) {
551
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
552
                DCHECK(false);
553
            }
554
            // For UnionSourceOperator without children, there is no shared state.
555
1
            _shared_state = info.shared_state->template cast<SharedStateArg>();
556
557
1
            _dependency = _shared_state->create_source_dependency(
558
1
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
559
1
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
560
1
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
561
1
        } else {
562
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
563
                DCHECK(false);
564
            }
565
0
        }
566
1
    }
567
568
1
    if (must_set_shared_state() && _shared_state == nullptr) {
569
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
570
0
    }
571
572
1
    _rows_returned_counter =
573
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
574
1
    _blocks_returned_counter =
575
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
576
1
    _output_block_bytes_counter =
577
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
578
1
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
579
1
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
580
1
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
581
1
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
582
1
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
583
1
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
584
1
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
585
1
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
586
1
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
587
1
    _memory_used_counter =
588
1
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
589
1
    _common_profile->add_info_string("IsColocate",
590
1
                                     std::to_string(_parent->is_colocated_operator()));
591
1
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
592
1
    _common_profile->add_info_string("FollowedByShuffledOperator",
593
1
                                     std::to_string(_parent->followed_by_shuffled_operator()));
594
1
    return Status::OK();
595
1
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
530
251k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
531
251k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
532
251k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
533
251k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
534
251k
    _operator_profile->set_metadata(_parent->node_id());
535
    // indent is false so that source operator will have same
536
    // indentation_level with its parent operator.
537
251k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
538
251k
    _operator_profile->add_child(_common_profile.get(), true);
539
251k
    _operator_profile->add_child(_custom_profile.get(), true);
540
251k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
541
251k
    if constexpr (!is_fake_shared) {
542
251k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
543
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
544
0
                                    .first.get()
545
0
                                    ->template cast<SharedStateArg>();
546
547
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
548
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
549
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
550
251k
        } else if (info.shared_state) {
551
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
552
                DCHECK(false);
553
            }
554
            // For UnionSourceOperator without children, there is no shared state.
555
248k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
556
557
248k
            _dependency = _shared_state->create_source_dependency(
558
248k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
559
248k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
560
248k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
561
248k
        } else {
562
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
563
                DCHECK(false);
564
            }
565
2.86k
        }
566
251k
    }
567
568
251k
    if (must_set_shared_state() && _shared_state == nullptr) {
569
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
570
0
    }
571
572
251k
    _rows_returned_counter =
573
251k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
574
251k
    _blocks_returned_counter =
575
251k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
576
251k
    _output_block_bytes_counter =
577
251k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
578
251k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
579
251k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
580
251k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
581
251k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
582
251k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
583
251k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
584
251k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
585
251k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
586
251k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
587
251k
    _memory_used_counter =
588
251k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
589
251k
    _common_profile->add_info_string("IsColocate",
590
251k
                                     std::to_string(_parent->is_colocated_operator()));
591
251k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
592
251k
    _common_profile->add_info_string("FollowedByShuffledOperator",
593
251k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
594
251k
    return Status::OK();
595
251k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
530
22
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
531
22
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
532
22
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
533
22
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
534
22
    _operator_profile->set_metadata(_parent->node_id());
535
    // indent is false so that source operator will have same
536
    // indentation_level with its parent operator.
537
22
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
538
22
    _operator_profile->add_child(_common_profile.get(), true);
539
22
    _operator_profile->add_child(_custom_profile.get(), true);
540
22
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
541
22
    if constexpr (!is_fake_shared) {
542
22
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
543
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
544
0
                                    .first.get()
545
0
                                    ->template cast<SharedStateArg>();
546
547
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
548
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
549
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
550
22
        } else if (info.shared_state) {
551
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
552
                DCHECK(false);
553
            }
554
            // For UnionSourceOperator without children, there is no shared state.
555
22
            _shared_state = info.shared_state->template cast<SharedStateArg>();
556
557
22
            _dependency = _shared_state->create_source_dependency(
558
22
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
559
22
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
560
22
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
561
22
        } else {
562
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
563
                DCHECK(false);
564
            }
565
0
        }
566
22
    }
567
568
22
    if (must_set_shared_state() && _shared_state == nullptr) {
569
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
570
0
    }
571
572
22
    _rows_returned_counter =
573
22
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
574
22
    _blocks_returned_counter =
575
22
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
576
22
    _output_block_bytes_counter =
577
22
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
578
22
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
579
22
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
580
22
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
581
22
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
582
22
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
583
22
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
584
22
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
585
22
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
586
22
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
587
22
    _memory_used_counter =
588
22
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
589
22
    _common_profile->add_info_string("IsColocate",
590
22
                                     std::to_string(_parent->is_colocated_operator()));
591
22
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
592
22
    _common_profile->add_info_string("FollowedByShuffledOperator",
593
22
                                     std::to_string(_parent->followed_by_shuffled_operator()));
594
22
    return Status::OK();
595
22
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
530
30.6k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
531
30.6k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
532
30.6k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
533
30.6k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
534
30.6k
    _operator_profile->set_metadata(_parent->node_id());
535
    // indent is false so that source operator will have same
536
    // indentation_level with its parent operator.
537
30.6k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
538
30.6k
    _operator_profile->add_child(_common_profile.get(), true);
539
30.6k
    _operator_profile->add_child(_custom_profile.get(), true);
540
30.6k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
541
30.6k
    if constexpr (!is_fake_shared) {
542
30.6k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
543
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
544
0
                                    .first.get()
545
0
                                    ->template cast<SharedStateArg>();
546
547
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
548
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
549
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
550
30.6k
        } else if (info.shared_state) {
551
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
552
                DCHECK(false);
553
            }
554
            // For UnionSourceOperator without children, there is no shared state.
555
30.6k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
556
557
30.6k
            _dependency = _shared_state->create_source_dependency(
558
30.6k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
559
30.6k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
560
30.6k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
561
18.4E
        } else {
562
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
563
                DCHECK(false);
564
            }
565
18.4E
        }
566
30.6k
    }
567
568
30.6k
    if (must_set_shared_state() && _shared_state == nullptr) {
569
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
570
0
    }
571
572
30.6k
    _rows_returned_counter =
573
30.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
574
30.6k
    _blocks_returned_counter =
575
30.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
576
30.6k
    _output_block_bytes_counter =
577
30.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
578
30.6k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
579
30.6k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
580
30.6k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
581
30.6k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
582
30.6k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
583
30.6k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
584
30.6k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
585
30.6k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
586
30.6k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
587
30.6k
    _memory_used_counter =
588
30.6k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
589
30.6k
    _common_profile->add_info_string("IsColocate",
590
30.6k
                                     std::to_string(_parent->is_colocated_operator()));
591
30.6k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
592
30.6k
    _common_profile->add_info_string("FollowedByShuffledOperator",
593
30.6k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
594
30.6k
    return Status::OK();
595
30.6k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
530
8.94k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
531
8.94k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
532
8.94k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
533
8.94k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
534
8.94k
    _operator_profile->set_metadata(_parent->node_id());
535
    // indent is false so that source operator will have same
536
    // indentation_level with its parent operator.
537
8.94k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
538
8.94k
    _operator_profile->add_child(_common_profile.get(), true);
539
8.94k
    _operator_profile->add_child(_custom_profile.get(), true);
540
8.94k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
541
8.94k
    if constexpr (!is_fake_shared) {
542
8.94k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
543
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
544
0
                                    .first.get()
545
0
                                    ->template cast<SharedStateArg>();
546
547
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
548
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
549
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
550
8.94k
        } else if (info.shared_state) {
551
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
552
                DCHECK(false);
553
            }
554
            // For UnionSourceOperator without children, there is no shared state.
555
8.87k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
556
557
8.87k
            _dependency = _shared_state->create_source_dependency(
558
8.87k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
559
8.87k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
560
8.87k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
561
8.87k
        } else {
562
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
563
                DCHECK(false);
564
            }
565
68
        }
566
8.94k
    }
567
568
8.94k
    if (must_set_shared_state() && _shared_state == nullptr) {
569
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
570
0
    }
571
572
8.94k
    _rows_returned_counter =
573
8.94k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
574
8.94k
    _blocks_returned_counter =
575
8.94k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
576
8.94k
    _output_block_bytes_counter =
577
8.94k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
578
8.94k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
579
8.94k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
580
8.94k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
581
8.94k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
582
8.94k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
583
8.94k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
584
8.94k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
585
8.94k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
586
8.94k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
587
8.94k
    _memory_used_counter =
588
8.94k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
589
8.94k
    _common_profile->add_info_string("IsColocate",
590
8.94k
                                     std::to_string(_parent->is_colocated_operator()));
591
8.94k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
592
8.94k
    _common_profile->add_info_string("FollowedByShuffledOperator",
593
8.94k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
594
8.94k
    return Status::OK();
595
8.94k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
530
208k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
531
208k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
532
208k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
533
208k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
534
208k
    _operator_profile->set_metadata(_parent->node_id());
535
    // indent is false so that source operator will have same
536
    // indentation_level with its parent operator.
537
208k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
538
208k
    _operator_profile->add_child(_common_profile.get(), true);
539
208k
    _operator_profile->add_child(_custom_profile.get(), true);
540
208k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
541
208k
    if constexpr (!is_fake_shared) {
542
208k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
543
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
544
0
                                    .first.get()
545
0
                                    ->template cast<SharedStateArg>();
546
547
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
548
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
549
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
550
208k
        } else if (info.shared_state) {
551
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
552
                DCHECK(false);
553
            }
554
            // For UnionSourceOperator without children, there is no shared state.
555
207k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
556
557
207k
            _dependency = _shared_state->create_source_dependency(
558
207k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
559
207k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
560
207k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
561
207k
        } else {
562
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
563
                DCHECK(false);
564
            }
565
744
        }
566
208k
    }
567
568
208k
    if (must_set_shared_state() && _shared_state == nullptr) {
569
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
570
0
    }
571
572
208k
    _rows_returned_counter =
573
208k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
574
208k
    _blocks_returned_counter =
575
208k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
576
208k
    _output_block_bytes_counter =
577
208k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
578
208k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
579
208k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
580
208k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
581
208k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
582
208k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
583
208k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
584
208k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
585
208k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
586
208k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
587
208k
    _memory_used_counter =
588
208k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
589
208k
    _common_profile->add_info_string("IsColocate",
590
208k
                                     std::to_string(_parent->is_colocated_operator()));
591
208k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
592
208k
    _common_profile->add_info_string("FollowedByShuffledOperator",
593
208k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
594
208k
    return Status::OK();
595
208k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
530
253
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
531
253
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
532
253
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
533
253
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
534
253
    _operator_profile->set_metadata(_parent->node_id());
535
    // indent is false so that source operator will have same
536
    // indentation_level with its parent operator.
537
253
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
538
253
    _operator_profile->add_child(_common_profile.get(), true);
539
253
    _operator_profile->add_child(_custom_profile.get(), true);
540
253
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
541
253
    if constexpr (!is_fake_shared) {
542
253
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
543
252
            _shared_state = info.shared_state_map.at(_parent->operator_id())
544
252
                                    .first.get()
545
252
                                    ->template cast<SharedStateArg>();
546
547
252
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
548
252
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
549
252
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
550
252
        } else if (info.shared_state) {
551
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
552
                DCHECK(false);
553
            }
554
            // For UnionSourceOperator without children, there is no shared state.
555
0
            _shared_state = info.shared_state->template cast<SharedStateArg>();
556
557
0
            _dependency = _shared_state->create_source_dependency(
558
0
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
559
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
560
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
561
1
        } else {
562
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
563
                DCHECK(false);
564
            }
565
1
        }
566
253
    }
567
568
253
    if (must_set_shared_state() && _shared_state == nullptr) {
569
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
570
0
    }
571
572
253
    _rows_returned_counter =
573
253
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
574
253
    _blocks_returned_counter =
575
253
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
576
253
    _output_block_bytes_counter =
577
253
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
578
253
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
579
253
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
580
253
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
581
253
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
582
253
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
583
253
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
584
253
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
585
253
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
586
253
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
587
253
    _memory_used_counter =
588
253
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
589
253
    _common_profile->add_info_string("IsColocate",
590
253
                                     std::to_string(_parent->is_colocated_operator()));
591
253
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
592
253
    _common_profile->add_info_string("FollowedByShuffledOperator",
593
253
                                     std::to_string(_parent->followed_by_shuffled_operator()));
594
253
    return Status::OK();
595
253
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
530
141
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
531
141
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
532
141
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
533
141
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
534
141
    _operator_profile->set_metadata(_parent->node_id());
535
    // indent is false so that source operator will have same
536
    // indentation_level with its parent operator.
537
141
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
538
141
    _operator_profile->add_child(_common_profile.get(), true);
539
141
    _operator_profile->add_child(_custom_profile.get(), true);
540
141
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
541
141
    if constexpr (!is_fake_shared) {
542
141
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
543
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
544
0
                                    .first.get()
545
0
                                    ->template cast<SharedStateArg>();
546
547
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
548
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
549
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
550
141
        } else if (info.shared_state) {
551
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
552
                DCHECK(false);
553
            }
554
            // For UnionSourceOperator without children, there is no shared state.
555
141
            _shared_state = info.shared_state->template cast<SharedStateArg>();
556
557
141
            _dependency = _shared_state->create_source_dependency(
558
141
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
559
141
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
560
141
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
561
141
        } else {
562
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
563
                DCHECK(false);
564
            }
565
0
        }
566
141
    }
567
568
141
    if (must_set_shared_state() && _shared_state == nullptr) {
569
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
570
0
    }
571
572
141
    _rows_returned_counter =
573
141
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
574
141
    _blocks_returned_counter =
575
141
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
576
141
    _output_block_bytes_counter =
577
141
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
578
141
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
579
141
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
580
141
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
581
141
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
582
141
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
583
141
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
584
141
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
585
141
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
586
141
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
587
141
    _memory_used_counter =
588
141
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
589
141
    _common_profile->add_info_string("IsColocate",
590
141
                                     std::to_string(_parent->is_colocated_operator()));
591
141
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
592
141
    _common_profile->add_info_string("FollowedByShuffledOperator",
593
141
                                     std::to_string(_parent->followed_by_shuffled_operator()));
594
141
    return Status::OK();
595
141
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
530
1.18M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
531
1.18M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
532
1.18M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
533
1.18M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
534
1.18M
    _operator_profile->set_metadata(_parent->node_id());
535
    // indent is false so that source operator will have same
536
    // indentation_level with its parent operator.
537
1.18M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
538
1.18M
    _operator_profile->add_child(_common_profile.get(), true);
539
1.18M
    _operator_profile->add_child(_custom_profile.get(), true);
540
1.18M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
541
    if constexpr (!is_fake_shared) {
542
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
543
            _shared_state = info.shared_state_map.at(_parent->operator_id())
544
                                    .first.get()
545
                                    ->template cast<SharedStateArg>();
546
547
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
548
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
549
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
550
        } else if (info.shared_state) {
551
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
552
                DCHECK(false);
553
            }
554
            // For UnionSourceOperator without children, there is no shared state.
555
            _shared_state = info.shared_state->template cast<SharedStateArg>();
556
557
            _dependency = _shared_state->create_source_dependency(
558
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
559
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
560
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
561
        } else {
562
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
563
                DCHECK(false);
564
            }
565
        }
566
    }
567
568
1.18M
    if (must_set_shared_state() && _shared_state == nullptr) {
569
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
570
0
    }
571
572
1.18M
    _rows_returned_counter =
573
1.18M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
574
1.18M
    _blocks_returned_counter =
575
1.18M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
576
1.18M
    _output_block_bytes_counter =
577
1.18M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
578
1.18M
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
579
1.18M
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
580
1.18M
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
581
1.18M
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
582
1.18M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
583
1.18M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
584
1.18M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
585
1.18M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
586
1.18M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
587
1.18M
    _memory_used_counter =
588
1.18M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
589
1.18M
    _common_profile->add_info_string("IsColocate",
590
1.18M
                                     std::to_string(_parent->is_colocated_operator()));
591
1.18M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
592
1.18M
    _common_profile->add_info_string("FollowedByShuffledOperator",
593
1.18M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
594
1.18M
    return Status::OK();
595
1.18M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
530
55.0k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
531
55.0k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
532
55.0k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
533
55.0k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
534
55.0k
    _operator_profile->set_metadata(_parent->node_id());
535
    // indent is false so that source operator will have same
536
    // indentation_level with its parent operator.
537
55.0k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
538
55.0k
    _operator_profile->add_child(_common_profile.get(), true);
539
55.0k
    _operator_profile->add_child(_custom_profile.get(), true);
540
55.0k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
541
55.0k
    if constexpr (!is_fake_shared) {
542
55.0k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
543
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
544
0
                                    .first.get()
545
0
                                    ->template cast<SharedStateArg>();
546
547
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
548
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
549
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
550
55.0k
        } else if (info.shared_state) {
551
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
552
                DCHECK(false);
553
            }
554
            // For UnionSourceOperator without children, there is no shared state.
555
2.98k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
556
557
2.98k
            _dependency = _shared_state->create_source_dependency(
558
2.98k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
559
2.98k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
560
2.98k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
561
52.0k
        } else {
562
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
563
                DCHECK(false);
564
            }
565
52.0k
        }
566
55.0k
    }
567
568
55.0k
    if (must_set_shared_state() && _shared_state == nullptr) {
569
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
570
0
    }
571
572
55.0k
    _rows_returned_counter =
573
55.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
574
55.0k
    _blocks_returned_counter =
575
55.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
576
55.0k
    _output_block_bytes_counter =
577
55.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
578
55.0k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
579
55.0k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
580
55.0k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
581
55.0k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
582
55.0k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
583
55.0k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
584
55.0k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
585
55.0k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
586
55.0k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
587
55.0k
    _memory_used_counter =
588
55.0k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
589
55.0k
    _common_profile->add_info_string("IsColocate",
590
55.0k
                                     std::to_string(_parent->is_colocated_operator()));
591
55.0k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
592
55.0k
    _common_profile->add_info_string("FollowedByShuffledOperator",
593
55.0k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
594
55.0k
    return Status::OK();
595
55.0k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
530
17
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
531
17
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
532
17
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
533
17
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
534
17
    _operator_profile->set_metadata(_parent->node_id());
535
    // indent is false so that source operator will have same
536
    // indentation_level with its parent operator.
537
17
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
538
17
    _operator_profile->add_child(_common_profile.get(), true);
539
17
    _operator_profile->add_child(_custom_profile.get(), true);
540
17
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
541
17
    if constexpr (!is_fake_shared) {
542
17
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
543
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
544
0
                                    .first.get()
545
0
                                    ->template cast<SharedStateArg>();
546
547
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
548
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
549
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
550
17
        } else if (info.shared_state) {
551
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
552
                DCHECK(false);
553
            }
554
            // For UnionSourceOperator without children, there is no shared state.
555
17
            _shared_state = info.shared_state->template cast<SharedStateArg>();
556
557
17
            _dependency = _shared_state->create_source_dependency(
558
17
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
559
17
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
560
17
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
561
17
        } else {
562
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
563
                DCHECK(false);
564
            }
565
0
        }
566
17
    }
567
568
17
    if (must_set_shared_state() && _shared_state == nullptr) {
569
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
570
0
    }
571
572
17
    _rows_returned_counter =
573
17
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
574
17
    _blocks_returned_counter =
575
17
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
576
17
    _output_block_bytes_counter =
577
17
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
578
17
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
579
17
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
580
17
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
581
17
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
582
17
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
583
17
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
584
17
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
585
17
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
586
17
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
587
17
    _memory_used_counter =
588
17
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
589
17
    _common_profile->add_info_string("IsColocate",
590
17
                                     std::to_string(_parent->is_colocated_operator()));
591
17
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
592
17
    _common_profile->add_info_string("FollowedByShuffledOperator",
593
17
                                     std::to_string(_parent->followed_by_shuffled_operator()));
594
17
    return Status::OK();
595
17
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
530
42.3k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
531
42.3k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
532
42.3k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
533
42.3k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
534
42.3k
    _operator_profile->set_metadata(_parent->node_id());
535
    // indent is false so that source operator will have same
536
    // indentation_level with its parent operator.
537
42.3k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
538
42.3k
    _operator_profile->add_child(_common_profile.get(), true);
539
42.3k
    _operator_profile->add_child(_custom_profile.get(), true);
540
42.3k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
541
42.3k
    if constexpr (!is_fake_shared) {
542
42.3k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
543
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
544
0
                                    .first.get()
545
0
                                    ->template cast<SharedStateArg>();
546
547
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
548
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
549
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
550
42.3k
        } else if (info.shared_state) {
551
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
552
                DCHECK(false);
553
            }
554
            // For UnionSourceOperator without children, there is no shared state.
555
42.2k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
556
557
42.2k
            _dependency = _shared_state->create_source_dependency(
558
42.2k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
559
42.2k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
560
42.2k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
561
42.2k
        } else {
562
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
563
                DCHECK(false);
564
            }
565
126
        }
566
42.3k
    }
567
568
42.3k
    if (must_set_shared_state() && _shared_state == nullptr) {
569
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
570
0
    }
571
572
42.3k
    _rows_returned_counter =
573
42.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
574
42.3k
    _blocks_returned_counter =
575
42.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
576
42.3k
    _output_block_bytes_counter =
577
42.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
578
42.3k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
579
42.3k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
580
42.3k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
581
42.3k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
582
42.3k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
583
42.3k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
584
42.3k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
585
42.3k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
586
42.3k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
587
42.3k
    _memory_used_counter =
588
42.3k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
589
42.3k
    _common_profile->add_info_string("IsColocate",
590
42.3k
                                     std::to_string(_parent->is_colocated_operator()));
591
42.3k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
592
42.3k
    _common_profile->add_info_string("FollowedByShuffledOperator",
593
42.3k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
594
42.3k
    return Status::OK();
595
42.3k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
530
463
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
531
463
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
532
463
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
533
463
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
534
463
    _operator_profile->set_metadata(_parent->node_id());
535
    // indent is false so that source operator will have same
536
    // indentation_level with its parent operator.
537
463
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
538
463
    _operator_profile->add_child(_common_profile.get(), true);
539
463
    _operator_profile->add_child(_custom_profile.get(), true);
540
463
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
541
463
    if constexpr (!is_fake_shared) {
542
463
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
543
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
544
0
                                    .first.get()
545
0
                                    ->template cast<SharedStateArg>();
546
547
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
548
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
549
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
550
463
        } else if (info.shared_state) {
551
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
552
                DCHECK(false);
553
            }
554
            // For UnionSourceOperator without children, there is no shared state.
555
462
            _shared_state = info.shared_state->template cast<SharedStateArg>();
556
557
462
            _dependency = _shared_state->create_source_dependency(
558
462
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
559
462
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
560
462
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
561
462
        } else {
562
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
563
                DCHECK(false);
564
            }
565
1
        }
566
463
    }
567
568
463
    if (must_set_shared_state() && _shared_state == nullptr) {
569
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
570
0
    }
571
572
463
    _rows_returned_counter =
573
463
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
574
463
    _blocks_returned_counter =
575
463
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
576
463
    _output_block_bytes_counter =
577
463
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
578
463
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
579
463
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
580
463
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
581
463
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
582
463
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
583
463
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
584
463
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
585
463
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
586
463
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
587
463
    _memory_used_counter =
588
463
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
589
463
    _common_profile->add_info_string("IsColocate",
590
463
                                     std::to_string(_parent->is_colocated_operator()));
591
463
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
592
463
    _common_profile->add_info_string("FollowedByShuffledOperator",
593
463
                                     std::to_string(_parent->followed_by_shuffled_operator()));
594
463
    return Status::OK();
595
463
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
530
4.91k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
531
4.91k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
532
4.91k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
533
4.91k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
534
4.91k
    _operator_profile->set_metadata(_parent->node_id());
535
    // indent is false so that source operator will have same
536
    // indentation_level with its parent operator.
537
4.91k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
538
4.91k
    _operator_profile->add_child(_common_profile.get(), true);
539
4.91k
    _operator_profile->add_child(_custom_profile.get(), true);
540
4.91k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
541
4.91k
    if constexpr (!is_fake_shared) {
542
4.91k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
543
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
544
0
                                    .first.get()
545
0
                                    ->template cast<SharedStateArg>();
546
547
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
548
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
549
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
550
4.91k
        } else if (info.shared_state) {
551
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
552
                DCHECK(false);
553
            }
554
            // For UnionSourceOperator without children, there is no shared state.
555
4.63k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
556
557
4.63k
            _dependency = _shared_state->create_source_dependency(
558
4.63k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
559
4.63k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
560
4.63k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
561
4.63k
        } else {
562
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
563
                DCHECK(false);
564
            }
565
282
        }
566
4.91k
    }
567
568
4.91k
    if (must_set_shared_state() && _shared_state == nullptr) {
569
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
570
0
    }
571
572
4.91k
    _rows_returned_counter =
573
4.91k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
574
4.91k
    _blocks_returned_counter =
575
4.91k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
576
4.91k
    _output_block_bytes_counter =
577
4.91k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
578
4.91k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
579
4.91k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
580
4.91k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
581
4.91k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
582
4.91k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
583
4.91k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
584
4.91k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
585
4.91k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
586
4.91k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
587
4.91k
    _memory_used_counter =
588
4.91k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
589
4.91k
    _common_profile->add_info_string("IsColocate",
590
4.91k
                                     std::to_string(_parent->is_colocated_operator()));
591
4.91k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
592
4.91k
    _common_profile->add_info_string("FollowedByShuffledOperator",
593
4.91k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
594
4.91k
    return Status::OK();
595
4.91k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
530
671k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
531
671k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
532
671k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
533
671k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
534
671k
    _operator_profile->set_metadata(_parent->node_id());
535
    // indent is false so that source operator will have same
536
    // indentation_level with its parent operator.
537
671k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
538
671k
    _operator_profile->add_child(_common_profile.get(), true);
539
671k
    _operator_profile->add_child(_custom_profile.get(), true);
540
671k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
541
671k
    if constexpr (!is_fake_shared) {
542
671k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
543
668k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
544
668k
                                    .first.get()
545
668k
                                    ->template cast<SharedStateArg>();
546
547
668k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
548
668k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
549
668k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
550
668k
        } else if (info.shared_state) {
551
0
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
552
0
                DCHECK(false);
553
0
            }
554
            // For UnionSourceOperator without children, there is no shared state.
555
0
            _shared_state = info.shared_state->template cast<SharedStateArg>();
556
557
0
            _dependency = _shared_state->create_source_dependency(
558
0
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
559
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
560
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
561
3.14k
        } else {
562
3.14k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
563
3.14k
                DCHECK(false);
564
3.14k
            }
565
3.14k
        }
566
671k
    }
567
568
671k
    if (must_set_shared_state() && _shared_state == nullptr) {
569
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
570
0
    }
571
572
671k
    _rows_returned_counter =
573
671k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
574
671k
    _blocks_returned_counter =
575
671k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
576
671k
    _output_block_bytes_counter =
577
671k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
578
671k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
579
671k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
580
671k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
581
671k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
582
671k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
583
671k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
584
671k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
585
671k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
586
671k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
587
671k
    _memory_used_counter =
588
671k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
589
671k
    _common_profile->add_info_string("IsColocate",
590
671k
                                     std::to_string(_parent->is_colocated_operator()));
591
671k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
592
671k
    _common_profile->add_info_string("FollowedByShuffledOperator",
593
671k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
594
671k
    return Status::OK();
595
671k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
530
151
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
531
151
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
532
151
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
533
151
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
534
151
    _operator_profile->set_metadata(_parent->node_id());
535
    // indent is false so that source operator will have same
536
    // indentation_level with its parent operator.
537
151
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
538
151
    _operator_profile->add_child(_common_profile.get(), true);
539
151
    _operator_profile->add_child(_custom_profile.get(), true);
540
151
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
541
151
    if constexpr (!is_fake_shared) {
542
151
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
543
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
544
0
                                    .first.get()
545
0
                                    ->template cast<SharedStateArg>();
546
547
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
548
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
549
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
550
151
        } else if (info.shared_state) {
551
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
552
                DCHECK(false);
553
            }
554
            // For UnionSourceOperator without children, there is no shared state.
555
151
            _shared_state = info.shared_state->template cast<SharedStateArg>();
556
557
151
            _dependency = _shared_state->create_source_dependency(
558
151
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
559
151
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
560
151
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
561
151
        } else {
562
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
563
                DCHECK(false);
564
            }
565
0
        }
566
151
    }
567
568
151
    if (must_set_shared_state() && _shared_state == nullptr) {
569
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
570
0
    }
571
572
151
    _rows_returned_counter =
573
151
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
574
151
    _blocks_returned_counter =
575
151
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
576
151
    _output_block_bytes_counter =
577
151
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
578
151
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
579
151
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
580
151
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
581
151
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
582
151
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
583
151
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
584
151
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
585
151
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
586
151
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
587
151
    _memory_used_counter =
588
151
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
589
151
    _common_profile->add_info_string("IsColocate",
590
151
                                     std::to_string(_parent->is_colocated_operator()));
591
151
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
592
151
    _common_profile->add_info_string("FollowedByShuffledOperator",
593
151
                                     std::to_string(_parent->followed_by_shuffled_operator()));
594
151
    return Status::OK();
595
151
}
596
597
template <typename SharedStateArg>
598
2.53M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
599
2.53M
    _conjuncts.resize(_parent->_conjuncts.size());
600
2.53M
    _projections.resize(_parent->_projections.size());
601
3.03M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
602
505k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
603
505k
    }
604
5.37M
    for (size_t i = 0; i < _projections.size(); i++) {
605
2.84M
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
606
2.84M
    }
607
2.53M
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
608
2.55M
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
609
21.5k
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
610
137k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
611
116k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
612
116k
                    state, _intermediate_projections[i][j]));
613
116k
        }
614
21.5k
    }
615
2.53M
    return Status::OK();
616
2.53M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
598
66.2k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
599
66.2k
    _conjuncts.resize(_parent->_conjuncts.size());
600
66.2k
    _projections.resize(_parent->_projections.size());
601
66.9k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
602
700
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
603
700
    }
604
322k
    for (size_t i = 0; i < _projections.size(); i++) {
605
255k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
606
255k
    }
607
66.2k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
608
67.5k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
609
1.31k
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
610
14.7k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
611
13.4k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
612
13.4k
                    state, _intermediate_projections[i][j]));
613
13.4k
        }
614
1.31k
    }
615
66.2k
    return Status::OK();
616
66.2k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
598
3
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
599
3
    _conjuncts.resize(_parent->_conjuncts.size());
600
3
    _projections.resize(_parent->_projections.size());
601
3
    for (size_t i = 0; i < _conjuncts.size(); i++) {
602
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
603
0
    }
604
3
    for (size_t i = 0; i < _projections.size(); i++) {
605
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
606
0
    }
607
3
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
608
3
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
609
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
610
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
611
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
612
0
                    state, _intermediate_projections[i][j]));
613
0
        }
614
0
    }
615
3
    return Status::OK();
616
3
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
598
251k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
599
251k
    _conjuncts.resize(_parent->_conjuncts.size());
600
251k
    _projections.resize(_parent->_projections.size());
601
251k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
602
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
603
0
    }
604
251k
    for (size_t i = 0; i < _projections.size(); i++) {
605
355
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
606
355
    }
607
251k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
608
251k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
609
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
610
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
611
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
612
0
                    state, _intermediate_projections[i][j]));
613
0
        }
614
0
    }
615
251k
    return Status::OK();
616
251k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
598
22
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
599
22
    _conjuncts.resize(_parent->_conjuncts.size());
600
22
    _projections.resize(_parent->_projections.size());
601
22
    for (size_t i = 0; i < _conjuncts.size(); i++) {
602
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
603
0
    }
604
22
    for (size_t i = 0; i < _projections.size(); i++) {
605
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
606
0
    }
607
22
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
608
22
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
609
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
610
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
611
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
612
0
                    state, _intermediate_projections[i][j]));
613
0
        }
614
0
    }
615
22
    return Status::OK();
616
22
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
598
30.7k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
599
30.7k
    _conjuncts.resize(_parent->_conjuncts.size());
600
30.7k
    _projections.resize(_parent->_projections.size());
601
30.8k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
602
37
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
603
37
    }
604
258k
    for (size_t i = 0; i < _projections.size(); i++) {
605
227k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
606
227k
    }
607
30.7k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
608
30.9k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
609
149
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
610
917
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
611
768
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
612
768
                    state, _intermediate_projections[i][j]));
613
768
        }
614
149
    }
615
30.7k
    return Status::OK();
616
30.7k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
598
8.95k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
599
8.95k
    _conjuncts.resize(_parent->_conjuncts.size());
600
8.95k
    _projections.resize(_parent->_projections.size());
601
9.83k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
602
881
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
603
881
    }
604
24.9k
    for (size_t i = 0; i < _projections.size(); i++) {
605
16.0k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
606
16.0k
    }
607
8.95k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
608
9.04k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
609
89
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
610
675
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
611
586
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
612
586
                    state, _intermediate_projections[i][j]));
613
586
        }
614
89
    }
615
8.95k
    return Status::OK();
616
8.95k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
598
208k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
599
208k
    _conjuncts.resize(_parent->_conjuncts.size());
600
208k
    _projections.resize(_parent->_projections.size());
601
212k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
602
3.84k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
603
3.84k
    }
604
490k
    for (size_t i = 0; i < _projections.size(); i++) {
605
281k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
606
281k
    }
607
208k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
608
208k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
609
241
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
610
1.83k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
611
1.59k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
612
1.59k
                    state, _intermediate_projections[i][j]));
613
1.59k
        }
614
241
    }
615
208k
    return Status::OK();
616
208k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
598
253
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
599
253
    _conjuncts.resize(_parent->_conjuncts.size());
600
253
    _projections.resize(_parent->_projections.size());
601
256
    for (size_t i = 0; i < _conjuncts.size(); i++) {
602
3
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
603
3
    }
604
885
    for (size_t i = 0; i < _projections.size(); i++) {
605
632
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
606
632
    }
607
253
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
608
253
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
609
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
610
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
611
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
612
0
                    state, _intermediate_projections[i][j]));
613
0
        }
614
0
    }
615
253
    return Status::OK();
616
253
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
598
145
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
599
145
    _conjuncts.resize(_parent->_conjuncts.size());
600
145
    _projections.resize(_parent->_projections.size());
601
145
    for (size_t i = 0; i < _conjuncts.size(); i++) {
602
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
603
0
    }
604
321
    for (size_t i = 0; i < _projections.size(); i++) {
605
176
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
606
176
    }
607
145
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
608
145
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
609
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
610
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
611
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
612
0
                    state, _intermediate_projections[i][j]));
613
0
        }
614
0
    }
615
145
    return Status::OK();
616
145
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
598
1.18M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
599
1.18M
    _conjuncts.resize(_parent->_conjuncts.size());
600
1.18M
    _projections.resize(_parent->_projections.size());
601
1.67M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
602
484k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
603
484k
    }
604
3.15M
    for (size_t i = 0; i < _projections.size(); i++) {
605
1.96M
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
606
1.96M
    }
607
1.18M
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
608
1.20M
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
609
19.7k
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
610
119k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
611
99.7k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
612
99.7k
                    state, _intermediate_projections[i][j]));
613
99.7k
        }
614
19.7k
    }
615
1.18M
    return Status::OK();
616
1.18M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
598
55.1k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
599
55.1k
    _conjuncts.resize(_parent->_conjuncts.size());
600
55.1k
    _projections.resize(_parent->_projections.size());
601
55.1k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
602
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
603
0
    }
604
149k
    for (size_t i = 0; i < _projections.size(); i++) {
605
94.4k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
606
94.4k
    }
607
55.1k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
608
55.1k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
609
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
610
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
611
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
612
0
                    state, _intermediate_projections[i][j]));
613
0
        }
614
0
    }
615
55.1k
    return Status::OK();
616
55.1k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
598
17
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
599
17
    _conjuncts.resize(_parent->_conjuncts.size());
600
17
    _projections.resize(_parent->_projections.size());
601
17
    for (size_t i = 0; i < _conjuncts.size(); i++) {
602
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
603
0
    }
604
17
    for (size_t i = 0; i < _projections.size(); i++) {
605
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
606
0
    }
607
17
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
608
17
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
609
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
610
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
611
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
612
0
                    state, _intermediate_projections[i][j]));
613
0
        }
614
0
    }
615
17
    return Status::OK();
616
17
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
598
42.3k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
599
42.3k
    _conjuncts.resize(_parent->_conjuncts.size());
600
42.3k
    _projections.resize(_parent->_projections.size());
601
57.4k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
602
15.1k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
603
15.1k
    }
604
42.3k
    for (size_t i = 0; i < _projections.size(); i++) {
605
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
606
0
    }
607
42.3k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
608
42.3k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
609
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
610
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
611
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
612
0
                    state, _intermediate_projections[i][j]));
613
0
        }
614
0
    }
615
42.3k
    return Status::OK();
616
42.3k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
598
464
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
599
464
    _conjuncts.resize(_parent->_conjuncts.size());
600
464
    _projections.resize(_parent->_projections.size());
601
464
    for (size_t i = 0; i < _conjuncts.size(); i++) {
602
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
603
0
    }
604
464
    for (size_t i = 0; i < _projections.size(); i++) {
605
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
606
0
    }
607
464
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
608
464
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
609
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
610
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
611
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
612
0
                    state, _intermediate_projections[i][j]));
613
0
        }
614
0
    }
615
464
    return Status::OK();
616
464
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
598
4.94k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
599
4.94k
    _conjuncts.resize(_parent->_conjuncts.size());
600
4.94k
    _projections.resize(_parent->_projections.size());
601
4.94k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
602
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
603
0
    }
604
4.94k
    for (size_t i = 0; i < _projections.size(); i++) {
605
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
606
0
    }
607
4.94k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
608
4.94k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
609
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
610
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
611
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
612
0
                    state, _intermediate_projections[i][j]));
613
0
        }
614
0
    }
615
4.94k
    return Status::OK();
616
4.94k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
598
672k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
599
672k
    _conjuncts.resize(_parent->_conjuncts.size());
600
672k
    _projections.resize(_parent->_projections.size());
601
672k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
602
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
603
0
    }
604
672k
    for (size_t i = 0; i < _projections.size(); i++) {
605
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
606
0
    }
607
672k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
608
672k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
609
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
610
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
611
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
612
0
                    state, _intermediate_projections[i][j]));
613
0
        }
614
0
    }
615
672k
    return Status::OK();
616
672k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4openEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
598
151
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
599
151
    _conjuncts.resize(_parent->_conjuncts.size());
600
151
    _projections.resize(_parent->_projections.size());
601
158
    for (size_t i = 0; i < _conjuncts.size(); i++) {
602
7
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
603
7
    }
604
447
    for (size_t i = 0; i < _projections.size(); i++) {
605
296
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
606
296
    }
607
151
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
608
152
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
609
1
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
610
3
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
611
2
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
612
2
                    state, _intermediate_projections[i][j]));
613
2
        }
614
1
    }
615
151
    return Status::OK();
616
151
}
617
618
template <typename SharedStateArg>
619
15.9k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
620
15.9k
    if (_terminated) {
621
3
        return Status::OK();
622
3
    }
623
15.9k
    _terminated = true;
624
15.9k
    return Status::OK();
625
15.9k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
619
1.00k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
620
1.00k
    if (_terminated) {
621
0
        return Status::OK();
622
0
    }
623
1.00k
    _terminated = true;
624
1.00k
    return Status::OK();
625
1.00k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
619
88
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
620
88
    if (_terminated) {
621
1
        return Status::OK();
622
1
    }
623
87
    _terminated = true;
624
87
    return Status::OK();
625
88
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
619
267
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
620
267
    if (_terminated) {
621
0
        return Status::OK();
622
0
    }
623
267
    _terminated = true;
624
267
    return Status::OK();
625
267
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
619
165
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
620
165
    if (_terminated) {
621
0
        return Status::OK();
622
0
    }
623
165
    _terminated = true;
624
165
    return Status::OK();
625
165
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
619
12.9k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
620
12.9k
    if (_terminated) {
621
1
        return Status::OK();
622
1
    }
623
12.9k
    _terminated = true;
624
12.9k
    return Status::OK();
625
12.9k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
619
10
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
620
10
    if (_terminated) {
621
0
        return Status::OK();
622
0
    }
623
10
    _terminated = true;
624
10
    return Status::OK();
625
10
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
619
25
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
620
25
    if (_terminated) {
621
0
        return Status::OK();
622
0
    }
623
25
    _terminated = true;
624
25
    return Status::OK();
625
25
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
619
243
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
620
243
    if (_terminated) {
621
0
        return Status::OK();
622
0
    }
623
243
    _terminated = true;
624
243
    return Status::OK();
625
243
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
619
1.17k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
620
1.17k
    if (_terminated) {
621
1
        return Status::OK();
622
1
    }
623
1.17k
    _terminated = true;
624
1.17k
    return Status::OK();
625
1.17k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
619
15
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
620
15
    if (_terminated) {
621
0
        return Status::OK();
622
0
    }
623
15
    _terminated = true;
624
15
    return Status::OK();
625
15
}
626
627
template <typename SharedStateArg>
628
2.82M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
629
2.82M
    if (_closed) {
630
294k
        return Status::OK();
631
294k
    }
632
2.53M
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
633
1.34M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
634
1.34M
    }
635
2.53M
    _closed = true;
636
2.53M
    return Status::OK();
637
2.82M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
628
66.2k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
629
66.2k
    if (_closed) {
630
0
        return Status::OK();
631
0
    }
632
66.2k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
633
66.2k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
634
66.2k
    }
635
66.2k
    _closed = true;
636
66.2k
    return Status::OK();
637
66.2k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
628
4
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
629
4
    if (_closed) {
630
0
        return Status::OK();
631
0
    }
632
4
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
633
4
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
634
4
    }
635
4
    _closed = true;
636
4
    return Status::OK();
637
4
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
628
500k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
629
500k
    if (_closed) {
630
250k
        return Status::OK();
631
250k
    }
632
250k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
633
250k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
634
250k
    }
635
250k
    _closed = true;
636
250k
    return Status::OK();
637
500k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
628
22
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
629
22
    if (_closed) {
630
0
        return Status::OK();
631
0
    }
632
22
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
633
22
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
634
22
    }
635
22
    _closed = true;
636
22
    return Status::OK();
637
22
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
628
30.7k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
629
30.7k
    if (_closed) {
630
0
        return Status::OK();
631
0
    }
632
30.7k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
633
30.7k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
634
30.7k
    }
635
30.7k
    _closed = true;
636
30.7k
    return Status::OK();
637
30.7k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
628
17.9k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
629
17.9k
    if (_closed) {
630
9.01k
        return Status::OK();
631
9.01k
    }
632
8.93k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
633
8.93k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
634
8.93k
    }
635
8.93k
    _closed = true;
636
8.93k
    return Status::OK();
637
17.9k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
628
208k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
629
208k
    if (_closed) {
630
0
        return Status::OK();
631
0
    }
632
208k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
633
208k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
634
208k
    }
635
208k
    _closed = true;
636
208k
    return Status::OK();
637
208k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
628
252
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
629
252
    if (_closed) {
630
0
        return Status::OK();
631
0
    }
632
252
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
633
252
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
634
252
    }
635
252
    _closed = true;
636
252
    return Status::OK();
637
252
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
628
140
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
629
140
    if (_closed) {
630
0
        return Status::OK();
631
0
    }
632
140
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
633
140
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
634
140
    }
635
140
    _closed = true;
636
140
    return Status::OK();
637
140
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
628
1.21M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
629
1.21M
    if (_closed) {
630
29.7k
        return Status::OK();
631
29.7k
    }
632
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
633
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
634
    }
635
1.18M
    _closed = true;
636
1.18M
    return Status::OK();
637
1.21M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
628
55.1k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
629
55.1k
    if (_closed) {
630
0
        return Status::OK();
631
0
    }
632
55.1k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
633
55.1k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
634
55.1k
    }
635
55.1k
    _closed = true;
636
55.1k
    return Status::OK();
637
55.1k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
628
28
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
629
28
    if (_closed) {
630
14
        return Status::OK();
631
14
    }
632
14
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
633
14
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
634
14
    }
635
14
    _closed = true;
636
14
    return Status::OK();
637
28
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
628
42.2k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
629
42.2k
    if (_closed) {
630
0
        return Status::OK();
631
0
    }
632
42.2k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
633
42.2k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
634
42.2k
    }
635
42.2k
    _closed = true;
636
42.2k
    return Status::OK();
637
42.2k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
628
723
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
629
723
    if (_closed) {
630
362
        return Status::OK();
631
362
    }
632
361
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
633
361
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
634
361
    }
635
361
    _closed = true;
636
361
    return Status::OK();
637
723
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
628
9.96k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
629
9.96k
    if (_closed) {
630
5.03k
        return Status::OK();
631
5.03k
    }
632
4.93k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
633
4.93k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
634
4.93k
    }
635
4.93k
    _closed = true;
636
4.93k
    return Status::OK();
637
9.96k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
628
673k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
629
673k
    if (_closed) {
630
0
        return Status::OK();
631
0
    }
632
673k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
633
673k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
634
673k
    }
635
673k
    _closed = true;
636
673k
    return Status::OK();
637
673k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
628
304
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
629
304
    if (_closed) {
630
162
        return Status::OK();
631
162
    }
632
142
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
633
142
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
634
142
    }
635
142
    _closed = true;
636
142
    return Status::OK();
637
304
}
638
639
template <typename SharedState>
640
2.08M
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
641
    // create profile
642
2.08M
    _operator_profile =
643
2.08M
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
644
2.08M
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
645
2.08M
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
646
647
    // indentation is true
648
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
649
    // So we should set the indentation to true.
650
2.08M
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
651
2.08M
    _operator_profile->add_child(_common_profile, true);
652
2.08M
    _operator_profile->add_child(_custom_profile, true);
653
654
2.08M
    _operator_profile->set_metadata(_parent->node_id());
655
2.08M
    _wait_for_finish_dependency_timer =
656
2.08M
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
657
2.08M
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
658
2.08M
    if constexpr (!is_fake_shared) {
659
1.37M
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
660
1.37M
            info.shared_state_map.end()) {
661
279k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
662
261k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
663
261k
            }
664
279k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
665
279k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
666
279k
                                                  ? 0
667
279k
                                                  : info.task_idx]
668
279k
                                  .get();
669
279k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
670
1.09M
        } else {
671
1.09M
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
672
308
                DCHECK(false);
673
308
            }
674
1.09M
            _shared_state = info.shared_state->template cast<SharedState>();
675
1.09M
            _dependency = _shared_state->create_sink_dependency(
676
1.09M
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
677
1.09M
        }
678
1.37M
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
679
1.37M
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
680
1.37M
    }
681
682
2.08M
    if (must_set_shared_state() && _shared_state == nullptr) {
683
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
684
0
    }
685
686
2.08M
    _rows_input_counter =
687
2.08M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
688
2.08M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
689
2.08M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
690
2.08M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
691
2.08M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
692
2.08M
    _memory_used_counter =
693
2.08M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
694
2.08M
    _common_profile->add_info_string("IsColocate",
695
2.08M
                                     std::to_string(_parent->is_colocated_operator()));
696
2.08M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
697
2.08M
    _common_profile->add_info_string("FollowedByShuffledOperator",
698
2.08M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
699
2.08M
    return Status::OK();
700
2.08M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
640
114k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
641
    // create profile
642
114k
    _operator_profile =
643
114k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
644
114k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
645
114k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
646
647
    // indentation is true
648
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
649
    // So we should set the indentation to true.
650
114k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
651
114k
    _operator_profile->add_child(_common_profile, true);
652
114k
    _operator_profile->add_child(_custom_profile, true);
653
654
114k
    _operator_profile->set_metadata(_parent->node_id());
655
114k
    _wait_for_finish_dependency_timer =
656
114k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
657
114k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
658
114k
    if constexpr (!is_fake_shared) {
659
114k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
660
114k
            info.shared_state_map.end()) {
661
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
662
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
663
            }
664
17.2k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
665
17.2k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
666
17.2k
                                                  ? 0
667
17.2k
                                                  : info.task_idx]
668
17.2k
                                  .get();
669
17.2k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
670
97.0k
        } else {
671
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
672
                DCHECK(false);
673
            }
674
97.0k
            _shared_state = info.shared_state->template cast<SharedState>();
675
97.0k
            _dependency = _shared_state->create_sink_dependency(
676
97.0k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
677
97.0k
        }
678
114k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
679
114k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
680
114k
    }
681
682
114k
    if (must_set_shared_state() && _shared_state == nullptr) {
683
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
684
0
    }
685
686
114k
    _rows_input_counter =
687
114k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
688
114k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
689
114k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
690
114k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
691
114k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
692
114k
    _memory_used_counter =
693
114k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
694
114k
    _common_profile->add_info_string("IsColocate",
695
114k
                                     std::to_string(_parent->is_colocated_operator()));
696
114k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
697
114k
    _common_profile->add_info_string("FollowedByShuffledOperator",
698
114k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
699
114k
    return Status::OK();
700
114k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
640
2
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
641
    // create profile
642
2
    _operator_profile =
643
2
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
644
2
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
645
2
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
646
647
    // indentation is true
648
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
649
    // So we should set the indentation to true.
650
2
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
651
2
    _operator_profile->add_child(_common_profile, true);
652
2
    _operator_profile->add_child(_custom_profile, true);
653
654
2
    _operator_profile->set_metadata(_parent->node_id());
655
2
    _wait_for_finish_dependency_timer =
656
2
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
657
2
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
658
2
    if constexpr (!is_fake_shared) {
659
2
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
660
2
            info.shared_state_map.end()) {
661
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
662
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
663
            }
664
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
665
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
666
0
                                                  ? 0
667
0
                                                  : info.task_idx]
668
0
                                  .get();
669
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
670
2
        } else {
671
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
672
                DCHECK(false);
673
            }
674
2
            _shared_state = info.shared_state->template cast<SharedState>();
675
2
            _dependency = _shared_state->create_sink_dependency(
676
2
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
677
2
        }
678
2
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
679
2
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
680
2
    }
681
682
2
    if (must_set_shared_state() && _shared_state == nullptr) {
683
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
684
0
    }
685
686
2
    _rows_input_counter =
687
2
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
688
2
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
689
2
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
690
2
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
691
2
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
692
2
    _memory_used_counter =
693
2
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
694
2
    _common_profile->add_info_string("IsColocate",
695
2
                                     std::to_string(_parent->is_colocated_operator()));
696
2
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
697
2
    _common_profile->add_info_string("FollowedByShuffledOperator",
698
2
                                     std::to_string(_parent->followed_by_shuffled_operator()));
699
2
    return Status::OK();
700
2
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
640
251k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
641
    // create profile
642
251k
    _operator_profile =
643
251k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
644
251k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
645
251k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
646
647
    // indentation is true
648
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
649
    // So we should set the indentation to true.
650
251k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
651
251k
    _operator_profile->add_child(_common_profile, true);
652
251k
    _operator_profile->add_child(_custom_profile, true);
653
654
251k
    _operator_profile->set_metadata(_parent->node_id());
655
251k
    _wait_for_finish_dependency_timer =
656
251k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
657
251k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
658
251k
    if constexpr (!is_fake_shared) {
659
251k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
660
251k
            info.shared_state_map.end()) {
661
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
662
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
663
            }
664
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
665
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
666
0
                                                  ? 0
667
0
                                                  : info.task_idx]
668
0
                                  .get();
669
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
670
251k
        } else {
671
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
672
                DCHECK(false);
673
            }
674
251k
            _shared_state = info.shared_state->template cast<SharedState>();
675
251k
            _dependency = _shared_state->create_sink_dependency(
676
251k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
677
251k
        }
678
251k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
679
251k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
680
251k
    }
681
682
251k
    if (must_set_shared_state() && _shared_state == nullptr) {
683
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
684
0
    }
685
686
251k
    _rows_input_counter =
687
251k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
688
251k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
689
251k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
690
251k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
691
251k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
692
251k
    _memory_used_counter =
693
251k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
694
251k
    _common_profile->add_info_string("IsColocate",
695
251k
                                     std::to_string(_parent->is_colocated_operator()));
696
251k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
697
251k
    _common_profile->add_info_string("FollowedByShuffledOperator",
698
251k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
699
251k
    return Status::OK();
700
251k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
640
28
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
641
    // create profile
642
28
    _operator_profile =
643
28
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
644
28
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
645
28
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
646
647
    // indentation is true
648
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
649
    // So we should set the indentation to true.
650
28
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
651
28
    _operator_profile->add_child(_common_profile, true);
652
28
    _operator_profile->add_child(_custom_profile, true);
653
654
28
    _operator_profile->set_metadata(_parent->node_id());
655
28
    _wait_for_finish_dependency_timer =
656
28
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
657
28
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
658
28
    if constexpr (!is_fake_shared) {
659
28
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
660
28
            info.shared_state_map.end()) {
661
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
662
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
663
            }
664
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
665
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
666
0
                                                  ? 0
667
0
                                                  : info.task_idx]
668
0
                                  .get();
669
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
670
28
        } else {
671
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
672
                DCHECK(false);
673
            }
674
28
            _shared_state = info.shared_state->template cast<SharedState>();
675
28
            _dependency = _shared_state->create_sink_dependency(
676
28
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
677
28
        }
678
28
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
679
28
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
680
28
    }
681
682
28
    if (must_set_shared_state() && _shared_state == nullptr) {
683
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
684
0
    }
685
686
28
    _rows_input_counter =
687
28
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
688
28
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
689
28
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
690
28
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
691
28
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
692
28
    _memory_used_counter =
693
28
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
694
28
    _common_profile->add_info_string("IsColocate",
695
28
                                     std::to_string(_parent->is_colocated_operator()));
696
28
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
697
28
    _common_profile->add_info_string("FollowedByShuffledOperator",
698
28
                                     std::to_string(_parent->followed_by_shuffled_operator()));
699
28
    return Status::OK();
700
28
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
640
30.7k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
641
    // create profile
642
30.7k
    _operator_profile =
643
30.7k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
644
30.7k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
645
30.7k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
646
647
    // indentation is true
648
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
649
    // So we should set the indentation to true.
650
30.7k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
651
30.7k
    _operator_profile->add_child(_common_profile, true);
652
30.7k
    _operator_profile->add_child(_custom_profile, true);
653
654
30.7k
    _operator_profile->set_metadata(_parent->node_id());
655
30.7k
    _wait_for_finish_dependency_timer =
656
30.7k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
657
30.7k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
658
30.7k
    if constexpr (!is_fake_shared) {
659
30.7k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
660
30.7k
            info.shared_state_map.end()) {
661
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
662
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
663
            }
664
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
665
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
666
0
                                                  ? 0
667
0
                                                  : info.task_idx]
668
0
                                  .get();
669
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
670
30.7k
        } else {
671
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
672
                DCHECK(false);
673
            }
674
30.7k
            _shared_state = info.shared_state->template cast<SharedState>();
675
30.7k
            _dependency = _shared_state->create_sink_dependency(
676
30.7k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
677
30.7k
        }
678
30.7k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
679
30.7k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
680
30.7k
    }
681
682
30.7k
    if (must_set_shared_state() && _shared_state == nullptr) {
683
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
684
0
    }
685
686
30.7k
    _rows_input_counter =
687
30.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
688
30.7k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
689
30.7k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
690
30.7k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
691
30.7k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
692
30.7k
    _memory_used_counter =
693
30.7k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
694
30.7k
    _common_profile->add_info_string("IsColocate",
695
30.7k
                                     std::to_string(_parent->is_colocated_operator()));
696
30.7k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
697
30.7k
    _common_profile->add_info_string("FollowedByShuffledOperator",
698
30.7k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
699
30.7k
    return Status::OK();
700
30.7k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
640
8.94k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
641
    // create profile
642
8.94k
    _operator_profile =
643
8.94k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
644
8.94k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
645
8.94k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
646
647
    // indentation is true
648
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
649
    // So we should set the indentation to true.
650
8.94k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
651
8.94k
    _operator_profile->add_child(_common_profile, true);
652
8.94k
    _operator_profile->add_child(_custom_profile, true);
653
654
8.94k
    _operator_profile->set_metadata(_parent->node_id());
655
8.94k
    _wait_for_finish_dependency_timer =
656
8.94k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
657
8.94k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
658
8.94k
    if constexpr (!is_fake_shared) {
659
8.94k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
660
8.94k
            info.shared_state_map.end()) {
661
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
662
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
663
            }
664
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
665
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
666
0
                                                  ? 0
667
0
                                                  : info.task_idx]
668
0
                                  .get();
669
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
670
8.94k
        } else {
671
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
672
                DCHECK(false);
673
            }
674
8.94k
            _shared_state = info.shared_state->template cast<SharedState>();
675
8.94k
            _dependency = _shared_state->create_sink_dependency(
676
8.94k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
677
8.94k
        }
678
8.94k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
679
8.94k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
680
8.94k
    }
681
682
8.94k
    if (must_set_shared_state() && _shared_state == nullptr) {
683
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
684
0
    }
685
686
8.94k
    _rows_input_counter =
687
8.94k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
688
8.94k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
689
8.94k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
690
8.94k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
691
8.94k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
692
8.94k
    _memory_used_counter =
693
8.94k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
694
8.94k
    _common_profile->add_info_string("IsColocate",
695
8.94k
                                     std::to_string(_parent->is_colocated_operator()));
696
8.94k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
697
8.94k
    _common_profile->add_info_string("FollowedByShuffledOperator",
698
8.94k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
699
8.94k
    return Status::OK();
700
8.94k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
640
208k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
641
    // create profile
642
208k
    _operator_profile =
643
208k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
644
208k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
645
208k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
646
647
    // indentation is true
648
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
649
    // So we should set the indentation to true.
650
208k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
651
208k
    _operator_profile->add_child(_common_profile, true);
652
208k
    _operator_profile->add_child(_custom_profile, true);
653
654
208k
    _operator_profile->set_metadata(_parent->node_id());
655
208k
    _wait_for_finish_dependency_timer =
656
208k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
657
208k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
658
208k
    if constexpr (!is_fake_shared) {
659
208k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
660
208k
            info.shared_state_map.end()) {
661
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
662
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
663
            }
664
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
665
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
666
0
                                                  ? 0
667
0
                                                  : info.task_idx]
668
0
                                  .get();
669
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
670
208k
        } else {
671
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
672
                DCHECK(false);
673
            }
674
208k
            _shared_state = info.shared_state->template cast<SharedState>();
675
208k
            _dependency = _shared_state->create_sink_dependency(
676
208k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
677
208k
        }
678
208k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
679
208k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
680
208k
    }
681
682
208k
    if (must_set_shared_state() && _shared_state == nullptr) {
683
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
684
0
    }
685
686
208k
    _rows_input_counter =
687
208k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
688
208k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
689
208k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
690
208k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
691
208k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
692
208k
    _memory_used_counter =
693
208k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
694
208k
    _common_profile->add_info_string("IsColocate",
695
208k
                                     std::to_string(_parent->is_colocated_operator()));
696
208k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
697
208k
    _common_profile->add_info_string("FollowedByShuffledOperator",
698
208k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
699
208k
    return Status::OK();
700
208k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
640
218
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
641
    // create profile
642
218
    _operator_profile =
643
218
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
644
218
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
645
218
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
646
647
    // indentation is true
648
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
649
    // So we should set the indentation to true.
650
218
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
651
218
    _operator_profile->add_child(_common_profile, true);
652
218
    _operator_profile->add_child(_custom_profile, true);
653
654
218
    _operator_profile->set_metadata(_parent->node_id());
655
218
    _wait_for_finish_dependency_timer =
656
218
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
657
218
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
658
218
    if constexpr (!is_fake_shared) {
659
218
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
660
218
            info.shared_state_map.end()) {
661
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
662
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
663
            }
664
217
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
665
217
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
666
217
                                                  ? 0
667
217
                                                  : info.task_idx]
668
217
                                  .get();
669
217
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
670
217
        } else {
671
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
672
                DCHECK(false);
673
            }
674
1
            _shared_state = info.shared_state->template cast<SharedState>();
675
1
            _dependency = _shared_state->create_sink_dependency(
676
1
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
677
1
        }
678
218
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
679
218
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
680
218
    }
681
682
218
    if (must_set_shared_state() && _shared_state == nullptr) {
683
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
684
0
    }
685
686
218
    _rows_input_counter =
687
218
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
688
218
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
689
218
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
690
218
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
691
218
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
692
218
    _memory_used_counter =
693
218
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
694
218
    _common_profile->add_info_string("IsColocate",
695
218
                                     std::to_string(_parent->is_colocated_operator()));
696
218
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
697
218
    _common_profile->add_info_string("FollowedByShuffledOperator",
698
218
                                     std::to_string(_parent->followed_by_shuffled_operator()));
699
218
    return Status::OK();
700
218
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
640
151
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
641
    // create profile
642
151
    _operator_profile =
643
151
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
644
151
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
645
151
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
646
647
    // indentation is true
648
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
649
    // So we should set the indentation to true.
650
151
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
651
151
    _operator_profile->add_child(_common_profile, true);
652
151
    _operator_profile->add_child(_custom_profile, true);
653
654
151
    _operator_profile->set_metadata(_parent->node_id());
655
151
    _wait_for_finish_dependency_timer =
656
151
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
657
151
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
658
151
    if constexpr (!is_fake_shared) {
659
151
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
660
151
            info.shared_state_map.end()) {
661
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
662
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
663
            }
664
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
665
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
666
0
                                                  ? 0
667
0
                                                  : info.task_idx]
668
0
                                  .get();
669
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
670
151
        } else {
671
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
672
                DCHECK(false);
673
            }
674
151
            _shared_state = info.shared_state->template cast<SharedState>();
675
151
            _dependency = _shared_state->create_sink_dependency(
676
151
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
677
151
        }
678
151
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
679
151
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
680
151
    }
681
682
151
    if (must_set_shared_state() && _shared_state == nullptr) {
683
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
684
0
    }
685
686
151
    _rows_input_counter =
687
151
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
688
151
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
689
151
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
690
151
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
691
151
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
692
151
    _memory_used_counter =
693
151
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
694
151
    _common_profile->add_info_string("IsColocate",
695
151
                                     std::to_string(_parent->is_colocated_operator()));
696
151
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
697
151
    _common_profile->add_info_string("FollowedByShuffledOperator",
698
151
                                     std::to_string(_parent->followed_by_shuffled_operator()));
699
151
    return Status::OK();
700
151
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
640
712k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
641
    // create profile
642
712k
    _operator_profile =
643
712k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
644
712k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
645
712k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
646
647
    // indentation is true
648
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
649
    // So we should set the indentation to true.
650
712k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
651
712k
    _operator_profile->add_child(_common_profile, true);
652
712k
    _operator_profile->add_child(_custom_profile, true);
653
654
712k
    _operator_profile->set_metadata(_parent->node_id());
655
712k
    _wait_for_finish_dependency_timer =
656
712k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
657
712k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
658
    if constexpr (!is_fake_shared) {
659
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
660
            info.shared_state_map.end()) {
661
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
662
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
663
            }
664
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
665
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
666
                                                  ? 0
667
                                                  : info.task_idx]
668
                                  .get();
669
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
670
        } else {
671
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
672
                DCHECK(false);
673
            }
674
            _shared_state = info.shared_state->template cast<SharedState>();
675
            _dependency = _shared_state->create_sink_dependency(
676
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
677
        }
678
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
679
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
680
    }
681
682
712k
    if (must_set_shared_state() && _shared_state == nullptr) {
683
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
684
0
    }
685
686
712k
    _rows_input_counter =
687
712k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
688
712k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
689
712k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
690
712k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
691
712k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
692
712k
    _memory_used_counter =
693
712k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
694
712k
    _common_profile->add_info_string("IsColocate",
695
712k
                                     std::to_string(_parent->is_colocated_operator()));
696
712k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
697
712k
    _common_profile->add_info_string("FollowedByShuffledOperator",
698
712k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
699
712k
    return Status::OK();
700
712k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
640
6.38k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
641
    // create profile
642
6.38k
    _operator_profile =
643
6.38k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
644
6.38k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
645
6.38k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
646
647
    // indentation is true
648
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
649
    // So we should set the indentation to true.
650
6.38k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
651
6.38k
    _operator_profile->add_child(_common_profile, true);
652
6.38k
    _operator_profile->add_child(_custom_profile, true);
653
654
6.38k
    _operator_profile->set_metadata(_parent->node_id());
655
6.38k
    _wait_for_finish_dependency_timer =
656
6.38k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
657
6.38k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
658
6.38k
    if constexpr (!is_fake_shared) {
659
6.38k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
660
6.38k
            info.shared_state_map.end()) {
661
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
662
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
663
            }
664
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
665
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
666
0
                                                  ? 0
667
0
                                                  : info.task_idx]
668
0
                                  .get();
669
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
670
6.38k
        } else {
671
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
672
                DCHECK(false);
673
            }
674
6.38k
            _shared_state = info.shared_state->template cast<SharedState>();
675
6.38k
            _dependency = _shared_state->create_sink_dependency(
676
6.38k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
677
6.38k
        }
678
6.38k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
679
6.38k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
680
6.38k
    }
681
682
6.38k
    if (must_set_shared_state() && _shared_state == nullptr) {
683
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
684
0
    }
685
686
6.38k
    _rows_input_counter =
687
6.38k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
688
6.38k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
689
6.38k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
690
6.38k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
691
6.38k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
692
6.38k
    _memory_used_counter =
693
6.38k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
694
6.38k
    _common_profile->add_info_string("IsColocate",
695
6.38k
                                     std::to_string(_parent->is_colocated_operator()));
696
6.38k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
697
6.38k
    _common_profile->add_info_string("FollowedByShuffledOperator",
698
6.38k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
699
6.38k
    return Status::OK();
700
6.38k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
640
465
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
641
    // create profile
642
465
    _operator_profile =
643
465
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
644
465
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
645
465
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
646
647
    // indentation is true
648
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
649
    // So we should set the indentation to true.
650
465
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
651
465
    _operator_profile->add_child(_common_profile, true);
652
465
    _operator_profile->add_child(_custom_profile, true);
653
654
465
    _operator_profile->set_metadata(_parent->node_id());
655
465
    _wait_for_finish_dependency_timer =
656
465
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
657
465
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
658
465
    if constexpr (!is_fake_shared) {
659
465
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
660
465
            info.shared_state_map.end()) {
661
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
662
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
663
            }
664
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
665
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
666
0
                                                  ? 0
667
0
                                                  : info.task_idx]
668
0
                                  .get();
669
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
670
465
        } else {
671
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
672
                DCHECK(false);
673
            }
674
465
            _shared_state = info.shared_state->template cast<SharedState>();
675
465
            _dependency = _shared_state->create_sink_dependency(
676
465
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
677
465
        }
678
465
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
679
465
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
680
465
    }
681
682
465
    if (must_set_shared_state() && _shared_state == nullptr) {
683
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
684
0
    }
685
686
465
    _rows_input_counter =
687
465
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
688
465
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
689
465
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
690
465
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
691
465
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
692
465
    _memory_used_counter =
693
465
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
694
465
    _common_profile->add_info_string("IsColocate",
695
465
                                     std::to_string(_parent->is_colocated_operator()));
696
465
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
697
465
    _common_profile->add_info_string("FollowedByShuffledOperator",
698
465
                                     std::to_string(_parent->followed_by_shuffled_operator()));
699
465
    return Status::OK();
700
465
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
640
14.7k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
641
    // create profile
642
14.7k
    _operator_profile =
643
14.7k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
644
14.7k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
645
14.7k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
646
647
    // indentation is true
648
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
649
    // So we should set the indentation to true.
650
14.7k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
651
14.7k
    _operator_profile->add_child(_common_profile, true);
652
14.7k
    _operator_profile->add_child(_custom_profile, true);
653
654
14.7k
    _operator_profile->set_metadata(_parent->node_id());
655
14.7k
    _wait_for_finish_dependency_timer =
656
14.7k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
657
14.7k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
658
14.7k
    if constexpr (!is_fake_shared) {
659
14.7k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
660
14.7k
            info.shared_state_map.end()) {
661
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
662
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
663
            }
664
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
665
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
666
0
                                                  ? 0
667
0
                                                  : info.task_idx]
668
0
                                  .get();
669
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
670
14.7k
        } else {
671
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
672
                DCHECK(false);
673
            }
674
14.7k
            _shared_state = info.shared_state->template cast<SharedState>();
675
14.7k
            _dependency = _shared_state->create_sink_dependency(
676
14.7k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
677
14.7k
        }
678
14.7k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
679
14.7k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
680
14.7k
    }
681
682
14.7k
    if (must_set_shared_state() && _shared_state == nullptr) {
683
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
684
0
    }
685
686
14.7k
    _rows_input_counter =
687
14.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
688
14.7k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
689
14.7k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
690
14.7k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
691
14.7k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
692
14.7k
    _memory_used_counter =
693
14.7k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
694
14.7k
    _common_profile->add_info_string("IsColocate",
695
14.7k
                                     std::to_string(_parent->is_colocated_operator()));
696
14.7k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
697
14.7k
    _common_profile->add_info_string("FollowedByShuffledOperator",
698
14.7k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
699
14.7k
    return Status::OK();
700
14.7k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
640
12.0k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
641
    // create profile
642
12.0k
    _operator_profile =
643
12.0k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
644
12.0k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
645
12.0k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
646
647
    // indentation is true
648
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
649
    // So we should set the indentation to true.
650
12.0k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
651
12.0k
    _operator_profile->add_child(_common_profile, true);
652
12.0k
    _operator_profile->add_child(_custom_profile, true);
653
654
12.0k
    _operator_profile->set_metadata(_parent->node_id());
655
12.0k
    _wait_for_finish_dependency_timer =
656
12.0k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
657
12.0k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
658
12.0k
    if constexpr (!is_fake_shared) {
659
12.0k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
660
12.0k
            info.shared_state_map.end()) {
661
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
662
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
663
            }
664
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
665
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
666
0
                                                  ? 0
667
0
                                                  : info.task_idx]
668
0
                                  .get();
669
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
670
12.0k
        } else {
671
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
672
                DCHECK(false);
673
            }
674
12.0k
            _shared_state = info.shared_state->template cast<SharedState>();
675
12.0k
            _dependency = _shared_state->create_sink_dependency(
676
12.0k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
677
12.0k
        }
678
12.0k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
679
12.0k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
680
12.0k
    }
681
682
12.0k
    if (must_set_shared_state() && _shared_state == nullptr) {
683
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
684
0
    }
685
686
12.0k
    _rows_input_counter =
687
12.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
688
12.0k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
689
12.0k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
690
12.0k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
691
12.0k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
692
12.0k
    _memory_used_counter =
693
12.0k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
694
12.0k
    _common_profile->add_info_string("IsColocate",
695
12.0k
                                     std::to_string(_parent->is_colocated_operator()));
696
12.0k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
697
12.0k
    _common_profile->add_info_string("FollowedByShuffledOperator",
698
12.0k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
699
12.0k
    return Status::OK();
700
12.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
640
262k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
641
    // create profile
642
262k
    _operator_profile =
643
262k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
644
262k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
645
262k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
646
647
    // indentation is true
648
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
649
    // So we should set the indentation to true.
650
262k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
651
262k
    _operator_profile->add_child(_common_profile, true);
652
262k
    _operator_profile->add_child(_custom_profile, true);
653
654
262k
    _operator_profile->set_metadata(_parent->node_id());
655
262k
    _wait_for_finish_dependency_timer =
656
262k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
657
262k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
658
262k
    if constexpr (!is_fake_shared) {
659
262k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
660
262k
            info.shared_state_map.end()) {
661
261k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
662
261k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
663
261k
            }
664
261k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
665
261k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
666
261k
                                                  ? 0
667
261k
                                                  : info.task_idx]
668
261k
                                  .get();
669
261k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
670
261k
        } else {
671
308
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
672
308
                DCHECK(false);
673
308
            }
674
308
            _shared_state = info.shared_state->template cast<SharedState>();
675
308
            _dependency = _shared_state->create_sink_dependency(
676
308
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
677
308
        }
678
262k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
679
262k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
680
262k
    }
681
682
262k
    if (must_set_shared_state() && _shared_state == nullptr) {
683
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
684
0
    }
685
686
262k
    _rows_input_counter =
687
262k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
688
262k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
689
262k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
690
262k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
691
262k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
692
262k
    _memory_used_counter =
693
262k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
694
262k
    _common_profile->add_info_string("IsColocate",
695
262k
                                     std::to_string(_parent->is_colocated_operator()));
696
262k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
697
262k
    _common_profile->add_info_string("FollowedByShuffledOperator",
698
262k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
699
262k
    return Status::OK();
700
262k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
640
460k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
641
    // create profile
642
460k
    _operator_profile =
643
460k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
644
460k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
645
460k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
646
647
    // indentation is true
648
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
649
    // So we should set the indentation to true.
650
460k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
651
460k
    _operator_profile->add_child(_common_profile, true);
652
460k
    _operator_profile->add_child(_custom_profile, true);
653
654
460k
    _operator_profile->set_metadata(_parent->node_id());
655
460k
    _wait_for_finish_dependency_timer =
656
460k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
657
460k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
658
460k
    if constexpr (!is_fake_shared) {
659
460k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
660
460k
            info.shared_state_map.end()) {
661
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
662
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
663
            }
664
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
665
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
666
0
                                                  ? 0
667
0
                                                  : info.task_idx]
668
0
                                  .get();
669
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
670
460k
        } else {
671
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
672
                DCHECK(false);
673
            }
674
460k
            _shared_state = info.shared_state->template cast<SharedState>();
675
460k
            _dependency = _shared_state->create_sink_dependency(
676
460k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
677
460k
        }
678
460k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
679
460k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
680
460k
    }
681
682
460k
    if (must_set_shared_state() && _shared_state == nullptr) {
683
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
684
0
    }
685
686
460k
    _rows_input_counter =
687
460k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
688
460k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
689
460k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
690
460k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
691
460k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
692
460k
    _memory_used_counter =
693
460k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
694
460k
    _common_profile->add_info_string("IsColocate",
695
460k
                                     std::to_string(_parent->is_colocated_operator()));
696
460k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
697
460k
    _common_profile->add_info_string("FollowedByShuffledOperator",
698
460k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
699
460k
    return Status::OK();
700
460k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
640
17
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
641
    // create profile
642
17
    _operator_profile =
643
17
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
644
17
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
645
17
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
646
647
    // indentation is true
648
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
649
    // So we should set the indentation to true.
650
17
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
651
17
    _operator_profile->add_child(_common_profile, true);
652
17
    _operator_profile->add_child(_custom_profile, true);
653
654
17
    _operator_profile->set_metadata(_parent->node_id());
655
17
    _wait_for_finish_dependency_timer =
656
17
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
657
17
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
658
17
    if constexpr (!is_fake_shared) {
659
17
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
660
17
            info.shared_state_map.end()) {
661
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
662
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
663
            }
664
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
665
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
666
0
                                                  ? 0
667
0
                                                  : info.task_idx]
668
0
                                  .get();
669
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
670
17
        } else {
671
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
672
                DCHECK(false);
673
            }
674
17
            _shared_state = info.shared_state->template cast<SharedState>();
675
17
            _dependency = _shared_state->create_sink_dependency(
676
17
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
677
17
        }
678
17
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
679
17
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
680
17
    }
681
682
17
    if (must_set_shared_state() && _shared_state == nullptr) {
683
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
684
0
    }
685
686
17
    _rows_input_counter =
687
17
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
688
17
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
689
17
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
690
17
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
691
17
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
692
17
    _memory_used_counter =
693
17
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
694
17
    _common_profile->add_info_string("IsColocate",
695
17
                                     std::to_string(_parent->is_colocated_operator()));
696
17
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
697
17
    _common_profile->add_info_string("FollowedByShuffledOperator",
698
17
                                     std::to_string(_parent->followed_by_shuffled_operator()));
699
17
    return Status::OK();
700
17
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
640
302
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
641
    // create profile
642
302
    _operator_profile =
643
302
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
644
302
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
645
302
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
646
647
    // indentation is true
648
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
649
    // So we should set the indentation to true.
650
302
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
651
302
    _operator_profile->add_child(_common_profile, true);
652
302
    _operator_profile->add_child(_custom_profile, true);
653
654
302
    _operator_profile->set_metadata(_parent->node_id());
655
302
    _wait_for_finish_dependency_timer =
656
302
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
657
302
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
658
302
    if constexpr (!is_fake_shared) {
659
302
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
660
302
            info.shared_state_map.end()) {
661
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
662
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
663
            }
664
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
665
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
666
0
                                                  ? 0
667
0
                                                  : info.task_idx]
668
0
                                  .get();
669
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
670
302
        } else {
671
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
672
                DCHECK(false);
673
            }
674
302
            _shared_state = info.shared_state->template cast<SharedState>();
675
302
            _dependency = _shared_state->create_sink_dependency(
676
302
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
677
302
        }
678
302
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
679
302
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
680
302
    }
681
682
302
    if (must_set_shared_state() && _shared_state == nullptr) {
683
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
684
0
    }
685
686
302
    _rows_input_counter =
687
302
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
688
302
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
689
302
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
690
302
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
691
302
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
692
302
    _memory_used_counter =
693
302
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
694
302
    _common_profile->add_info_string("IsColocate",
695
302
                                     std::to_string(_parent->is_colocated_operator()));
696
302
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
697
302
    _common_profile->add_info_string("FollowedByShuffledOperator",
698
302
                                     std::to_string(_parent->followed_by_shuffled_operator()));
699
302
    return Status::OK();
700
302
}
701
702
template <typename SharedState>
703
2.08M
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
704
2.08M
    if (_closed) {
705
2
        return Status::OK();
706
2
    }
707
2.08M
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
708
1.37M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
709
1.37M
    }
710
2.08M
    _closed = true;
711
2.08M
    return Status::OK();
712
2.08M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
703
114k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
704
114k
    if (_closed) {
705
0
        return Status::OK();
706
0
    }
707
114k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
708
114k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
709
114k
    }
710
114k
    _closed = true;
711
114k
    return Status::OK();
712
114k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
703
1
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
704
1
    if (_closed) {
705
0
        return Status::OK();
706
0
    }
707
1
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
708
1
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
709
1
    }
710
1
    _closed = true;
711
1
    return Status::OK();
712
1
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
703
251k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
704
251k
    if (_closed) {
705
0
        return Status::OK();
706
0
    }
707
251k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
708
251k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
709
251k
    }
710
251k
    _closed = true;
711
251k
    return Status::OK();
712
251k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
703
20
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
704
20
    if (_closed) {
705
2
        return Status::OK();
706
2
    }
707
18
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
708
18
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
709
18
    }
710
18
    _closed = true;
711
18
    return Status::OK();
712
20
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
703
30.7k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
704
30.7k
    if (_closed) {
705
0
        return Status::OK();
706
0
    }
707
30.7k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
708
30.7k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
709
30.7k
    }
710
30.7k
    _closed = true;
711
30.7k
    return Status::OK();
712
30.7k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
703
8.92k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
704
8.92k
    if (_closed) {
705
0
        return Status::OK();
706
0
    }
707
8.92k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
708
8.92k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
709
8.92k
    }
710
8.92k
    _closed = true;
711
8.92k
    return Status::OK();
712
8.92k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
703
207k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
704
207k
    if (_closed) {
705
0
        return Status::OK();
706
0
    }
707
207k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
708
207k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
709
207k
    }
710
207k
    _closed = true;
711
207k
    return Status::OK();
712
207k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
703
218
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
704
218
    if (_closed) {
705
0
        return Status::OK();
706
0
    }
707
218
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
708
218
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
709
218
    }
710
218
    _closed = true;
711
218
    return Status::OK();
712
218
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
703
140
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
704
140
    if (_closed) {
705
0
        return Status::OK();
706
0
    }
707
140
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
708
140
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
709
140
    }
710
140
    _closed = true;
711
140
    return Status::OK();
712
140
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
703
713k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
704
713k
    if (_closed) {
705
0
        return Status::OK();
706
0
    }
707
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
708
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
709
    }
710
713k
    _closed = true;
711
713k
    return Status::OK();
712
713k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
703
6.36k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
704
6.36k
    if (_closed) {
705
0
        return Status::OK();
706
0
    }
707
6.36k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
708
6.36k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
709
6.36k
    }
710
6.36k
    _closed = true;
711
6.36k
    return Status::OK();
712
6.36k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
703
363
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
704
363
    if (_closed) {
705
0
        return Status::OK();
706
0
    }
707
363
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
708
363
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
709
363
    }
710
363
    _closed = true;
711
363
    return Status::OK();
712
363
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
703
14.7k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
704
14.7k
    if (_closed) {
705
0
        return Status::OK();
706
0
    }
707
14.7k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
708
14.7k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
709
14.7k
    }
710
14.7k
    _closed = true;
711
14.7k
    return Status::OK();
712
14.7k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
703
12.1k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
704
12.1k
    if (_closed) {
705
0
        return Status::OK();
706
0
    }
707
12.1k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
708
12.1k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
709
12.1k
    }
710
12.1k
    _closed = true;
711
12.1k
    return Status::OK();
712
12.1k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
703
262k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
704
262k
    if (_closed) {
705
0
        return Status::OK();
706
0
    }
707
262k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
708
262k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
709
262k
    }
710
262k
    _closed = true;
711
262k
    return Status::OK();
712
262k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
703
462k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
704
462k
    if (_closed) {
705
0
        return Status::OK();
706
0
    }
707
462k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
708
462k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
709
462k
    }
710
462k
    _closed = true;
711
462k
    return Status::OK();
712
462k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
703
14
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
704
14
    if (_closed) {
705
0
        return Status::OK();
706
0
    }
707
14
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
708
14
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
709
14
    }
710
14
    _closed = true;
711
14
    return Status::OK();
712
14
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
703
302
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
704
302
    if (_closed) {
705
0
        return Status::OK();
706
0
    }
707
302
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
708
302
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
709
302
    }
710
302
    _closed = true;
711
302
    return Status::OK();
712
302
}
713
714
template <typename LocalStateType>
715
87.8k
Status StreamingOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
716
87.8k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
717
87.8k
    return pull(state, block, eos);
718
87.8k
}
_ZN5doris18StreamingOperatorXINS_23AssertNumRowsLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
715
432
Status StreamingOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
716
432
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
717
432
    return pull(state, block, eos);
718
432
}
_ZN5doris18StreamingOperatorXINS_16SelectLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
715
87.4k
Status StreamingOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
716
87.4k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
717
87.4k
    return pull(state, block, eos);
718
87.4k
}
719
720
template <typename LocalStateType>
721
710k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
722
710k
    auto& local_state = get_local_state(state);
723
710k
    if (need_more_input_data(state)) {
724
683k
        local_state._child_block->clear_column_data(
725
683k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
726
683k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
727
683k
                state, local_state._child_block.get(), &local_state._child_eos));
728
683k
        *eos = local_state._child_eos;
729
683k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
730
83.7k
            return Status::OK();
731
83.7k
        }
732
599k
        {
733
599k
            SCOPED_TIMER(local_state.exec_time_counter());
734
599k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
735
599k
        }
736
599k
    }
737
738
626k
    if (!need_more_input_data(state)) {
739
562k
        SCOPED_TIMER(local_state.exec_time_counter());
740
562k
        bool new_eos = false;
741
562k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
742
562k
        if (new_eos) {
743
475k
            *eos = true;
744
475k
        } else if (!need_more_input_data(state)) {
745
22.2k
            *eos = false;
746
22.2k
        }
747
562k
    }
748
626k
    return Status::OK();
749
626k
}
_ZN5doris17StatefulOperatorXINS_23HashJoinProbeLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
721
133k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
722
133k
    auto& local_state = get_local_state(state);
723
133k
    if (need_more_input_data(state)) {
724
119k
        local_state._child_block->clear_column_data(
725
119k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
726
119k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
727
119k
                state, local_state._child_block.get(), &local_state._child_eos));
728
119k
        *eos = local_state._child_eos;
729
119k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
730
38.1k
            return Status::OK();
731
38.1k
        }
732
81.6k
        {
733
81.6k
            SCOPED_TIMER(local_state.exec_time_counter());
734
81.6k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
735
81.6k
        }
736
81.6k
    }
737
738
95.7k
    if (!need_more_input_data(state)) {
739
95.7k
        SCOPED_TIMER(local_state.exec_time_counter());
740
95.7k
        bool new_eos = false;
741
95.7k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
742
95.7k
        if (new_eos) {
743
42.0k
            *eos = true;
744
53.7k
        } else if (!need_more_input_data(state)) {
745
8.48k
            *eos = false;
746
8.48k
        }
747
95.7k
    }
748
95.7k
    return Status::OK();
749
95.7k
}
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_34PartitionedHashJoinProbeLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
_ZN5doris17StatefulOperatorXINS_16RepeatLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
721
3.12k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
722
3.12k
    auto& local_state = get_local_state(state);
723
3.12k
    if (need_more_input_data(state)) {
724
1.88k
        local_state._child_block->clear_column_data(
725
1.88k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
726
1.88k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
727
1.88k
                state, local_state._child_block.get(), &local_state._child_eos));
728
1.88k
        *eos = local_state._child_eos;
729
1.88k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
730
339
            return Status::OK();
731
339
        }
732
1.54k
        {
733
1.54k
            SCOPED_TIMER(local_state.exec_time_counter());
734
1.54k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
735
1.54k
        }
736
1.54k
    }
737
738
2.79k
    if (!need_more_input_data(state)) {
739
2.79k
        SCOPED_TIMER(local_state.exec_time_counter());
740
2.79k
        bool new_eos = false;
741
2.79k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
742
2.79k
        if (new_eos) {
743
1.18k
            *eos = true;
744
1.60k
        } else if (!need_more_input_data(state)) {
745
1.24k
            *eos = false;
746
1.24k
        }
747
2.79k
    }
748
2.78k
    return Status::OK();
749
2.78k
}
_ZN5doris17StatefulOperatorXINS_25MaterializationLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
721
4.71k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
722
4.71k
    auto& local_state = get_local_state(state);
723
4.71k
    if (need_more_input_data(state)) {
724
4.71k
        local_state._child_block->clear_column_data(
725
4.71k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
726
4.71k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
727
4.71k
                state, local_state._child_block.get(), &local_state._child_eos));
728
4.71k
        *eos = local_state._child_eos;
729
4.71k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
730
1.56k
            return Status::OK();
731
1.56k
        }
732
3.14k
        {
733
3.14k
            SCOPED_TIMER(local_state.exec_time_counter());
734
3.14k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
735
3.14k
        }
736
3.14k
    }
737
738
3.14k
    if (!need_more_input_data(state)) {
739
3.14k
        SCOPED_TIMER(local_state.exec_time_counter());
740
3.14k
        bool new_eos = false;
741
3.14k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
742
3.14k
        if (new_eos) {
743
1.59k
            *eos = true;
744
1.59k
        } else if (!need_more_input_data(state)) {
745
0
            *eos = false;
746
0
        }
747
3.14k
    }
748
3.14k
    return Status::OK();
749
3.14k
}
_ZN5doris17StatefulOperatorXINS_22StreamingAggLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
721
56.3k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
722
56.3k
    auto& local_state = get_local_state(state);
723
56.3k
    if (need_more_input_data(state)) {
724
56.3k
        local_state._child_block->clear_column_data(
725
56.3k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
726
56.3k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
727
56.3k
                state, local_state._child_block.get(), &local_state._child_eos));
728
56.3k
        *eos = local_state._child_eos;
729
56.3k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
730
6.19k
            return Status::OK();
731
6.19k
        }
732
50.1k
        {
733
50.1k
            SCOPED_TIMER(local_state.exec_time_counter());
734
50.1k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
735
50.1k
        }
736
50.1k
    }
737
738
50.1k
    if (!need_more_input_data(state)) {
739
19.0k
        SCOPED_TIMER(local_state.exec_time_counter());
740
19.0k
        bool new_eos = false;
741
19.0k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
742
19.0k
        if (new_eos) {
743
18.8k
            *eos = true;
744
18.8k
        } else if (!need_more_input_data(state)) {
745
62
            *eos = false;
746
62
        }
747
19.0k
    }
748
50.1k
    return Status::OK();
749
50.1k
}
_ZN5doris17StatefulOperatorXINS_30DistinctStreamingAggLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
721
433k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
722
433k
    auto& local_state = get_local_state(state);
723
434k
    if (need_more_input_data(state)) {
724
434k
        local_state._child_block->clear_column_data(
725
434k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
726
434k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
727
434k
                state, local_state._child_block.get(), &local_state._child_eos));
728
434k
        *eos = local_state._child_eos;
729
434k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
730
23.5k
            return Status::OK();
731
23.5k
        }
732
410k
        {
733
410k
            SCOPED_TIMER(local_state.exec_time_counter());
734
410k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
735
410k
        }
736
410k
    }
737
738
409k
    if (!need_more_input_data(state)) {
739
376k
        SCOPED_TIMER(local_state.exec_time_counter());
740
376k
        bool new_eos = false;
741
376k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
742
376k
        if (new_eos) {
743
376k
            *eos = true;
744
376k
        } else if (!need_more_input_data(state)) {
745
0
            *eos = false;
746
0
        }
747
376k
    }
748
409k
    return Status::OK();
749
409k
}
_ZN5doris17StatefulOperatorXINS_29NestedLoopJoinProbeLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
721
71.5k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
722
71.5k
    auto& local_state = get_local_state(state);
723
71.5k
    if (need_more_input_data(state)) {
724
59.4k
        local_state._child_block->clear_column_data(
725
59.4k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
726
59.4k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
727
59.4k
                state, local_state._child_block.get(), &local_state._child_eos));
728
59.4k
        *eos = local_state._child_eos;
729
59.4k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
730
13.3k
            return Status::OK();
731
13.3k
        }
732
46.0k
        {
733
46.0k
            SCOPED_TIMER(local_state.exec_time_counter());
734
46.0k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
735
46.0k
        }
736
46.0k
    }
737
738
58.2k
    if (!need_more_input_data(state)) {
739
57.6k
        SCOPED_TIMER(local_state.exec_time_counter());
740
57.6k
        bool new_eos = false;
741
57.6k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
742
57.6k
        if (new_eos) {
743
30.7k
            *eos = true;
744
30.7k
        } else if (!need_more_input_data(state)) {
745
12.1k
            *eos = false;
746
12.1k
        }
747
57.6k
    }
748
58.2k
    return Status::OK();
749
58.2k
}
_ZN5doris17StatefulOperatorXINS_23TableFunctionLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
721
7.50k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
722
7.50k
    auto& local_state = get_local_state(state);
723
7.50k
    if (need_more_input_data(state)) {
724
7.13k
        local_state._child_block->clear_column_data(
725
7.13k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
726
7.13k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
727
7.13k
                state, local_state._child_block.get(), &local_state._child_eos));
728
7.13k
        *eos = local_state._child_eos;
729
7.13k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
730
651
            return Status::OK();
731
651
        }
732
6.48k
        {
733
6.48k
            SCOPED_TIMER(local_state.exec_time_counter());
734
6.48k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
735
6.48k
        }
736
6.48k
    }
737
738
6.84k
    if (!need_more_input_data(state)) {
739
6.84k
        SCOPED_TIMER(local_state.exec_time_counter());
740
6.84k
        bool new_eos = false;
741
6.84k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
742
6.84k
        if (new_eos) {
743
4.84k
            *eos = true;
744
4.84k
        } else if (!need_more_input_data(state)) {
745
366
            *eos = false;
746
366
        }
747
6.84k
    }
748
6.84k
    return Status::OK();
749
6.84k
}
750
751
template <typename Writer, typename Parent>
752
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
753
64.0k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
754
64.0k
    RETURN_IF_ERROR(Base::init(state, info));
755
64.0k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
756
64.0k
                                                         "AsyncWriterDependency", true);
757
64.0k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
758
64.0k
                             _finish_dependency));
759
760
64.0k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
761
64.0k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
762
64.0k
    return Status::OK();
763
64.0k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
753
520
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
754
520
    RETURN_IF_ERROR(Base::init(state, info));
755
520
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
756
520
                                                         "AsyncWriterDependency", true);
757
520
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
758
520
                             _finish_dependency));
759
760
520
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
761
520
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
762
520
    return Status::OK();
763
520
}
_ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
753
88
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
754
88
    RETURN_IF_ERROR(Base::init(state, info));
755
88
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
756
88
                                                         "AsyncWriterDependency", true);
757
88
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
758
88
                             _finish_dependency));
759
760
88
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
761
88
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
762
88
    return Status::OK();
763
88
}
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
753
45.0k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
754
45.0k
    RETURN_IF_ERROR(Base::init(state, info));
755
45.0k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
756
45.0k
                                                         "AsyncWriterDependency", true);
757
45.0k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
758
45.0k
                             _finish_dependency));
759
760
45.0k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
761
45.0k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
762
45.0k
    return Status::OK();
763
45.0k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
753
8.92k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
754
8.92k
    RETURN_IF_ERROR(Base::init(state, info));
755
8.92k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
756
8.92k
                                                         "AsyncWriterDependency", true);
757
8.92k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
758
8.92k
                             _finish_dependency));
759
760
8.92k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
761
8.92k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
762
8.92k
    return Status::OK();
763
8.92k
}
_ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
753
5.15k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
754
5.15k
    RETURN_IF_ERROR(Base::init(state, info));
755
5.15k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
756
5.15k
                                                         "AsyncWriterDependency", true);
757
5.15k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
758
5.15k
                             _finish_dependency));
759
760
5.15k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
761
5.15k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
762
5.15k
    return Status::OK();
763
5.15k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
753
3.38k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
754
3.38k
    RETURN_IF_ERROR(Base::init(state, info));
755
3.38k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
756
3.38k
                                                         "AsyncWriterDependency", true);
757
3.38k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
758
3.38k
                             _finish_dependency));
759
760
3.38k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
761
3.38k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
762
3.38k
    return Status::OK();
763
3.38k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
753
160
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
754
160
    RETURN_IF_ERROR(Base::init(state, info));
755
160
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
756
160
                                                         "AsyncWriterDependency", true);
757
160
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
758
160
                             _finish_dependency));
759
760
160
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
761
160
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
762
160
    return Status::OK();
763
160
}
_ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
753
640
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
754
640
    RETURN_IF_ERROR(Base::init(state, info));
755
640
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
756
640
                                                         "AsyncWriterDependency", true);
757
640
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
758
640
                             _finish_dependency));
759
760
640
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
761
640
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
762
640
    return Status::OK();
763
640
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
753
156
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
754
156
    RETURN_IF_ERROR(Base::init(state, info));
755
156
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
756
156
                                                         "AsyncWriterDependency", true);
757
156
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
758
156
                             _finish_dependency));
759
760
156
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
761
156
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
762
156
    return Status::OK();
763
156
}
764
765
template <typename Writer, typename Parent>
766
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
767
64.1k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
768
64.1k
    RETURN_IF_ERROR(Base::open(state));
769
64.1k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
770
575k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
771
511k
        RETURN_IF_ERROR(
772
511k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
773
511k
    }
774
64.1k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
775
64.1k
    return Status::OK();
776
64.1k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
767
519
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
768
519
    RETURN_IF_ERROR(Base::open(state));
769
519
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
770
2.78k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
771
2.26k
        RETURN_IF_ERROR(
772
2.26k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
773
2.26k
    }
774
519
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
775
519
    return Status::OK();
776
519
}
_ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
767
88
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
768
88
    RETURN_IF_ERROR(Base::open(state));
769
88
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
770
412
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
771
324
        RETURN_IF_ERROR(
772
324
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
773
324
    }
774
88
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
775
88
    return Status::OK();
776
88
}
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
767
45.1k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
768
45.1k
    RETURN_IF_ERROR(Base::open(state));
769
45.1k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
770
333k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
771
288k
        RETURN_IF_ERROR(
772
288k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
773
288k
    }
774
45.1k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
775
45.1k
    return Status::OK();
776
45.1k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
767
8.85k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
768
8.85k
    RETURN_IF_ERROR(Base::open(state));
769
8.85k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
770
54.4k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
771
45.6k
        RETURN_IF_ERROR(
772
45.6k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
773
45.6k
    }
774
8.85k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
775
8.85k
    return Status::OK();
776
8.85k
}
_ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
767
5.14k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
768
5.14k
    RETURN_IF_ERROR(Base::open(state));
769
5.14k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
770
136k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
771
131k
        RETURN_IF_ERROR(
772
131k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
773
131k
    }
774
5.14k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
775
5.14k
    return Status::OK();
776
5.14k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
767
3.38k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
768
3.38k
    RETURN_IF_ERROR(Base::open(state));
769
3.38k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
770
42.6k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
771
39.2k
        RETURN_IF_ERROR(
772
39.2k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
773
39.2k
    }
774
3.38k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
775
3.38k
    return Status::OK();
776
3.38k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
767
160
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
768
160
    RETURN_IF_ERROR(Base::open(state));
769
160
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
770
480
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
771
320
        RETURN_IF_ERROR(
772
320
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
773
320
    }
774
160
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
775
160
    return Status::OK();
776
160
}
_ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
767
640
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
768
640
    RETURN_IF_ERROR(Base::open(state));
769
640
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
770
4.37k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
771
3.73k
        RETURN_IF_ERROR(
772
3.73k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
773
3.73k
    }
774
640
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
775
640
    return Status::OK();
776
640
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
767
156
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
768
156
    RETURN_IF_ERROR(Base::open(state));
769
156
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
770
786
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
771
630
        RETURN_IF_ERROR(
772
630
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
773
630
    }
774
156
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
775
156
    return Status::OK();
776
156
}
777
778
template <typename Writer, typename Parent>
779
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
780
87.2k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
781
87.2k
    return _writer->sink(block, eos);
782
87.2k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
780
2.48k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
781
2.48k
    return _writer->sink(block, eos);
782
2.48k
}
_ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
780
112
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
781
112
    return _writer->sink(block, eos);
782
112
}
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
780
60.2k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
781
60.2k
    return _writer->sink(block, eos);
782
60.2k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
780
10.2k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
781
10.2k
    return _writer->sink(block, eos);
782
10.2k
}
_ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
780
7.50k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
781
7.50k
    return _writer->sink(block, eos);
782
7.50k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
780
5.33k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
781
5.33k
    return _writer->sink(block, eos);
782
5.33k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
780
180
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
781
180
    return _writer->sink(block, eos);
782
180
}
_ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
780
796
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
781
796
    return _writer->sink(block, eos);
782
796
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
780
310
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
781
310
    return _writer->sink(block, eos);
782
310
}
783
784
template <typename Writer, typename Parent>
785
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
786
64.2k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
787
64.2k
    if (_closed) {
788
0
        return Status::OK();
789
0
    }
790
64.2k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
791
64.2k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
792
    // if the init failed, the _writer may be nullptr. so here need check
793
64.2k
    if (_writer) {
794
64.2k
        Status st = _writer->get_writer_status();
795
64.2k
        if (exec_status.ok()) {
796
64.1k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
797
64.1k
                                                       : Status::Cancelled("force close"));
798
64.1k
        } else {
799
164
            _writer->force_close(exec_status);
800
164
        }
801
        // If there is an error in process_block thread, then we should get the writer
802
        // status before call force_close. For example, the thread may failed in commit
803
        // transaction.
804
64.2k
        RETURN_IF_ERROR(st);
805
64.2k
    }
806
64.1k
    return Base::close(state, exec_status);
807
64.2k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
786
508
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
787
508
    if (_closed) {
788
0
        return Status::OK();
789
0
    }
790
508
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
791
508
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
792
    // if the init failed, the _writer may be nullptr. so here need check
793
508
    if (_writer) {
794
508
        Status st = _writer->get_writer_status();
795
508
        if (exec_status.ok()) {
796
508
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
797
508
                                                       : Status::Cancelled("force close"));
798
508
        } else {
799
0
            _writer->force_close(exec_status);
800
0
        }
801
        // If there is an error in process_block thread, then we should get the writer
802
        // status before call force_close. For example, the thread may failed in commit
803
        // transaction.
804
508
        RETURN_IF_ERROR(st);
805
508
    }
806
508
    return Base::close(state, exec_status);
807
508
}
_ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
786
88
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
787
88
    if (_closed) {
788
0
        return Status::OK();
789
0
    }
790
88
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
791
88
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
792
    // if the init failed, the _writer may be nullptr. so here need check
793
88
    if (_writer) {
794
88
        Status st = _writer->get_writer_status();
795
88
        if (exec_status.ok()) {
796
88
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
797
88
                                                       : Status::Cancelled("force close"));
798
88
        } else {
799
0
            _writer->force_close(exec_status);
800
0
        }
801
        // If there is an error in process_block thread, then we should get the writer
802
        // status before call force_close. For example, the thread may failed in commit
803
        // transaction.
804
88
        RETURN_IF_ERROR(st);
805
88
    }
806
80
    return Base::close(state, exec_status);
807
88
}
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
786
45.2k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
787
45.2k
    if (_closed) {
788
0
        return Status::OK();
789
0
    }
790
45.2k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
791
45.2k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
792
    // if the init failed, the _writer may be nullptr. so here need check
793
45.2k
    if (_writer) {
794
45.2k
        Status st = _writer->get_writer_status();
795
45.2k
        if (exec_status.ok()) {
796
45.1k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
797
45.1k
                                                       : Status::Cancelled("force close"));
798
45.1k
        } else {
799
64
            _writer->force_close(exec_status);
800
64
        }
801
        // If there is an error in process_block thread, then we should get the writer
802
        // status before call force_close. For example, the thread may failed in commit
803
        // transaction.
804
45.2k
        RETURN_IF_ERROR(st);
805
45.2k
    }
806
45.1k
    return Base::close(state, exec_status);
807
45.2k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
786
8.91k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
787
8.91k
    if (_closed) {
788
0
        return Status::OK();
789
0
    }
790
8.91k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
791
8.91k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
792
    // if the init failed, the _writer may be nullptr. so here need check
793
8.92k
    if (_writer) {
794
8.92k
        Status st = _writer->get_writer_status();
795
8.92k
        if (exec_status.ok()) {
796
8.82k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
797
8.82k
                                                       : Status::Cancelled("force close"));
798
8.82k
        } else {
799
102
            _writer->force_close(exec_status);
800
102
        }
801
        // If there is an error in process_block thread, then we should get the writer
802
        // status before call force_close. For example, the thread may failed in commit
803
        // transaction.
804
8.92k
        RETURN_IF_ERROR(st);
805
8.92k
    }
806
8.91k
    return Base::close(state, exec_status);
807
8.91k
}
_ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
786
5.15k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
787
5.15k
    if (_closed) {
788
0
        return Status::OK();
789
0
    }
790
5.15k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
791
5.15k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
792
    // if the init failed, the _writer may be nullptr. so here need check
793
5.15k
    if (_writer) {
794
5.15k
        Status st = _writer->get_writer_status();
795
5.15k
        if (exec_status.ok()) {
796
5.15k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
797
5.15k
                                                       : Status::Cancelled("force close"));
798
5.15k
        } else {
799
0
            _writer->force_close(exec_status);
800
0
        }
801
        // If there is an error in process_block thread, then we should get the writer
802
        // status before call force_close. For example, the thread may failed in commit
803
        // transaction.
804
5.15k
        RETURN_IF_ERROR(st);
805
5.15k
    }
806
5.15k
    return Base::close(state, exec_status);
807
5.15k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
786
3.38k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
787
3.38k
    if (_closed) {
788
0
        return Status::OK();
789
0
    }
790
3.38k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
791
3.38k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
792
    // if the init failed, the _writer may be nullptr. so here need check
793
3.38k
    if (_writer) {
794
3.38k
        Status st = _writer->get_writer_status();
795
3.38k
        if (exec_status.ok()) {
796
3.38k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
797
3.38k
                                                       : Status::Cancelled("force close"));
798
18.4E
        } else {
799
18.4E
            _writer->force_close(exec_status);
800
18.4E
        }
801
        // If there is an error in process_block thread, then we should get the writer
802
        // status before call force_close. For example, the thread may failed in commit
803
        // transaction.
804
3.38k
        RETURN_IF_ERROR(st);
805
3.38k
    }
806
3.38k
    return Base::close(state, exec_status);
807
3.38k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
786
160
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
787
160
    if (_closed) {
788
0
        return Status::OK();
789
0
    }
790
160
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
791
160
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
792
    // if the init failed, the _writer may be nullptr. so here need check
793
160
    if (_writer) {
794
160
        Status st = _writer->get_writer_status();
795
160
        if (exec_status.ok()) {
796
160
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
797
160
                                                       : Status::Cancelled("force close"));
798
160
        } else {
799
0
            _writer->force_close(exec_status);
800
0
        }
801
        // If there is an error in process_block thread, then we should get the writer
802
        // status before call force_close. For example, the thread may failed in commit
803
        // transaction.
804
160
        RETURN_IF_ERROR(st);
805
160
    }
806
160
    return Base::close(state, exec_status);
807
160
}
_ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
786
640
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
787
640
    if (_closed) {
788
0
        return Status::OK();
789
0
    }
790
640
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
791
640
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
792
    // if the init failed, the _writer may be nullptr. so here need check
793
640
    if (_writer) {
794
640
        Status st = _writer->get_writer_status();
795
640
        if (exec_status.ok()) {
796
640
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
797
640
                                                       : Status::Cancelled("force close"));
798
640
        } else {
799
0
            _writer->force_close(exec_status);
800
0
        }
801
        // If there is an error in process_block thread, then we should get the writer
802
        // status before call force_close. For example, the thread may failed in commit
803
        // transaction.
804
640
        RETURN_IF_ERROR(st);
805
640
    }
806
640
    return Base::close(state, exec_status);
807
640
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
786
156
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
787
156
    if (_closed) {
788
0
        return Status::OK();
789
0
    }
790
156
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
791
156
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
792
    // if the init failed, the _writer may be nullptr. so here need check
793
156
    if (_writer) {
794
156
        Status st = _writer->get_writer_status();
795
156
        if (exec_status.ok()) {
796
156
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
797
156
                                                       : Status::Cancelled("force close"));
798
156
        } else {
799
0
            _writer->force_close(exec_status);
800
0
        }
801
        // If there is an error in process_block thread, then we should get the writer
802
        // status before call force_close. For example, the thread may failed in commit
803
        // transaction.
804
156
        RETURN_IF_ERROR(st);
805
156
    }
806
156
    return Base::close(state, exec_status);
807
156
}
808
809
#define DECLARE_OPERATOR(LOCAL_STATE) template class DataSinkOperatorX<LOCAL_STATE>;
810
DECLARE_OPERATOR(HashJoinBuildSinkLocalState)
811
DECLARE_OPERATOR(ResultSinkLocalState)
812
DECLARE_OPERATOR(JdbcTableSinkLocalState)
813
DECLARE_OPERATOR(MemoryScratchSinkLocalState)
814
DECLARE_OPERATOR(ResultFileSinkLocalState)
815
DECLARE_OPERATOR(OlapTableSinkLocalState)
816
DECLARE_OPERATOR(OlapTableSinkV2LocalState)
817
DECLARE_OPERATOR(HiveTableSinkLocalState)
818
DECLARE_OPERATOR(TVFTableSinkLocalState)
819
DECLARE_OPERATOR(IcebergTableSinkLocalState)
820
DECLARE_OPERATOR(SpillIcebergTableSinkLocalState)
821
DECLARE_OPERATOR(IcebergDeleteSinkLocalState)
822
DECLARE_OPERATOR(IcebergMergeSinkLocalState)
823
DECLARE_OPERATOR(MCTableSinkLocalState)
824
DECLARE_OPERATOR(AnalyticSinkLocalState)
825
DECLARE_OPERATOR(BlackholeSinkLocalState)
826
DECLARE_OPERATOR(SortSinkLocalState)
827
DECLARE_OPERATOR(SpillSortSinkLocalState)
828
DECLARE_OPERATOR(LocalExchangeSinkLocalState)
829
DECLARE_OPERATOR(AggSinkLocalState)
830
DECLARE_OPERATOR(BucketedAggSinkLocalState)
831
DECLARE_OPERATOR(PartitionedAggSinkLocalState)
832
DECLARE_OPERATOR(ExchangeSinkLocalState)
833
DECLARE_OPERATOR(NestedLoopJoinBuildSinkLocalState)
834
DECLARE_OPERATOR(UnionSinkLocalState)
835
DECLARE_OPERATOR(MultiCastDataStreamSinkLocalState)
836
DECLARE_OPERATOR(PartitionSortSinkLocalState)
837
DECLARE_OPERATOR(SetProbeSinkLocalState<true>)
838
DECLARE_OPERATOR(SetProbeSinkLocalState<false>)
839
DECLARE_OPERATOR(SetSinkLocalState<true>)
840
DECLARE_OPERATOR(SetSinkLocalState<false>)
841
DECLARE_OPERATOR(PartitionedHashJoinSinkLocalState)
842
DECLARE_OPERATOR(GroupCommitBlockSinkLocalState)
843
DECLARE_OPERATOR(CacheSinkLocalState)
844
DECLARE_OPERATOR(DictSinkLocalState)
845
DECLARE_OPERATOR(RecCTESinkLocalState)
846
DECLARE_OPERATOR(RecCTEAnchorSinkLocalState)
847
848
#undef DECLARE_OPERATOR
849
850
#define DECLARE_OPERATOR(LOCAL_STATE) template class OperatorX<LOCAL_STATE>;
851
DECLARE_OPERATOR(HashJoinProbeLocalState)
852
DECLARE_OPERATOR(OlapScanLocalState)
853
DECLARE_OPERATOR(GroupCommitLocalState)
854
DECLARE_OPERATOR(JDBCScanLocalState)
855
DECLARE_OPERATOR(FileScanLocalState)
856
DECLARE_OPERATOR(AnalyticLocalState)
857
DECLARE_OPERATOR(SortLocalState)
858
DECLARE_OPERATOR(SpillSortLocalState)
859
DECLARE_OPERATOR(LocalMergeSortLocalState)
860
DECLARE_OPERATOR(AggLocalState)
861
DECLARE_OPERATOR(BucketedAggLocalState)
862
DECLARE_OPERATOR(PartitionedAggLocalState)
863
DECLARE_OPERATOR(TableFunctionLocalState)
864
DECLARE_OPERATOR(ExchangeLocalState)
865
DECLARE_OPERATOR(RepeatLocalState)
866
DECLARE_OPERATOR(NestedLoopJoinProbeLocalState)
867
DECLARE_OPERATOR(AssertNumRowsLocalState)
868
DECLARE_OPERATOR(EmptySetLocalState)
869
DECLARE_OPERATOR(UnionSourceLocalState)
870
DECLARE_OPERATOR(MultiCastDataStreamSourceLocalState)
871
DECLARE_OPERATOR(PartitionSortSourceLocalState)
872
DECLARE_OPERATOR(SetSourceLocalState<true>)
873
DECLARE_OPERATOR(SetSourceLocalState<false>)
874
DECLARE_OPERATOR(DataGenLocalState)
875
DECLARE_OPERATOR(SchemaScanLocalState)
876
DECLARE_OPERATOR(MetaScanLocalState)
877
DECLARE_OPERATOR(LocalExchangeSourceLocalState)
878
DECLARE_OPERATOR(PartitionedHashJoinProbeLocalState)
879
DECLARE_OPERATOR(CacheSourceLocalState)
880
DECLARE_OPERATOR(RecCTESourceLocalState)
881
DECLARE_OPERATOR(RecCTEScanLocalState)
882
883
#ifdef BE_TEST
884
DECLARE_OPERATOR(MockLocalState)
885
DECLARE_OPERATOR(MockScanLocalState)
886
#endif
887
#undef DECLARE_OPERATOR
888
889
template class StreamingOperatorX<AssertNumRowsLocalState>;
890
template class StreamingOperatorX<SelectLocalState>;
891
892
template class StatefulOperatorX<HashJoinProbeLocalState>;
893
template class StatefulOperatorX<PartitionedHashJoinProbeLocalState>;
894
template class StatefulOperatorX<RepeatLocalState>;
895
template class StatefulOperatorX<MaterializationLocalState>;
896
template class StatefulOperatorX<StreamingAggLocalState>;
897
template class StatefulOperatorX<DistinctStreamingAggLocalState>;
898
template class StatefulOperatorX<NestedLoopJoinProbeLocalState>;
899
template class StatefulOperatorX<TableFunctionLocalState>;
900
901
template class PipelineXSinkLocalState<HashJoinSharedState>;
902
template class PipelineXSinkLocalState<PartitionedHashJoinSharedState>;
903
template class PipelineXSinkLocalState<SortSharedState>;
904
template class PipelineXSinkLocalState<SpillSortSharedState>;
905
template class PipelineXSinkLocalState<NestedLoopJoinSharedState>;
906
template class PipelineXSinkLocalState<AnalyticSharedState>;
907
template class PipelineXSinkLocalState<AggSharedState>;
908
template class PipelineXSinkLocalState<BucketedAggSharedState>;
909
template class PipelineXSinkLocalState<PartitionedAggSharedState>;
910
template class PipelineXSinkLocalState<FakeSharedState>;
911
template class PipelineXSinkLocalState<UnionSharedState>;
912
template class PipelineXSinkLocalState<PartitionSortNodeSharedState>;
913
template class PipelineXSinkLocalState<MultiCastSharedState>;
914
template class PipelineXSinkLocalState<SetSharedState>;
915
template class PipelineXSinkLocalState<LocalExchangeSharedState>;
916
template class PipelineXSinkLocalState<BasicSharedState>;
917
template class PipelineXSinkLocalState<DataQueueSharedState>;
918
template class PipelineXSinkLocalState<RecCTESharedState>;
919
920
template class PipelineXLocalState<HashJoinSharedState>;
921
template class PipelineXLocalState<PartitionedHashJoinSharedState>;
922
template class PipelineXLocalState<SortSharedState>;
923
template class PipelineXLocalState<SpillSortSharedState>;
924
template class PipelineXLocalState<NestedLoopJoinSharedState>;
925
template class PipelineXLocalState<AnalyticSharedState>;
926
template class PipelineXLocalState<AggSharedState>;
927
template class PipelineXLocalState<BucketedAggSharedState>;
928
template class PipelineXLocalState<PartitionedAggSharedState>;
929
template class PipelineXLocalState<FakeSharedState>;
930
template class PipelineXLocalState<UnionSharedState>;
931
template class PipelineXLocalState<DataQueueSharedState>;
932
template class PipelineXLocalState<MultiCastSharedState>;
933
template class PipelineXLocalState<PartitionSortNodeSharedState>;
934
template class PipelineXLocalState<SetSharedState>;
935
template class PipelineXLocalState<LocalExchangeSharedState>;
936
template class PipelineXLocalState<BasicSharedState>;
937
template class PipelineXLocalState<RecCTESharedState>;
938
939
template class AsyncWriterSink<doris::VFileResultWriter, ResultFileSinkOperatorX>;
940
template class AsyncWriterSink<doris::VJdbcTableWriter, JdbcTableSinkOperatorX>;
941
template class AsyncWriterSink<doris::VTabletWriter, OlapTableSinkOperatorX>;
942
template class AsyncWriterSink<doris::VTabletWriterV2, OlapTableSinkV2OperatorX>;
943
template class AsyncWriterSink<doris::VHiveTableWriter, HiveTableSinkOperatorX>;
944
template class AsyncWriterSink<doris::VIcebergTableWriter, IcebergTableSinkOperatorX>;
945
template class AsyncWriterSink<doris::VIcebergTableWriter, SpillIcebergTableSinkOperatorX>;
946
template class AsyncWriterSink<doris::VIcebergDeleteSink, IcebergDeleteSinkOperatorX>;
947
template class AsyncWriterSink<doris::VIcebergMergeSink, IcebergMergeSinkOperatorX>;
948
template class AsyncWriterSink<doris::VMCTableWriter, MCTableSinkOperatorX>;
949
template class AsyncWriterSink<doris::VTVFTableWriter, TVFTableSinkOperatorX>;
950
951
#ifdef BE_TEST
952
template class OperatorX<DummyOperatorLocalState>;
953
template class DataSinkOperatorX<DummySinkLocalState>;
954
#endif
955
956
} // namespace doris