Coverage Report

Created: 2026-08-07 05:10

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.43M
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
2.43M
    if (_parent->nereids_id() == -1) {
122
1.28M
        return fmt::format("(id={})", _parent->node_id());
123
1.28M
    } else {
124
1.15M
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
1.15M
    }
126
2.43M
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
72.0k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
72.0k
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
72.0k
    } else {
124
72.0k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
72.0k
    }
126
72.0k
}
_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
280k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
280k
    if (_parent->nereids_id() == -1) {
122
12
        return fmt::format("(id={})", _parent->node_id());
123
280k
    } else {
124
280k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
280k
    }
126
280k
}
_ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
25
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
25
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
25
    } else {
124
25
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
25
    }
126
25
}
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
9.98k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
9.98k
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
9.98k
    } else {
124
9.98k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
9.98k
    }
126
9.98k
}
_ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
7.81k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
7.81k
    if (_parent->nereids_id() == -1) {
122
11
        return fmt::format("(id={})", _parent->node_id());
123
7.80k
    } else {
124
7.80k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
7.80k
    }
126
7.81k
}
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
166k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
166k
    if (_parent->nereids_id() == -1) {
122
29
        return fmt::format("(id={})", _parent->node_id());
123
166k
    } else {
124
166k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
166k
    }
126
166k
}
_ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
319
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
319
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
319
    } else {
124
319
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
319
    }
126
319
}
_ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
100
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
100
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
100
    } else {
124
100
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
100
    }
126
100
}
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
975k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
975k
    if (_parent->nereids_id() == -1) {
122
423k
        return fmt::format("(id={})", _parent->node_id());
123
551k
    } else {
124
551k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
551k
    }
126
975k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
56.0k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
56.0k
    if (_parent->nereids_id() == -1) {
122
2
        return fmt::format("(id={})", _parent->node_id());
123
56.0k
    } else {
124
56.0k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
56.0k
    }
126
56.0k
}
_ZNK5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
26
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
26
    if (_parent->nereids_id() == -1) {
122
26
        return fmt::format("(id={})", _parent->node_id());
123
26
    } else {
124
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
0
    }
126
26
}
_ZNK5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
11.2k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
11.2k
    if (_parent->nereids_id() == -1) {
122
11.2k
        return fmt::format("(id={})", _parent->node_id());
123
11.2k
    } else {
124
2
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
2
    }
126
11.2k
}
_ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
402
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
402
    if (_parent->nereids_id() == -1) {
122
102
        return fmt::format("(id={})", _parent->node_id());
123
300
    } else {
124
300
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
300
    }
126
402
}
_ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
4.86k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
4.86k
    if (_parent->nereids_id() == -1) {
122
13
        return fmt::format("(id={})", _parent->node_id());
123
4.85k
    } else {
124
4.85k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
4.85k
    }
126
4.86k
}
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
848k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
848k
    if (_parent->nereids_id() == -1) {
122
848k
        return fmt::format("(id={})", _parent->node_id());
123
848k
    } else {
124
160
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
160
    }
126
848k
}
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.47M
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
1.47M
    if (_parent->nereids_id() == -1) {
131
883k
        return fmt::format("(id={})", _parent->node_id());
132
883k
    } else {
133
594k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
594k
    }
135
1.47M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
120k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
120k
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
120k
    } else {
133
120k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
120k
    }
135
120k
}
_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
281k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
281k
    if (_parent->nereids_id() == -1) {
131
9
        return fmt::format("(id={})", _parent->node_id());
132
281k
    } else {
133
281k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
281k
    }
135
281k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
32
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
32
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
32
    } else {
133
32
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
32
    }
135
32
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
10.0k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
10.0k
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
10.0k
    } else {
133
10.0k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
10.0k
    }
135
10.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
7.80k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
7.80k
    if (_parent->nereids_id() == -1) {
131
11
        return fmt::format("(id={})", _parent->node_id());
132
7.79k
    } else {
133
7.79k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
7.79k
    }
135
7.80k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
167k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
167k
    if (_parent->nereids_id() == -1) {
131
29
        return fmt::format("(id={})", _parent->node_id());
132
167k
    } else {
133
167k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
167k
    }
135
167k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
322
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
322
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
322
    } else {
133
322
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
322
    }
135
322
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
110
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
110
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
110
    } else {
133
110
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
110
    }
135
110
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
101
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
101
    if (_parent->nereids_id() == -1) {
131
101
        return fmt::format("(id={})", _parent->node_id());
132
101
    } else {
133
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
0
    }
135
101
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
5.61k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
5.61k
    if (_parent->nereids_id() == -1) {
131
3
        return fmt::format("(id={})", _parent->node_id());
132
5.61k
    } else {
133
5.61k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
5.61k
    }
135
5.61k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
401
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
401
    if (_parent->nereids_id() == -1) {
131
102
        return fmt::format("(id={})", _parent->node_id());
132
299
    } else {
133
299
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
299
    }
135
401
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
12.2k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
12.2k
    if (_parent->nereids_id() == -1) {
131
12.2k
        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
310k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
310k
    if (_parent->nereids_id() == -1) {
131
310k
        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
310k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
560k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
560k
    if (_parent->nereids_id() == -1) {
131
560k
        return fmt::format("(id={})", _parent->node_id());
132
560k
    } else {
133
255
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
255
    }
135
560k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
25
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
25
    if (_parent->nereids_id() == -1) {
131
25
        return fmt::format("(id={})", _parent->node_id());
132
25
    } else {
133
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
0
    }
135
25
}
_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
31.1k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
31.1k
    if (_terminated) {
140
1
        return Status::OK();
141
1
    }
142
31.1k
    _terminated = true;
143
31.1k
    return Status::OK();
144
31.1k
}
_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
1.38k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
1.38k
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
1.38k
    _terminated = true;
143
1.38k
    return Status::OK();
144
1.38k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_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
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_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
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
3.43k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
3.43k
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
3.43k
    _terminated = true;
143
3.43k
    return Status::OK();
144
3.43k
}
_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.13k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
1.13k
    if (_terminated) {
140
1
        return Status::OK();
141
1
    }
142
1.13k
    _terminated = true;
143
1.13k
    return Status::OK();
144
1.13k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
10
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
10
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
10
    _terminated = true;
143
10
    return Status::OK();
144
10
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_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
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
873
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
873
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
873
    _terminated = true;
143
873
    return Status::OK();
144
873
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE9terminateEPNS_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_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
135
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
135
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
135
    _terminated = true;
143
135
    return Status::OK();
144
135
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
129
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
129
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
129
    _terminated = true;
143
129
    return Status::OK();
144
129
}
145
146
439k
DataDistribution OperatorBase::required_data_distribution(RuntimeState* /*state*/) const {
147
439k
    return _child && _child->is_serial_operator() && !is_source()
148
439k
                   ? DataDistribution(TLocalPartitionType::PASSTHROUGH)
149
439k
                   : DataDistribution(TLocalPartitionType::NOOP);
150
439k
}
151
152
37.1k
bool OperatorBase::child_breaks_local_key_distribution(RuntimeState* state) const {
153
37.1k
    if (!_child) {
154
32.1k
        return false;
155
32.1k
    }
156
5.07k
    if (_child->is_serial_operator()) {
157
167
        return true;
158
167
    }
159
4.91k
    const auto child_distribution = _child->required_data_distribution(state);
160
4.91k
    return child_distribution.need_local_exchange() &&
161
4.91k
           !is_shuffled_exchange(child_distribution.distribution_type);
162
5.07k
}
163
164
82.7k
const RowDescriptor& OperatorBase::row_desc() const {
165
82.7k
    return _child->row_desc();
166
82.7k
}
167
168
template <typename SharedStateArg>
169
20.0k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
170
20.0k
    fmt::memory_buffer debug_string_buffer;
171
20.0k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
172
20.0k
    return fmt::to_string(debug_string_buffer);
173
20.0k
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
169
8
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
170
8
    fmt::memory_buffer debug_string_buffer;
171
8
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
172
8
    return fmt::to_string(debug_string_buffer);
173
8
}
_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
4
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
170
4
    fmt::memory_buffer debug_string_buffer;
171
4
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
172
4
    return fmt::to_string(debug_string_buffer);
173
4
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
169
4
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
170
4
    fmt::memory_buffer debug_string_buffer;
171
4
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
172
4
    return fmt::to_string(debug_string_buffer);
173
4
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
169
4
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
170
4
    fmt::memory_buffer debug_string_buffer;
171
4
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
172
4
    return fmt::to_string(debug_string_buffer);
173
4
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
169
19.9k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
170
19.9k
    fmt::memory_buffer debug_string_buffer;
171
19.9k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
172
19.9k
    return fmt::to_string(debug_string_buffer);
173
19.9k
}
_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
8
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
170
8
    fmt::memory_buffer debug_string_buffer;
171
8
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
172
8
    return fmt::to_string(debug_string_buffer);
173
8
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
174
175
template <typename SharedStateArg>
176
20.0k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
177
20.0k
    fmt::memory_buffer debug_string_buffer;
178
20.0k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
179
20.0k
    return fmt::to_string(debug_string_buffer);
180
20.0k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
176
4
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
177
4
    fmt::memory_buffer debug_string_buffer;
178
4
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
179
4
    return fmt::to_string(debug_string_buffer);
180
4
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
176
4
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
177
4
    fmt::memory_buffer debug_string_buffer;
178
4
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
179
4
    return fmt::to_string(debug_string_buffer);
180
4
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
176
8
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
177
8
    fmt::memory_buffer debug_string_buffer;
178
8
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
179
8
    return fmt::to_string(debug_string_buffer);
180
8
}
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
4
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
177
4
    fmt::memory_buffer debug_string_buffer;
178
4
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
179
4
    return fmt::to_string(debug_string_buffer);
180
4
}
_ZNK5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
176
19.9k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
177
19.9k
    fmt::memory_buffer debug_string_buffer;
178
19.9k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
179
19.9k
    return fmt::to_string(debug_string_buffer);
180
19.9k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
181
182
20.0k
std::string OperatorXBase::debug_string(int indentation_level) const {
183
20.0k
    fmt::memory_buffer debug_string_buffer;
184
20.0k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, parallel_tasks={}, _is_serial_operator={}",
185
20.0k
                   std::string(indentation_level * 2, ' '), _op_name, node_id(), _parallel_tasks,
186
20.0k
                   _is_serial_operator);
187
20.0k
    return fmt::to_string(debug_string_buffer);
188
20.0k
}
189
190
20.0k
std::string OperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
191
20.0k
    return state->get_local_state(operator_id())->debug_string(indentation_level);
192
20.0k
}
193
194
860k
Status OperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
195
860k
    std::string node_name = print_plan_node_type(tnode.node_type);
196
860k
    _nereids_id = tnode.nereids_id;
197
860k
    if (!tnode.intermediate_output_tuple_id_list.empty()) {
198
4.18k
        if (!tnode.__isset.output_tuple_id) {
199
0
            return Status::InternalError("no final output tuple id");
200
0
        }
201
4.18k
        if (tnode.intermediate_output_tuple_id_list.size() !=
202
4.18k
            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
4.18k
    }
210
860k
    auto substr = node_name.substr(0, node_name.find("_NODE"));
211
860k
    _op_name = substr + "_OPERATOR";
212
213
860k
    if (tnode.__isset.vconjunct) {
214
0
        return Status::InternalError("vconjunct is not supported yet");
215
860k
    } else if (tnode.__isset.conjuncts) {
216
490k
        for (const auto& conjunct : tnode.conjuncts) {
217
490k
            VExprContextSPtr context;
218
490k
            RETURN_IF_ERROR(VExpr::create_expr_tree(conjunct, context));
219
490k
            _conjuncts.emplace_back(context);
220
490k
        }
221
157k
    }
222
223
    // create the projections expr
224
860k
    if (tnode.__isset.projections) {
225
333k
        DCHECK(tnode.__isset.output_tuple_id);
226
333k
        RETURN_IF_ERROR(VExpr::create_expr_trees(tnode.projections, _projections));
227
333k
    }
228
860k
    if (!tnode.intermediate_projections_list.empty()) {
229
4.18k
        DCHECK(tnode.__isset.projections) << "no final projections";
230
4.18k
        _intermediate_projections.reserve(tnode.intermediate_projections_list.size());
231
8.59k
        for (const auto& tnode_projections : tnode.intermediate_projections_list) {
232
8.59k
            VExprContextSPtrs projections;
233
8.59k
            RETURN_IF_ERROR(VExpr::create_expr_trees(tnode_projections, projections));
234
8.59k
            _intermediate_projections.push_back(projections);
235
8.59k
        }
236
4.18k
    }
237
860k
    return Status::OK();
238
860k
}
239
240
893k
Status OperatorXBase::prepare(RuntimeState* state) {
241
893k
    for (auto& conjunct : _conjuncts) {
242
489k
        RETURN_IF_ERROR(conjunct->prepare(state, intermediate_row_desc()));
243
489k
    }
244
893k
    if (state->enable_adjust_conjunct_order_by_cost()) {
245
840k
        std::ranges::stable_sort(_conjuncts, [](const auto& a, const auto& b) {
246
650k
            return a->execute_cost() < b->execute_cost();
247
650k
        });
248
840k
    };
249
250
901k
    for (int i = 0; i < _intermediate_projections.size(); i++) {
251
8.60k
        RETURN_IF_ERROR(
252
8.60k
                VExpr::prepare(_intermediate_projections[i], state, intermediate_row_desc(i)));
253
8.60k
    }
254
893k
    RETURN_IF_ERROR(VExpr::prepare(_projections, state, projections_row_desc()));
255
256
893k
    if (has_output_row_desc()) {
257
333k
        RETURN_IF_ERROR(VExpr::check_expr_output_type(_projections, *_output_row_descriptor));
258
333k
    }
259
260
893k
    for (auto& conjunct : _conjuncts) {
261
490k
        RETURN_IF_ERROR(conjunct->open(state));
262
490k
    }
263
893k
    RETURN_IF_ERROR(VExpr::open(_projections, state));
264
893k
    for (auto& projections : _intermediate_projections) {
265
8.60k
        RETURN_IF_ERROR(VExpr::open(projections, state));
266
8.60k
    }
267
893k
    if (_child && !is_source()) {
268
137k
        RETURN_IF_ERROR(_child->prepare(state));
269
137k
    }
270
271
893k
    if (VExpr::contains_blockable_function(_conjuncts) ||
272
893k
        VExpr::contains_blockable_function(_projections)) {
273
0
        _blockable = true;
274
0
    }
275
276
893k
    return Status::OK();
277
893k
}
278
279
8.62k
Status OperatorXBase::terminate(RuntimeState* state) {
280
8.62k
    if (_child && !is_source()) {
281
1.47k
        RETURN_IF_ERROR(_child->terminate(state));
282
1.47k
    }
283
8.62k
    auto result = state->get_local_state_result(operator_id());
284
8.62k
    if (!result) {
285
0
        return result.error();
286
0
    }
287
8.62k
    return result.value()->terminate(state);
288
8.62k
}
289
290
6.84M
Status OperatorXBase::close(RuntimeState* state) {
291
6.84M
    if (_child && !is_source()) {
292
1.26M
        RETURN_IF_ERROR(_child->close(state));
293
1.26M
    }
294
6.84M
    auto result = state->get_local_state_result(operator_id());
295
6.84M
    if (!result) {
296
0
        return result.error();
297
0
    }
298
6.84M
    return result.value()->close(state);
299
6.84M
}
300
301
293k
void PipelineXLocalStateBase::clear_origin_block() {
302
293k
    _origin_block.clear_column_data(_parent->intermediate_row_desc().num_materialized_slots());
303
293k
}
304
305
661k
Status PipelineXLocalStateBase::filter_block(const VExprContextSPtrs& expr_contexts, Block* block) {
306
661k
    RETURN_IF_ERROR(VExprContext::filter_block(expr_contexts, block, block->columns()));
307
308
661k
    _estimate_memory_usage += VExprContext::get_memory_usage(expr_contexts);
309
661k
    return Status::OK();
310
661k
}
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
293k
                                     Block* output_block) const {
319
293k
    auto* local_state = state->get_local_state(operator_id());
320
293k
    SCOPED_TIMER(local_state->exec_time_counter());
321
293k
    SCOPED_TIMER(local_state->_projection_timer);
322
293k
    const size_t rows = origin_block->rows();
323
293k
    if (rows == 0) {
324
155k
        return Status::OK();
325
155k
    }
326
138k
    SCOPED_PEAK_MEM(&local_state->_estimate_memory_usage);
327
328
138k
    {
329
138k
        Block input_block = *origin_block;
330
331
138k
        ColumnsWithTypeAndName new_columns;
332
138k
        for (const auto& projections : local_state->_intermediate_projections) {
333
1.72k
            if (projections.empty()) {
334
0
                return Status::InternalError("meet empty intermediate projection, node id: {}",
335
0
                                             node_id());
336
0
            }
337
1.72k
            new_columns.resize(projections.size());
338
13.9k
            for (int i = 0; i < projections.size(); i++) {
339
12.2k
                RETURN_IF_ERROR(projections[i]->execute(&input_block, new_columns[i]));
340
12.2k
                if (new_columns[i].column->size() != rows) {
341
0
                    return Status::InternalError(
342
0
                            "intermediate projection result column size {} not equal input rows "
343
0
                            "{}, expr: {}",
344
0
                            new_columns[i].column->size(), rows,
345
0
                            projections[i]->root()->debug_string());
346
0
                }
347
12.2k
            }
348
1.72k
            Block tmp_block {new_columns};
349
1.72k
            input_block.swap(tmp_block);
350
1.72k
        }
351
352
138k
        if (input_block.rows() != rows) {
353
0
            return Status::InternalError(
354
0
                    "after intermediate projections input block rows {} not equal origin rows {}, "
355
0
                    "input_block: {}",
356
0
                    input_block.rows(), rows, input_block.dump_structure());
357
0
        }
358
359
138k
        auto scoped_mutable_block = VectorizedUtils::build_scoped_mutable_mem_reuse_block(
360
138k
                output_block, *_output_row_descriptor);
361
138k
        auto& mutable_columns = scoped_mutable_block.mutable_columns();
362
138k
        DCHECK_EQ(mutable_columns.size(), local_state->_projections.size()) << debug_string();
363
138k
        Columns shared_columns(mutable_columns.size());
364
365
797k
        for (int i = 0; i < mutable_columns.size(); ++i) {
366
659k
            ColumnPtr column_ptr;
367
659k
            RETURN_IF_ERROR(local_state->_projections[i]->execute(&input_block, column_ptr));
368
659k
            if (column_ptr->size() != rows) {
369
0
                return Status::InternalError(
370
0
                        "projection result column size {} not equal input rows {}, expr: {}",
371
0
                        column_ptr->size(), rows,
372
0
                        local_state->_projections[i]->root()->debug_string());
373
0
            }
374
659k
            column_ptr = column_ptr->convert_to_full_column_if_const();
375
659k
            if (is_column_nullable(*mutable_columns[i]) && !is_column_nullable(*column_ptr)) {
376
0
                column_ptr = make_nullable(column_ptr, false);
377
0
            }
378
659k
            if (column_ptr->is_exclusive()) {
379
249k
                mutable_columns[i] = IColumn::mutate(std::move(column_ptr));
380
409k
            } else {
381
409k
                shared_columns[i] = std::move(column_ptr);
382
409k
            }
383
659k
        }
384
385
138k
        scoped_mutable_block.restore();
386
797k
        for (int i = 0; i < shared_columns.size(); ++i) {
387
659k
            if (shared_columns[i]) {
388
409k
                output_block->replace_by_position(i, std::move(shared_columns[i]));
389
409k
            }
390
659k
        }
391
138k
    }
392
393
0
    origin_block->clear_column_data(
394
138k
            local_state->_parent->intermediate_row_desc().num_materialized_slots());
395
138k
    DCHECK_EQ(output_block->rows(), rows);
396
397
138k
    return Status::OK();
398
138k
}
399
400
5.02M
Status OperatorXBase::get_block_after_projects(RuntimeState* state, Block* block, bool* eos) {
401
5.02M
    DBUG_EXECUTE_IF("Pipeline::return_empty_block", {
402
5.02M
        if (this->_op_name == "AGGREGATION_OPERATOR" || this->_op_name == "HASH_JOIN_OPERATOR" ||
403
5.02M
            this->_op_name == "PARTITIONED_AGGREGATION_OPERATOR" ||
404
5.02M
            this->_op_name == "PARTITIONED_HASH_JOIN_OPERATOR" ||
405
5.02M
            this->_op_name == "CROSS_JOIN_OPERATOR" || this->_op_name == "SORT_OPERATOR") {
406
5.02M
            if (_debug_point_count++ % 2 == 0) {
407
5.02M
                return Status::OK();
408
5.02M
            }
409
5.02M
        }
410
5.02M
    });
411
412
5.02M
    Status status;
413
5.02M
    auto* local_state = state->get_local_state(operator_id());
414
5.02M
    Defer defer([&]() {
415
5.02M
        if (status.ok()) {
416
5.02M
            local_state->update_output_block_counters(*block);
417
5.02M
        }
418
5.02M
    });
419
5.02M
    if (_output_row_descriptor) {
420
293k
        local_state->clear_origin_block();
421
293k
        status = get_block(state, &local_state->_origin_block, eos);
422
293k
        if (UNLIKELY(!status.ok())) {
423
20
            return status;
424
20
        }
425
293k
        status = do_projections(state, &local_state->_origin_block, block);
426
293k
        return status;
427
293k
    }
428
4.73M
    status = get_block(state, block, eos);
429
4.73M
    RETURN_IF_ERROR(block->check_type_and_column());
430
4.73M
    return status;
431
4.73M
}
432
433
3.41M
void PipelineXLocalStateBase::reached_limit(Block* block, bool* eos) {
434
3.41M
    if (_parent->_limit != -1 and _num_rows_returned + block->rows() >= _parent->_limit) {
435
6.55k
        block->set_num_rows(_parent->_limit - _num_rows_returned);
436
6.55k
        *eos = true;
437
6.55k
    }
438
439
3.41M
    DBUG_EXECUTE_IF("Pipeline::reached_limit_early", {
440
3.41M
        auto op_name = to_lower(_parent->_op_name);
441
3.41M
        auto arg_op_name = dp->param<std::string>("op_name");
442
3.41M
        arg_op_name = to_lower(arg_op_name);
443
444
3.41M
        if (op_name == arg_op_name) {
445
3.41M
            *eos = true;
446
3.41M
        }
447
3.41M
    });
448
449
3.41M
    if (auto rows = block->rows()) {
450
936k
        _num_rows_returned += rows;
451
936k
        _state->get_query_ctx()->resource_ctx()->io_context()->update_process_rows(rows);
452
936k
    }
453
3.41M
}
454
455
31.1k
Status DataSinkOperatorXBase::terminate(RuntimeState* state) {
456
31.1k
    auto result = state->get_sink_local_state_result();
457
31.1k
    if (!result) {
458
0
        return result.error();
459
0
    }
460
31.1k
    return result.value()->terminate(state);
461
31.1k
}
462
463
20.0k
std::string DataSinkOperatorXBase::debug_string(int indentation_level) const {
464
20.0k
    fmt::memory_buffer debug_string_buffer;
465
466
20.0k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, _is_serial_operator={}",
467
20.0k
                   std::string(indentation_level * 2, ' '), _name, node_id(), _is_serial_operator);
