Coverage Report

Created: 2026-05-14 11:58

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