Coverage Report

Created: 2026-07-01 14:50

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