468
20.0k
    return fmt::to_string(debug_string_buffer);
469
20.0k
}
470
471
20.0k
std::string DataSinkOperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
472
20.0k
    return state->get_sink_local_state()->debug_string(indentation_level);
473
20.0k
}
474
475
477k
Status DataSinkOperatorXBase::init(const TDataSink& tsink) {
476
477k
    std::string op_name = "UNKNOWN_SINK";
477
477k
    auto it = _TDataSinkType_VALUES_TO_NAMES.find(tsink.type);
478
479
479k
    if (it != _TDataSinkType_VALUES_TO_NAMES.end()) {
480
479k
        op_name = it->second;
481
479k
    }
482
477k
    _name = op_name + "_OPERATOR";
483
477k
    return Status::OK();
484
477k
}
485
486
324k
Status DataSinkOperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
487
324k
    std::string op_name = print_plan_node_type(tnode.node_type);
488
324k
    _nereids_id = tnode.nereids_id;
489
324k
    auto substr = op_name.substr(0, op_name.find("_NODE"));
490
324k
    _name = substr + "_SINK_OPERATOR";
491
324k
    return Status::OK();
492
324k
}
493
494
template <typename LocalStateType>
495
Status DataSinkOperatorX<LocalStateType>::setup_local_state(RuntimeState* state,
496
2.24M
                                                            LocalSinkStateInfo& info) {
497
2.24M
    auto local_state = LocalStateType::create_unique(this, state);
498
2.24M
    RETURN_IF_ERROR(local_state->init(state, info));
499
2.24M
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
500
2.24M
    return Status::OK();
501
2.24M
}
_ZN5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
496
120k
                                                            LocalSinkStateInfo& info) {
497
120k
    auto local_state = LocalStateType::create_unique(this, state);
498
120k
    RETURN_IF_ERROR(local_state->init(state, info));
499
120k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
500
120k
    return Status::OK();
501
120k
}
_ZN5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
496
490k
                                                            LocalSinkStateInfo& info) {
497
490k
    auto local_state = LocalStateType::create_unique(this, state);
498
490k
    RETURN_IF_ERROR(local_state->init(state, info));
499
490k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
500
490k
    return Status::OK();
501
490k
}
_ZN5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
496
86
                                                            LocalSinkStateInfo& info) {
497
86
    auto local_state = LocalStateType::create_unique(this, state);
498
86
    RETURN_IF_ERROR(local_state->init(state, info));
499
86
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
500
86
    return Status::OK();
501
86
}
_ZN5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
496
3
                                                            LocalSinkStateInfo& info) {
497
3
    auto local_state = LocalStateType::create_unique(this, state);
498
3
    RETURN_IF_ERROR(local_state->init(state, info));
499
3
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
500
3
    return Status::OK();
501
3
}
_ZN5doris17DataSinkOperatorXINS_24ResultFileSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
496
523
                                                            LocalSinkStateInfo& info) {
497
523
    auto local_state = LocalStateType::create_unique(this, state);
498
523
    RETURN_IF_ERROR(local_state->init(state, info));
499
523
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
500
523
    return Status::OK();
501
523
}
_ZN5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
496
49.1k
                                                            LocalSinkStateInfo& info) {
497
49.1k
    auto local_state = LocalStateType::create_unique(this, state);
498
49.1k
    RETURN_IF_ERROR(local_state->init(state, info));
499
49.1k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
500
49.1k
    return Status::OK();
501
49.1k
}
_ZN5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
496
9.66k
                                                            LocalSinkStateInfo& info) {
497
9.66k
    auto local_state = LocalStateType::create_unique(this, state);
498
9.66k
    RETURN_IF_ERROR(local_state->init(state, info));
499
9.66k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
500
9.66k
    return Status::OK();
501
9.66k
}
_ZN5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
496
5.23k
                                                            LocalSinkStateInfo& info) {
497
5.23k
    auto local_state = LocalStateType::create_unique(this, state);
498
5.23k
    RETURN_IF_ERROR(local_state->init(state, info));
499
5.23k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
500
5.23k
    return Status::OK();
501
5.23k
}
_ZN5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
496
156
                                                            LocalSinkStateInfo& info) {
497
156
    auto local_state = LocalStateType::create_unique(this, state);
498
156
    RETURN_IF_ERROR(local_state->init(state, info));
499
156
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
500
156
    return Status::OK();
501
156
}
_ZN5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
496
4.04k
                                                            LocalSinkStateInfo& info) {
497
4.04k
    auto local_state = LocalStateType::create_unique(this, state);
498
4.04k
    RETURN_IF_ERROR(local_state->init(state, info));
499
4.04k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
500
4.04k
    return Status::OK();
501
4.04k
}
_ZN5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
496
48
                                                            LocalSinkStateInfo& info) {
497
48
    auto local_state = LocalStateType::create_unique(this, state);
498
48
    RETURN_IF_ERROR(local_state->init(state, info));
499
48
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
500
48
    return Status::OK();
501
48
}
_ZN5doris17DataSinkOperatorXINS_27IcebergDeleteSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
496
704
                                                            LocalSinkStateInfo& info) {
497
704
    auto local_state = LocalStateType::create_unique(this, state);
498
704
    RETURN_IF_ERROR(local_state->init(state, info));
499
704
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
500
704
    return Status::OK();
501
704
}
_ZN5doris17DataSinkOperatorXINS_26IcebergMergeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
496
1.78k
                                                            LocalSinkStateInfo& info) {
497
1.78k
    auto local_state = LocalStateType::create_unique(this, state);
498
1.78k
    RETURN_IF_ERROR(local_state->init(state, info));
499
1.78k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
500
1.78k
    return Status::OK();
501
1.78k
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_21MCTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
496
7.80k
                                                            LocalSinkStateInfo& info) {
497
7.80k
    auto local_state = LocalStateType::create_unique(this, state);
498
7.80k
    RETURN_IF_ERROR(local_state->init(state, info));
499
7.80k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
500
7.80k
    return Status::OK();
501
7.80k
}
_ZN5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
496
98
                                                            LocalSinkStateInfo& info) {
497
98
    auto local_state = LocalStateType::create_unique(this, state);
498
98
    RETURN_IF_ERROR(local_state->init(state, info));
499
98
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
500
98
    return Status::OK();
501
98
}
_ZN5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
496
282k
                                                            LocalSinkStateInfo& info) {
497
282k
    auto local_state = LocalStateType::create_unique(this, state);
498
282k
    RETURN_IF_ERROR(local_state->init(state, info));
499
282k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
500
282k
    return Status::OK();
501
282k
}
_ZN5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
496
32
                                                            LocalSinkStateInfo& info) {
497
32
    auto local_state = LocalStateType::create_unique(this, state);
498
32
    RETURN_IF_ERROR(local_state->init(state, info));
499
32
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
500
32
    return Status::OK();
501
32
}
_ZN5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
496
310k
                                                            LocalSinkStateInfo& info) {
497
310k
    auto local_state = LocalStateType::create_unique(this, state);
498
310k
    RETURN_IF_ERROR(local_state->init(state, info));
499
310k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
500
310k
    return Status::OK();
501
310k
}
_ZN5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
496
167k
                                                            LocalSinkStateInfo& info) {
497
167k
    auto local_state = LocalStateType::create_unique(this, state);
498
167k
    RETURN_IF_ERROR(local_state->init(state, info));
499
167k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
500
167k
    return Status::OK();
501
167k
}
_ZN5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
496
323
                                                            LocalSinkStateInfo& info) {
497
323
    auto local_state = LocalStateType::create_unique(this, state);
498
323
    RETURN_IF_ERROR(local_state->init(state, info));
499
323
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
500
323
    return Status::OK();
501
323
}
_ZN5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
496
110
                                                            LocalSinkStateInfo& info) {
497
110
    auto local_state = LocalStateType::create_unique(this, state);
498
110
    RETURN_IF_ERROR(local_state->init(state, info));
499
110
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
500
110
    return Status::OK();
501
110
}
_ZN5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
496
765k
                                                            LocalSinkStateInfo& info) {
497
765k
    auto local_state = LocalStateType::create_unique(this, state);
498
765k
    RETURN_IF_ERROR(local_state->init(state, info));
499
765k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
500
765k
    return Status::OK();
501
765k
}
_ZN5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
496
10.0k
                                                            LocalSinkStateInfo& info) {
497
10.0k
    auto local_state = LocalStateType::create_unique(this, state);
498
10.0k
    RETURN_IF_ERROR(local_state->init(state, info));
499
10.0k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
500
10.0k
    return Status::OK();
501
10.0k
}
_ZN5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
496
5.61k
                                                            LocalSinkStateInfo& info) {
497
5.61k
    auto local_state = LocalStateType::create_unique(this, state);
498
5.61k
    RETURN_IF_ERROR(local_state->init(state, info));
499
5.61k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
500
5.61k
    return Status::OK();
501
5.61k
}
_ZN5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
496
4.15k
                                                            LocalSinkStateInfo& info) {
497
4.15k
    auto local_state = LocalStateType::create_unique(this, state);
498
4.15k
    RETURN_IF_ERROR(local_state->init(state, info));
499
4.15k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
500
4.15k
    return Status::OK();
501
4.15k
}
_ZN5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
496
300
                                                            LocalSinkStateInfo& info) {
497
300
    auto local_state = LocalStateType::create_unique(this, state);
498
300
    RETURN_IF_ERROR(local_state->init(state, info));
499
300
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
500
300
    return Status::OK();
501
300
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
496
4.69k
                                                            LocalSinkStateInfo& info) {
497
4.69k
    auto local_state = LocalStateType::create_unique(this, state);
498
4.69k
    RETURN_IF_ERROR(local_state->init(state, info));
499
4.69k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
500
4.69k
    return Status::OK();
501
4.69k
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
496
2.46k
                                                            LocalSinkStateInfo& info) {
497
2.46k
    auto local_state = LocalStateType::create_unique(this, state);
498
2.46k
    RETURN_IF_ERROR(local_state->init(state, info));
499
2.46k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
500
2.46k
    return Status::OK();
501
2.46k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
496
2.54k
                                                            LocalSinkStateInfo& info) {
497
2.54k
    auto local_state = LocalStateType::create_unique(this, state);
498
2.54k
    RETURN_IF_ERROR(local_state->init(state, info));
499
2.54k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
500
2.54k
    return Status::OK();
501
2.54k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
496
2.41k
                                                            LocalSinkStateInfo& info) {
497
2.41k
    auto local_state = LocalStateType::create_unique(this, state);
498
2.41k
    RETURN_IF_ERROR(local_state->init(state, info));
499
2.41k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
500
2.41k
    return Status::OK();
501
2.41k
}
_ZN5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
496
1
                                                            LocalSinkStateInfo& info) {
497
1
    auto local_state = LocalStateType::create_unique(this, state);
498
1
    RETURN_IF_ERROR(local_state->init(state, info));
499
1
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
500
1
    return Status::OK();
501
1
}
_ZN5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
496
566
                                                            LocalSinkStateInfo& info) {
497
566
    auto local_state = LocalStateType::create_unique(this, state);
498
566
    RETURN_IF_ERROR(local_state->init(state, info));
499
566
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
500
566
    return Status::OK();
501
566
}
_ZN5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
496
14
                                                            LocalSinkStateInfo& info) {
497
14
    auto local_state = LocalStateType::create_unique(this, state);
498
14
    RETURN_IF_ERROR(local_state->init(state, info));
499
14
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
500
14
    return Status::OK();
501
14
}
_ZN5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
496
101
                                                            LocalSinkStateInfo& info) {
497
101
    auto local_state = LocalStateType::create_unique(this, state);
498
101
    RETURN_IF_ERROR(local_state->init(state, info));
499
101
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
500
101
    return Status::OK();
501
101
}
_ZN5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
496
164
                                                            LocalSinkStateInfo& info) {
497
164
    auto local_state = LocalStateType::create_unique(this, state);
498
164
    RETURN_IF_ERROR(local_state->init(state, info));
499
164
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
500
164
    return Status::OK();
501
164
}
_ZN5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
496
164
                                                            LocalSinkStateInfo& info) {
497
164
    auto local_state = LocalStateType::create_unique(this, state);
498
164
    RETURN_IF_ERROR(local_state->init(state, info));
499
164
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
500
164
    return Status::OK();
501
164
}
502
503
template <typename LocalStateType>
504
1.90M
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
505
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
506
0
                                 LocalExchangeSharedState>) {
507
0
        return nullptr;
508
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
0
                                        MultiCastSharedState>) {
510
0
        throw Exception(Status::FatalError("should not reach here!"));
511
1.90M
    } else {
512
1.90M
        auto ss = LocalStateType::SharedStateType::create_shared();
513
1.90M
        ss->id = operator_id();
514
1.90M
        for (auto& dest : dests_id()) {
515
1.90M
            ss->related_op_ids.insert(dest);
516
1.90M
        }
517
1.90M
        return ss;
518
1.90M
    }
519
1.90M
}
_ZNK5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
504
100k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
505
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
506
                                 LocalExchangeSharedState>) {
507
        return nullptr;
508
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                        MultiCastSharedState>) {
510
        throw Exception(Status::FatalError("should not reach here!"));
511
100k
    } else {
512
100k
        auto ss = LocalStateType::SharedStateType::create_shared();
513
100k
        ss->id = operator_id();
514
100k
        for (auto& dest : dests_id()) {
515
100k
            ss->related_op_ids.insert(dest);
516
100k
        }
517
100k
        return ss;
518
100k
    }
519
100k
}
_ZNK5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
504
492k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
505
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
506
                                 LocalExchangeSharedState>) {
507
        return nullptr;
508
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                        MultiCastSharedState>) {
510
        throw Exception(Status::FatalError("should not reach here!"));
511
492k
    } else {
512
492k
        auto ss = LocalStateType::SharedStateType::create_shared();
513
492k
        ss->id = operator_id();
514
492k
        for (auto& dest : dests_id()) {
515
490k
            ss->related_op_ids.insert(dest);
516
490k
        }
517
492k
        return ss;
518
492k
    }
519
492k
}
_ZNK5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
504
86
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
505
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
506
                                 LocalExchangeSharedState>) {
507
        return nullptr;
508
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                        MultiCastSharedState>) {
510
        throw Exception(Status::FatalError("should not reach here!"));
511
86
    } else {
512
86
        auto ss = LocalStateType::SharedStateType::create_shared();
513
86
        ss->id = operator_id();
514
86
        for (auto& dest : dests_id()) {
515
86
            ss->related_op_ids.insert(dest);
516
86
        }
517
86
        return ss;
518
86
    }
519
86
}
_ZNK5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
504
3
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
505
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
506
                                 LocalExchangeSharedState>) {
507
        return nullptr;
508
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                        MultiCastSharedState>) {
510
        throw Exception(Status::FatalError("should not reach here!"));
511
3
    } else {
512
3
        auto ss = LocalStateType::SharedStateType::create_shared();
513
3
        ss->id = operator_id();
514
3
        for (auto& dest : dests_id()) {
515
3
            ss->related_op_ids.insert(dest);
516
3
        }
517
3
        return ss;
518
3
    }
519
3
}
_ZNK5doris17DataSinkOperatorXINS_24ResultFileSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
504
523
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
505
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
506
                                 LocalExchangeSharedState>) {
507
        return nullptr;
508
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                        MultiCastSharedState>) {
510
        throw Exception(Status::FatalError("should not reach here!"));
511
523
    } else {
512
523
        auto ss = LocalStateType::SharedStateType::create_shared();
513
523
        ss->id = operator_id();
514
523
        for (auto& dest : dests_id()) {
515
523
            ss->related_op_ids.insert(dest);
516
523
        }
517
523
        return ss;
518
523
    }
519
523
}
_ZNK5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
504
49.2k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
505
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
506
                                 LocalExchangeSharedState>) {
507
        return nullptr;
508
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                        MultiCastSharedState>) {
510
        throw Exception(Status::FatalError("should not reach here!"));
511
49.2k
    } else {
512
49.2k
        auto ss = LocalStateType::SharedStateType::create_shared();
513
49.2k
        ss->id = operator_id();
514
49.2k
        for (auto& dest : dests_id()) {
515
49.0k
            ss->related_op_ids.insert(dest);
516
49.0k
        }
517
49.2k
        return ss;
518
49.2k
    }
519
49.2k
}
_ZNK5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE19create_shared_stateEv
Line
Count
Source
504
9.66k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
505
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
506
                                 LocalExchangeSharedState>) {
507
        return nullptr;
508
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                        MultiCastSharedState>) {
510
        throw Exception(Status::FatalError("should not reach here!"));
511
9.66k
    } else {
512
9.66k
        auto ss = LocalStateType::SharedStateType::create_shared();
513
9.66k
        ss->id = operator_id();
514
9.66k
        for (auto& dest : dests_id()) {
515
9.66k
            ss->related_op_ids.insert(dest);
516
9.66k
        }
517
9.66k
        return ss;
518
9.66k
    }
519
9.66k
}
_ZNK5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
504
5.23k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
505
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
506
                                 LocalExchangeSharedState>) {
507
        return nullptr;
508
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                        MultiCastSharedState>) {
510
        throw Exception(Status::FatalError("should not reach here!"));
511
5.23k
    } else {
512
5.23k
        auto ss = LocalStateType::SharedStateType::create_shared();
513
5.23k
        ss->id = operator_id();
514
5.23k
        for (auto& dest : dests_id()) {
515
5.23k
            ss->related_op_ids.insert(dest);
516
5.23k
        }
517
5.23k
        return ss;
518
5.23k
    }
519
5.23k
}
_ZNK5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
504
156
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
505
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
506
                                 LocalExchangeSharedState>) {
507
        return nullptr;
508
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                        MultiCastSharedState>) {
510
        throw Exception(Status::FatalError("should not reach here!"));
511
156
    } else {
512
156
        auto ss = LocalStateType::SharedStateType::create_shared();
513
156
        ss->id = operator_id();
514
156
        for (auto& dest : dests_id()) {
515
156
            ss->related_op_ids.insert(dest);
516
156
        }
517
156
        return ss;
518
156
    }
519
156
}
_ZNK5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
504
4.04k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
505
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
506
                                 LocalExchangeSharedState>) {
507
        return nullptr;
508
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                        MultiCastSharedState>) {
510
        throw Exception(Status::FatalError("should not reach here!"));
511
4.04k
    } else {
512
4.04k
        auto ss = LocalStateType::SharedStateType::create_shared();
513
4.04k
        ss->id = operator_id();
514
4.04k
        for (auto& dest : dests_id()) {
515
4.04k
            ss->related_op_ids.insert(dest);
516
4.04k
        }
517
4.04k
        return ss;
518
4.04k
    }
519
4.04k
}
_ZNK5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
504
48
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
505
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
506
                                 LocalExchangeSharedState>) {
507
        return nullptr;
508
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                        MultiCastSharedState>) {
510
        throw Exception(Status::FatalError("should not reach here!"));
511
48
    } else {
512
48
        auto ss = LocalStateType::SharedStateType::create_shared();
513
48
        ss->id = operator_id();
514
48
        for (auto& dest : dests_id()) {
515
48
            ss->related_op_ids.insert(dest);
516
48
        }
517
48
        return ss;
518
48
    }
519
48
}
_ZNK5doris17DataSinkOperatorXINS_27IcebergDeleteSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
504
704
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
505
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
506
                                 LocalExchangeSharedState>) {
507
        return nullptr;
508
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                        MultiCastSharedState>) {
510
        throw Exception(Status::FatalError("should not reach here!"));
511
704
    } else {
512
704
        auto ss = LocalStateType::SharedStateType::create_shared();
513
704
        ss->id = operator_id();
514
704
        for (auto& dest : dests_id()) {
515
704
            ss->related_op_ids.insert(dest);
516
704
        }
517
704
        return ss;
518
704
    }
519
704
}
_ZNK5doris17DataSinkOperatorXINS_26IcebergMergeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
504
1.78k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
505
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
506
                                 LocalExchangeSharedState>) {
507
        return nullptr;
508
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                        MultiCastSharedState>) {
510
        throw Exception(Status::FatalError("should not reach here!"));
511
1.78k
    } else {
512
1.78k
        auto ss = LocalStateType::SharedStateType::create_shared();
513
1.78k
        ss->id = operator_id();
514
1.78k
        for (auto& dest : dests_id()) {
515
1.78k
            ss->related_op_ids.insert(dest);
516
1.78k
        }
517
1.78k
        return ss;
518
1.78k
    }
519
1.78k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_21MCTableSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
504
7.84k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
505
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
506
                                 LocalExchangeSharedState>) {
507
        return nullptr;
508
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                        MultiCastSharedState>) {
510
        throw Exception(Status::FatalError("should not reach here!"));
511
7.84k
    } else {
512
7.84k
        auto ss = LocalStateType::SharedStateType::create_shared();
513
7.84k
        ss->id = operator_id();
514
7.84k
        for (auto& dest : dests_id()) {
515
7.83k
            ss->related_op_ids.insert(dest);
516
7.83k
        }
517
7.84k
        return ss;
518
7.84k
    }
519
7.84k
}
_ZNK5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
504
98
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
505
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
506
                                 LocalExchangeSharedState>) {
507
        return nullptr;
508
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                        MultiCastSharedState>) {
510
        throw Exception(Status::FatalError("should not reach here!"));
511
98
    } else {
512
98
        auto ss = LocalStateType::SharedStateType::create_shared();
513
98
        ss->id = operator_id();
514
98
        for (auto& dest : dests_id()) {
515
98
            ss->related_op_ids.insert(dest);
516
98
        }
517
98
        return ss;
518
98
    }
519
98
}
_ZNK5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
504
283k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
505
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
506
                                 LocalExchangeSharedState>) {
507
        return nullptr;
508
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                        MultiCastSharedState>) {
510
        throw Exception(Status::FatalError("should not reach here!"));
511
283k
    } else {
512
283k
        auto ss = LocalStateType::SharedStateType::create_shared();
513
283k
        ss->id = operator_id();
514
283k
        for (auto& dest : dests_id()) {
515
282k
            ss->related_op_ids.insert(dest);
516
282k
        }
517
283k
        return ss;
518
283k
    }
519
283k
}
_ZNK5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
504
34
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
505
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
506
                                 LocalExchangeSharedState>) {
507
        return nullptr;
508
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                        MultiCastSharedState>) {
510
        throw Exception(Status::FatalError("should not reach here!"));
511
34
    } else {
512
34
        auto ss = LocalStateType::SharedStateType::create_shared();
513
34
        ss->id = operator_id();
514
34
        for (auto& dest : dests_id()) {
515
34
            ss->related_op_ids.insert(dest);
516
34
        }
517
34
        return ss;
518
34
    }
519
34
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
504
167k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
505
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
506
                                 LocalExchangeSharedState>) {
507
        return nullptr;
508
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                        MultiCastSharedState>) {
510
        throw Exception(Status::FatalError("should not reach here!"));
511
167k
    } else {
512
167k
        auto ss = LocalStateType::SharedStateType::create_shared();
513
167k
        ss->id = operator_id();
514
167k
        for (auto& dest : dests_id()) {
515
167k
            ss->related_op_ids.insert(dest);
516
167k
        }
517
167k
        return ss;
518
167k
    }
