Coverage Report

Created: 2026-06-29 16:04

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