Coverage Report

Created: 2026-06-08 19:32

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