519
167k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
504
109
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
505
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
506
                                 LocalExchangeSharedState>) {
507
        return nullptr;
508
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                        MultiCastSharedState>) {
510
        throw Exception(Status::FatalError("should not reach here!"));
511
109
    } else {
512
109
        auto ss = LocalStateType::SharedStateType::create_shared();
513
109
        ss->id = operator_id();
514
109
        for (auto& dest : dests_id()) {
515
109
            ss->related_op_ids.insert(dest);
516
109
        }
517
109
        return ss;
518
109
    }
519
109
}
_ZNK5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
504
767k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
505
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
506
                                 LocalExchangeSharedState>) {
507
        return nullptr;
508
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                        MultiCastSharedState>) {
510
        throw Exception(Status::FatalError("should not reach here!"));
511
767k
    } else {
512
767k
        auto ss = LocalStateType::SharedStateType::create_shared();
513
767k
        ss->id = operator_id();
514
767k
        for (auto& dest : dests_id()) {
515
767k
            ss->related_op_ids.insert(dest);
516
767k
        }
517
767k
        return ss;
518
767k
    }
519
767k
}
_ZNK5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
504
10.0k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
505
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
506
                                 LocalExchangeSharedState>) {
507
        return nullptr;
508
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                        MultiCastSharedState>) {
510
        throw Exception(Status::FatalError("should not reach here!"));
511
10.0k
    } else {
512
10.0k
        auto ss = LocalStateType::SharedStateType::create_shared();
513
10.0k
        ss->id = operator_id();
514
10.0k
        for (auto& dest : dests_id()) {
515
10.0k
            ss->related_op_ids.insert(dest);
516
10.0k
        }
517
10.0k
        return ss;
518
10.0k
    }
519
10.0k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
504
402
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
505
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
506
                                 LocalExchangeSharedState>) {
507
        return nullptr;
508
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                        MultiCastSharedState>) {
510
        throw Exception(Status::FatalError("should not reach here!"));
511
402
    } else {
512
402
        auto ss = LocalStateType::SharedStateType::create_shared();
513
402
        ss->id = operator_id();
514
402
        for (auto& dest : dests_id()) {
515
402
            ss->related_op_ids.insert(dest);
516
402
        }
517
402
        return ss;
518
402
    }
519
402
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE19create_shared_stateEv
Line
Count
Source
504
2.56k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
505
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
506
                                 LocalExchangeSharedState>) {
507
        return nullptr;
508
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                        MultiCastSharedState>) {
510
        throw Exception(Status::FatalError("should not reach here!"));
511
2.56k
    } else {
512
2.56k
        auto ss = LocalStateType::SharedStateType::create_shared();
513
2.56k
        ss->id = operator_id();
514
2.56k
        for (auto& dest : dests_id()) {
515
2.56k
            ss->related_op_ids.insert(dest);
516
2.56k
        }
517
2.56k
        return ss;
518
2.56k
    }
519
2.56k
}
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE19create_shared_stateEv
Line
Count
Source
504
2.44k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
505
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
506
                                 LocalExchangeSharedState>) {
507
        return nullptr;
508
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                        MultiCastSharedState>) {
510
        throw Exception(Status::FatalError("should not reach here!"));
511
2.44k
    } else {
512
2.44k
        auto ss = LocalStateType::SharedStateType::create_shared();
513
2.44k
        ss->id = operator_id();
514
2.44k
        for (auto& dest : dests_id()) {
515
2.43k
            ss->related_op_ids.insert(dest);
516
2.43k
        }
517
2.44k
        return ss;
518
2.44k
    }
519
2.44k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
504
567
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
505
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
506
                                 LocalExchangeSharedState>) {
507
        return nullptr;
508
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                        MultiCastSharedState>) {
510
        throw Exception(Status::FatalError("should not reach here!"));
511
567
    } else {
512
567
        auto ss = LocalStateType::SharedStateType::create_shared();
513
567
        ss->id = operator_id();
514
567
        for (auto& dest : dests_id()) {
515
559
            ss->related_op_ids.insert(dest);
516
559
        }
517
567
        return ss;
518
567
    }
519
567
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
504
101
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
505
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
506
                                 LocalExchangeSharedState>) {
507
        return nullptr;
508
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                        MultiCastSharedState>) {
510
        throw Exception(Status::FatalError("should not reach here!"));
511
101
    } else {
512
101
        auto ss = LocalStateType::SharedStateType::create_shared();
513
101
        ss->id = operator_id();
514
101
        for (auto& dest : dests_id()) {
515
101
            ss->related_op_ids.insert(dest);
516
101
        }
517
101
        return ss;
518
101
    }
519
101
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE19create_shared_stateEv
520
521
template <typename LocalStateType>
522
2.80M
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
523
2.80M
    auto local_state = LocalStateType::create_unique(state, this);
524
2.80M
    RETURN_IF_ERROR(local_state->init(state, info));
525
2.80M
    state->emplace_local_state(operator_id(), std::move(local_state));
526
2.80M
    return Status::OK();
527
2.80M
}
_ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
522
72.2k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
523
72.2k
    auto local_state = LocalStateType::create_unique(state, this);
524
72.2k
    RETURN_IF_ERROR(local_state->init(state, info));
525
72.2k
    state->emplace_local_state(operator_id(), std::move(local_state));
526
72.2k
    return Status::OK();
527
72.2k
}
_ZN5doris9OperatorXINS_18OlapScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
522
318k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
523
318k
    auto local_state = LocalStateType::create_unique(state, this);
524
318k
    RETURN_IF_ERROR(local_state->init(state, info));
525
318k
    state->emplace_local_state(operator_id(), std::move(local_state));
526
318k
    return Status::OK();
527
318k
}
_ZN5doris9OperatorXINS_21GroupCommitLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
522
147
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
523
147
    auto local_state = LocalStateType::create_unique(state, this);
524
147
    RETURN_IF_ERROR(local_state->init(state, info));
525
147
    state->emplace_local_state(operator_id(), std::move(local_state));
526
147
    return Status::OK();
527
147
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_18JDBCScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_18FileScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
522
38.6k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
523
38.6k
    auto local_state = LocalStateType::create_unique(state, this);
524
38.6k
    RETURN_IF_ERROR(local_state->init(state, info));
525
38.6k
    state->emplace_local_state(operator_id(), std::move(local_state));
526
38.6k
    return Status::OK();
527
38.6k
}
_ZN5doris9OperatorXINS_18AnalyticLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
522
7.81k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
523
7.81k
    auto local_state = LocalStateType::create_unique(state, this);
524
7.81k
    RETURN_IF_ERROR(local_state->init(state, info));
525
7.81k
    state->emplace_local_state(operator_id(), std::move(local_state));
526
7.81k
    return Status::OK();
527
7.81k
}
_ZN5doris9OperatorXINS_14SortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
522
8.08k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
523
8.08k
    auto local_state = LocalStateType::create_unique(state, this);
524
8.08k
    RETURN_IF_ERROR(local_state->init(state, info));
525
8.08k
    state->emplace_local_state(operator_id(), std::move(local_state));
526
8.08k
    return Status::OK();
527
8.08k
}
_ZN5doris9OperatorXINS_19SpillSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
522
25
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
523
25
    auto local_state = LocalStateType::create_unique(state, this);
524
25
    RETURN_IF_ERROR(local_state->init(state, info));
525
25
    state->emplace_local_state(operator_id(), std::move(local_state));
526
25
    return Status::OK();
527
25
}
_ZN5doris9OperatorXINS_24LocalMergeSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
522
273k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
523
273k
    auto local_state = LocalStateType::create_unique(state, this);
524
273k
    RETURN_IF_ERROR(local_state->init(state, info));
525
273k
    state->emplace_local_state(operator_id(), std::move(local_state));
526
273k
    return Status::OK();
527
273k
}
_ZN5doris9OperatorXINS_13AggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
522
167k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
523
167k
    auto local_state = LocalStateType::create_unique(state, this);
524
167k
    RETURN_IF_ERROR(local_state->init(state, info));
525
167k
    state->emplace_local_state(operator_id(), std::move(local_state));
526
167k
    return Status::OK();
527
167k
}
_ZN5doris9OperatorXINS_21BucketedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
522
320
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
523
320
    auto local_state = LocalStateType::create_unique(state, this);
524
320
    RETURN_IF_ERROR(local_state->init(state, info));
525
320
    state->emplace_local_state(operator_id(), std::move(local_state));
526
320
    return Status::OK();
527
320
}
_ZN5doris9OperatorXINS_24PartitionedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
522
100
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
523
100
    auto local_state = LocalStateType::create_unique(state, this);
524
100
    RETURN_IF_ERROR(local_state->init(state, info));
525
100
    state->emplace_local_state(operator_id(), std::move(local_state));
526
100
    return Status::OK();
527
100
}
_ZN5doris9OperatorXINS_23TableFunctionLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
522
4.40k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
523
4.40k
    auto local_state = LocalStateType::create_unique(state, this);
524
4.40k
    RETURN_IF_ERROR(local_state->init(state, info));
525
4.40k
    state->emplace_local_state(operator_id(), std::move(local_state));
526
4.40k
    return Status::OK();
527
4.40k
}
_ZN5doris9OperatorXINS_18ExchangeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
522
426k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
523
426k
    auto local_state = LocalStateType::create_unique(state, this);
524
426k
    RETURN_IF_ERROR(local_state->init(state, info));
525
426k
    state->emplace_local_state(operator_id(), std::move(local_state));
526
426k
    return Status::OK();
527
426k
}
_ZN5doris9OperatorXINS_16RepeatLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
522
956
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
523
956
    auto local_state = LocalStateType::create_unique(state, this);
524
956
    RETURN_IF_ERROR(local_state->init(state, info));
525
956
    state->emplace_local_state(operator_id(), std::move(local_state));
526
956
    return Status::OK();
527
956
}
_ZN5doris9OperatorXINS_29NestedLoopJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
522
9.97k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
523
9.97k
    auto local_state = LocalStateType::create_unique(state, this);
524
9.97k
    RETURN_IF_ERROR(local_state->init(state, info));
525
9.97k
    state->emplace_local_state(operator_id(), std::move(local_state));
526
9.97k
    return Status::OK();
527
9.97k
}
_ZN5doris9OperatorXINS_23AssertNumRowsLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
522
221
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
523
221
    auto local_state = LocalStateType::create_unique(state, this);
524
221
    RETURN_IF_ERROR(local_state->init(state, info));
525
221
    state->emplace_local_state(operator_id(), std::move(local_state));
526
221
    return Status::OK();
527
221
}
_ZN5doris9OperatorXINS_18EmptySetLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
522
1.99k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
523
1.99k
    auto local_state = LocalStateType::create_unique(state, this);
524
1.99k
    RETURN_IF_ERROR(local_state->init(state, info));
525
1.99k
    state->emplace_local_state(operator_id(), std::move(local_state));
526
1.99k
    return Status::OK();
527
1.99k
}
_ZN5doris9OperatorXINS_21UnionSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
522
56.1k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
523
56.1k
    auto local_state = LocalStateType::create_unique(state, this);
524
56.1k
    RETURN_IF_ERROR(local_state->init(state, info));
525
56.1k
    state->emplace_local_state(operator_id(), std::move(local_state));
526
56.1k
    return Status::OK();
527
56.1k
}
_ZN5doris9OperatorXINS_35MultiCastDataStreamSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
522
11.2k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
523
11.2k
    auto local_state = LocalStateType::create_unique(state, this);
524
11.2k
    RETURN_IF_ERROR(local_state->init(state, info));
525
11.2k
    state->emplace_local_state(operator_id(), std::move(local_state));
526
11.2k
    return Status::OK();
527
11.2k
}
_ZN5doris9OperatorXINS_29PartitionSortSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
522
300
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
523
300
    auto local_state = LocalStateType::create_unique(state, this);
524
300
    RETURN_IF_ERROR(local_state->init(state, info));
525
300
    state->emplace_local_state(operator_id(), std::move(local_state));
526
300
    return Status::OK();
527
300
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
522
2.50k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
523
2.50k
    auto local_state = LocalStateType::create_unique(state, this);
524
2.50k
    RETURN_IF_ERROR(local_state->init(state, info));
525
2.50k
    state->emplace_local_state(operator_id(), std::move(local_state));
526
2.50k
    return Status::OK();
527
2.50k
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
522
2.36k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
523
2.36k
    auto local_state = LocalStateType::create_unique(state, this);
524
2.36k
    RETURN_IF_ERROR(local_state->init(state, info));
525
2.36k
    state->emplace_local_state(operator_id(), std::move(local_state));
526
2.36k
    return Status::OK();
527
2.36k
}
_ZN5doris9OperatorXINS_17DataGenLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
522
521
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
523
521
    auto local_state = LocalStateType::create_unique(state, this);
524
521
    RETURN_IF_ERROR(local_state->init(state, info));
525
521
    state->emplace_local_state(operator_id(), std::move(local_state));
526
521
    return Status::OK();
527
521
}
_ZN5doris9OperatorXINS_20SchemaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
522
2.24k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
523
2.24k
    auto local_state = LocalStateType::create_unique(state, this);
524
2.24k
    RETURN_IF_ERROR(local_state->init(state, info));
525
2.24k
    state->emplace_local_state(operator_id(), std::move(local_state));
526
2.24k
    return Status::OK();
527
2.24k
}
_ZN5doris9OperatorXINS_18MetaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
522
6.50k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
523
6.50k
    auto local_state = LocalStateType::create_unique(state, this);
524
6.50k
    RETURN_IF_ERROR(local_state->init(state, info));
525
6.50k
    state->emplace_local_state(operator_id(), std::move(local_state));
526
6.50k
    return Status::OK();
527
6.50k
}
_ZN5doris9OperatorXINS_29LocalExchangeSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
522
852k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
523
852k
    auto local_state = LocalStateType::create_unique(state, this);
524
852k
    RETURN_IF_ERROR(local_state->init(state, info));
525
852k
    state->emplace_local_state(operator_id(), std::move(local_state));
526
852k
    return Status::OK();
527
852k
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_34PartitionedHashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_21CacheSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
522
14
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
523
14
    auto local_state = LocalStateType::create_unique(state, this);
524
14
    RETURN_IF_ERROR(local_state->init(state, info));
525
14
    state->emplace_local_state(operator_id(), std::move(local_state));
526
14
    return Status::OK();
527
14
}
_ZN5doris9OperatorXINS_22RecCTESourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
522
164
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
523
164
    auto local_state = LocalStateType::create_unique(state, this);
524
164
    RETURN_IF_ERROR(local_state->init(state, info));
525
164
    state->emplace_local_state(operator_id(), std::move(local_state));
526
164
    return Status::OK();
527
164
}
_ZN5doris9OperatorXINS_20RecCTEScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
522
2.18k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
523
2.18k
    auto local_state = LocalStateType::create_unique(state, this);
524
2.18k
    RETURN_IF_ERROR(local_state->init(state, info));
525
2.18k
    state->emplace_local_state(operator_id(), std::move(local_state));
526
2.18k
    return Status::OK();
527
2.18k
}
_ZN5doris9OperatorXINS_25MaterializationLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
522
1.73k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
523
1.73k
    auto local_state = LocalStateType::create_unique(state, this);
524
1.73k
    RETURN_IF_ERROR(local_state->init(state, info));
525
1.73k
    state->emplace_local_state(operator_id(), std::move(local_state));
526
1.73k
    return Status::OK();
527
1.73k
}
_ZN5doris9OperatorXINS_16SelectLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
522
2.91k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
523
2.91k
    auto local_state = LocalStateType::create_unique(state, this);
524
2.91k
    RETURN_IF_ERROR(local_state->init(state, info));
525
2.91k
    state->emplace_local_state(operator_id(), std::move(local_state));
526
2.91k
    return Status::OK();
527
2.91k
}
_ZN5doris9OperatorXINS_22StreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
522
11.3k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
523
11.3k
    auto local_state = LocalStateType::create_unique(state, this);
524
11.3k
    RETURN_IF_ERROR(local_state->init(state, info));
525
11.3k
    state->emplace_local_state(operator_id(), std::move(local_state));
526
11.3k
    return Status::OK();
527
11.3k
}
_ZN5doris9OperatorXINS_30DistinctStreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
522
523k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
523
523k
    auto local_state = LocalStateType::create_unique(state, this);
524
523k
    RETURN_IF_ERROR(local_state->init(state, info));
525
523k
    state->emplace_local_state(operator_id(), std::move(local_state));
526
523k
    return Status::OK();
527
523k
}
528
529
PipelineXSinkLocalStateBase::PipelineXSinkLocalStateBase(DataSinkOperatorXBase* parent,
530
                                                         RuntimeState* state)
531
2.24M
        : _parent(parent), _state(state) {}
532
533
PipelineXLocalStateBase::PipelineXLocalStateBase(RuntimeState* state, OperatorXBase* parent)
534
2.79M
        : _num_rows_returned(0),
535
2.79M
          _rows_returned_counter(nullptr),
536
2.79M
          _parent(parent),
537
2.79M
          _state(state),
538
2.79M
          _budget(state->batch_size(), state->preferred_block_size_bytes()) {}
539
540
template <typename SharedStateArg>
541
2.81M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
542
2.81M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
543
2.81M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
544
2.81M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
545
2.81M
    _operator_profile->set_metadata(_parent->node_id());
546
    // indent is false so that source operator will have same
547
    // indentation_level with its parent operator.
548
2.81M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
549
2.81M
    _operator_profile->add_child(_common_profile.get(), true);
550
2.81M
    _operator_profile->add_child(_custom_profile.get(), true);
551
2.81M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
552
2.81M
    if constexpr (!is_fake_shared) {
553
1.47M
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
554
866k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
555
866k
                                    .first.get()
556
866k
                                    ->template cast<SharedStateArg>();
557
558
866k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
559
866k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
560
866k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
561
866k
        } else if (info.shared_state) {
562
529k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
563
0
                DCHECK(false);
564
0
            }
565
            // For UnionSourceOperator without children, there is no shared state.
566
529k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
567
568
529k
            _dependency = _shared_state->create_source_dependency(
569
529k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
570
529k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
571
529k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
572
529k
        } else {
573
76.3k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
574
12.0k
                DCHECK(false);
575
12.0k
            }
576
76.3k
        }
577
1.47M
    }
578
579
2.81M
    if (must_set_shared_state() && _shared_state == nullptr) {
580
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
581
0
    }
582
583
2.81M
    _rows_returned_counter =
584
2.81M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
585
2.81M
    _blocks_returned_counter =
586
2.81M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
587
2.81M
    _output_block_bytes_counter =
588
2.81M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
589
2.81M
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
590
2.81M
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
591
2.81M
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
592
2.81M
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
593
2.81M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
594
2.81M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
595
2.81M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
596
2.81M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
597
2.81M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
598
2.81M
    _memory_used_counter =
599
2.81M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
600
2.81M
    _common_profile->add_info_string("IsColocate",
601
2.81M
                                     std::to_string(_parent->is_colocated_operator()));
602
2.81M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
603
2.81M
    _common_profile->add_info_string("FollowedByShuffledOperator",
604
2.81M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
605
2.81M
    return Status::OK();
606
2.81M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
541
72.5k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
542
72.5k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
543
72.5k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
544
72.5k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
545
72.5k
    _operator_profile->set_metadata(_parent->node_id());
546
    // indent is false so that source operator will have same
547
    // indentation_level with its parent operator.
548
72.5k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
549
72.5k
    _operator_profile->add_child(_common_profile.get(), true);
550
72.5k
    _operator_profile->add_child(_custom_profile.get(), true);
551
72.5k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
552
72.5k
    if constexpr (!is_fake_shared) {
553
72.5k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
554
19.8k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
555
19.8k
                                    .first.get()
556
19.8k
                                    ->template cast<SharedStateArg>();
557
558
19.8k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
559
19.8k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
560
19.8k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
561
52.7k
        } else if (info.shared_state) {
562
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
563
                DCHECK(false);
564
            }
565
            // For UnionSourceOperator without children, there is no shared state.
566
52.0k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
567
568
52.0k
            _dependency = _shared_state->create_source_dependency(
569
52.0k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
570
52.0k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
571
52.0k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
572
52.0k
        } else {
573
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
574
                DCHECK(false);
575
            }
576
678
        }
577
72.5k
    }
578
579
72.5k
    if (must_set_shared_state() && _shared_state == nullptr) {
580
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
581
0
    }
582
583
72.5k
    _rows_returned_counter =
584
72.5k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
585
72.5k
    _blocks_returned_counter =
586
72.5k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
587
72.5k
    _output_block_bytes_counter =
588
72.5k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
589
72.5k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
590
72.5k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
591
72.5k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
592
72.5k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
593
72.5k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
594
72.5k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
595
72.5k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
596
72.5k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
597
72.5k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
598
72.5k
    _memory_used_counter =
599
72.5k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
600
72.5k
    _common_profile->add_info_string("IsColocate",
601
72.5k
                                     std::to_string(_parent->is_colocated_operator()));
602
72.5k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
603
72.5k
    _common_profile->add_info_string("FollowedByShuffledOperator",
604
72.5k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
605
72.5k
    return Status::OK();
606
72.5k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
541
1
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
542
1
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
543
1
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
544
1
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
545
1
    _operator_profile->set_metadata(_parent->node_id());
546
    // indent is false so that source operator will have same
547
    // indentation_level with its parent operator.
548
1
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
549
1
    _operator_profile->add_child(_common_profile.get(), true);
550
1
    _operator_profile->add_child(_custom_profile.get(), true);
551
1
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
552
1
    if constexpr (!is_fake_shared) {
553
1
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
554
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
555
0
                                    .first.get()
556
0
                                    ->template cast<SharedStateArg>();
557
558
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
559
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
560
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
561
1
        } else if (info.shared_state) {
562
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
563
                DCHECK(false);
564
            }
565
            // For UnionSourceOperator without children, there is no shared state.
566
1
            _shared_state = info.shared_state->template cast<SharedStateArg>();
567
568
1
            _dependency = _shared_state->create_source_dependency(
569
1
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
570
1
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
571
1
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
572
1
        } else {
573
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
574
                DCHECK(false);
575
            }
576
0
        }
577
1
    }
578
579
1
    if (must_set_shared_state() && _shared_state == nullptr) {
580
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
581
0
    }
582
583
1
    _rows_returned_counter =
584
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
585
1
    _blocks_returned_counter =
586
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
587
1
    _output_block_bytes_counter =
588
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
589
1
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
590
1
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
591
1
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
592
1
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
593
1
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
594
1
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
595
1
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
596
1
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
597
1
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
598
1
    _memory_used_counter =
599
1
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
600
1
    _common_profile->add_info_string("IsColocate",
601
1
                                     std::to_string(_parent->is_colocated_operator()));
602
1
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
603
1
    _common_profile->add_info_string("FollowedByShuffledOperator",
604
1
                                     std::to_string(_parent->followed_by_shuffled_operator()));
605
1
    return Status::OK();
606
1
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
541
282k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
542
282k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
543
282k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
544
282k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
545
282k
    _operator_profile->set_metadata(_parent->node_id());
546
    // indent is false so that source operator will have same
547
    // indentation_level with its parent operator.
548
282k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
549
282k
    _operator_profile->add_child(_common_profile.get(), true);
550
282k
    _operator_profile->add_child(_custom_profile.get(), true);
551
282k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
552
282k
    if constexpr (!is_fake_shared) {
553
282k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
554
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
555
0
                                    .first.get()
556
0
                                    ->template cast<SharedStateArg>();
557
558
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
559
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
560
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
561
282k
        } else if (info.shared_state) {
562
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
563
                DCHECK(false);
564
            }
565
            // For UnionSourceOperator without children, there is no shared state.
566
274k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
567
568
274k
            _dependency = _shared_state->create_source_dependency(
569
274k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
570
274k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
571
274k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
572
274k
        } else {
573
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
574
                DCHECK(false);
575
            }
576
8.02k
        }
577
282k
    }
578
579
282k
    if (must_set_shared_state() && _shared_state == nullptr) {
580
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
581
0
    }
582
583
282k
    _rows_returned_counter =
584
282k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
585
282k
    _blocks_returned_counter =
586
282k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
587
282k
    _output_block_bytes_counter =
588
282k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
589
282k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
590
282k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
591
282k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
592
282k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
593
282k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
594
282k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
595
282k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
596
282k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
597
282k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
598
282k
    _memory_used_counter =
599
282k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
600
282k
    _common_profile->add_info_string("IsColocate",
601
282k
                                     std::to_string(_parent->is_colocated_operator()));
602
282k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
603
282k
    _common_profile->add_info_string("FollowedByShuffledOperator",
604
282k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
605
282k
    return Status::OK();
606
282k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
541
25
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
542
25
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
543
25
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
544
25
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
545
25
    _operator_profile->set_metadata(_parent->node_id());
546
    // indent is false so that source operator will have same
547
    // indentation_level with its parent operator.
548
25
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
549
25
    _operator_profile->add_child(_common_profile.get(), true);
550
25
    _operator_profile->add_child(_custom_profile.get(), true);
551
25
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
552
25
    if constexpr (!is_fake_shared) {
553
25
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
554
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
555
0
                                    .first.get()
556
0
                                    ->template cast<SharedStateArg>();
557
558
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
559
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
560
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
561
25
        } else if (info.shared_state) {
562
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
563
                DCHECK(false);
564
            }
565
            // For UnionSourceOperator without children, there is no shared state.
566
25
            _shared_state = info.shared_state->template cast<SharedStateArg>();
567
568
25
            _dependency = _shared_state->create_source_dependency(
569
25
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
570
25
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
571
25
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
572
25
        } else {
573
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
574
                DCHECK(false);
575
            }
576
0
        }
577
25
    }
578
579
25
    if (must_set_shared_state() && _shared_state == nullptr) {
580
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
581
0
    }
582
583
25
    _rows_returned_counter =
584
25
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
585
25
    _blocks_returned_counter =
586
25
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
587
25
    _output_block_bytes_counter =
588
25
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
589
25
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
590
25
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
591
25
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
592
25
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
593
25
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
594
25
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
595
25
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
596
25
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
597
25
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
598
25
    _memory_used_counter =
599
25
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
600
25
    _common_profile->add_info_string("IsColocate",
601
25
                                     std::to_string(_parent->is_colocated_operator()));
602
25
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
603
25
    _common_profile->add_info_string("FollowedByShuffledOperator",
604
25
                                     std::to_string(_parent->followed_by_shuffled_operator()));
605
25
    return Status::OK();
606
25
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
541
10.0k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
542
10.0k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
543
10.0k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
544
10.0k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
545
10.0k
    _operator_profile->set_metadata(_parent->node_id());
546
    // indent is false so that source operator will have same
547
    // indentation_level with its parent operator.
548
10.0k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
549
10.0k
    _operator_profile->add_child(_common_profile.get(), true);
550
10.0k
    _operator_profile->add_child(_custom_profile.get(), true);
551
10.0k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
552
10.0k
    if constexpr (!is_fake_shared) {
553
10.0k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
554
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
555
0
                                    .first.get()
556
0
                                    ->template cast<SharedStateArg>();
557
558
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
559
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
560
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
561
10.0k
        } else if (info.shared_state) {
562
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
563
                DCHECK(false);
564
            }
565
            // For UnionSourceOperator without children, there is no shared state.
566
9.95k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
567
568
9.95k
            _dependency = _shared_state->create_source_dependency(
569
9.95k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
570
9.95k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
571
9.95k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
572
9.95k
        } else {
573
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
574
                DCHECK(false);
575
            }
576
54
        }
577
10.0k
    }
578
579
10.0k
    if (must_set_shared_state() && _shared_state == nullptr) {
580
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
581
0
    }
582
583
10.0k
    _rows_returned_counter =
584
10.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
585
10.0k
    _blocks_returned_counter =
586
10.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
587
10.0k
    _output_block_bytes_counter =
588
10.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
589
10.0k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
590
10.0k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
591
10.0k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
592
10.0k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
593
10.0k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
594
10.0k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
595
10.0k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
596
10.0k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
597
10.0k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
598
10.0k
    _memory_used_counter =
599
10.0k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
600
10.0k
    _common_profile->add_info_string("IsColocate",
601
10.0k
                                     std::to_string(_parent->is_colocated_operator()));
602
10.0k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
603
10.0k
    _common_profile->add_info_string("FollowedByShuffledOperator",
604
10.0k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
605
10.0k
    return Status::OK();
606
10.0k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
541
7.84k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
542
7.84k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
543
7.84k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
544
7.84k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
545
7.84k
    _operator_profile->set_metadata(_parent->node_id());
546
    // indent is false so that source operator will have same
547
    // indentation_level with its parent operator.
548
7.84k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
549
7.84k
    _operator_profile->add_child(_common_profile.get(), true);
550
7.84k
    _operator_profile->add_child(_custom_profile.get(), true);
551
7.84k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
552
7.84k
    if constexpr (!is_fake_shared) {
553
7.84k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
554
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
555
0
                                    .first.get()
556
0
                                    ->template cast<SharedStateArg>();
557
558
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
559
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
560
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
561
7.84k
        } else if (info.shared_state) {
562
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
563
                DCHECK(false);
564
            }
565
            // For UnionSourceOperator without children, there is no shared state.
566
7.75k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
567
568
7.75k
            _dependency = _shared_state->create_source_dependency(
569
7.75k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
570
7.75k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
571
7.75k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
572
7.75k
        } else {
573
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
574
                DCHECK(false);
575
            }
576
97
        }
577
7.84k
    }
578
579
7.84k
    if (must_set_shared_state() && _shared_state == nullptr) {
580
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
581
0
    }
582
583
7.84k
    _rows_returned_counter =
584
7.84k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
585
7.84k
    _blocks_returned_counter =
586
7.84k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
587
7.84k
    _output_block_bytes_counter =
588
7.84k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
589
7.84k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
590
7.84k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
591
7.84k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
592
7.84k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
593
7.84k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
594
7.84k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
595
7.84k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
596
7.84k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
597
7.84k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
598
7.84k
    _memory_used_counter =
599
7.84k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
600
7.84k
    _common_profile->add_info_string("IsColocate",
601
7.84k
                                     std::to_string(_parent->is_colocated_operator()));
602
7.84k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
603
7.84k
    _common_profile->add_info_string("FollowedByShuffledOperator",
604
7.84k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
605
7.84k
    return Status::OK();
606
7.84k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
541
167k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
542
167k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
543
167k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
544
167k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
545
167k
    _operator_profile->set_metadata(_parent->node_id());
546
    // indent is false so that source operator will have same
547
    // indentation_level with its parent operator.
548
167k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
549
167k
    _operator_profile->add_child(_common_profile.get(), true);
550
167k
    _operator_profile->add_child(_custom_profile.get(), true);
551
167k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
552
167k
    if constexpr (!is_fake_shared) {
553
167k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
554
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
555
0
                                    .first.get()
556
0
                                    ->template cast<SharedStateArg>();
557
558
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
559
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
560
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
561
167k
        } else if (info.shared_state) {
562
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
563
                DCHECK(false);
564
            }
565
            // For UnionSourceOperator without children, there is no shared state.
566
165k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
567
568
165k
            _dependency = _shared_state->create_source_dependency(
569
165k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
570
165k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
571
165k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
572
165k
        } else {
573
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
574
                DCHECK(false);
575
            }
576
1.86k
        }
577
167k
    }
578
579
167k
    if (must_set_shared_state() && _shared_state == nullptr) {
580
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
581
0
    }
582
583
167k
    _rows_returned_counter =
584
167k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
585
167k
    _blocks_returned_counter =
586
167k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
587
167k
    _output_block_bytes_counter =
588
167k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
589
167k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
590
167k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
591
167k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
592
167k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
593
167k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
594
167k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
595
167k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
596
167k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
597
167k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
598
167k
    _memory_used_counter =
599
167k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
600
167k
    _common_profile->add_info_string("IsColocate",
601
167k
                                     std::to_string(_parent->is_colocated_operator()));
602
167k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
603
167k
    _common_profile->add_info_string("FollowedByShuffledOperator",
604
167k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
605
167k
    return Status::OK();
606
167k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
541
320
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
542
320
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
543
320
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
544
320
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
545
320
    _operator_profile->set_metadata(_parent->node_id());
546
    // indent is false so that source operator will have same
547
    // indentation_level with its parent operator.
548
320
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
549
320
    _operator_profile->add_child(_common_profile.get(), true);
550
320
    _operator_profile->add_child(_custom_profile.get(), true);
551
320
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
552
320
    if constexpr (!is_fake_shared) {
553
320
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
554
313
            _shared_state = info.shared_state_map.at(_parent->operator_id())
555
313
                                    .first.get()
556
313
                                    ->template cast<SharedStateArg>();
557
558
313
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
559
313
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
560
313
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
561
313
        } else if (info.shared_state) {
562
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
563
                DCHECK(false);
564
            }
565
            // For UnionSourceOperator without children, there is no shared state.
566
0
            _shared_state = info.shared_state->template cast<SharedStateArg>();
567
568
0
            _dependency = _shared_state->create_source_dependency(
569
0
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
570
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
571
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
572
7
        } else {
573
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
574
                DCHECK(false);
575
            }
576
7
        }
577
320
    }
578
579
320
    if (must_set_shared_state() && _shared_state == nullptr) {
580
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
581
0
    }
582
583
320
    _rows_returned_counter =
584
320
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
585
320
    _blocks_returned_counter =
586
320
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
587
320
    _output_block_bytes_counter =
588
320
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
589
320
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
590
320
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
591
320
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
592
320
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
593
320
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
594
320
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
595
320
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
596
320
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
597
320
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
598
320
    _memory_used_counter =
599
320
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
600
320
    _common_profile->add_info_string("IsColocate",
601
320
                                     std::to_string(_parent->is_colocated_operator()));
602
320
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
603
320
    _common_profile->add_info_string("FollowedByShuffledOperator",
604
320
                                     std::to_string(_parent->followed_by_shuffled_operator()));
605
320
    return Status::OK();
606
320
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
541
100
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
542
100
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
543
100
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
544
100
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
545
100
    _operator_profile->set_metadata(_parent->node_id());
546
    // indent is false so that source operator will have same
547
    // indentation_level with its parent operator.
548
100
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
549
100
    _operator_profile->add_child(_common_profile.get(), true);
550
100
    _operator_profile->add_child(_custom_profile.get(), true);
551
100
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
552
100
    if constexpr (!is_fake_shared) {
553
100
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
554
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
555
0
                                    .first.get()
556
0
                                    ->template cast<SharedStateArg>();
557
558
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
559
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
560
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
561
100
        } else if (info.shared_state) {
562
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
563
                DCHECK(false);
564
            }
565
            // For UnionSourceOperator without children, there is no shared state.
566
100
            _shared_state = info.shared_state->template cast<SharedStateArg>();
567
568
100
            _dependency = _shared_state->create_source_dependency(
569
100
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
570
100
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
571
100
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
572
100
        } else {
573
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
574
                DCHECK(false);
575
            }
576
0
        }
577
100
    }
578
579
100
    if (must_set_shared_state() && _shared_state == nullptr) {
580
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
581
0
    }
582
583
100
    _rows_returned_counter =
584
100
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
585
100
    _blocks_returned_counter =
586
100
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
587
100
    _output_block_bytes_counter =
588
100
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
589
100
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
590
100
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
591
100
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
592
100
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
593
100
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
594
100
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
595
100
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
596
100
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
597
100
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
598
100
    _memory_used_counter =
599
100
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
600
100
    _common_profile->add_info_string("IsColocate",
601
100
                                     std::to_string(_parent->is_colocated_operator()));
602
100
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
603
100
    _common_profile->add_info_string("FollowedByShuffledOperator",
604
100
                                     std::to_string(_parent->followed_by_shuffled_operator()));
605
100
    return Status::OK();
606
100
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
541
1.33M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
542
1.33M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
543
1.33M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
544
1.33M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
545
1.33M
    _operator_profile->set_metadata(_parent->node_id());
546
    // indent is false so that source operator will have same
547
    // indentation_level with its parent operator.
548
1.33M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
549
1.33M
    _operator_profile->add_child(_common_profile.get(), true);
550
1.33M
    _operator_profile->add_child(_custom_profile.get(), true);
551
1.33M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
552
    if constexpr (!is_fake_shared) {
553
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
554
            _shared_state = info.shared_state_map.at(_parent->operator_id())
555
                                    .first.get()
556
                                    ->template cast<SharedStateArg>();
557
558
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
559
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
560
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
561
        } else if (info.shared_state) {
562
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
563
                DCHECK(false);
564
            }
565
            // For UnionSourceOperator without children, there is no shared state.
566
            _shared_state = info.shared_state->template cast<SharedStateArg>();
567
568
            _dependency = _shared_state->create_source_dependency(
569
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
570
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
571
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
572
        } else {
573
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
574
                DCHECK(false);
575
            }
576
        }
577
    }
578
579
1.33M
    if (must_set_shared_state() && _shared_state == nullptr) {
580
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
581
0
    }
582
583
1.33M
    _rows_returned_counter =
584
1.33M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
585
1.33M
    _blocks_returned_counter =
586
1.33M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
587
1.33M
    _output_block_bytes_counter =
588
1.33M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
589
1.33M
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
590
1.33M
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
591
1.33M
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
592
1.33M
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
593
1.33M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
594
1.33M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
595
1.33M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
596
1.33M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
597
1.33M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
598
1.33M
    _memory_used_counter =
599
1.33M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
600
1.33M
    _common_profile->add_info_string("IsColocate",
601
1.33M
                                     std::to_string(_parent->is_colocated_operator()));
602
1.33M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
603
1.33M
    _common_profile->add_info_string("FollowedByShuffledOperator",
604
1.33M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
605
1.33M
    return Status::OK();
606
1.33M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
541
56.0k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
542
56.0k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
543
56.0k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
544
56.0k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
545
56.0k
    _operator_profile->set_metadata(_parent->node_id());
546
    // indent is false so that source operator will have same
547
    // indentation_level with its parent operator.
548
56.0k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
549
56.0k
    _operator_profile->add_child(_common_profile.get(), true);
550
56.0k
    _operator_profile->add_child(_custom_profile.get(), true);
551
56.0k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
552
56.0k
    if constexpr (!is_fake_shared) {
553
56.0k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
554
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
555
0
                                    .first.get()
556
0
                                    ->template cast<SharedStateArg>();
557
558
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
559
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
560
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
561
56.0k
        } else if (info.shared_state) {
562
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
563
                DCHECK(false);
564
            }
565
            // For UnionSourceOperator without children, there is no shared state.
566
2.66k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
567
568
2.66k
            _dependency = _shared_state->create_source_dependency(
569
2.66k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
570
2.66k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
571
2.66k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
572
53.3k
        } else {
573
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
574
                DCHECK(false);
575
            }
576
53.3k
        }
577
56.0k
    }
578
579
56.0k
    if (must_set_shared_state() && _shared_state == nullptr) {
580
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
581
0
    }
582
583
56.0k
    _rows_returned_counter =
584
56.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
585
56.0k
    _blocks_returned_counter =
586
56.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
587
56.0k
    _output_block_bytes_counter =
588
56.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
589
56.0k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
590
56.0k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
591
56.0k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
592
56.0k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
593
56.0k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
594
56.0k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
595
56.0k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
596
56.0k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
597
56.0k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
598
56.0k
    _memory_used_counter =
599
56.0k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
600
56.0k
    _common_profile->add_info_string("IsColocate",
601
56.0k
                                     std::to_string(_parent->is_colocated_operator()));
602
56.0k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
603
56.0k
    _common_profile->add_info_string("FollowedByShuffledOperator",
604
56.0k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
605
56.0k
    return Status::OK();
606
56.0k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
541
26
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
542
26
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
543
26
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
544
26
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
545
26
    _operator_profile->set_metadata(_parent->node_id());
546
    // indent is false so that source operator will have same
547
    // indentation_level with its parent operator.
548
26
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
549
26
    _operator_profile->add_child(_common_profile.get(), true);
550
26
    _operator_profile->add_child(_custom_profile.get(), true);
551
26
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
552
26
    if constexpr (!is_fake_shared) {
553
26
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
554
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
555
0
                                    .first.get()
556
0
                                    ->template cast<SharedStateArg>();
557
558
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
559
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
560
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
561
26
        } else if (info.shared_state) {
562
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
563
                DCHECK(false);
564
            }
565
            // For UnionSourceOperator without children, there is no shared state.
566
26
            _shared_state = info.shared_state->template cast<SharedStateArg>();
567
568
26
            _dependency = _shared_state->create_source_dependency(
569
26
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
570
26
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
571
26
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
572
26
        } else {
573
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
574
                DCHECK(false);
575
            }
576
0
        }
577
26
    }
578
579
26
    if (must_set_shared_state() && _shared_state == nullptr) {
580
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
581
0
    }
582
583
26
    _rows_returned_counter =
584
26
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
585
26
    _blocks_returned_counter =
586
26
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
587
26
    _output_block_bytes_counter =
588
26
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
589
26
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
590
26
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
591
26
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
592
26
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
593
26
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
594
26
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
595
26
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
596
26
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
597
26
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
598
26
    _memory_used_counter =
599
26
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
600
26
    _common_profile->add_info_string("IsColocate",
601
26
                                     std::to_string(_parent->is_colocated_operator()));
602
26
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
603
26
    _common_profile->add_info_string("FollowedByShuffledOperator",
604
26
                                     std::to_string(_parent->followed_by_shuffled_operator()));
605
26
    return Status::OK();
606
26
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
541
11.2k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
542
11.2k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
543
11.2k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
544
11.2k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
545
11.2k
    _operator_profile->set_metadata(_parent->node_id());
546
    // indent is false so that source operator will have same
547
    // indentation_level with its parent operator.
548
11.2k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
549
11.2k
    _operator_profile->add_child(_common_profile.get(), true);
550
11.2k
    _operator_profile->add_child(_custom_profile.get(), true);
551
11.2k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
552
11.2k
    if constexpr (!is_fake_shared) {
553
11.2k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
554
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
555
0
                                    .first.get()
556
0
                                    ->template cast<SharedStateArg>();
557
558
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
559
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
560
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
561
11.2k
        } else if (info.shared_state) {
562
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
563
                DCHECK(false);
564
            }
565
            // For UnionSourceOperator without children, there is no shared state.
566
11.1k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
567
568
11.1k
            _dependency = _shared_state->create_source_dependency(
569
11.1k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
570
11.1k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
571
11.1k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
572
11.1k
        } else {
573
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
574
                DCHECK(false);
575
            }
576
39
        }
577
11.2k
    }
578
579
11.2k
    if (must_set_shared_state() && _shared_state == nullptr) {
580
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
581
0
    }
582
583
11.2k
    _rows_returned_counter =
584
11.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
585
11.2k
    _blocks_returned_counter =
586
11.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
587
11.2k
    _output_block_bytes_counter =
588
11.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
589
11.2k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
590
11.2k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
591
11.2k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
592
11.2k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
593
11.2k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
594
11.2k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
595
11.2k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
596
11.2k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
597
11.2k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
598
11.2k
    _memory_used_counter =
599
11.2k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
600
11.2k
    _common_profile->add_info_string("IsColocate",
601
11.2k
                                     std::to_string(_parent->is_colocated_operator()));
602
11.2k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
603
11.2k
    _common_profile->add_info_string("FollowedByShuffledOperator",
604
11.2k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
605
11.2k
    return Status::OK();
606
11.2k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
541
402
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
542
402
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
543
402
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
544
402
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
545
402
    _operator_profile->set_metadata(_parent->node_id());
546
    // indent is false so that source operator will have same
547
    // indentation_level with its parent operator.
548
402
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
549
402
    _operator_profile->add_child(_common_profile.get(), true);
550
402
    _operator_profile->add_child(_custom_profile.get(), true);
551
402
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
552
402
    if constexpr (!is_fake_shared) {
553
402
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
554
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
555
0
                                    .first.get()
556
0
                                    ->template cast<SharedStateArg>();
557
558
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
559
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
560
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
561
402
        } else if (info.shared_state) {
562
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
563
                DCHECK(false);
564
            }
565
            // For UnionSourceOperator without children, there is no shared state.
566
402
            _shared_state = info.shared_state->template cast<SharedStateArg>();
567
568
402
            _dependency = _shared_state->create_source_dependency(
569
402
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
570
402
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
571
402
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
572
402
        } else {
573
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
574
                DCHECK(false);
575
            }
576
0
        }
577
402
    }
578
579
402
    if (must_set_shared_state() && _shared_state == nullptr) {
580
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
581
0
    }
582
583
402
    _rows_returned_counter =
584
402
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
585
402
    _blocks_returned_counter =
586
402
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
587
402
    _output_block_bytes_counter =
588
402
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
589
402
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
590
402
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
591
402
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
592
402
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
593
402
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
594
402
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
595
402
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
596
402
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
597
402
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
598
402
    _memory_used_counter =
599
402
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
600
402
    _common_profile->add_info_string("IsColocate",
601
402
                                     std::to_string(_parent->is_colocated_operator()));
602
402
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
603
402
    _common_profile->add_info_string("FollowedByShuffledOperator",
604
402
                                     std::to_string(_parent->followed_by_shuffled_operator()));
605
402
    return Status::OK();
606
402
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
541
4.93k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
542
4.93k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
543
4.93k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
544
4.93k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
545
4.93k
    _operator_profile->set_metadata(_parent->node_id());
546
    // indent is false so that source operator will have same
547
    // indentation_level with its parent operator.
548
4.93k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
549
4.93k
    _operator_profile->add_child(_common_profile.get(), true);
550
4.93k
    _operator_profile->add_child(_custom_profile.get(), true);
551
4.93k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
552
4.93k
    if constexpr (!is_fake_shared) {
553
4.93k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
554
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
555
0
                                    .first.get()
556
0
                                    ->template cast<SharedStateArg>();
557
558
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
559
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
560
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
561
4.93k
        } else if (info.shared_state) {
562
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
563
                DCHECK(false);
564
            }
565
            // For UnionSourceOperator without children, there is no shared state.
566
4.76k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
567
568
4.76k
            _dependency = _shared_state->create_source_dependency(
569
4.76k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
570
4.76k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
571
4.76k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
572
4.76k
        } else {
573
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
574
                DCHECK(false);
575
            }
576
170
        }
577
4.93k
    }
578
579
4.93k
    if (must_set_shared_state() && _shared_state == nullptr) {
580
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
581
0
    }
582
583
4.93k
    _rows_returned_counter =
584
4.93k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
585
4.93k
    _blocks_returned_counter =
586
4.93k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
587
4.93k
    _output_block_bytes_counter =
588
4.93k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
589
4.93k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
590
4.93k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
591
4.93k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
592
4.93k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
593
4.93k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
594
4.93k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
595
4.93k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
596
4.93k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
597
4.93k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
598
4.93k
    _memory_used_counter =
599
4.93k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
600
4.93k
    _common_profile->add_info_string("IsColocate",
601
4.93k
                                     std::to_string(_parent->is_colocated_operator()));
602
4.93k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
603
4.93k
    _common_profile->add_info_string("FollowedByShuffledOperator",
604
4.93k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
605
4.93k
    return Status::OK();
606
4.93k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
541
858k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
542
858k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
543
858k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
544
858k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
545
858k
    _operator_profile->set_metadata(_parent->node_id());
546
    // indent is false so that source operator will have same
547
    // indentation_level with its parent operator.
548
858k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
549
858k
    _operator_profile->add_child(_common_profile.get(), true);
550
858k
    _operator_profile->add_child(_custom_profile.get(), true);
551
858k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
552
858k
    if constexpr (!is_fake_shared) {
553
858k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
554
846k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
555
846k
                                    .first.get()
556
846k
                                    ->template cast<SharedStateArg>();
557
558
846k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
559
846k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
560
846k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
561
846k
        } else if (info.shared_state) {
562
0
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
563
0
                DCHECK(false);
564
0
            }
565
            // For UnionSourceOperator without children, there is no shared state.
566
0
            _shared_state = info.shared_state->template cast<SharedStateArg>();
567
568
0
            _dependency = _shared_state->create_source_dependency(
569
0
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
570
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
571
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
572
12.0k
        } else {
573
12.0k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
574
12.0k
                DCHECK(false);
575
12.0k
            }
576
12.0k
        }
577
858k
    }
578
579
858k
    if (must_set_shared_state() && _shared_state == nullptr) {
580
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
581
0
    }
582
583
858k
    _rows_returned_counter =
584
858k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
585
858k
    _blocks_returned_counter =
586
858k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
587
858k
    _output_block_bytes_counter =
588
858k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
589
858k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
590
858k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
591
858k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
592
858k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
593
858k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
594
858k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
595
858k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
596
858k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
597
858k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
598
858k
    _memory_used_counter =
599
858k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
600
858k
    _common_profile->add_info_string("IsColocate",
601
858k
                                     std::to_string(_parent->is_colocated_operator()));
602
858k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
603
858k
    _common_profile->add_info_string("FollowedByShuffledOperator",
604
858k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
605
858k
    return Status::OK();
606
858k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
541
164
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
542
164
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
543
164
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
544
164
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
545
164
    _operator_profile->set_metadata(_parent->node_id());
546
    // indent is false so that source operator will have same
547
    // indentation_level with its parent operator.
548
164
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
549
164
    _operator_profile->add_child(_common_profile.get(), true);
550
164
    _operator_profile->add_child(_custom_profile.get(), true);
551
164
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
552
164
    if constexpr (!is_fake_shared) {
553
164
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
554
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
555
0
                                    .first.get()
556
0
                                    ->template cast<SharedStateArg>();
557
558
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
559
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
560
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
561
164
        } else if (info.shared_state) {
562
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
563
                DCHECK(false);
564
            }
565
            // For UnionSourceOperator without children, there is no shared state.
566
164
            _shared_state = info.shared_state->template cast<SharedStateArg>();
567
568
164
            _dependency = _shared_state->create_source_dependency(
569
164
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
570
164
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
571
164
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
572
164
        } else {
573
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
574
                DCHECK(false);
575
            }
576
0
        }
577
164
    }
578
579
164
    if (must_set_shared_state() && _shared_state == nullptr) {
580
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
581
0
    }
582
583
164
    _rows_returned_counter =
584
164
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
585
164
    _blocks_returned_counter =
586
164
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
587
164
    _output_block_bytes_counter =
588
164
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
589
164
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
590
164
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
591
164
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
592
164
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
593
164
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
594
164
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
595
164
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
596
164
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
597
164
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
598
164
    _memory_used_counter =
599
164
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
600
164
    _common_profile->add_info_string("IsColocate",
601
164
                                     std::to_string(_parent->is_colocated_operator()));
602
164
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
603
164
    _common_profile->add_info_string("FollowedByShuffledOperator",
604
164
                                     std::to_string(_parent->followed_by_shuffled_operator()));
605
164
    return Status::OK();
606
164
}
607
608
template <typename SharedStateArg>
609
2.82M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
610
2.82M
    _conjuncts.resize(_parent->_conjuncts.size());
611
2.82M
    _projections.resize(_parent->_projections.size());
612
3.37M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
613
546k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
614
546k
    }
615
5.66M
    for (size_t i = 0; i < _projections.size(); i++) {
616
2.83M
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
617
2.83M
    }
618
2.82M
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
619
2.84M
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
620
17.1k
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
621
126k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
622
109k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
623
109k
                    state, _intermediate_projections[i][j]));
624
109k
        }
625
17.1k
    }
626
2.82M
    return Status::OK();
627
2.82M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
609
72.4k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
610
72.4k
    _conjuncts.resize(_parent->_conjuncts.size());
611
72.4k
    _projections.resize(_parent->_projections.size());
612
73.2k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
613
769
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
614
769
    }
615
350k
    for (size_t i = 0; i < _projections.size(); i++) {
616
278k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
617
278k
    }
618
72.4k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
619
75.7k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
620
3.28k
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
621
43.2k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
622
39.9k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
623
39.9k
                    state, _intermediate_projections[i][j]));
624
39.9k
        }
625
3.28k
    }
626
72.4k
    return Status::OK();
627
72.4k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
609
3
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
610
3
    _conjuncts.resize(_parent->_conjuncts.size());
611
3
    _projections.resize(_parent->_projections.size());
612
3
    for (size_t i = 0; i < _conjuncts.size(); i++) {
613
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
614
0
    }
615
3
    for (size_t i = 0; i < _projections.size(); i++) {
616
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
617
0
    }
618
3
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
619
3
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
620
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
621
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
622
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
623
0
                    state, _intermediate_projections[i][j]));
624
0
        }
625
0
    }
626
3
    return Status::OK();
627
3
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
609
284k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
610
284k
    _conjuncts.resize(_parent->_conjuncts.size());
611
284k
    _projections.resize(_parent->_projections.size());
612
284k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
613
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
614
0
    }
615
284k
    for (size_t i = 0; i < _projections.size(); i++) {
616
364
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
617
364
    }
618
284k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
619
284k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
620
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
621
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
622
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
623
0
                    state, _intermediate_projections[i][j]));
624
0
        }
625
0
    }
626
284k
    return Status::OK();
627
284k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
609
25
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
610
25
    _conjuncts.resize(_parent->_conjuncts.size());
611
25
    _projections.resize(_parent->_projections.size());
612
25
    for (size_t i = 0; i < _conjuncts.size(); i++) {
613
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
614
0
    }
615
25
    for (size_t i = 0; i < _projections.size(); i++) {
616
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
617
0
    }
618
25
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
619
25
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
620
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
621
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
622
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
623
0
                    state, _intermediate_projections[i][j]));
624
0
        }
625
0
    }
626
25
    return Status::OK();
627
25
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
609
10.0k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
610
10.0k
    _conjuncts.resize(_parent->_conjuncts.size());
611
10.0k
    _projections.resize(_parent->_projections.size());
612
10.0k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
613
67
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
614
67
    }
615
62.5k
    for (size_t i = 0; i < _projections.size(); i++) {
616
52.5k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
617
52.5k
    }
618
10.0k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
619
10.1k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
620
134
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
621
813
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
622
679
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
623
679
                    state, _intermediate_projections[i][j]));
624
679
        }
625
134
    }
626
10.0k
    return Status::OK();
627
10.0k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
609
7.85k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
610
7.85k
    _conjuncts.resize(_parent->_conjuncts.size());
611
7.85k
    _projections.resize(_parent->_projections.size());
612
8.56k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
613
709
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
614
709
    }
615
21.6k
    for (size_t i = 0; i < _projections.size(); i++) {
616
13.7k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
617
13.7k
    }
618
7.85k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
619
7.94k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
620
89
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
621
674
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
622
585
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
623
585
                    state, _intermediate_projections[i][j]));
624
585
        }
625
89
    }
626
7.85k
    return Status::OK();
627
7.85k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
609
167k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
610
167k
    _conjuncts.resize(_parent->_conjuncts.size());
611
167k
    _projections.resize(_parent->_projections.size());
612
172k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
613
4.64k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
614
4.64k
    }
615
430k
    for (size_t i = 0; i < _projections.size(); i++) {
616
262k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
617
262k
    }
618
167k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
619
168k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
620
301
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
621
1.95k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
622
1.65k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
623
1.65k
                    state, _intermediate_projections[i][j]));
624
1.65k
        }
625
301
    }
626
167k
    return Status::OK();
627
167k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
609
323
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
610
323
    _conjuncts.resize(_parent->_conjuncts.size());
611
323
    _projections.resize(_parent->_projections.size());
612
327
    for (size_t i = 0; i < _conjuncts.size(); i++) {
613
4
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
614
4
    }
615
1.42k
    for (size_t i = 0; i < _projections.size(); i++) {
616
1.09k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
617
1.09k
    }
618
323
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
619
323
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
620
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
621
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
622
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
623
0
                    state, _intermediate_projections[i][j]));
624
0
        }
625
0
    }
626
323
    return Status::OK();
627
323
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
609
104
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
610
104
    _conjuncts.resize(_parent->_conjuncts.size());
611
104
    _projections.resize(_parent->_projections.size());
612
104
    for (size_t i = 0; i < _conjuncts.size(); i++) {
613
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
614
0
    }
615
274
    for (size_t i = 0; i < _projections.size(); i++) {
616
170
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
617
170
    }
618
104
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
619
104
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
620
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
621
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
622
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
623
0
                    state, _intermediate_projections[i][j]));
624
0
        }
625
0
    }
626
104
    return Status::OK();
627
104
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
609
1.34M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
610
1.34M
    _conjuncts.resize(_parent->_conjuncts.size());
611
1.34M
    _projections.resize(_parent->_projections.size());
612
1.88M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
613
536k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
614
536k
    }
615
3.47M
    for (size_t i = 0; i < _projections.size(); i++) {
616
2.13M
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
617
2.13M
    }
618
1.34M
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
619
1.36M
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
620
13.2k
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
621
79.7k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
622
66.4k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
623
66.4k
                    state, _intermediate_projections[i][j]));
624
66.4k
        }
625
13.2k
    }
626
1.34M
    return Status::OK();
627
1.34M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
609
56.3k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
610
56.3k
    _conjuncts.resize(_parent->_conjuncts.size());
611
56.3k
    _projections.resize(_parent->_projections.size());
612
56.3k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
613
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
614
0
    }
615
152k
    for (size_t i = 0; i < _projections.size(); i++) {
616
96.2k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
617
96.2k
    }
618
56.3k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
619
56.3k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
620
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
621
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
622
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
623
0
                    state, _intermediate_projections[i][j]));
624
0
        }
625
0
    }
626
56.3k
    return Status::OK();
627
56.3k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
609
25
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
610
25
    _conjuncts.resize(_parent->_conjuncts.size());
611
25
    _projections.resize(_parent->_projections.size());
612
25
    for (size_t i = 0; i < _conjuncts.size(); i++) {
613
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
614
0
    }
615
25
    for (size_t i = 0; i < _projections.size(); i++) {
616
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
617
0
    }
618
25
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
619
25
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
620
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
621
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
622
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
623
0
                    state, _intermediate_projections[i][j]));
624
0
        }
625
0
    }
626
25
    return Status::OK();
627
25
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
609
11.2k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
610
11.2k
    _conjuncts.resize(_parent->_conjuncts.size());
611
11.2k
    _projections.resize(_parent->_projections.size());
612
14.8k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
613
3.63k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
614
3.63k
    }
615
11.2k
    for (size_t i = 0; i < _projections.size(); i++) {
616
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
617
0
    }
618
11.2k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
619
11.2k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
620
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
621
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
622
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
623
0
                    state, _intermediate_projections[i][j]));
624
0
        }
625
0
    }
626
11.2k
    return Status::OK();
627
11.2k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
609
402
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
610
402
    _conjuncts.resize(_parent->_conjuncts.size());
611
402
    _projections.resize(_parent->_projections.size());
612
402
    for (size_t i = 0; i < _conjuncts.size(); i++) {
613
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
614
0
    }
615
402
    for (size_t i = 0; i < _projections.size(); i++) {
616
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
617
0
    }
618
402
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
619
402
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
620
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
621
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
622
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
623
0
                    state, _intermediate_projections[i][j]));
624
0
        }
625
0
    }
626
402
    return Status::OK();
627
402
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
609
5.06k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
610
5.06k
    _conjuncts.resize(_parent->_conjuncts.size());
611
5.06k
    _projections.resize(_parent->_projections.size());
612
5.06k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
613
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
614
0
    }
615
5.23k
    for (size_t i = 0; i < _projections.size(); i++) {
616
168
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
617
168
    }
618
5.06k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
619
5.06k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
620
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
621
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
622
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
623
0
                    state, _intermediate_projections[i][j]));
624
0
        }
625
0
    }
626
5.06k
    return Status::OK();
627
5.06k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
609
862k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
610
862k
    _conjuncts.resize(_parent->_conjuncts.size());
611
862k
    _projections.resize(_parent->_projections.size());
612
862k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
613
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
614
0
    }
615
862k
    for (size_t i = 0; i < _projections.size(); i++) {
616
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
617
0
    }
618
862k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
619
862k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
620
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
621
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
622
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
623
0
                    state, _intermediate_projections[i][j]));
624
0
        }
625
0
    }
626
862k
    return Status::OK();
627
862k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4openEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
609
164
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
610
164
    _conjuncts.resize(_parent->_conjuncts.size());
611
164
    _projections.resize(_parent->_projections.size());
612
171
    for (size_t i = 0; i < _conjuncts.size(); i++) {
613
7
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
614
7
    }
615
483
    for (size_t i = 0; i < _projections.size(); i++) {
616
319
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
617
319
    }
618
164
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
619
167
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
620
3
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
621
11
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
622
8
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
623
8
                    state, _intermediate_projections[i][j]));
624
8
        }
625
3
    }
626
164
    return Status::OK();
627
164
}
628
629
template <typename SharedStateArg>
630
8.62k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
631
8.62k
    if (_terminated) {
632
2
        return Status::OK();
633
2
    }
634
8.62k
    _terminated = true;
635
8.62k
    return Status::OK();
636
8.62k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
630
436
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
631
436
    if (_terminated) {
632
0
        return Status::OK();
633
0
    }
634
436
    _terminated = true;
635
436
    return Status::OK();
636
436
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
630
19
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
631
19
    if (_terminated) {
632
0
        return Status::OK();
633
0
    }
634
19
    _terminated = true;
635
19
    return Status::OK();
636
19
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
630
47
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
631
47
    if (_terminated) {
632
0
        return Status::OK();
633
0
    }
634
47
    _terminated = true;
635
47
    return Status::OK();
636
47
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
630
182
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
631
182
    if (_terminated) {
632
0
        return Status::OK();
633
0
    }
634
182
    _terminated = true;
635
182
    return Status::OK();
636
182
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
630
1
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
631
1
    if (_terminated) {
632
0
        return Status::OK();
633
0
    }
634
1
    _terminated = true;
635
1
    return Status::OK();
636
1
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
630
6.85k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
631
6.85k
    if (_terminated) {
632
1
        return Status::OK();
633
1
    }
634
6.85k
    _terminated = true;
635
6.85k
    return Status::OK();
636
6.85k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
630
8
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
631
8
    if (_terminated) {
632
0
        return Status::OK();
633
0
    }
634
8
    _terminated = true;
635
8
    return Status::OK();
636
8
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
630
7
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
631
7
    if (_terminated) {
632
0
        return Status::OK();
633
0
    }
634
7
    _terminated = true;
635
7
    return Status::OK();
636
7
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
630
1
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
631
1
    if (_terminated) {
632
0
        return Status::OK();
633
0
    }
634
1
    _terminated = true;
635
1
    return Status::OK();
636
1
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
630
322
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
631
322
    if (_terminated) {
632
0
        return Status::OK();
633
0
    }
634
322
    _terminated = true;
635
322
    return Status::OK();
636
322
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
630
718
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
631
718
    if (_terminated) {
632
1
        return Status::OK();
633
1
    }
634
717
    _terminated = true;
635
717
    return Status::OK();
636
718
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
630
28
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
631
28
    if (_terminated) {
632
0
        return Status::OK();
633
0
    }
634
28
    _terminated = true;
635
28
    return Status::OK();
636
28
}
637
638
template <typename SharedStateArg>
639
3.14M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
640
3.14M
    if (_closed) {
641
315k
        return Status::OK();
642
315k
    }
643
2.82M
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
644
1.47M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
645
1.47M
    }
646
2.82M
    _closed = true;
647
2.82M
    return Status::OK();
648
3.14M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
639
72.4k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
640
72.4k
    if (_closed) {
641
0
        return Status::OK();
642
0
    }
643
72.4k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
644
72.4k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
645
72.4k
    }
646
72.4k
    _closed = true;
647
72.4k
    return Status::OK();
648
72.4k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
639
4
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
640
4
    if (_closed) {
641
0
        return Status::OK();
642
0
    }
643
4
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
644
4
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
645
4
    }
646
4
    _closed = true;
647
4
    return Status::OK();
648
4
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
639
564k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
640
564k
    if (_closed) {
641
282k
        return Status::OK();
642
282k
    }
643
281k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
644
281k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
645
281k
    }
646
281k
    _closed = true;
647
281k
    return Status::OK();
648
564k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
639
25
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
640
25
    if (_closed) {
641
0
        return Status::OK();
642
0
    }
643
25
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
644
25
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
645
25
    }
646
25
    _closed = true;
647
25
    return Status::OK();
648
25
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
639
10.0k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
640
10.0k
    if (_closed) {
641
0
        return Status::OK();
642
0
    }
643
10.0k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
644
10.0k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
645
10.0k
    }
646
10.0k
    _closed = true;
647
10.0k
    return Status::OK();
648
10.0k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
639
15.7k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
640
15.7k
    if (_closed) {
641
7.94k
        return Status::OK();
642
7.94k
    }
643
7.82k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
644
7.82k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
645
7.82k
    }
646
7.82k
    _closed = true;
647
7.82k
    return Status::OK();
648
15.7k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
639
167k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
640
167k
    if (_closed) {
641
0
        return Status::OK();
642
0
    }
643
167k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
644
167k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
645
167k
    }
646
167k
    _closed = true;
647
167k
    return Status::OK();
648
167k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
639
320
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
640
320
    if (_closed) {
641
0
        return Status::OK();
642
0
    }
643
320
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
644
320
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
645
320
    }
646
320
    _closed = true;
647
320
    return Status::OK();
648
320
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
639
99
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
640
99
    if (_closed) {
641
0
        return Status::OK();
642
0
    }
643
99
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
644
99
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
645
99
    }
646
99
    _closed = true;
647
99
    return Status::OK();
648
99
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
639
1.36M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
640
1.36M
    if (_closed) {
641
18.8k
        return Status::OK();
642
18.8k
    }
643
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
644
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
645
    }
646
1.35M
    _closed = true;
647
1.35M
    return Status::OK();
648
1.36M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
639
56.3k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
640
56.3k
    if (_closed) {
641
0
        return Status::OK();
642
0
    }
643
56.3k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
644
56.3k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
645
56.3k
    }
646
56.3k
    _closed = true;
647
56.3k
    return Status::OK();
648
56.3k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
639
27
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
640
27
    if (_closed) {
641
13
        return Status::OK();
642
13
    }
643
14
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
644
14
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
645
14
    }
646
14
    _closed = true;
647
14
    return Status::OK();
648
27
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
639
11.2k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
640
11.2k
    if (_closed) {
641
0
        return Status::OK();
642
0
    }
643
11.2k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
644
11.2k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
645
11.2k
    }
646
11.2k
    _closed = true;
647
11.2k
    return Status::OK();
648
11.2k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
639
598
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
640
598
    if (_closed) {
641
300
        return Status::OK();
642
300
    }
643
298
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
644
298
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
645
298
    }
646
298
    _closed = true;
647
298
    return Status::OK();
648
598
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
639
10.4k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
640
10.4k
    if (_closed) {
641
5.38k
        return Status::OK();
642
5.38k
    }
643
5.05k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
644
5.05k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
645
5.05k
    }
646
5.05k
    _closed = true;
647
5.05k
    return Status::OK();
648
10.4k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
639
864k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
640
864k
    if (_closed) {
641
0
        return Status::OK();
642
0
    }
643
864k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
644
864k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
645
864k
    }
646
864k
    _closed = true;
647
864k
    return Status::OK();
648
864k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
639
325
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
640
325
    if (_closed) {
641
170
        return Status::OK();
642
170
    }
643
155
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
644
155
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
645
155
    }
646
155
    _closed = true;
647
155
    return Status::OK();
648
325
}
649
650
template <typename SharedState>
651
2.25M
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
652
    // create profile
653
2.25M
    _operator_profile =
654
2.25M
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
655
2.25M
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
656
2.25M
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
657
658
    // indentation is true
659
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
660
    // So we should set the indentation to true.
661
2.25M
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
662
2.25M
    _operator_profile->add_child(_common_profile, true);
663
2.25M
    _operator_profile->add_child(_custom_profile, true);
664
665
2.25M
    _operator_profile->set_metadata(_parent->node_id());
666
2.25M
    _wait_for_finish_dependency_timer =
667
2.25M
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
668
2.25M
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
669
2.25M
    if constexpr (!is_fake_shared) {
670
1.48M
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
671
1.48M
            info.shared_state_map.end()) {
672
331k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
311k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
674
311k
            }
675
331k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
676
331k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
677
331k
                                                  ? 0
678
331k
                                                  : info.task_idx]
679
331k
                                  .get();
680
331k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
681
1.15M
        } else {
682
18.4E
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
18.4E
                DCHECK(false);
684
18.4E
            }
685
1.15M
            _shared_state = info.shared_state->template cast<SharedState>();
686
1.15M
            _dependency = _shared_state->create_sink_dependency(
687
1.15M
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
688
1.15M
        }
689
1.48M
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
690
1.48M
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
691
1.48M
    }
692
693
2.25M
    if (must_set_shared_state() && _shared_state == nullptr) {
694
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
695
0
    }
696
697
2.25M
    _rows_input_counter =
698
2.25M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
699
2.25M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
700
2.25M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
701
2.25M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
702
2.25M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
703
2.25M
    _memory_used_counter =
704
2.25M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
705
2.25M
    _common_profile->add_info_string("IsColocate",
706
2.25M
                                     std::to_string(_parent->is_colocated_operator()));
707
2.25M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
708
2.25M
    _common_profile->add_info_string("FollowedByShuffledOperator",
709
2.25M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
710
2.25M
    return Status::OK();
711
2.25M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
651
120k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
652
    // create profile
653
120k
    _operator_profile =
654
120k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
655
120k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
656
120k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
657
658
    // indentation is true
659
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
660
    // So we should set the indentation to true.
661
120k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
662
120k
    _operator_profile->add_child(_common_profile, true);
663
120k
    _operator_profile->add_child(_custom_profile, true);
664
665
120k
    _operator_profile->set_metadata(_parent->node_id());
666
120k
    _wait_for_finish_dependency_timer =
667
120k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
668
120k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
669
120k
    if constexpr (!is_fake_shared) {
670
120k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
671
120k
            info.shared_state_map.end()) {
672
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
674
            }
675
19.9k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
676
19.9k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
677
19.9k
                                                  ? 0
678
19.9k
                                                  : info.task_idx]
679
19.9k
                                  .get();
680
19.9k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
681
100k
        } else {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(false);
684
            }
685
100k
            _shared_state = info.shared_state->template cast<SharedState>();
686
100k
            _dependency = _shared_state->create_sink_dependency(
687
100k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
688
100k
        }
689
120k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
690
120k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
691
120k
    }
692
693
120k
    if (must_set_shared_state() && _shared_state == nullptr) {
694
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
695
0
    }
696
697
120k
    _rows_input_counter =
698
120k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
699
120k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
700
120k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
701
120k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
702
120k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
703
120k
    _memory_used_counter =
704
120k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
705
120k
    _common_profile->add_info_string("IsColocate",
706
120k
                                     std::to_string(_parent->is_colocated_operator()));
707
120k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
708
120k
    _common_profile->add_info_string("FollowedByShuffledOperator",
709
120k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
710
120k
    return Status::OK();
711
120k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
651
2
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
652
    // create profile
653
2
    _operator_profile =
654
2
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
655
2
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
656
2
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
657
658
    // indentation is true
659
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
660
    // So we should set the indentation to true.
661
2
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
662
2
    _operator_profile->add_child(_common_profile, true);
663
2
    _operator_profile->add_child(_custom_profile, true);
664
665
2
    _operator_profile->set_metadata(_parent->node_id());
666
2
    _wait_for_finish_dependency_timer =
667
2
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
668
2
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
669
2
    if constexpr (!is_fake_shared) {
670
2
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
671
2
            info.shared_state_map.end()) {
672
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
674
            }
675
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
676
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
677
0
                                                  ? 0
678
0
                                                  : info.task_idx]
679
0
                                  .get();
680
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
681
2
        } else {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(false);
684
            }
685
2
            _shared_state = info.shared_state->template cast<SharedState>();
686
2
            _dependency = _shared_state->create_sink_dependency(
687
2
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
688
2
        }
689
2
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
690
2
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
691
2
    }
692
693
2
    if (must_set_shared_state() && _shared_state == nullptr) {
694
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
695
0
    }
696
697
2
    _rows_input_counter =
698
2
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
699
2
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
700
2
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
701
2
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
702
2
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
703
2
    _memory_used_counter =
704
2
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
705
2
    _common_profile->add_info_string("IsColocate",
706
2
                                     std::to_string(_parent->is_colocated_operator()));
707
2
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
708
2
    _common_profile->add_info_string("FollowedByShuffledOperator",
709
2
                                     std::to_string(_parent->followed_by_shuffled_operator()));
710
2
    return Status::OK();
711
2
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
651
282k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
652
    // create profile
653
282k
    _operator_profile =
654
282k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
655
282k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
656
282k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
657
658
    // indentation is true
659
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
660
    // So we should set the indentation to true.
661
282k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
662
282k
    _operator_profile->add_child(_common_profile, true);
663
282k
    _operator_profile->add_child(_custom_profile, true);
664
665
282k
    _operator_profile->set_metadata(_parent->node_id());
666
282k
    _wait_for_finish_dependency_timer =
667
282k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
668
282k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
669
282k
    if constexpr (!is_fake_shared) {
670
282k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
671
282k
            info.shared_state_map.end()) {
672
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
674
            }
675
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
676
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
677
0
                                                  ? 0
678
0
                                                  : info.task_idx]
679
0
                                  .get();
680
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
681
282k
        } else {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(false);
684
            }
685
282k
            _shared_state = info.shared_state->template cast<SharedState>();
686
282k
            _dependency = _shared_state->create_sink_dependency(
687
282k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
688
282k
        }
689
282k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
690
282k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
691
282k
    }
692
693
282k
    if (must_set_shared_state() && _shared_state == nullptr) {
694
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
695
0
    }
696
697
282k
    _rows_input_counter =
698
282k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
699
282k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
700
282k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
701
282k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
702
282k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
703
282k
    _memory_used_counter =
704
282k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
705
282k
    _common_profile->add_info_string("IsColocate",
706
282k
                                     std::to_string(_parent->is_colocated_operator()));
707
282k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
708
282k
    _common_profile->add_info_string("FollowedByShuffledOperator",
709
282k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
710
282k
    return Status::OK();
711
282k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
651
32
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
652
    // create profile
653
32
    _operator_profile =
654
32
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
655
32
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
656
32
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
657
658
    // indentation is true
659
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
660
    // So we should set the indentation to true.
661
32
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
662
32
    _operator_profile->add_child(_common_profile, true);
663
32
    _operator_profile->add_child(_custom_profile, true);
664
665
32
    _operator_profile->set_metadata(_parent->node_id());
666
32
    _wait_for_finish_dependency_timer =
667
32
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
668
32
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
669
32
    if constexpr (!is_fake_shared) {
670
32
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
671
32
            info.shared_state_map.end()) {
672
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
674
            }
675
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
676
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
677
0
                                                  ? 0
678
0
                                                  : info.task_idx]
679
0
                                  .get();
680
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
681
32
        } else {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(false);
684
            }
685
32
            _shared_state = info.shared_state->template cast<SharedState>();
686
32
            _dependency = _shared_state->create_sink_dependency(
687
32
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
688
32
        }
689
32
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
690
32
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
691
32
    }
692
693
32
    if (must_set_shared_state() && _shared_state == nullptr) {
694
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
695
0
    }
696
697
32
    _rows_input_counter =
698
32
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
699
32
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
700
32
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
701
32
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
702
32
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
703
32
    _memory_used_counter =
704
32
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
705
32
    _common_profile->add_info_string("IsColocate",
706
32
                                     std::to_string(_parent->is_colocated_operator()));
707
32
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
708
32
    _common_profile->add_info_string("FollowedByShuffledOperator",
709
32
                                     std::to_string(_parent->followed_by_shuffled_operator()));
710
32
    return Status::OK();
711
32
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
651
10.0k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
652
    // create profile
653
10.0k
    _operator_profile =
654
10.0k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
655
10.0k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
656
10.0k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
657
658
    // indentation is true
659
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
660
    // So we should set the indentation to true.
661
10.0k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
662
10.0k
    _operator_profile->add_child(_common_profile, true);
663
10.0k
    _operator_profile->add_child(_custom_profile, true);
664
665
10.0k
    _operator_profile->set_metadata(_parent->node_id());
666
10.0k
    _wait_for_finish_dependency_timer =
667
10.0k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
668
10.0k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
669
10.0k
    if constexpr (!is_fake_shared) {
670
10.0k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
671
10.0k
            info.shared_state_map.end()) {
672
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
674
            }
675
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
676
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
677
0
                                                  ? 0
678
0
                                                  : info.task_idx]
679
0
                                  .get();
680
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
681
10.0k
        } else {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(false);
684
            }
685
10.0k
            _shared_state = info.shared_state->template cast<SharedState>();
686
10.0k
            _dependency = _shared_state->create_sink_dependency(
687
10.0k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
688
10.0k
        }
689
10.0k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
690
10.0k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
691
10.0k
    }
692
693
10.0k
    if (must_set_shared_state() && _shared_state == nullptr) {
694
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
695
0
    }
696
697
10.0k
    _rows_input_counter =
698
10.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
699
10.0k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
700
10.0k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
701
10.0k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
702
10.0k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
703
10.0k
    _memory_used_counter =
704
10.0k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
705
10.0k
    _common_profile->add_info_string("IsColocate",
706
10.0k
                                     std::to_string(_parent->is_colocated_operator()));
707
10.0k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
708
10.0k
    _common_profile->add_info_string("FollowedByShuffledOperator",
709
10.0k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
710
10.0k
    return Status::OK();
711
10.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
651
7.82k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
652
    // create profile
653
7.82k
    _operator_profile =
654
7.82k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
655
7.82k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
656
7.82k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
657
658
    // indentation is true
659
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
660
    // So we should set the indentation to true.
661
7.82k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
662
7.82k
    _operator_profile->add_child(_common_profile, true);
663
7.82k
    _operator_profile->add_child(_custom_profile, true);
664
665
7.82k
    _operator_profile->set_metadata(_parent->node_id());
666
7.82k
    _wait_for_finish_dependency_timer =
667
7.82k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
668
7.82k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
669
7.82k
    if constexpr (!is_fake_shared) {
670
7.82k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
671
7.82k
            info.shared_state_map.end()) {
672
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
674
            }
675
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
676
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
677
0
                                                  ? 0
678
0
                                                  : info.task_idx]
679
0
                                  .get();
680
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
681
7.82k
        } else {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(false);
684
            }
685
7.82k
            _shared_state = info.shared_state->template cast<SharedState>();
686
7.82k
            _dependency = _shared_state->create_sink_dependency(
687
7.82k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
688
7.82k
        }
689
7.82k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
690
7.82k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
691
7.82k
    }
692
693
7.82k
    if (must_set_shared_state() && _shared_state == nullptr) {
694
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
695
0
    }
696
697
7.82k
    _rows_input_counter =
698
7.82k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
699
7.82k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
700
7.82k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
701
7.82k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
702
7.82k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
703
7.82k
    _memory_used_counter =
704
7.82k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
705
7.82k
    _common_profile->add_info_string("IsColocate",
706
7.82k
                                     std::to_string(_parent->is_colocated_operator()));
707
7.82k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
708
7.82k
    _common_profile->add_info_string("FollowedByShuffledOperator",
709
7.82k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
710
7.82k
    return Status::OK();
711
7.82k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
651
167k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
652
    // create profile
653
167k
    _operator_profile =
654
167k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
655
167k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
656
167k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
657
658
    // indentation is true
659
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
660
    // So we should set the indentation to true.
661
167k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
662
167k
    _operator_profile->add_child(_common_profile, true);
663
167k
    _operator_profile->add_child(_custom_profile, true);
664
665
167k
    _operator_profile->set_metadata(_parent->node_id());
666
167k
    _wait_for_finish_dependency_timer =
667
167k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
668
167k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
669
167k
    if constexpr (!is_fake_shared) {
670
167k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
671
167k
            info.shared_state_map.end()) {
672
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
674
            }
675
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
676
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
677
0
                                                  ? 0
678
0
                                                  : info.task_idx]
679
0
                                  .get();
680
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
681
167k
        } else {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(false);
684
            }
685
167k
            _shared_state = info.shared_state->template cast<SharedState>();
686
167k
            _dependency = _shared_state->create_sink_dependency(
687
167k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
688
167k
        }
689
167k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
690
167k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
691
167k
    }
692
693
167k
    if (must_set_shared_state() && _shared_state == nullptr) {
694
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
695
0
    }
696
697
167k
    _rows_input_counter =
698
167k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
699
167k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
700
167k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
701
167k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
702
167k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
703
167k
    _memory_used_counter =
704
167k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
705
167k
    _common_profile->add_info_string("IsColocate",
706
167k
                                     std::to_string(_parent->is_colocated_operator()));
707
167k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
708
167k
    _common_profile->add_info_string("FollowedByShuffledOperator",
709
167k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
710
167k
    return Status::OK();
711
167k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
651
321
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
652
    // create profile
653
321
    _operator_profile =
654
321
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
655
321
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
656
321
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
657
658
    // indentation is true
659
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
660
    // So we should set the indentation to true.
661
321
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
662
321
    _operator_profile->add_child(_common_profile, true);
663
321
    _operator_profile->add_child(_custom_profile, true);
664
665
321
    _operator_profile->set_metadata(_parent->node_id());
666
321
    _wait_for_finish_dependency_timer =
667
321
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
668
321
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
669
321
    if constexpr (!is_fake_shared) {
670
321
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
671
321
            info.shared_state_map.end()) {
672
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
674
            }
675
318
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
676
318
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
677
318
                                                  ? 0
678
318
                                                  : info.task_idx]
679
318
                                  .get();
680
318
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
681
318
        } else {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(false);
684
            }
685
3
            _shared_state = info.shared_state->template cast<SharedState>();
686
3
            _dependency = _shared_state->create_sink_dependency(
687
3
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
688
3
        }
689
321
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
690
321
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
691
321
    }
692
693
321
    if (must_set_shared_state() && _shared_state == nullptr) {
694
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
695
0
    }
696
697
321
    _rows_input_counter =
698
321
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
699
321
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
700
321
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
701
321
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
702
321
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
703
321
    _memory_used_counter =
704
321
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
705
321
    _common_profile->add_info_string("IsColocate",
706
321
                                     std::to_string(_parent->is_colocated_operator()));
707
321
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
708
321
    _common_profile->add_info_string("FollowedByShuffledOperator",
709
321
                                     std::to_string(_parent->followed_by_shuffled_operator()));
710
321
    return Status::OK();
711
321
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
651
110
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
652
    // create profile
653
110
    _operator_profile =
654
110
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
655
110
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
656
110
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
657
658
    // indentation is true
659
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
660
    // So we should set the indentation to true.
661
110
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
662
110
    _operator_profile->add_child(_common_profile, true);
663
110
    _operator_profile->add_child(_custom_profile, true);
664
665
110
    _operator_profile->set_metadata(_parent->node_id());
666
110
    _wait_for_finish_dependency_timer =
667
110
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
668
110
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
669
110
    if constexpr (!is_fake_shared) {
670
110
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
671
110
            info.shared_state_map.end()) {
672
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
674
            }
675
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
676
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
677
0
                                                  ? 0
678
0
                                                  : info.task_idx]
679
0
                                  .get();
680
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
681
110
        } else {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(false);
684
            }
685
110
            _shared_state = info.shared_state->template cast<SharedState>();
686
110
            _dependency = _shared_state->create_sink_dependency(
687
110
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
688
110
        }
689
110
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
690
110
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
691
110
    }
692
693
110
    if (must_set_shared_state() && _shared_state == nullptr) {
694
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
695
0
    }
696
697
110
    _rows_input_counter =
698
110
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
699
110
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
700
110
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
701
110
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
702
110
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
703
110
    _memory_used_counter =
704
110
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
705
110
    _common_profile->add_info_string("IsColocate",
706
110
                                     std::to_string(_parent->is_colocated_operator()));
707
110
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
708
110
    _common_profile->add_info_string("FollowedByShuffledOperator",
709
110
                                     std::to_string(_parent->followed_by_shuffled_operator()));
710
110
    return Status::OK();
711
110
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
651
766k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
652
    // create profile
653
766k
    _operator_profile =
654
766k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
655
766k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
656
766k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
657
658
    // indentation is true
659
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
660
    // So we should set the indentation to true.
661
766k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
662
766k
    _operator_profile->add_child(_common_profile, true);
663
766k
    _operator_profile->add_child(_custom_profile, true);
664
665
766k
    _operator_profile->set_metadata(_parent->node_id());
666
766k
    _wait_for_finish_dependency_timer =
667
766k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
668
766k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
669
    if constexpr (!is_fake_shared) {
670
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
671
            info.shared_state_map.end()) {
672
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
674
            }
675
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
676
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
677
                                                  ? 0
678
                                                  : info.task_idx]
679
                                  .get();
680
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
681
        } else {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(false);
684
            }
685
            _shared_state = info.shared_state->template cast<SharedState>();
686
            _dependency = _shared_state->create_sink_dependency(
687
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
688
        }
689
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
690
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
691
    }
692
693
766k
    if (must_set_shared_state() && _shared_state == nullptr) {
694
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
695
0
    }
696
697
766k
    _rows_input_counter =
698
766k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
699
766k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
700
766k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
701
766k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
702
766k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
703
766k
    _memory_used_counter =
704
766k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
705
766k
    _common_profile->add_info_string("IsColocate",
706
766k
                                     std::to_string(_parent->is_colocated_operator()));
707
766k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
708
766k
    _common_profile->add_info_string("FollowedByShuffledOperator",
709
766k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
710
766k
    return Status::OK();
711
766k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
651
5.62k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
652
    // create profile
653
5.62k
    _operator_profile =
654
5.62k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
655
5.62k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
656
5.62k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
657
658
    // indentation is true
659
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
660
    // So we should set the indentation to true.
661
5.62k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
662
5.62k
    _operator_profile->add_child(_common_profile, true);
663
5.62k
    _operator_profile->add_child(_custom_profile, true);
664
665
5.62k
    _operator_profile->set_metadata(_parent->node_id());
666
5.62k
    _wait_for_finish_dependency_timer =
667
5.62k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
668
5.62k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
669
5.62k
    if constexpr (!is_fake_shared) {
670
5.62k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
671
5.62k
            info.shared_state_map.end()) {
672
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
674
            }
675
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
676
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
677
0
                                                  ? 0
678
0
                                                  : info.task_idx]
679
0
                                  .get();
680
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
681
5.62k
        } else {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(false);
684
            }
685
5.62k
            _shared_state = info.shared_state->template cast<SharedState>();
686
5.62k
            _dependency = _shared_state->create_sink_dependency(
687
5.62k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
688
5.62k
        }
689
5.62k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
690
5.62k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
691
5.62k
    }
692
693
5.62k
    if (must_set_shared_state() && _shared_state == nullptr) {
694
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
695
0
    }
696
697
5.62k
    _rows_input_counter =
698
5.62k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
699
5.62k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
700
5.62k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
701
5.62k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
702
5.62k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
703
5.62k
    _memory_used_counter =
704
5.62k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
705
5.62k
    _common_profile->add_info_string("IsColocate",
706
5.62k
                                     std::to_string(_parent->is_colocated_operator()));
707
5.62k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
708
5.62k
    _common_profile->add_info_string("FollowedByShuffledOperator",
709
5.62k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
710
5.62k
    return Status::OK();
711
5.62k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
651
402
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
652
    // create profile
653
402
    _operator_profile =
654
402
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
655
402
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
656
402
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
657
658
    // indentation is true
659
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
660
    // So we should set the indentation to true.
661
402
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
662
402
    _operator_profile->add_child(_common_profile, true);
663
402
    _operator_profile->add_child(_custom_profile, true);
664
665
402
    _operator_profile->set_metadata(_parent->node_id());
666
402
    _wait_for_finish_dependency_timer =
667
402
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
668
402
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
669
402
    if constexpr (!is_fake_shared) {
670
402
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
671
402
            info.shared_state_map.end()) {
672
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
674
            }
675
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
676
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
677
0
                                                  ? 0
678
0
                                                  : info.task_idx]
679
0
                                  .get();
680
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
681
402
        } else {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(false);
684
            }
685
402
            _shared_state = info.shared_state->template cast<SharedState>();
686
402
            _dependency = _shared_state->create_sink_dependency(
687
402
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
688
402
        }
689
402
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
690
402
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
691
402
    }
692
693
402
    if (must_set_shared_state() && _shared_state == nullptr) {
694
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
695
0
    }
696
697
402
    _rows_input_counter =
698
402
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
699
402
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
700
402
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
701
402
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
702
402
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
703
402
    _memory_used_counter =
704
402
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
705
402
    _common_profile->add_info_string("IsColocate",
706
402
                                     std::to_string(_parent->is_colocated_operator()));
707
402
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
708
402
    _common_profile->add_info_string("FollowedByShuffledOperator",
709
402
                                     std::to_string(_parent->followed_by_shuffled_operator()));
710
402
    return Status::OK();
711
402
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
651
4.15k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
652
    // create profile
653
4.15k
    _operator_profile =
654
4.15k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
655
4.15k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
656
4.15k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
657
658
    // indentation is true
659
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
660
    // So we should set the indentation to true.
661
4.15k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
662
4.15k
    _operator_profile->add_child(_common_profile, true);
663
4.15k
    _operator_profile->add_child(_custom_profile, true);
664
665
4.15k
    _operator_profile->set_metadata(_parent->node_id());
666
4.15k
    _wait_for_finish_dependency_timer =
667
4.15k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
668
4.15k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
669
4.15k
    if constexpr (!is_fake_shared) {
670
4.15k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
671
4.15k
            info.shared_state_map.end()) {
672
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
674
            }
675
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
676
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
677
0
                                                  ? 0
678
0
                                                  : info.task_idx]
679
0
                                  .get();
680
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
681
4.15k
        } else {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(false);
684
            }
685
4.15k
            _shared_state = info.shared_state->template cast<SharedState>();
686
4.15k
            _dependency = _shared_state->create_sink_dependency(
687
4.15k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
688
4.15k
        }
689
4.15k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
690
4.15k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
691
4.15k
    }
692
693
4.15k
    if (must_set_shared_state() && _shared_state == nullptr) {
694
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
695
0
    }
696
697
4.15k
    _rows_input_counter =
698
4.15k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
699
4.15k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
700
4.15k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
701
4.15k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
702
4.15k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
703
4.15k
    _memory_used_counter =
704
4.15k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
705
4.15k
    _common_profile->add_info_string("IsColocate",
706
4.15k
                                     std::to_string(_parent->is_colocated_operator()));
707
4.15k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
708
4.15k
    _common_profile->add_info_string("FollowedByShuffledOperator",
709
4.15k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
710
4.15k
    return Status::OK();
711
4.15k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
651
12.2k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
652
    // create profile
653
12.2k
    _operator_profile =
654
12.2k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
655
12.2k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
656
12.2k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
657
658
    // indentation is true
659
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
660
    // So we should set the indentation to true.
661
12.2k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
662
12.2k
    _operator_profile->add_child(_common_profile, true);
663
12.2k
    _operator_profile->add_child(_custom_profile, true);
664
665
12.2k
    _operator_profile->set_metadata(_parent->node_id());
666
12.2k
    _wait_for_finish_dependency_timer =
667
12.2k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
668
12.2k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
669
12.2k
    if constexpr (!is_fake_shared) {
670
12.2k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
671
12.2k
            info.shared_state_map.end()) {
672
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
674
            }
675
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
676
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
677
0
                                                  ? 0
678
0
                                                  : info.task_idx]
679
0
                                  .get();
680
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
681
12.2k
        } else {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(false);
684
            }
685
12.2k
            _shared_state = info.shared_state->template cast<SharedState>();
686
12.2k
            _dependency = _shared_state->create_sink_dependency(
687
12.2k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
688
12.2k
        }
689
12.2k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
690
12.2k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
691
12.2k
    }
692
693
12.2k
    if (must_set_shared_state() && _shared_state == nullptr) {
694
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
695
0
    }
696
697
12.2k
    _rows_input_counter =
698
12.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
699
12.2k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
700
12.2k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
701
12.2k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
702
12.2k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
703
12.2k
    _memory_used_counter =
704
12.2k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
705
12.2k
    _common_profile->add_info_string("IsColocate",
706
12.2k
                                     std::to_string(_parent->is_colocated_operator()));
707
12.2k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
708
12.2k
    _common_profile->add_info_string("FollowedByShuffledOperator",
709
12.2k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
710
12.2k
    return Status::OK();
711
12.2k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
651
311k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
652
    // create profile
653
311k
    _operator_profile =
654
311k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
655
311k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
656
311k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
657
658
    // indentation is true
659
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
660
    // So we should set the indentation to true.
661
311k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
662
311k
    _operator_profile->add_child(_common_profile, true);
663
311k
    _operator_profile->add_child(_custom_profile, true);
664
665
311k
    _operator_profile->set_metadata(_parent->node_id());
666
311k
    _wait_for_finish_dependency_timer =
667
311k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
668
311k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
669
311k
    if constexpr (!is_fake_shared) {
670
311k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
671
311k
            info.shared_state_map.end()) {
672
311k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
311k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
674
311k
            }
675
311k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
676
311k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
677
311k
                                                  ? 0
678
311k
                                                  : info.task_idx]
679
311k
                                  .get();
680
311k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
681
18.4E
        } else {
682
18.4E
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
18.4E
                DCHECK(false);
684
18.4E
            }
685
18.4E
            _shared_state = info.shared_state->template cast<SharedState>();
686
18.4E
            _dependency = _shared_state->create_sink_dependency(
687
18.4E
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
688
18.4E
        }
689
311k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
690
311k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
691
311k
    }
692
693
311k
    if (must_set_shared_state() && _shared_state == nullptr) {
694
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
695
0
    }
696
697
311k
    _rows_input_counter =
698
311k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
699
311k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
700
311k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
701
311k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
702
311k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
703
311k
    _memory_used_counter =
704
311k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
705
311k
    _common_profile->add_info_string("IsColocate",
706
311k
                                     std::to_string(_parent->is_colocated_operator()));
707
311k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
708
311k
    _common_profile->add_info_string("FollowedByShuffledOperator",
709
311k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
710
311k
    return Status::OK();
711
311k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
651
562k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
652
    // create profile
653
562k
    _operator_profile =
654
562k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
655
562k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
656
562k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
657
658
    // indentation is true
659
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
660
    // So we should set the indentation to true.
661
562k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
662
562k
    _operator_profile->add_child(_common_profile, true);
663
562k
    _operator_profile->add_child(_custom_profile, true);
664
665
562k
    _operator_profile->set_metadata(_parent->node_id());
666
562k
    _wait_for_finish_dependency_timer =
667
562k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
668
562k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
669
562k
    if constexpr (!is_fake_shared) {
670
562k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
671
562k
            info.shared_state_map.end()) {
672
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
674
            }
675
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
676
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
677
0
                                                  ? 0
678
0
                                                  : info.task_idx]
679
0
                                  .get();
680
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
681
562k
        } else {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(false);
684
            }
685
562k
            _shared_state = info.shared_state->template cast<SharedState>();
686
562k
            _dependency = _shared_state->create_sink_dependency(
687
562k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
688
562k
        }
689
562k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
690
562k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
691
562k
    }
692
693
562k
    if (must_set_shared_state() && _shared_state == nullptr) {
694
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
695
0
    }
696
697
562k
    _rows_input_counter =
698
562k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
699
562k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
700
562k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
701
562k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
702
562k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
703
562k
    _memory_used_counter =
704
562k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
705
562k
    _common_profile->add_info_string("IsColocate",
706
562k
                                     std::to_string(_parent->is_colocated_operator()));
707
562k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
708
562k
    _common_profile->add_info_string("FollowedByShuffledOperator",
709
562k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
710
562k
    return Status::OK();
711
562k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
651
25
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
652
    // create profile
653
25
    _operator_profile =
654
25
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
655
25
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
656
25
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
657
658
    // indentation is true
659
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
660
    // So we should set the indentation to true.
661
25
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
662
25
    _operator_profile->add_child(_common_profile, true);
663
25
    _operator_profile->add_child(_custom_profile, true);
664
665
25
    _operator_profile->set_metadata(_parent->node_id());
666
25
    _wait_for_finish_dependency_timer =
667
25
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
668
25
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
669
25
    if constexpr (!is_fake_shared) {
670
25
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
671
25
            info.shared_state_map.end()) {
672
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
674
            }
675
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
676
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
677
0
                                                  ? 0
678
0
                                                  : info.task_idx]
679
0
                                  .get();
680
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
681
25
        } else {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(false);
684
            }
685
25
            _shared_state = info.shared_state->template cast<SharedState>();
686
25
            _dependency = _shared_state->create_sink_dependency(
687
25
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
688
25
        }
689
25
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
690
25
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
691
25
    }
692
693
25
    if (must_set_shared_state() && _shared_state == nullptr) {
694
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
695
0
    }
696
697
25
    _rows_input_counter =
698
25
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
699
25
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
700
25
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
701
25
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
702
25
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
703
25
    _memory_used_counter =
704
25
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
705
25
    _common_profile->add_info_string("IsColocate",
706
25
                                     std::to_string(_parent->is_colocated_operator()));
707
25
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
708
25
    _common_profile->add_info_string("FollowedByShuffledOperator",
709
25
                                     std::to_string(_parent->followed_by_shuffled_operator()));
710
25
    return Status::OK();
711
25
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
651
328
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
652
    // create profile
653
328
    _operator_profile =
654
328
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
655
328
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
656
328
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
657
658
    // indentation is true
659
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
660
    // So we should set the indentation to true.
661
328
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
662
328
    _operator_profile->add_child(_common_profile, true);
663
328
    _operator_profile->add_child(_custom_profile, true);
664
665
328
    _operator_profile->set_metadata(_parent->node_id());
666
328
    _wait_for_finish_dependency_timer =
667
328
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
668
328
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
669
328
    if constexpr (!is_fake_shared) {
670
328
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
671
328
            info.shared_state_map.end()) {
672
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
674
            }
675
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
676
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
677
0
                                                  ? 0
678
0
                                                  : info.task_idx]
679
0
                                  .get();
680
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
681
328
        } else {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(false);
684
            }
685
328
            _shared_state = info.shared_state->template cast<SharedState>();
686
328
            _dependency = _shared_state->create_sink_dependency(
687
328
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
688
328
        }
689
328
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
690
328
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
691
328
    }
692
693
328
    if (must_set_shared_state() && _shared_state == nullptr) {
694
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
695
0
    }
696
697
328
    _rows_input_counter =
698
328
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
699
328
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
700
328
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
701
328
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
702
328
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
703
328
    _memory_used_counter =
704
328
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
705
328
    _common_profile->add_info_string("IsColocate",
706
328
                                     std::to_string(_parent->is_colocated_operator()));
707
328
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
708
328
    _common_profile->add_info_string("FollowedByShuffledOperator",
709
328
                                     std::to_string(_parent->followed_by_shuffled_operator()));
710
328
    return Status::OK();
711
328
}
712
713
template <typename SharedState>
714
2.26M
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
715
2.26M
    if (_closed) {
716
2
        return Status::OK();
717
2
    }
718
2.26M
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
719
1.49M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
720
1.49M
    }
721
2.26M
    _closed = true;
722
2.26M
    return Status::OK();
723
2.26M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
714
120k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
715
120k
    if (_closed) {
716
0
        return Status::OK();
717
0
    }
718
120k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
719
120k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
720
120k
    }
721
120k
    _closed = true;
722
120k
    return Status::OK();
723
120k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
714
1
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
715
1
    if (_closed) {
716
0
        return Status::OK();
717
0
    }
718
1
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
719
1
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
720
1
    }
721
1
    _closed = true;
722
1
    return Status::OK();
723
1
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
714
283k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
715
283k
    if (_closed) {
716
0
        return Status::OK();
717
0
    }
718
283k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
719
283k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
720
283k
    }
721
283k
    _closed = true;
722
283k
    return Status::OK();
723
283k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
714
23
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
715
23
    if (_closed) {
716
2
        return Status::OK();
717
2
    }
718
21
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
719
21
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
720
21
    }
721
21
    _closed = true;
722
21
    return Status::OK();
723
23
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
714
10.0k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
715
10.0k
    if (_closed) {
716
0
        return Status::OK();
717
0
    }
718
10.0k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
719
10.0k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
720
10.0k
    }
721
10.0k
    _closed = true;
722
10.0k
    return Status::OK();
723
10.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
714
7.82k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
715
7.82k
    if (_closed) {
716
0
        return Status::OK();
717
0
    }
718
7.82k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
719
7.82k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
720
7.82k
    }
721
7.82k
    _closed = true;
722
7.82k
    return Status::OK();
723
7.82k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
714
167k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
715
167k
    if (_closed) {
716
0
        return Status::OK();
717
0
    }
718
167k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
719
167k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
720
167k
    }
721
167k
    _closed = true;
722
167k
    return Status::OK();
723
167k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
714
322
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
715
322
    if (_closed) {
716
0
        return Status::OK();
717
0
    }
718
322
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
719
322
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
720
322
    }
721
322
    _closed = true;
722
322
    return Status::OK();
723
322
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
714
99
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
715
99
    if (_closed) {
716
0
        return Status::OK();
717
0
    }
718
99
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
719
99
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
720
99
    }
721
99
    _closed = true;
722
99
    return Status::OK();
723
99
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
714
773k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
715
773k
    if (_closed) {
716
0
        return Status::OK();
717
0
    }
718
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
719
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
720
    }
721
773k
    _closed = true;
722
773k
    return Status::OK();
723
773k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
714
5.62k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
715
5.62k
    if (_closed) {
716
0
        return Status::OK();
717
0
    }
718
5.62k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
719
5.62k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
720
5.62k
    }
721
5.62k
    _closed = true;
722
5.62k
    return Status::OK();
723
5.62k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
714
298
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
715
298
    if (_closed) {
716
0
        return Status::OK();
717
0
    }
718
298
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
719
298
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
720
298
    }
721
298
    _closed = true;
722
298
    return Status::OK();
723
298
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
714
4.21k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
715
4.21k
    if (_closed) {
716
0
        return Status::OK();
717
0
    }
718
4.21k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
719
4.21k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
720
4.21k
    }
721
4.21k
    _closed = true;
722
4.21k
    return Status::OK();
723
4.21k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
714
12.2k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
715
12.2k
    if (_closed) {
716
0
        return Status::OK();
717
0
    }
718
12.2k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
719
12.2k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
720
12.2k
    }
721
12.2k
    _closed = true;
722
12.2k
    return Status::OK();
723
12.2k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
714
312k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
715
312k
    if (_closed) {
716
0
        return Status::OK();
717
0
    }
718
312k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
719
312k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
720
312k
    }
721
312k
    _closed = true;
722
312k
    return Status::OK();
723
312k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
714
568k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
715
568k
    if (_closed) {
716
0
        return Status::OK();
717
0
    }
718
568k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
719
568k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
720
568k
    }
721
568k
    _closed = true;
722
568k
    return Status::OK();
723
568k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
714
14
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
715
14
    if (_closed) {
716
0
        return Status::OK();
717
0
    }
718
14
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
719
14
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
720
14
    }
721
14
    _closed = true;
722
14
    return Status::OK();
723
14
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
714
328
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
715
328
    if (_closed) {
716
0
        return Status::OK();
717
0
    }
718
328
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
719
328
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
720
328
    }
721
328
    _closed = true;
722
328
    return Status::OK();
723
328
}
724
725
template <typename LocalStateType>
726
Status StreamingOperatorX<LocalStateType>::get_block_impl(RuntimeState* state, Block* block,
727
14.1k
                                                          bool* eos) {
728
14.1k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
729
14.1k
    return pull(state, block, eos);
730
14.1k
}
_ZN5doris18StreamingOperatorXINS_23AssertNumRowsLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
727
431
                                                          bool* eos) {
728
431
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
729
431
    return pull(state, block, eos);
730
431
}
_ZN5doris18StreamingOperatorXINS_16SelectLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
727
13.6k
                                                          bool* eos) {
728
13.6k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
729
13.6k
    return pull(state, block, eos);
730
13.6k
}
731
732
template <typename LocalStateType>
733
Status StatefulOperatorX<LocalStateType>::get_block_impl(RuntimeState* state, Block* block,
734
802k
                                                         bool* eos) {
735
802k
    auto& local_state = get_local_state(state);
736
802k
    if (need_more_input_data(state)) {
737
773k
        local_state._child_block->clear_column_data(
738
773k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
739
773k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
740
773k
                state, local_state._child_block.get(), &local_state._child_eos));
741
773k
        *eos = local_state._child_eos;
742
773k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
743
65.7k
            return Status::OK();
744
65.7k
        }
745
707k
        {
746
707k
            SCOPED_TIMER(local_state.exec_time_counter());
747
707k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
748
707k
        }
749
707k
    }
750
751
736k
    if (!need_more_input_data(state)) {
752
681k
        SCOPED_TIMER(local_state.exec_time_counter());
753
681k
        bool new_eos = false;
754
681k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
755
681k
        if (new_eos) {
756
601k
            *eos = true;
757
601k
        } else if (!need_more_input_data(state)) {
758
25.1k
            *eos = false;
759
25.1k
        }
760
681k
    }
761
736k
    return Status::OK();
762
736k
}
_ZN5doris17StatefulOperatorXINS_23HashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
734
143k
                                                         bool* eos) {
735
143k
    auto& local_state = get_local_state(state);
736
143k
    if (need_more_input_data(state)) {
737
127k
        local_state._child_block->clear_column_data(
738
127k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
739
127k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
740
127k
                state, local_state._child_block.get(), &local_state._child_eos));
741
127k
        *eos = local_state._child_eos;
742
127k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
743
40.0k
            return Status::OK();
744
40.0k
        }
745
87.1k
        {
746
87.1k
            SCOPED_TIMER(local_state.exec_time_counter());
747
87.1k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
748
87.1k
        }
749
87.1k
    }
750
751
103k
    if (!need_more_input_data(state)) {
752
103k
        SCOPED_TIMER(local_state.exec_time_counter());
753
103k
        bool new_eos = false;
754
103k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
755
103k
        if (new_eos) {
756
48.2k
            *eos = true;
757
55.3k
        } else if (!need_more_input_data(state)) {
758
10.5k
            *eos = false;
759
10.5k
        }
760
103k
    }
761
103k
    return Status::OK();
762
103k
}
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_34PartitionedHashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
_ZN5doris17StatefulOperatorXINS_16RepeatLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
734
3.43k
                                                         bool* eos) {
735
3.43k
    auto& local_state = get_local_state(state);
736
3.43k
    if (need_more_input_data(state)) {
737
1.72k
        local_state._child_block->clear_column_data(
738
1.72k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
739
1.72k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
740
1.72k
                state, local_state._child_block.get(), &local_state._child_eos));
741
1.72k
        *eos = local_state._child_eos;
742
1.72k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
743
196
            return Status::OK();
744
196
        }
745
1.53k
        {
746
1.53k
            SCOPED_TIMER(local_state.exec_time_counter());
747
1.53k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
748
1.53k
        }
749
1.53k
    }
750
751
3.24k
    if (!need_more_input_data(state)) {
752
3.24k
        SCOPED_TIMER(local_state.exec_time_counter());
753
3.24k
        bool new_eos = false;
754
3.24k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
755
3.24k
        if (new_eos) {
756
963
            *eos = true;
757
2.28k
        } else if (!need_more_input_data(state)) {
758
1.70k
            *eos = false;
759
1.70k
        }
760
3.24k
    }
761
3.23k
    return Status::OK();
762
3.23k
}
_ZN5doris17StatefulOperatorXINS_25MaterializationLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
734
4.92k
                                                         bool* eos) {
735
4.92k
    auto& local_state = get_local_state(state);
736
4.92k
    if (need_more_input_data(state)) {
737
4.92k
        local_state._child_block->clear_column_data(
738
4.92k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
739
4.92k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
740
4.92k
                state, local_state._child_block.get(), &local_state._child_eos));
741
4.92k
        *eos = local_state._child_eos;
742
4.92k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
743
1.71k
            return Status::OK();
744
1.71k
        }
745
3.21k
        {
746
3.21k
            SCOPED_TIMER(local_state.exec_time_counter());
747
3.21k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
748
3.21k
        }
749
3.21k
    }
750
751
3.21k
    if (!need_more_input_data(state)) {
752
3.21k
        SCOPED_TIMER(local_state.exec_time_counter());
753
3.21k
        bool new_eos = false;
754
3.21k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
755
3.21k
        if (new_eos) {
756
1.73k
            *eos = true;
757
1.73k
        } else if (!need_more_input_data(state)) {
758
0
            *eos = false;
759
0
        }
760
3.21k
    }
761
3.21k
    return Status::OK();
762
3.21k
}
_ZN5doris17StatefulOperatorXINS_22StreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
734
37.0k
                                                         bool* eos) {
735
37.0k
    auto& local_state = get_local_state(state);
736
37.0k
    if (need_more_input_data(state)) {
737
37.0k
        local_state._child_block->clear_column_data(
738
37.0k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
739
37.0k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
740
37.0k
                state, local_state._child_block.get(), &local_state._child_eos));
741
37.0k
        *eos = local_state._child_eos;
742
37.0k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
743
3.58k
            return Status::OK();
744
3.58k
        }
745
33.5k
        {
746
33.5k
            SCOPED_TIMER(local_state.exec_time_counter());
747
33.5k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
748
33.5k
        }
749
33.5k
    }
750
751
33.5k
    if (!need_more_input_data(state)) {
752
11.3k
        SCOPED_TIMER(local_state.exec_time_counter());
753
11.3k
        bool new_eos = false;
754
11.3k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
755
11.3k
        if (new_eos) {
756
11.3k
            *eos = true;
757
11.3k
        } else if (!need_more_input_data(state)) {
758
1
            *eos = false;
759
1
        }
760
11.3k
    }
761
33.5k
    return Status::OK();
762
33.5k
}
_ZN5doris17StatefulOperatorXINS_30DistinctStreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
734
575k
                                                         bool* eos) {
735
575k
    auto& local_state = get_local_state(state);
736
577k
    if (need_more_input_data(state)) {
737
577k
        local_state._child_block->clear_column_data(
738
577k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
739
577k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
740
577k
                state, local_state._child_block.get(), &local_state._child_eos));
741
577k
        *eos = local_state._child_eos;
742
577k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
743
16.9k
            return Status::OK();
744
16.9k
        }
745
560k
        {
746
560k
            SCOPED_TIMER(local_state.exec_time_counter());
747
560k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
748
560k
        }
749
560k
    }
750
751
558k
    if (!need_more_input_data(state)) {
752
526k
        SCOPED_TIMER(local_state.exec_time_counter());
753
526k
        bool new_eos = false;
754
526k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
755
526k
        if (new_eos) {
756
524k
            *eos = true;
757
524k
        } else if (!need_more_input_data(state)) {
758
0
            *eos = false;
759
0
        }
760
526k
    }
761
558k
    return Status::OK();
762
558k
}
_ZN5doris17StatefulOperatorXINS_29NestedLoopJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
734
30.5k
                                                         bool* eos) {
735
30.5k
    auto& local_state = get_local_state(state);
736
30.5k
    if (need_more_input_data(state)) {
737
18.0k
        local_state._child_block->clear_column_data(
738
18.0k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
739
18.0k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
740
18.0k
                state, local_state._child_block.get(), &local_state._child_eos));
741
18.0k
        *eos = local_state._child_eos;
742
18.0k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
743
2.69k
            return Status::OK();
744
2.69k
        }
745
15.3k
        {
746
15.3k
            SCOPED_TIMER(local_state.exec_time_counter());
747
15.3k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
748
15.3k
        }
749
15.3k
    }
750
751
27.8k
    if (!need_more_input_data(state)) {
752
27.3k
        SCOPED_TIMER(local_state.exec_time_counter());
753
27.3k
        bool new_eos = false;
754
27.3k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
755
27.3k
        if (new_eos) {
756
9.99k
            *eos = true;
757
17.3k
        } else if (!need_more_input_data(state)) {
758
12.5k
            *eos = false;
759
12.5k
        }
760
27.3k
    }
761
27.8k
    return Status::OK();
762
27.8k
}
_ZN5doris17StatefulOperatorXINS_23TableFunctionLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
734
7.09k
                                                         bool* eos) {
735
7.09k
    auto& local_state = get_local_state(state);
736
7.09k
    if (need_more_input_data(state)) {
737
6.73k
        local_state._child_block->clear_column_data(
738
6.73k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
739
6.73k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
740
6.73k
                state, local_state._child_block.get(), &local_state._child_eos));
741
6.73k
        *eos = local_state._child_eos;
742
6.73k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
743
625
            return Status::OK();
744
625
        }
745
6.10k
        {
746
6.10k
            SCOPED_TIMER(local_state.exec_time_counter());
747
6.10k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
748
6.10k
        }
749
6.10k
    }
750
751
6.46k
    if (!need_more_input_data(state)) {
752
6.46k
        SCOPED_TIMER(local_state.exec_time_counter());
753
6.46k
        bool new_eos = false;
754
6.46k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
755
6.46k
        if (new_eos) {
756
4.36k
            *eos = true;
757
4.36k
        } else if (!need_more_input_data(state)) {
758
366
            *eos = false;
759
366
        }
760
6.46k
    }
761
6.46k
    return Status::OK();
762
6.46k
}
763
764
template <typename Writer, typename Parent>
765
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
766
71.0k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
767
71.0k
    RETURN_IF_ERROR(Base::init(state, info));
768
71.0k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
769
71.0k
                                                         "AsyncWriterDependency", true);
770
71.0k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
771
71.0k
                             _finish_dependency));
772
773
71.0k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
774
71.0k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
775
71.0k
    return Status::OK();
776
71.0k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
766
523
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
767
523
    RETURN_IF_ERROR(Base::init(state, info));
768
523
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
769
523
                                                         "AsyncWriterDependency", true);
770
523
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
771
523
                             _finish_dependency));
772
773
523
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
774
523
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
775
523
    return Status::OK();
776
523
}
_ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
766
86
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
767
86
    RETURN_IF_ERROR(Base::init(state, info));
768
86
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
769
86
                                                         "AsyncWriterDependency", true);
770
86
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
771
86
                             _finish_dependency));
772
773
86
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
774
86
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
775
86
    return Status::OK();
776
86
}
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
766
48.8k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
767
48.8k
    RETURN_IF_ERROR(Base::init(state, info));
768
48.8k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
769
48.8k
                                                         "AsyncWriterDependency", true);
770
48.8k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
771
48.8k
                             _finish_dependency));
772
773
48.8k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
774
48.8k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
775
48.8k
    return Status::OK();
776
48.8k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
766
9.66k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
767
9.66k
    RETURN_IF_ERROR(Base::init(state, info));
768
9.66k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
769
9.66k
                                                         "AsyncWriterDependency", true);
770
9.66k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
771
9.66k
                             _finish_dependency));
772
773
9.66k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
774
9.66k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
775
9.66k
    return Status::OK();
776
9.66k
}
_ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
766
5.23k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
767
5.23k
    RETURN_IF_ERROR(Base::init(state, info));
768
5.23k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
769
5.23k
                                                         "AsyncWriterDependency", true);
770
5.23k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
771
5.23k
                             _finish_dependency));
772
773
5.23k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
774
5.23k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
775
5.23k
    return Status::OK();
776
5.23k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
766
4.04k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
767
4.04k
    RETURN_IF_ERROR(Base::init(state, info));
768
4.04k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
769
4.04k
                                                         "AsyncWriterDependency", true);
770
4.04k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
771
4.04k
                             _finish_dependency));
772
773
4.04k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
774
4.04k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
775
4.04k
    return Status::OK();
776
4.04k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
766
48
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
767
48
    RETURN_IF_ERROR(Base::init(state, info));
768
48
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
769
48
                                                         "AsyncWriterDependency", true);
770
48
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
771
48
                             _finish_dependency));
772
773
48
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
774
48
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
775
48
    return Status::OK();
776
48
}
_ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
766
704
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
767
704
    RETURN_IF_ERROR(Base::init(state, info));
768
704
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
769
704
                                                         "AsyncWriterDependency", true);
770
704
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
771
704
                             _finish_dependency));
772
773
704
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
774
704
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
775
704
    return Status::OK();
776
704
}
_ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
766
1.78k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
767
1.78k
    RETURN_IF_ERROR(Base::init(state, info));
768
1.78k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
769
1.78k
                                                         "AsyncWriterDependency", true);
770
1.78k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
771
1.78k
                             _finish_dependency));
772
773
1.78k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
774
1.78k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
775
1.78k
    return Status::OK();
776
1.78k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
766
156
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
767
156
    RETURN_IF_ERROR(Base::init(state, info));
768
156
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
769
156
                                                         "AsyncWriterDependency", true);
770
156
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
771
156
                             _finish_dependency));
772
773
156
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
774
156
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
775
156
    return Status::OK();
776
156
}
777
778
template <typename Writer, typename Parent>
779
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
780
71.5k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
781
71.5k
    RETURN_IF_ERROR(Base::open(state));
782
71.5k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
783
606k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
784
535k
        RETURN_IF_ERROR(
785
535k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
786
535k
    }
787
71.5k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
788
71.5k
    return Status::OK();
789
71.5k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
780
523
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
781
523
    RETURN_IF_ERROR(Base::open(state));
782
523
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
783
2.90k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
784
2.38k
        RETURN_IF_ERROR(
785
2.38k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
786
2.38k
    }
787
523
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
788
523
    return Status::OK();
789
523
}
_ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
780
86
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
781
86
    RETURN_IF_ERROR(Base::open(state));
782
86
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
783
402
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
784
316
        RETURN_IF_ERROR(
785
316
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
786
316
    }
787
86
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
788
86
    return Status::OK();
789
86
}
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
780
49.4k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
781
49.4k
    RETURN_IF_ERROR(Base::open(state));
782
49.4k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
783
353k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
784
303k
        RETURN_IF_ERROR(
785
303k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
786
303k
    }
787
49.4k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
788
49.4k
    return Status::OK();
789
49.4k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
780
9.60k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
781
9.60k
    RETURN_IF_ERROR(Base::open(state));
782
9.60k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
783
58.3k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
784
48.7k
        RETURN_IF_ERROR(
785
48.7k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
786
48.7k
    }
787
9.60k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
788
9.60k
    return Status::OK();
789
9.60k
}
_ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
780
5.23k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
781
5.23k
    RETURN_IF_ERROR(Base::open(state));
782
5.23k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
783
129k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
784
124k
        RETURN_IF_ERROR(
785
124k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
786
124k
    }
787
5.23k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
788
5.23k
    return Status::OK();
789
5.23k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
780
4.04k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
781
4.04k
    RETURN_IF_ERROR(Base::open(state));
782
4.04k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
783
44.1k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
784
40.1k
        RETURN_IF_ERROR(
785
40.1k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
786
40.1k
    }
787
4.04k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
788
4.04k
    return Status::OK();
789
4.04k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
780
48
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
781
48
    RETURN_IF_ERROR(Base::open(state));
782
48
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
783
206
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
784
158
        RETURN_IF_ERROR(
785
158
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
786
158
    }
787
48
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
788
48
    return Status::OK();
789
48
}
_ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
780
704
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
781
704
    RETURN_IF_ERROR(Base::open(state));
782
704
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
783
2.11k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
784
1.40k
        RETURN_IF_ERROR(
785
1.40k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
786
1.40k
    }
787
704
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
788
704
    return Status::OK();
789
704
}
_ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
780
1.77k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
781
1.77k
    RETURN_IF_ERROR(Base::open(state));
782
1.77k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
783
14.9k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
784
13.1k
        RETURN_IF_ERROR(
785
13.1k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
786
13.1k
    }
787
1.77k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
788
1.77k
    return Status::OK();
789
1.77k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
780
156
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
781
156
    RETURN_IF_ERROR(Base::open(state));
782
156
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
783
786
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
784
630
        RETURN_IF_ERROR(
785
630
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
786
630
    }
787
156
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
788
156
    return Status::OK();
789
156
}
790
791
template <typename Writer, typename Parent>
792
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
793
97.3k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
794
97.3k
    return _writer->sink(block, eos);
795
97.3k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
793
2.23k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
794
2.23k
    return _writer->sink(block, eos);
795
2.23k
}
_ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
793
110
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
794
110
    return _writer->sink(block, eos);
795
110
}
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
793
66.1k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
794
66.1k
    return _writer->sink(block, eos);
795
66.1k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
793
11.1k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
794
11.1k
    return _writer->sink(block, eos);
795
11.1k
}
_ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
793
7.66k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
794
7.66k
    return _writer->sink(block, eos);
795
7.66k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
793
6.60k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
794
6.60k
    return _writer->sink(block, eos);
795
6.60k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
793
60
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
794
60
    return _writer->sink(block, eos);
795
60
}
_ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
793
794
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
794
794
    return _writer->sink(block, eos);
795
794
}
_ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
793
2.25k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
794
2.25k
    return _writer->sink(block, eos);
795
2.25k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
793
310
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
794
310
    return _writer->sink(block, eos);
795
310
}
796
797
template <typename Writer, typename Parent>
798
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
799
71.6k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
800
71.6k
    if (_closed) {
801
0
        return Status::OK();
802
0
    }
803
71.6k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
804
71.6k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
805
    // if the init failed, the _writer may be nullptr. so here need check
806
71.7k
    if (_writer) {
807
71.7k
        Status st = _writer->get_writer_status();
808
71.7k
        if (exec_status.ok()) {
809
71.5k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
810
71.5k
                                                       : Status::Cancelled("force close"));
811
71.5k
        } else {
812
185
            _writer->force_close(exec_status);
813
185
        }
814
        // If there is an error in process_block thread, then we should get the writer
815
        // status before call force_close. For example, the thread may failed in commit
816
        // transaction.
817
71.7k
        RETURN_IF_ERROR(st);
818
71.7k
    }
819
71.6k
    return Base::close(state, exec_status);
820
71.6k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
799
511
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
800
511
    if (_closed) {
801
0
        return Status::OK();
802
0
    }
803
511
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
804
511
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
805
    // if the init failed, the _writer may be nullptr. so here need check
806
511
    if (_writer) {
807
511
        Status st = _writer->get_writer_status();
808
511
        if (exec_status.ok()) {
809
511
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
810
511
                                                       : Status::Cancelled("force close"));
811
511
        } else {
812
0
            _writer->force_close(exec_status);
813
0
        }
814
        // If there is an error in process_block thread, then we should get the writer
815
        // status before call force_close. For example, the thread may failed in commit
816
        // transaction.
817
511
        RETURN_IF_ERROR(st);
818
511
    }
819
511
    return Base::close(state, exec_status);
820
511
}
_ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
799
86
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
800
86
    if (_closed) {
801
0
        return Status::OK();
802
0
    }
803
86
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
804
86
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
805
    // if the init failed, the _writer may be nullptr. so here need check
806
86
    if (_writer) {
807
86
        Status st = _writer->get_writer_status();
808
86
        if (exec_status.ok()) {
809
86
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
810
86
                                                       : Status::Cancelled("force close"));
811
86
        } else {
812
0
            _writer->force_close(exec_status);
813
0
        }
814
        // If there is an error in process_block thread, then we should get the writer
815
        // status before call force_close. For example, the thread may failed in commit
816
        // transaction.
817
86
        RETURN_IF_ERROR(st);
818
86
    }
819
78
    return Base::close(state, exec_status);
820
86
}
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
799
49.4k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
800
49.4k
    if (_closed) {
801
0
        return Status::OK();
802
0
    }
803
49.4k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
804
49.4k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
805
    // if the init failed, the _writer may be nullptr. so here need check
806
49.5k
    if (_writer) {
807
49.5k
        Status st = _writer->get_writer_status();
808
49.5k
        if (exec_status.ok()) {
809
49.3k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
810
49.3k
                                                       : Status::Cancelled("force close"));
811
49.3k
        } else {
812
113
            _writer->force_close(exec_status);
813
113
        }
814
        // If there is an error in process_block thread, then we should get the writer
815
        // status before call force_close. For example, the thread may failed in commit
816
        // transaction.
817
49.5k
        RETURN_IF_ERROR(st);
818
49.5k
    }
819
49.4k
    return Base::close(state, exec_status);
820
49.4k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
799
9.64k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
800
9.64k
    if (_closed) {
801
0
        return Status::OK();
802
0
    }
803
9.64k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
804
9.64k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
805
    // if the init failed, the _writer may be nullptr. so here need check
806
9.65k
    if (_writer) {
807
9.65k
        Status st = _writer->get_writer_status();
808
9.65k
        if (exec_status.ok()) {
809
9.58k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
810
9.58k
                                                       : Status::Cancelled("force close"));
811
9.58k
        } else {
812
74
            _writer->force_close(exec_status);
813
74
        }
814
        // If there is an error in process_block thread, then we should get the writer
815
        // status before call force_close. For example, the thread may failed in commit
816
        // transaction.
817
9.65k
        RETURN_IF_ERROR(st);
818
9.65k
    }
819
9.64k
    return Base::close(state, exec_status);
820
9.64k
}
_ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
799
5.22k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
800
5.22k
    if (_closed) {
801
0
        return Status::OK();
802
0
    }
803
5.22k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
804
5.22k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
805
    // if the init failed, the _writer may be nullptr. so here need check
806
5.23k
    if (_writer) {
807
5.23k
        Status st = _writer->get_writer_status();
808
5.23k
        if (exec_status.ok()) {
809
5.23k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
810
5.23k
                                                       : Status::Cancelled("force close"));
811
5.23k
        } else {
812
0
            _writer->force_close(exec_status);
813
0
        }
814
        // If there is an error in process_block thread, then we should get the writer
815
        // status before call force_close. For example, the thread may failed in commit
816
        // transaction.
817
5.23k
        RETURN_IF_ERROR(st);
818
5.23k
    }
819
5.22k
    return Base::close(state, exec_status);
820
5.22k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
799
4.04k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
800
4.04k
    if (_closed) {
801
0
        return Status::OK();
802
0
    }
803
4.04k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
804
4.04k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
805
    // if the init failed, the _writer may be nullptr. so here need check
806
4.04k
    if (_writer) {
807
4.04k
        Status st = _writer->get_writer_status();
808
4.04k
        if (exec_status.ok()) {
809
4.04k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
810
4.04k
                                                       : Status::Cancelled("force close"));
811
18.4E
        } else {
812
18.4E
            _writer->force_close(exec_status);
813
18.4E
        }
814
        // If there is an error in process_block thread, then we should get the writer
815
        // status before call force_close. For example, the thread may failed in commit
816
        // transaction.
817
4.04k
        RETURN_IF_ERROR(st);
818
4.04k
    }
819
4.04k
    return Base::close(state, exec_status);
820
4.04k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
799
48
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
800
48
    if (_closed) {
801
0
        return Status::OK();
802
0
    }
803
48
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
804
48
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
805
    // if the init failed, the _writer may be nullptr. so here need check
806
48
    if (_writer) {
807
48
        Status st = _writer->get_writer_status();
808
48
        if (exec_status.ok()) {
809
48
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
810
48
                                                       : Status::Cancelled("force close"));
811
48
        } else {
812
0
            _writer->force_close(exec_status);
813
0
        }
814
        // If there is an error in process_block thread, then we should get the writer
815
        // status before call force_close. For example, the thread may failed in commit
816
        // transaction.
817
48
        RETURN_IF_ERROR(st);
818
48
    }
819
48
    return Base::close(state, exec_status);
820
48
}
_ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
799
704
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
800
704
    if (_closed) {
801
0
        return Status::OK();
802
0
    }
803
704
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
804
704
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
805
    // if the init failed, the _writer may be nullptr. so here need check
806
704
    if (_writer) {
807
704
        Status st = _writer->get_writer_status();
808
704
        if (exec_status.ok()) {
809
704
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
810
704
                                                       : Status::Cancelled("force close"));
811
704
        } else {
812
0
            _writer->force_close(exec_status);
813
0
        }
814
        // If there is an error in process_block thread, then we should get the writer
815
        // status before call force_close. For example, the thread may failed in commit
816
        // transaction.
817
704
        RETURN_IF_ERROR(st);
818
704
    }
819
704
    return Base::close(state, exec_status);
820
704
}
_ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
799
1.78k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
800
1.78k
    if (_closed) {
801
0
        return Status::OK();
802
0
    }
803
1.78k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
804
1.78k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
805
    // if the init failed, the _writer may be nullptr. so here need check
806
1.78k
    if (_writer) {
807
1.78k
        Status st = _writer->get_writer_status();
808
1.78k
        if (exec_status.ok()) {
809
1.78k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
810
1.78k
                                                       : Status::Cancelled("force close"));
811
1.78k
        } else {
812
0
            _writer->force_close(exec_status);
813
0
        }
814
        // If there is an error in process_block thread, then we should get the writer
815
        // status before call force_close. For example, the thread may failed in commit
816
        // transaction.
817
1.78k
        RETURN_IF_ERROR(st);
818
1.78k
    }
819
1.77k
    return Base::close(state, exec_status);
820
1.78k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
799
156
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
800
156
    if (_closed) {
801
0
        return Status::OK();
802
0
    }
803
156
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
804
156
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
805
    // if the init failed, the _writer may be nullptr. so here need check
806
156
    if (_writer) {
807
156
        Status st = _writer->get_writer_status();
808
156
        if (exec_status.ok()) {
809
156
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
810
156
                                                       : Status::Cancelled("force close"));
811
156
        } else {
812
0
            _writer->force_close(exec_status);
813
0
        }
814
        // If there is an error in process_block thread, then we should get the writer
815
        // status before call force_close. For example, the thread may failed in commit
816
        // transaction.
817
156
        RETURN_IF_ERROR(st);
818
156
    }
819
156
    return Base::close(state, exec_status);
820
156
}
821
822
#define DECLARE_OPERATOR(LOCAL_STATE) template class DataSinkOperatorX<LOCAL_STATE>;
823
DECLARE_OPERATOR(HashJoinBuildSinkLocalState)
824
DECLARE_OPERATOR(ResultSinkLocalState)
825
DECLARE_OPERATOR(JdbcTableSinkLocalState)
826
DECLARE_OPERATOR(MemoryScratchSinkLocalState)
827
DECLARE_OPERATOR(ResultFileSinkLocalState)
828
DECLARE_OPERATOR(OlapTableSinkLocalState)
829
DECLARE_OPERATOR(OlapTableSinkV2LocalState)
830
DECLARE_OPERATOR(HiveTableSinkLocalState)
831
DECLARE_OPERATOR(TVFTableSinkLocalState)
832
DECLARE_OPERATOR(IcebergTableSinkLocalState)
833
DECLARE_OPERATOR(SpillIcebergTableSinkLocalState)
834
DECLARE_OPERATOR(IcebergDeleteSinkLocalState)
835
DECLARE_OPERATOR(IcebergMergeSinkLocalState)
836
DECLARE_OPERATOR(MCTableSinkLocalState)
837
DECLARE_OPERATOR(AnalyticSinkLocalState)
838
DECLARE_OPERATOR(BlackholeSinkLocalState)
839
DECLARE_OPERATOR(SortSinkLocalState)
840
DECLARE_OPERATOR(SpillSortSinkLocalState)
841
DECLARE_OPERATOR(LocalExchangeSinkLocalState)
842
DECLARE_OPERATOR(AggSinkLocalState)
843
DECLARE_OPERATOR(BucketedAggSinkLocalState)
844
DECLARE_OPERATOR(PartitionedAggSinkLocalState)
845
DECLARE_OPERATOR(ExchangeSinkLocalState)
846
DECLARE_OPERATOR(NestedLoopJoinBuildSinkLocalState)
847
DECLARE_OPERATOR(UnionSinkLocalState)
848
DECLARE_OPERATOR(MultiCastDataStreamSinkLocalState)
849
DECLARE_OPERATOR(PartitionSortSinkLocalState)
850
DECLARE_OPERATOR(SetProbeSinkLocalState<true>)
851
DECLARE_OPERATOR(SetProbeSinkLocalState<false>)
852
DECLARE_OPERATOR(SetSinkLocalState<true>)
853
DECLARE_OPERATOR(SetSinkLocalState<false>)
854
DECLARE_OPERATOR(PartitionedHashJoinSinkLocalState)
855
DECLARE_OPERATOR(GroupCommitBlockSinkLocalState)
856
DECLARE_OPERATOR(CacheSinkLocalState)
857
DECLARE_OPERATOR(DictSinkLocalState)
858
DECLARE_OPERATOR(RecCTESinkLocalState)
859
DECLARE_OPERATOR(RecCTEAnchorSinkLocalState)
860
861
#undef DECLARE_OPERATOR
862
863
#define DECLARE_OPERATOR(LOCAL_STATE) template class OperatorX<LOCAL_STATE>;
864
DECLARE_OPERATOR(HashJoinProbeLocalState)
865
DECLARE_OPERATOR(OlapScanLocalState)
866
DECLARE_OPERATOR(GroupCommitLocalState)
867
DECLARE_OPERATOR(JDBCScanLocalState)
868
DECLARE_OPERATOR(FileScanLocalState)
869
DECLARE_OPERATOR(AnalyticLocalState)
870
DECLARE_OPERATOR(SortLocalState)
871
DECLARE_OPERATOR(SpillSortLocalState)
872
DECLARE_OPERATOR(LocalMergeSortLocalState)
873
DECLARE_OPERATOR(AggLocalState)
874
DECLARE_OPERATOR(BucketedAggLocalState)
875
DECLARE_OPERATOR(PartitionedAggLocalState)
876
DECLARE_OPERATOR(TableFunctionLocalState)
877
DECLARE_OPERATOR(ExchangeLocalState)
878
DECLARE_OPERATOR(RepeatLocalState)
879
DECLARE_OPERATOR(NestedLoopJoinProbeLocalState)
880
DECLARE_OPERATOR(AssertNumRowsLocalState)
881
DECLARE_OPERATOR(EmptySetLocalState)
882
DECLARE_OPERATOR(UnionSourceLocalState)
883
DECLARE_OPERATOR(MultiCastDataStreamSourceLocalState)
884
DECLARE_OPERATOR(PartitionSortSourceLocalState)
885
DECLARE_OPERATOR(SetSourceLocalState<true>)
886
DECLARE_OPERATOR(SetSourceLocalState<false>)
887
DECLARE_OPERATOR(DataGenLocalState)
888
DECLARE_OPERATOR(SchemaScanLocalState)
889
DECLARE_OPERATOR(MetaScanLocalState)
890
DECLARE_OPERATOR(LocalExchangeSourceLocalState)
891
DECLARE_OPERATOR(PartitionedHashJoinProbeLocalState)
892
DECLARE_OPERATOR(CacheSourceLocalState)
893
DECLARE_OPERATOR(RecCTESourceLocalState)
894
DECLARE_OPERATOR(RecCTEScanLocalState)
895
896
#ifdef BE_TEST
897
DECLARE_OPERATOR(MockLocalState)
898
DECLARE_OPERATOR(MockScanLocalState)
899
#endif
900
#undef DECLARE_OPERATOR
901
902
template class StreamingOperatorX<AssertNumRowsLocalState>;
903
template class StreamingOperatorX<SelectLocalState>;
904
905
template class StatefulOperatorX<HashJoinProbeLocalState>;
906
template class StatefulOperatorX<PartitionedHashJoinProbeLocalState>;
907
template class StatefulOperatorX<RepeatLocalState>;
908
template class StatefulOperatorX<MaterializationLocalState>;
909
template class StatefulOperatorX<StreamingAggLocalState>;
910
template class StatefulOperatorX<DistinctStreamingAggLocalState>;
911
template class StatefulOperatorX<NestedLoopJoinProbeLocalState>;
912
template class StatefulOperatorX<TableFunctionLocalState>;
913
914
template class PipelineXSinkLocalState<HashJoinSharedState>;
915
template class PipelineXSinkLocalState<PartitionedHashJoinSharedState>;
916
template class PipelineXSinkLocalState<SortSharedState>;
917
template class PipelineXSinkLocalState<SpillSortSharedState>;
918
template class PipelineXSinkLocalState<NestedLoopJoinSharedState>;
919
template class PipelineXSinkLocalState<AnalyticSharedState>;
920
template class PipelineXSinkLocalState<AggSharedState>;
921
template class PipelineXSinkLocalState<BucketedAggSharedState>;
922
template class PipelineXSinkLocalState<PartitionedAggSharedState>;
923
template class PipelineXSinkLocalState<FakeSharedState>;
924
template class PipelineXSinkLocalState<UnionSharedState>;
925
template class PipelineXSinkLocalState<PartitionSortNodeSharedState>;
926
template class PipelineXSinkLocalState<MultiCastSharedState>;
927
template class PipelineXSinkLocalState<SetSharedState>;
928
template class PipelineXSinkLocalState<LocalExchangeSharedState>;
929
template class PipelineXSinkLocalState<BasicSharedState>;
930
template class PipelineXSinkLocalState<DataQueueSharedState>;
931
template class PipelineXSinkLocalState<RecCTESharedState>;
932
933
template class PipelineXLocalState<HashJoinSharedState>;
934
template class PipelineXLocalState<PartitionedHashJoinSharedState>;
935
template class PipelineXLocalState<SortSharedState>;
936
template class PipelineXLocalState<SpillSortSharedState>;
937
template class PipelineXLocalState<NestedLoopJoinSharedState>;
938
template class PipelineXLocalState<AnalyticSharedState>;
939
template class PipelineXLocalState<AggSharedState>;
940
template class PipelineXLocalState<BucketedAggSharedState>;
941
template class PipelineXLocalState<PartitionedAggSharedState>;
942
template class PipelineXLocalState<FakeSharedState>;
943
template class PipelineXLocalState<UnionSharedState>;
944
template class PipelineXLocalState<DataQueueSharedState>;
945
template class PipelineXLocalState<MultiCastSharedState>;
946
template class PipelineXLocalState<PartitionSortNodeSharedState>;
947
template class PipelineXLocalState<SetSharedState>;
948
template class PipelineXLocalState<LocalExchangeSharedState>;
949
template class PipelineXLocalState<BasicSharedState>;
950
template class PipelineXLocalState<RecCTESharedState>;
951
952
template class AsyncWriterSink<doris::VFileResultWriter, ResultFileSinkOperatorX>;
953
template class AsyncWriterSink<doris::VJdbcTableWriter, JdbcTableSinkOperatorX>;
954
template class AsyncWriterSink<doris::VTabletWriter, OlapTableSinkOperatorX>;
955
template class AsyncWriterSink<doris::VTabletWriterV2, OlapTableSinkV2OperatorX>;
956
template class AsyncWriterSink<doris::VHiveTableWriter, HiveTableSinkOperatorX>;
957
template class AsyncWriterSink<doris::VIcebergTableWriter, IcebergTableSinkOperatorX>;
958
template class AsyncWriterSink<doris::VIcebergTableWriter, SpillIcebergTableSinkOperatorX>;
959
template class AsyncWriterSink<doris::VIcebergDeleteSink, IcebergDeleteSinkOperatorX>;
960
template class AsyncWriterSink<doris::VIcebergMergeSink, IcebergMergeSinkOperatorX>;
961
template class AsyncWriterSink<doris::VMCTableWriter, MCTableSinkOperatorX>;
962
template class AsyncWriterSink<doris::VTVFTableWriter, TVFTableSinkOperatorX>;
963
964
#ifdef BE_TEST
965
template class OperatorX<DummyOperatorLocalState>;
966
template class DataSinkOperatorX<DummySinkLocalState>;
967
#endif
968
969
} // namespace doris