Coverage Report

Created: 2026-10-31 18:35

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/paimon_table_sink_operator.h"
68
#include "exec/operator/partition_sort_sink_operator.h"
69
#include "exec/operator/partition_sort_source_operator.h"
70
#include "exec/operator/partitioned_aggregation_sink_operator.h"
71
#include "exec/operator/partitioned_aggregation_source_operator.h"
72
#include "exec/operator/partitioned_hash_join_probe_operator.h"
73
#include "exec/operator/partitioned_hash_join_sink_operator.h"
74
#include "exec/operator/rec_cte_anchor_sink_operator.h"
75
#include "exec/operator/rec_cte_scan_operator.h"
76
#include "exec/operator/rec_cte_sink_operator.h"
77
#include "exec/operator/rec_cte_source_operator.h"
78
#include "exec/operator/repeat_operator.h"
79
#include "exec/operator/result_file_sink_operator.h"
80
#include "exec/operator/result_sink_operator.h"
81
#include "exec/operator/schema_scan_operator.h"
82
#include "exec/operator/select_operator.h"
83
#include "exec/operator/set_probe_sink_operator.h"
84
#include "exec/operator/set_sink_operator.h"
85
#include "exec/operator/set_source_operator.h"
86
#include "exec/operator/sort_sink_operator.h"
87
#include "exec/operator/sort_source_operator.h"
88
#include "exec/operator/spill_iceberg_table_sink_operator.h"
89
#include "exec/operator/spill_sort_sink_operator.h"
90
#include "exec/operator/spill_sort_source_operator.h"
91
#include "exec/operator/streaming_aggregation_operator.h"
92
#include "exec/operator/table_function_operator.h"
93
#include "exec/operator/tvf_table_sink_operator.h"
94
#include "exec/operator/union_sink_operator.h"
95
#include "exec/operator/union_source_operator.h"
96
#include "exec/pipeline/dependency.h"
97
#include "exec/pipeline/pipeline.h"
98
#include "exprs/vexpr.h"
99
#include "exprs/vexpr_context.h"
100
#include "runtime/runtime_profile.h"
101
#include "runtime/runtime_profile_counter_names.h"
102
#include "util/debug_util.h"
103
#include "util/string_util.h"
104
105
namespace doris {
106
class RowDescriptor;
107
class RuntimeState;
108
} // namespace doris
109
110
namespace doris {
111
112
0
Status OperatorBase::close(RuntimeState* state) {
113
0
    if (_is_closed) {
114
0
        return Status::OK();
115
0
    }
116
0
    _is_closed = true;
117
0
    return Status::OK();
118
0
}
119
120
template <typename SharedStateArg>
121
1.73M
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
1.73M
    if (_parent->nereids_id() == -1) {
123
894k
        return fmt::format("(id={})", _parent->node_id());
124
894k
    } else {
125
835k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
835k
    }
127
1.73M
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
69.8k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
69.8k
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
69.8k
    } else {
125
69.8k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
69.8k
    }
127
69.8k
}
_ZNK5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
4
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
4
    if (_parent->nereids_id() == -1) {
123
1
        return fmt::format("(id={})", _parent->node_id());
124
3
    } else {
125
3
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
3
    }
127
4
}
_ZNK5doris19PipelineXLocalStateINS_15SortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
231k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
231k
    if (_parent->nereids_id() == -1) {
123
12
        return fmt::format("(id={})", _parent->node_id());
124
231k
    } else {
125
231k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
231k
    }
127
231k
}
_ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
153
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
153
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
153
    } else {
125
153
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
153
    }
127
153
}
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
6.00k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
6.00k
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
6.00k
    } else {
125
6.00k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
6.00k
    }
127
6.00k
}
_ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
9.79k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
9.79k
    if (_parent->nereids_id() == -1) {
123
60
        return fmt::format("(id={})", _parent->node_id());
124
9.73k
    } else {
125
9.73k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
9.73k
    }
127
9.79k
}
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
101k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
101k
    if (_parent->nereids_id() == -1) {
123
29
        return fmt::format("(id={})", _parent->node_id());
124
101k
    } else {
125
101k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
101k
    }
127
101k
}
_ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
70.8k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
70.8k
    if (_parent->nereids_id() == -1) {
123
2
        return fmt::format("(id={})", _parent->node_id());
124
70.8k
    } else {
125
70.8k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
70.8k
    }
127
70.8k
}
_ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
121
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
121
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
121
    } else {
125
121
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
121
    }
127
121
}
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
555k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
555k
    if (_parent->nereids_id() == -1) {
123
270k
        return fmt::format("(id={})", _parent->node_id());
124
284k
    } else {
125
284k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
284k
    }
127
555k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
55.6k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
55.6k
    if (_parent->nereids_id() == -1) {
123
2
        return fmt::format("(id={})", _parent->node_id());
124
55.6k
    } else {
125
55.6k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
55.6k
    }
127
55.6k
}
_ZNK5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
26
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
26
    if (_parent->nereids_id() == -1) {
123
26
        return fmt::format("(id={})", _parent->node_id());
124
26
    } else {
125
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
0
    }
127
26
}
_ZNK5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
5.13k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
5.13k
    if (_parent->nereids_id() == -1) {
123
5.13k
        return fmt::format("(id={})", _parent->node_id());
124
5.13k
    } else {
125
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
0
    }
127
5.13k
}
_ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
407
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
407
    if (_parent->nereids_id() == -1) {
123
102
        return fmt::format("(id={})", _parent->node_id());
124
305
    } else {
125
305
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
305
    }
127
407
}
_ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
5.36k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
5.36k
    if (_parent->nereids_id() == -1) {
123
13
        return fmt::format("(id={})", _parent->node_id());
124
5.35k
    } else {
125
5.35k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
5.35k
    }
127
5.36k
}
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
618k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
618k
    if (_parent->nereids_id() == -1) {
123
618k
        return fmt::format("(id={})", _parent->node_id());
124
18.4E
    } else {
125
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
18.4E
    }
127
618k
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
_ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
169
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
169
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
169
    } else {
125
169
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
169
    }
127
169
}
128
129
template <typename SharedStateArg>
130
1.20M
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
1.20M
    if (_parent->nereids_id() == -1) {
132
658k
        return fmt::format("(id={})", _parent->node_id());
133
658k
    } else {
134
551k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
551k
    }
136
1.20M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
118k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
118k
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
118k
    } else {
134
118k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
118k
    }
136
118k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
5
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
5
    if (_parent->nereids_id() == -1) {
132
1
        return fmt::format("(id={})", _parent->node_id());
133
4
    } else {
134
4
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
4
    }
136
5
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
235k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
235k
    if (_parent->nereids_id() == -1) {
132
9
        return fmt::format("(id={})", _parent->node_id());
133
235k
    } else {
134
235k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
235k
    }
136
235k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
160
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
160
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
160
    } else {
134
160
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
160
    }
136
160
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
6.02k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
6.02k
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
6.02k
    } else {
134
6.02k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
6.02k
    }
136
6.02k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
9.85k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
9.85k
    if (_parent->nereids_id() == -1) {
132
60
        return fmt::format("(id={})", _parent->node_id());
133
9.79k
    } else {
134
9.79k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
9.79k
    }
136
9.85k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
102k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
102k
    if (_parent->nereids_id() == -1) {
132
29
        return fmt::format("(id={})", _parent->node_id());
133
102k
    } else {
134
102k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
102k
    }
136
102k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
70.6k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
70.6k
    if (_parent->nereids_id() == -1) {
132
4
        return fmt::format("(id={})", _parent->node_id());
133
70.6k
    } else {
134
70.6k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
70.6k
    }
136
70.6k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
131
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
131
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
131
    } else {
134
131
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
131
    }
136
131
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
37
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
37
    if (_parent->nereids_id() == -1) {
132
37
        return fmt::format("(id={})", _parent->node_id());
133
37
    } else {
134
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
0
    }
136
37
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
8.90k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
8.90k
    if (_parent->nereids_id() == -1) {
132
3
        return fmt::format("(id={})", _parent->node_id());
133
8.89k
    } else {
134
8.89k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
8.89k
    }
136
8.90k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
408
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
408
    if (_parent->nereids_id() == -1) {
132
102
        return fmt::format("(id={})", _parent->node_id());
133
306
    } else {
134
306
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
306
    }
136
408
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
13.2k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
13.3k
    if (_parent->nereids_id() == -1) {
132
13.3k
        return fmt::format("(id={})", _parent->node_id());
133
18.4E
    } else {
134
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
18.4E
    }
136
13.2k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
231k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
231k
    if (_parent->nereids_id() == -1) {
132
231k
        return fmt::format("(id={})", _parent->node_id());
133
18.4E
    } else {
134
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
18.4E
    }
136
231k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
412k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
412k
    if (_parent->nereids_id() == -1) {
132
412k
        return fmt::format("(id={})", _parent->node_id());
133
18.4E
    } else {
134
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
18.4E
    }
136
412k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
25
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
25
    if (_parent->nereids_id() == -1) {
132
25
        return fmt::format("(id={})", _parent->node_id());
133
25
    } else {
134
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
0
    }
136
25
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
338
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
338
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
338
    } else {
134
338
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
338
    }
136
338
}
137
138
template <typename SharedStateArg>
139
34.0k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
34.0k
    if (_terminated) {
141
1
        return Status::OK();
142
1
    }
143
34.0k
    _terminated = true;
144
34.0k
    return Status::OK();
145
34.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
24.1k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
24.1k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
24.1k
    _terminated = true;
144
24.1k
    return Status::OK();
145
24.1k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
3.88k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
3.88k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
3.88k
    _terminated = true;
144
3.88k
    return Status::OK();
145
3.88k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
11
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
11
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
11
    _terminated = true;
144
11
    return Status::OK();
145
11
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
4
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
4
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
4
    _terminated = true;
144
4
    return Status::OK();
145
4
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
2.16k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
2.16k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
2.16k
    _terminated = true;
144
2.16k
    return Status::OK();
145
2.16k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
2.64k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
2.64k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
2.64k
    _terminated = true;
144
2.64k
    return Status::OK();
145
2.64k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
405
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
405
    if (_terminated) {
141
1
        return Status::OK();
142
1
    }
143
404
    _terminated = true;
144
404
    return Status::OK();
145
405
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
326
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
326
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
326
    _terminated = true;
144
326
    return Status::OK();
145
326
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
7
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
7
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
7
    _terminated = true;
144
7
    return Status::OK();
145
7
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
61
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
61
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
61
    _terminated = true;
144
61
    return Status::OK();
145
61
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
15
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
15
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
15
    _terminated = true;
144
15
    return Status::OK();
145
15
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
250
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
250
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
250
    _terminated = true;
144
250
    return Status::OK();
145
250
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
128
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
128
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
128
    _terminated = true;
144
128
    return Status::OK();
145
128
}
146
147
313k
DataDistribution OperatorBase::required_data_distribution(RuntimeState* /*state*/) const {
148
313k
    return _child && _child->is_serial_operator() && !is_source()
149
313k
                   ? DataDistribution(TLocalPartitionType::PASSTHROUGH)
150
313k
                   : DataDistribution(TLocalPartitionType::NOOP);
151
313k
}
152
153
25.7k
bool OperatorBase::child_breaks_local_key_distribution(RuntimeState* state) const {
154
25.7k
    if (!_child) {
155
25.0k
        return false;
156
25.0k
    }
157
730
    if (_child->is_serial_operator()) {
158
57
        return true;
159
57
    }
160
673
    const auto child_distribution = _child->required_data_distribution(state);
161
673
    return child_distribution.need_local_exchange() &&
162
673
           !is_shuffled_exchange(child_distribution.distribution_type);
163
730
}
164
165
template <typename SharedStateArg>
166
14.4k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
14.4k
    fmt::memory_buffer debug_string_buffer;
168
14.4k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
14.4k
    return fmt::to_string(debug_string_buffer);
170
14.4k
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
28
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
28
    fmt::memory_buffer debug_string_buffer;
168
28
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
28
    return fmt::to_string(debug_string_buffer);
170
28
}
_ZNK5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
3
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
3
    fmt::memory_buffer debug_string_buffer;
168
3
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
3
    return fmt::to_string(debug_string_buffer);
170
3
}
_ZNK5doris19PipelineXLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
24
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
24
    fmt::memory_buffer debug_string_buffer;
168
24
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
24
    return fmt::to_string(debug_string_buffer);
170
24
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
87
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
87
    fmt::memory_buffer debug_string_buffer;
168
87
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
87
    return fmt::to_string(debug_string_buffer);
170
87
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
14.2k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
14.2k
    fmt::memory_buffer debug_string_buffer;
168
14.2k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
14.2k
    return fmt::to_string(debug_string_buffer);
170
14.2k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
1
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
1
    fmt::memory_buffer debug_string_buffer;
168
1
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
1
    return fmt::to_string(debug_string_buffer);
170
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
166
76
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
76
    fmt::memory_buffer debug_string_buffer;
168
76
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
76
    return fmt::to_string(debug_string_buffer);
170
76
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
171
172
template <typename SharedStateArg>
173
14.3k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
14.3k
    fmt::memory_buffer debug_string_buffer;
175
14.3k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
14.3k
    return fmt::to_string(debug_string_buffer);
177
14.3k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
24
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
24
    fmt::memory_buffer debug_string_buffer;
175
24
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
24
    return fmt::to_string(debug_string_buffer);
177
24
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
87
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
87
    fmt::memory_buffer debug_string_buffer;
175
87
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
87
    return fmt::to_string(debug_string_buffer);
177
87
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
104
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
104
    fmt::memory_buffer debug_string_buffer;
175
104
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
104
    return fmt::to_string(debug_string_buffer);
177
104
}
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
173
37
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
37
    fmt::memory_buffer debug_string_buffer;
175
37
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
37
    return fmt::to_string(debug_string_buffer);
177
37
}
_ZNK5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
14.1k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
14.1k
    fmt::memory_buffer debug_string_buffer;
175
14.1k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
14.1k
    return fmt::to_string(debug_string_buffer);
177
14.1k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
178
179
14.4k
std::string OperatorXBase::debug_string(int indentation_level) const {
180
14.4k
    fmt::memory_buffer debug_string_buffer;
181
14.4k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, parallel_tasks={}, _is_serial_operator={}",
182
14.4k
                   std::string(indentation_level * 2, ' '), _op_name, node_id(), _parallel_tasks,
183
14.4k
                   _is_serial_operator);
184
14.4k
    return fmt::to_string(debug_string_buffer);
185
14.4k
}
186
187
14.4k
std::string OperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
188
14.4k
    return state->get_local_state(operator_id())->debug_string(indentation_level);
189
14.4k
}
190
191
692k
Status OperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
192
692k
    std::string node_name = print_plan_node_type(tnode.node_type);
193
692k
    _nereids_id = tnode.nereids_id;
194
692k
    if (!tnode.intermediate_output_tuple_id_list.empty()) {
195
6.79k
        if (!has_projection()) {
196
0
            return Status::InternalError("no final output tuple id");
197
0
        }
198
6.79k
        if (tnode.intermediate_output_tuple_id_list.size() !=
199
6.79k
            tnode.intermediate_projections_list.size()) {
200
0
            return Status::InternalError(
201
0
                    "intermediate_output_tuple_id_list size:{} not match "
202
0
                    "intermediate_projections_list size:{}",
203
0
                    tnode.intermediate_output_tuple_id_list.size(),
204
0
                    tnode.intermediate_projections_list.size());
205
0
        }
206
6.79k
    }
207
692k
    auto substr = node_name.substr(0, node_name.find("_NODE"));
208
692k
    _op_name = substr + "_OPERATOR";
209
210
692k
    if (tnode.__isset.vconjunct) {
211
0
        return Status::InternalError("vconjunct is not supported yet");
212
692k
    } else if (tnode.__isset.conjuncts) {
213
285k
        for (const auto& conjunct : tnode.conjuncts) {
214
285k
            VExprContextSPtr context;
215
285k
            RETURN_IF_ERROR(VExpr::create_expr_tree(conjunct, context));
216
285k
            _conjuncts.emplace_back(context);
217
285k
        }
218
106k
    }
219
220
    // create the projections expr
221
692k
    if (tnode.__isset.projections) {
222
276k
        RETURN_IF_ERROR(VExpr::create_expr_trees(tnode.projections, _projection->projections));
223
276k
    }
224
692k
    if (!tnode.intermediate_projections_list.empty()) {
225
6.79k
        DCHECK(has_projection()) << "no final projections";
226
6.79k
        _projection->intermediate_projections.reserve(tnode.intermediate_projections_list.size());
227
12.2k
        for (const auto& tnode_projections : tnode.intermediate_projections_list) {
228
12.2k
            VExprContextSPtrs projections;
229
12.2k
            RETURN_IF_ERROR(VExpr::create_expr_trees(tnode_projections, projections));
230
12.2k
            _projection->intermediate_projections.push_back(projections);
231
12.2k
        }
232
6.79k
    }
233
692k
    return Status::OK();
234
692k
}
235
236
719k
Status OperatorXBase::prepare(RuntimeState* state) {
237
719k
    for (auto& conjunct : _conjuncts) {
238
284k
        RETURN_IF_ERROR(conjunct->prepare(state, operator_row_desc_before_projection()));
239
284k
    }
240
719k
    if (state->enable_adjust_conjunct_order_by_cost()) {
241
668k
        std::ranges::stable_sort(_conjuncts, [](const auto& a, const auto& b) {
242
348k
            return a->execute_cost() < b->execute_cost();
243
348k
        });
244
668k
    };
245
246
719k
    if (has_projection()) {
247
276k
        auto& projection = *_projection;
248
288k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
249
12.2k
            const auto& input_row_desc =
250
12.2k
                    i == 0 ? operator_row_desc_before_projection()
251
12.2k
                           : projection.intermediate_output_row_descriptors[i - 1];
252
12.2k
            RETURN_IF_ERROR(
253
12.2k
                    VExpr::prepare(projection.intermediate_projections[i], state, input_row_desc));
254
12.2k
        }
255
276k
        const auto& final_projection_input_row_desc =
256
276k
                projection.intermediate_output_row_descriptors.empty()
257
276k
                        ? operator_row_desc_before_projection()
258
276k
                        : projection.intermediate_output_row_descriptors.back();
259
276k
        RETURN_IF_ERROR(
260
276k
                VExpr::prepare(projection.projections, state, final_projection_input_row_desc));
261
276k
        RETURN_IF_ERROR(VExpr::check_expr_output_type(projection.projections,
262
276k
                                                      projection.output_row_descriptor));
263
276k
    }
264
265
719k
    for (auto& conjunct : _conjuncts) {
266
285k
        RETURN_IF_ERROR(conjunct->open(state));
267
285k
    }
268
719k
    if (has_projection()) {
269
276k
        RETURN_IF_ERROR(VExpr::open(_projection->projections, state));
270
276k
        for (auto& projections : _projection->intermediate_projections) {
271
12.2k
            RETURN_IF_ERROR(VExpr::open(projections, state));
272
12.2k
        }
273
276k
    }
274
718k
    if (_child && !is_source()) {
275
91.5k
        RETURN_IF_ERROR(_child->prepare(state));
276
91.5k
    }
277
278
718k
    if (VExpr::contains_blockable_function(_conjuncts) ||
279
718k
        (has_projection() && VExpr::contains_blockable_function(_projection->projections))) {
280
0
        _blockable = true;
281
0
    }
282
283
718k
    return Status::OK();
284
718k
}
285
286
10.6k
Status OperatorXBase::terminate(RuntimeState* state) {
287
10.6k
    if (_child && !is_source()) {
288
645
        RETURN_IF_ERROR(_child->terminate(state));
289
645
    }
290
10.6k
    auto result = state->get_local_state_result(operator_id());
291
10.6k
    if (!result) {
292
0
        return result.error();
293
0
    }
294
10.6k
    return result.value()->terminate(state);
295
10.6k
}
296
297
4.65M
Status OperatorXBase::close(RuntimeState* state) {
298
4.65M
    if (_child && !is_source()) {
299
697k
        RETURN_IF_ERROR(_child->close(state));
300
697k
    }
301
4.65M
    auto result = state->get_local_state_result(operator_id());
302
4.65M
    if (!result) {
303
0
        return result.error();
304
0
    }
305
4.65M
    return result.value()->close(state);
306
4.65M
}
307
308
300k
void PipelineXLocalStateBase::clear_origin_block() {
309
300k
    _origin_block.clear_column_data(_parent->operator_row_desc_before_projection().num_slots());
310
300k
}
311
312
691k
Status PipelineXLocalStateBase::filter_block(const VExprContextSPtrs& expr_contexts, Block* block) {
313
691k
    RETURN_IF_ERROR(VExprContext::filter_block(expr_contexts, block, block->columns()));
314
315
691k
    _estimate_memory_usage += VExprContext::get_memory_usage(expr_contexts);
316
691k
    return Status::OK();
317
691k
}
318
319
0
bool PipelineXLocalStateBase::is_blockable() const {
320
0
    return std::any_of(_projections.begin(), _projections.end(),
321
0
                       [&](VExprContextSPtr expr) -> bool { return expr->is_blockable(); });
322
0
}
323
324
Status OperatorXBase::do_projections(RuntimeState* state, Block* origin_block,
325
300k
                                     Block* output_block) const {
326
300k
    auto* local_state = state->get_local_state(operator_id());
327
300k
    SCOPED_TIMER(local_state->exec_time_counter());
328
300k
    SCOPED_TIMER(local_state->_projection_timer);
329
300k
    const size_t rows = origin_block->rows();
330
300k
    if (rows == 0) {
331
152k
        return Status::OK();
332
152k
    }
333
147k
    SCOPED_PEAK_MEM(&local_state->_estimate_memory_usage);
334
335
147k
    {
336
147k
        Block input_block = *origin_block;
337
338
147k
        ColumnsWithTypeAndName new_columns;
339
147k
        for (const auto& projections : local_state->_intermediate_projections) {
340
5.51k
            if (projections.empty()) {
341
0
                return Status::InternalError("meet empty intermediate projection, node id: {}",
342
0
                                             node_id());
343
0
            }
344
5.51k
            new_columns.resize(projections.size());
345
125k
            for (int i = 0; i < projections.size(); i++) {
346
120k
                RETURN_IF_ERROR(projections[i]->execute(&input_block, new_columns[i]));
347
120k
                if (new_columns[i].column->size() != rows) {
348
0
                    return Status::InternalError(
349
0
                            "intermediate projection result column size {} not equal input rows "
350
0
                            "{}, expr: {}",
351
0
                            new_columns[i].column->size(), rows,
352
0
                            projections[i]->root()->debug_string());
353
0
                }
354
120k
            }
355
5.50k
            Block tmp_block {new_columns};
356
5.50k
            input_block.swap(tmp_block);
357
5.50k
        }
358
359
147k
        if (input_block.rows() != rows) {
360
0
            return Status::InternalError(
361
0
                    "after intermediate projections input block rows {} not equal origin rows {}, "
362
0
                    "input_block: {}",
363
0
                    input_block.rows(), rows, input_block.dump_structure());
364
0
        }
365
366
147k
        auto scoped_mutable_block = VectorizedUtils::build_scoped_mutable_mem_reuse_block(
367
147k
                output_block, _projection->output_row_descriptor);
368
147k
        auto& mutable_columns = scoped_mutable_block.mutable_columns();
369
147k
        DCHECK_EQ(mutable_columns.size(), local_state->_projections.size()) << debug_string();
370
147k
        Columns shared_columns(mutable_columns.size());
371
372
839k
        for (int i = 0; i < mutable_columns.size(); ++i) {
373
692k
            ColumnPtr column_ptr;
374
692k
            RETURN_IF_ERROR(local_state->_projections[i]->execute(&input_block, column_ptr));
375
692k
            if (column_ptr->size() != rows) {
376
0
                return Status::InternalError(
377
0
                        "projection result column size {} not equal input rows {}, expr: {}",
378
0
                        column_ptr->size(), rows,
379
0
                        local_state->_projections[i]->root()->debug_string());
380
0
            }
381
692k
            column_ptr = column_ptr->convert_to_full_column_if_const();
382
692k
            if (is_column_nullable(*mutable_columns[i]) && !is_column_nullable(*column_ptr)) {
383
0
                column_ptr = make_nullable(column_ptr, false);
384
0
            }
385
692k
            if (column_ptr->is_exclusive()) {
386
240k
                mutable_columns[i] = IColumn::mutate(std::move(column_ptr));
387
451k
            } else {
388
451k
                shared_columns[i] = std::move(column_ptr);
389
451k
            }
390
692k
        }
391
392
147k
        scoped_mutable_block.restore();
393
839k
        for (int i = 0; i < shared_columns.size(); ++i) {
394
692k
            if (shared_columns[i]) {
395
451k
                output_block->replace_by_position(i, std::move(shared_columns[i]));
396
451k
            }
397
692k
        }
398
147k
    }
399
400
0
    origin_block->clear_column_data(
401
147k
            local_state->_parent->operator_row_desc_before_projection().num_slots());
402
147k
    DCHECK_EQ(output_block->rows(), rows);
403
404
147k
    return Status::OK();
405
147k
}
406
407
4.09M
Status OperatorXBase::get_block_after_projects(RuntimeState* state, Block* block, bool* eos) {
408
4.09M
    DBUG_EXECUTE_IF("Pipeline::return_empty_block", {
409
4.09M
        if (this->_op_name == "AGGREGATION_OPERATOR" || this->_op_name == "HASH_JOIN_OPERATOR" ||
410
4.09M
            this->_op_name == "PARTITIONED_AGGREGATION_OPERATOR" ||
411
4.09M
            this->_op_name == "PARTITIONED_HASH_JOIN_OPERATOR" ||
412
4.09M
            this->_op_name == "CROSS_JOIN_OPERATOR" || this->_op_name == "SORT_OPERATOR") {
413
4.09M
            if (_debug_point_count++ % 2 == 0) {
414
4.09M
                return Status::OK();
415
4.09M
            }
416
4.09M
        }
417
4.09M
    });
418
419
4.09M
    Status status;
420
4.09M
    auto* local_state = state->get_local_state(operator_id());
421
4.09M
    Defer defer([&]() {
422
4.09M
        if (status.ok()) {
423
4.09M
            local_state->update_output_block_counters(*block);
424
4.09M
        }
425
4.08M
    });
426
4.09M
    if (has_projection()) {
427
300k
        local_state->clear_origin_block();
428
300k
        status = get_block(state, &local_state->_origin_block, eos);
429
300k
        if (UNLIKELY(!status.ok())) {
430
43
            return status;
431
43
        }
432
299k
        status = do_projections(state, &local_state->_origin_block, block);
433
299k
        return status;
434
300k
    }
435
3.79M
    status = get_block(state, block, eos);
436
3.79M
    RETURN_IF_ERROR(block->check_type_and_column());
437
3.79M
    return status;
438
3.79M
}
439
440
2.77M
void PipelineXLocalStateBase::reached_limit(Block* block, bool* eos) {
441
2.77M
    if (_parent->_limit != -1 and _num_rows_returned + block->rows() >= _parent->_limit) {
442
10.0k
        block->set_num_rows(_parent->_limit - _num_rows_returned);
443
10.0k
        *eos = true;
444
10.0k
    }
445
446
2.77M
    DBUG_EXECUTE_IF("Pipeline::reached_limit_early", {
447
2.77M
        auto op_name = to_lower(_parent->_op_name);
448
2.77M
        auto arg_op_name = dp->param<std::string>("op_name");
449
2.77M
        arg_op_name = to_lower(arg_op_name);
450
451
2.77M
        if (op_name == arg_op_name) {
452
2.77M
            *eos = true;
453
2.77M
        }
454
2.77M
    });
455
456
2.77M
    if (auto rows = block->rows()) {
457
811k
        _num_rows_returned += rows;
458
811k
        _state->get_query_ctx()->resource_ctx()->io_context()->update_process_rows(rows);
459
811k
    }
460
2.77M
}
461
462
34.0k
Status DataSinkOperatorXBase::terminate(RuntimeState* state) {
463
34.0k
    auto result = state->get_sink_local_state_result();
464
34.0k
    if (!result) {
465
0
        return result.error();
466
0
    }
467
34.0k
    return result.value()->terminate(state);
468
34.0k
}
469
470
14.3k
std::string DataSinkOperatorXBase::debug_string(int indentation_level) const {
471
14.3k
    fmt::memory_buffer debug_string_buffer;
472
473
14.3k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, _is_serial_operator={}",
474
14.3k
                   std::string(indentation_level * 2, ' '), _name, node_id(), _is_serial_operator);
475
14.3k
    return fmt::to_string(debug_string_buffer);
476
14.3k
}
477
478
14.3k
std::string DataSinkOperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
479
14.3k
    return state->get_sink_local_state()->debug_string(indentation_level);
480
14.3k
}
481
482
362k
Status DataSinkOperatorXBase::init(const TDataSink& tsink) {
483
362k
    std::string op_name = "UNKNOWN_SINK";
484
362k
    auto it = _TDataSinkType_VALUES_TO_NAMES.find(tsink.type);
485
486
363k
    if (it != _TDataSinkType_VALUES_TO_NAMES.end()) {
487
363k
        op_name = it->second;
488
363k
    }
489
362k
    _name = op_name + "_OPERATOR";
490
362k
    return Status::OK();
491
362k
}
492
493
310k
Status DataSinkOperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
494
310k
    std::string op_name = print_plan_node_type(tnode.node_type);
495
310k
    _nereids_id = tnode.nereids_id;
496
310k
    auto substr = op_name.substr(0, op_name.find("_NODE"));
497
310k
    _name = substr + "_SINK_OPERATOR";
498
310k
    return Status::OK();
499
310k
}
500
501
template <typename LocalStateType>
502
Status DataSinkOperatorX<LocalStateType>::setup_local_state(RuntimeState* state,
503
1.72M
                                                            LocalSinkStateInfo& info) {
504
1.72M
    auto local_state = LocalStateType::create_unique(this, state);
505
1.72M
    RETURN_IF_ERROR(local_state->init(state, info));
506
1.72M
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
1.72M
    return Status::OK();
508
1.72M
}
_ZN5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
118k
                                                            LocalSinkStateInfo& info) {
504
118k
    auto local_state = LocalStateType::create_unique(this, state);
505
118k
    RETURN_IF_ERROR(local_state->init(state, info));
506
118k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
118k
    return Status::OK();
508
118k
}
_ZN5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
363k
                                                            LocalSinkStateInfo& info) {
504
363k
    auto local_state = LocalStateType::create_unique(this, state);
505
363k
    RETURN_IF_ERROR(local_state->init(state, info));
506
363k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
363k
    return Status::OK();
508
363k
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
6
                                                            LocalSinkStateInfo& info) {
504
6
    auto local_state = LocalStateType::create_unique(this, state);
505
6
    RETURN_IF_ERROR(local_state->init(state, info));
506
6
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
6
    return Status::OK();
508
6
}
_ZN5doris17DataSinkOperatorXINS_24ResultFileSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
372
                                                            LocalSinkStateInfo& info) {
504
372
    auto local_state = LocalStateType::create_unique(this, state);
505
372
    RETURN_IF_ERROR(local_state->init(state, info));
506
372
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
372
    return Status::OK();
508
372
}
_ZN5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
49.9k
                                                            LocalSinkStateInfo& info) {
504
49.9k
    auto local_state = LocalStateType::create_unique(this, state);
505
49.9k
    RETURN_IF_ERROR(local_state->init(state, info));
506
49.9k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
49.9k
    return Status::OK();
508
49.9k
}
_ZN5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
18
                                                            LocalSinkStateInfo& info) {
504
18
    auto local_state = LocalStateType::create_unique(this, state);
505
18
    RETURN_IF_ERROR(local_state->init(state, info));
506
18
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
18
    return Status::OK();
508
18
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
16
                                                            LocalSinkStateInfo& info) {
504
16
    auto local_state = LocalStateType::create_unique(this, state);
505
16
    RETURN_IF_ERROR(local_state->init(state, info));
506
16
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
16
    return Status::OK();
508
16
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_25PaimonTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_27IcebergDeleteSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_26IcebergMergeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_21MCTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
9.76k
                                                            LocalSinkStateInfo& info) {
504
9.76k
    auto local_state = LocalStateType::create_unique(this, state);
505
9.76k
    RETURN_IF_ERROR(local_state->init(state, info));
506
9.76k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
9.76k
    return Status::OK();
508
9.76k
}
_ZN5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
15
                                                            LocalSinkStateInfo& info) {
504
15
    auto local_state = LocalStateType::create_unique(this, state);
505
15
    RETURN_IF_ERROR(local_state->init(state, info));
506
15
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
15
    return Status::OK();
508
15
}
_ZN5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
236k
                                                            LocalSinkStateInfo& info) {
504
236k
    auto local_state = LocalStateType::create_unique(this, state);
505
236k
    RETURN_IF_ERROR(local_state->init(state, info));
506
236k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
236k
    return Status::OK();
508
236k
}
_ZN5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
160
                                                            LocalSinkStateInfo& info) {
504
160
    auto local_state = LocalStateType::create_unique(this, state);
505
160
    RETURN_IF_ERROR(local_state->init(state, info));
506
160
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
160
    return Status::OK();
508
160
}
_ZN5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
232k
                                                            LocalSinkStateInfo& info) {
504
232k
    auto local_state = LocalStateType::create_unique(this, state);
505
232k
    RETURN_IF_ERROR(local_state->init(state, info));
506
232k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
232k
    return Status::OK();
508
232k
}
_ZN5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
102k
                                                            LocalSinkStateInfo& info) {
504
102k
    auto local_state = LocalStateType::create_unique(this, state);
505
102k
    RETURN_IF_ERROR(local_state->init(state, info));
506
102k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
102k
    return Status::OK();
508
102k
}
_ZN5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
70.7k
                                                            LocalSinkStateInfo& info) {
504
70.7k
    auto local_state = LocalStateType::create_unique(this, state);
505
70.7k
    RETURN_IF_ERROR(local_state->init(state, info));
506
70.7k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
70.7k
    return Status::OK();
508
70.7k
}
_ZN5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
131
                                                            LocalSinkStateInfo& info) {
504
131
    auto local_state = LocalStateType::create_unique(this, state);
505
131
    RETURN_IF_ERROR(local_state->init(state, info));
506
131
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
131
    return Status::OK();
508
131
}
_ZN5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
510k
                                                            LocalSinkStateInfo& info) {
504
510k
    auto local_state = LocalStateType::create_unique(this, state);
505
510k
    RETURN_IF_ERROR(local_state->init(state, info));
506
510k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
510k
    return Status::OK();
508
510k
}
_ZN5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
6.04k
                                                            LocalSinkStateInfo& info) {
504
6.04k
    auto local_state = LocalStateType::create_unique(this, state);
505
6.04k
    RETURN_IF_ERROR(local_state->init(state, info));
506
6.04k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
6.04k
    return Status::OK();
508
6.04k
}
_ZN5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
8.90k
                                                            LocalSinkStateInfo& info) {
504
8.90k
    auto local_state = LocalStateType::create_unique(this, state);
505
8.90k
    RETURN_IF_ERROR(local_state->init(state, info));
506
8.90k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
8.90k
    return Status::OK();
508
8.90k
}
_ZN5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.17k
                                                            LocalSinkStateInfo& info) {
504
2.17k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.17k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.17k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.17k
    return Status::OK();
508
2.17k
}
_ZN5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
307
                                                            LocalSinkStateInfo& info) {
504
307
    auto local_state = LocalStateType::create_unique(this, state);
505
307
    RETURN_IF_ERROR(local_state->init(state, info));
506
307
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
307
    return Status::OK();
508
307
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
5.01k
                                                            LocalSinkStateInfo& info) {
504
5.01k
    auto local_state = LocalStateType::create_unique(this, state);
505
5.01k
    RETURN_IF_ERROR(local_state->init(state, info));
506
5.01k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
5.01k
    return Status::OK();
508
5.01k
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.86k
                                                            LocalSinkStateInfo& info) {
504
2.86k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.86k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.86k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.86k
    return Status::OK();
508
2.86k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.69k
                                                            LocalSinkStateInfo& info) {
504
2.69k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.69k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.69k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.69k
    return Status::OK();
508
2.69k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.63k
                                                            LocalSinkStateInfo& info) {
504
2.63k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.63k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.63k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.63k
    return Status::OK();
508
2.63k
}
_ZN5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
4
                                                            LocalSinkStateInfo& info) {
504
4
    auto local_state = LocalStateType::create_unique(this, state);
505
4
    RETURN_IF_ERROR(local_state->init(state, info));
506
4
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
4
    return Status::OK();
508
4
}
_ZN5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
566
                                                            LocalSinkStateInfo& info) {
504
566
    auto local_state = LocalStateType::create_unique(this, state);
505
566
    RETURN_IF_ERROR(local_state->init(state, info));
506
566
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
566
    return Status::OK();
508
566
}
_ZN5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
14
                                                            LocalSinkStateInfo& info) {
504
14
    auto local_state = LocalStateType::create_unique(this, state);
505
14
    RETURN_IF_ERROR(local_state->init(state, info));
506
14
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
14
    return Status::OK();
508
14
}
_ZN5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
105
                                                            LocalSinkStateInfo& info) {
504
105
    auto local_state = LocalStateType::create_unique(this, state);
505
105
    RETURN_IF_ERROR(local_state->init(state, info));
506
105
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
105
    return Status::OK();
508
105
}
_ZN5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
169
                                                            LocalSinkStateInfo& info) {
504
169
    auto local_state = LocalStateType::create_unique(this, state);
505
169
    RETURN_IF_ERROR(local_state->init(state, info));
506
169
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
169
    return Status::OK();
508
169
}
_ZN5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
169
                                                            LocalSinkStateInfo& info) {
504
169
    auto local_state = LocalStateType::create_unique(this, state);
505
169
    RETURN_IF_ERROR(local_state->init(state, info));
506
169
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
169
    return Status::OK();
508
169
}
509
510
template <typename LocalStateType>
511
1.39M
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
0
                                 LocalExchangeSharedState>) {
514
0
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
0
                                        MultiCastSharedState>) {
517
0
        throw Exception(Status::FatalError("should not reach here!"));
518
1.39M
    } else {
519
1.39M
        auto ss = LocalStateType::SharedStateType::create_shared();
520
1.39M
        ss->id = operator_id();
521
1.39M
        for (auto& dest : dests_id()) {
522
1.38M
            ss->related_op_ids.insert(dest);
523
1.38M
        }
524
1.39M
        return ss;
525
1.39M
    }
526
1.39M
}
_ZNK5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
105k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
105k
    } else {
519
105k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
105k
        ss->id = operator_id();
521
105k
        for (auto& dest : dests_id()) {
522
105k
            ss->related_op_ids.insert(dest);
523
105k
        }
524
105k
        return ss;
525
105k
    }
526
105k
}
_ZNK5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
364k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
364k
    } else {
519
364k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
364k
        ss->id = operator_id();
521
364k
        for (auto& dest : dests_id()) {
522
362k
            ss->related_op_ids.insert(dest);
523
362k
        }
524
364k
        return ss;
525
364k
    }
526
364k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
6
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
6
    } else {
519
6
        auto ss = LocalStateType::SharedStateType::create_shared();
520
6
        ss->id = operator_id();
521
6
        for (auto& dest : dests_id()) {
522
6
            ss->related_op_ids.insert(dest);
523
6
        }
524
6
        return ss;
525
6
    }
526
6
}
_ZNK5doris17DataSinkOperatorXINS_24ResultFileSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
372
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
372
    } else {
519
372
        auto ss = LocalStateType::SharedStateType::create_shared();
520
372
        ss->id = operator_id();
521
372
        for (auto& dest : dests_id()) {
522
372
            ss->related_op_ids.insert(dest);
523
372
        }
524
372
        return ss;
525
372
    }
526
372
}
_ZNK5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
50.0k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
50.0k
    } else {
519
50.0k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
50.0k
        ss->id = operator_id();
521
50.0k
        for (auto& dest : dests_id()) {
522
49.5k
            ss->related_op_ids.insert(dest);
523
49.5k
        }
524
50.0k
        return ss;
525
50.0k
    }
526
50.0k
}
_ZNK5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE19create_shared_stateEv
Line
Count
Source
511
18
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
18
    } else {
519
18
        auto ss = LocalStateType::SharedStateType::create_shared();
520
18
        ss->id = operator_id();
521
18
        for (auto& dest : dests_id()) {
522
18
            ss->related_op_ids.insert(dest);
523
18
        }
524
18
        return ss;
525
18
    }
526
18
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
16
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
16
    } else {
519
16
        auto ss = LocalStateType::SharedStateType::create_shared();
520
16
        ss->id = operator_id();
521
16
        for (auto& dest : dests_id()) {
522
16
            ss->related_op_ids.insert(dest);
523
16
        }
524
16
        return ss;
525
16
    }
526
16
}
_ZNK5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
8
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
8
    } else {
519
8
        auto ss = LocalStateType::SharedStateType::create_shared();
520
8
        ss->id = operator_id();
521
8
        for (auto& dest : dests_id()) {
522
8
            ss->related_op_ids.insert(dest);
523
8
        }
524
8
        return ss;
525
8
    }
526
8
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_25PaimonTableSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
8
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
8
    } else {
519
8
        auto ss = LocalStateType::SharedStateType::create_shared();
520
8
        ss->id = operator_id();
521
8
        for (auto& dest : dests_id()) {
522
8
            ss->related_op_ids.insert(dest);
523
8
        }
524
8
        return ss;
525
8
    }
526
8
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27IcebergDeleteSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26IcebergMergeSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_21MCTableSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
9.93k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
9.93k
    } else {
519
9.93k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
9.93k
        ss->id = operator_id();
521
9.93k
        for (auto& dest : dests_id()) {
522
9.91k
            ss->related_op_ids.insert(dest);
523
9.91k
        }
524
9.93k
        return ss;
525
9.93k
    }
526
9.93k
}
_ZNK5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
15
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
15
    } else {
519
15
        auto ss = LocalStateType::SharedStateType::create_shared();
520
15
        ss->id = operator_id();
521
15
        for (auto& dest : dests_id()) {
522
15
            ss->related_op_ids.insert(dest);
523
15
        }
524
15
        return ss;
525
15
    }
526
15
}
_ZNK5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
236k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
236k
    } else {
519
236k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
236k
        ss->id = operator_id();
521
236k
        for (auto& dest : dests_id()) {
522
236k
            ss->related_op_ids.insert(dest);
523
236k
        }
524
236k
        return ss;
525
236k
    }
526
236k
}
_ZNK5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
162
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
162
    } else {
519
162
        auto ss = LocalStateType::SharedStateType::create_shared();
520
162
        ss->id = operator_id();
521
162
        for (auto& dest : dests_id()) {
522
162
            ss->related_op_ids.insert(dest);
523
162
        }
524
162
        return ss;
525
162
    }
526
162
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
102k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
102k
    } else {
519
102k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
102k
        ss->id = operator_id();
521
102k
        for (auto& dest : dests_id()) {
522
102k
            ss->related_op_ids.insert(dest);
523
102k
        }
524
102k
        return ss;
525
102k
    }
526
102k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
130
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
130
    } else {
519
130
        auto ss = LocalStateType::SharedStateType::create_shared();
520
130
        ss->id = operator_id();
521
130
        for (auto& dest : dests_id()) {
522
130
            ss->related_op_ids.insert(dest);
523
130
        }
524
130
        return ss;
525
130
    }
526
130
}
_ZNK5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
511k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
511k
    } else {
519
511k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
511k
        ss->id = operator_id();
521
511k
        for (auto& dest : dests_id()) {
522
509k
            ss->related_op_ids.insert(dest);
523
509k
        }
524
511k
        return ss;
525
511k
    }
526
511k
}
_ZNK5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
6.05k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
6.05k
    } else {
519
6.05k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
6.05k
        ss->id = operator_id();
521
6.05k
        for (auto& dest : dests_id()) {
522
6.04k
            ss->related_op_ids.insert(dest);
523
6.04k
        }
524
6.05k
        return ss;
525
6.05k
    }
526
6.05k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
410
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
410
    } else {
519
410
        auto ss = LocalStateType::SharedStateType::create_shared();
520
410
        ss->id = operator_id();
521
410
        for (auto& dest : dests_id()) {
522
409
            ss->related_op_ids.insert(dest);
523
409
        }
524
410
        return ss;
525
410
    }
526
410
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE19create_shared_stateEv
Line
Count
Source
511
2.70k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
2.70k
    } else {
519
2.70k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
2.70k
        ss->id = operator_id();
521
2.70k
        for (auto& dest : dests_id()) {
522
2.70k
            ss->related_op_ids.insert(dest);
523
2.70k
        }
524
2.70k
        return ss;
525
2.70k
    }
526
2.70k
}
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE19create_shared_stateEv
Line
Count
Source
511
2.63k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
2.63k
    } else {
519
2.63k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
2.63k
        ss->id = operator_id();
521
2.63k
        for (auto& dest : dests_id()) {
522
2.63k
            ss->related_op_ids.insert(dest);
523
2.63k
        }
524
2.63k
        return ss;
525
2.63k
    }
526
2.63k
}
_ZNK5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
3
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
3
    } else {
519
3
        auto ss = LocalStateType::SharedStateType::create_shared();
520
3
        ss->id = operator_id();
521
3
        for (auto& dest : dests_id()) {
522
3
            ss->related_op_ids.insert(dest);
523
3
        }
524
3
        return ss;
525
3
    }
526
3
}
_ZNK5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
567
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
567
    } else {
519
567
        auto ss = LocalStateType::SharedStateType::create_shared();
520
567
        ss->id = operator_id();
521
567
        for (auto& dest : dests_id()) {
522
567
            ss->related_op_ids.insert(dest);
523
567
        }
524
567
        return ss;
525
567
    }
526
567
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
105
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
105
    } else {
519
105
        auto ss = LocalStateType::SharedStateType::create_shared();
520
105
        ss->id = operator_id();
521
105
        for (auto& dest : dests_id()) {
522
105
            ss->related_op_ids.insert(dest);
523
105
        }
524
105
        return ss;
525
105
    }
526
105
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE19create_shared_stateEv
527
528
template <typename LocalStateType>
529
2.00M
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.00M
    auto local_state = LocalStateType::create_unique(state, this);
531
2.00M
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.00M
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.00M
    return Status::OK();
534
2.00M
}
_ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
70.3k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
70.3k
    auto local_state = LocalStateType::create_unique(state, this);
531
70.3k
    RETURN_IF_ERROR(local_state->init(state, info));
532
70.3k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
70.3k
    return Status::OK();
534
70.3k
}
_ZN5doris9OperatorXINS_18OlapScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
253k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
253k
    auto local_state = LocalStateType::create_unique(state, this);
531
253k
    RETURN_IF_ERROR(local_state->init(state, info));
532
253k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
253k
    return Status::OK();
534
253k
}
_ZN5doris9OperatorXINS_21GroupCommitLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
136
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
136
    auto local_state = LocalStateType::create_unique(state, this);
531
136
    RETURN_IF_ERROR(local_state->init(state, info));
532
136
    state->emplace_local_state(operator_id(), std::move(local_state));
533
136
    return Status::OK();
534
136
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_18JDBCScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_18FileScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
3.37k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
3.37k
    auto local_state = LocalStateType::create_unique(state, this);
531
3.37k
    RETURN_IF_ERROR(local_state->init(state, info));
532
3.37k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
3.37k
    return Status::OK();
534
3.37k
}
_ZN5doris9OperatorXINS_18AnalyticLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
9.78k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
9.78k
    auto local_state = LocalStateType::create_unique(state, this);
531
9.78k
    RETURN_IF_ERROR(local_state->init(state, info));
532
9.78k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
9.78k
    return Status::OK();
534
9.78k
}
_ZN5doris9OperatorXINS_14SortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
9.10k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
9.10k
    auto local_state = LocalStateType::create_unique(state, this);
531
9.10k
    RETURN_IF_ERROR(local_state->init(state, info));
532
9.10k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
9.10k
    return Status::OK();
534
9.10k
}
_ZN5doris9OperatorXINS_19SpillSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
153
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
153
    auto local_state = LocalStateType::create_unique(state, this);
531
153
    RETURN_IF_ERROR(local_state->init(state, info));
532
153
    state->emplace_local_state(operator_id(), std::move(local_state));
533
153
    return Status::OK();
534
153
}
_ZN5doris9OperatorXINS_24LocalMergeSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
226k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
226k
    auto local_state = LocalStateType::create_unique(state, this);
531
226k
    RETURN_IF_ERROR(local_state->init(state, info));
532
226k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
226k
    return Status::OK();
534
226k
}
_ZN5doris9OperatorXINS_13AggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
102k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
102k
    auto local_state = LocalStateType::create_unique(state, this);
531
102k
    RETURN_IF_ERROR(local_state->init(state, info));
532
102k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
102k
    return Status::OK();
534
102k
}
_ZN5doris9OperatorXINS_21BucketedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
71.0k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
71.0k
    auto local_state = LocalStateType::create_unique(state, this);
531
71.0k
    RETURN_IF_ERROR(local_state->init(state, info));
532
71.0k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
71.0k
    return Status::OK();
534
71.0k
}
_ZN5doris9OperatorXINS_24PartitionedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
121
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
121
    auto local_state = LocalStateType::create_unique(state, this);
531
121
    RETURN_IF_ERROR(local_state->init(state, info));
532
121
    state->emplace_local_state(operator_id(), std::move(local_state));
533
121
    return Status::OK();
534
121
}
_ZN5doris9OperatorXINS_23TableFunctionLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
5.89k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
5.89k
    auto local_state = LocalStateType::create_unique(state, this);
531
5.89k
    RETURN_IF_ERROR(local_state->init(state, info));
532
5.89k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
5.89k
    return Status::OK();
534
5.89k
}
_ZN5doris9OperatorXINS_18ExchangeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
271k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
271k
    auto local_state = LocalStateType::create_unique(state, this);
531
271k
    RETURN_IF_ERROR(local_state->init(state, info));
532
271k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
271k
    return Status::OK();
534
271k
}
_ZN5doris9OperatorXINS_16RepeatLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.43k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.43k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.43k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.43k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.43k
    return Status::OK();
534
1.43k
}
_ZN5doris9OperatorXINS_29NestedLoopJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
6.03k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
6.03k
    auto local_state = LocalStateType::create_unique(state, this);
531
6.03k
    RETURN_IF_ERROR(local_state->init(state, info));
532
6.03k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
6.03k
    return Status::OK();
534
6.03k
}
_ZN5doris9OperatorXINS_23AssertNumRowsLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
29
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
29
    auto local_state = LocalStateType::create_unique(state, this);
531
29
    RETURN_IF_ERROR(local_state->init(state, info));
532
29
    state->emplace_local_state(operator_id(), std::move(local_state));
533
29
    return Status::OK();
534
29
}
_ZN5doris9OperatorXINS_18EmptySetLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.59k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.59k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.59k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.59k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.59k
    return Status::OK();
534
1.59k
}
_ZN5doris9OperatorXINS_21UnionSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
55.8k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
55.8k
    auto local_state = LocalStateType::create_unique(state, this);
531
55.8k
    RETURN_IF_ERROR(local_state->init(state, info));
532
55.8k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
55.8k
    return Status::OK();
534
55.8k
}
_ZN5doris9OperatorXINS_35MultiCastDataStreamSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
5.16k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
5.16k
    auto local_state = LocalStateType::create_unique(state, this);
531
5.16k
    RETURN_IF_ERROR(local_state->init(state, info));
532
5.16k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
5.16k
    return Status::OK();
534
5.16k
}
_ZN5doris9OperatorXINS_29PartitionSortSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
304
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
304
    auto local_state = LocalStateType::create_unique(state, this);
531
304
    RETURN_IF_ERROR(local_state->init(state, info));
532
304
    state->emplace_local_state(operator_id(), std::move(local_state));
533
304
    return Status::OK();
534
304
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.70k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.70k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.70k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.70k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.70k
    return Status::OK();
534
2.70k
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.65k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.65k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.65k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.65k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.65k
    return Status::OK();
534
2.65k
}
_ZN5doris9OperatorXINS_17DataGenLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
607
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
607
    auto local_state = LocalStateType::create_unique(state, this);
531
607
    RETURN_IF_ERROR(local_state->init(state, info));
532
607
    state->emplace_local_state(operator_id(), std::move(local_state));
533
607
    return Status::OK();
534
607
}
_ZN5doris9OperatorXINS_20SchemaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.72k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.72k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.72k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.72k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.72k
    return Status::OK();
534
1.72k
}
_ZN5doris9OperatorXINS_18MetaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
10.7k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
10.7k
    auto local_state = LocalStateType::create_unique(state, this);
531
10.7k
    RETURN_IF_ERROR(local_state->init(state, info));
532
10.7k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
10.7k
    return Status::OK();
534
10.7k
}
_ZN5doris9OperatorXINS_29LocalExchangeSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
625k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
625k
    auto local_state = LocalStateType::create_unique(state, this);
531
625k
    RETURN_IF_ERROR(local_state->init(state, info));
532
625k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
625k
    return Status::OK();
534
625k
}
_ZN5doris9OperatorXINS_34PartitionedHashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
3
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
3
    auto local_state = LocalStateType::create_unique(state, this);
531
3
    RETURN_IF_ERROR(local_state->init(state, info));
532
3
    state->emplace_local_state(operator_id(), std::move(local_state));
533
3
    return Status::OK();
534
3
}
_ZN5doris9OperatorXINS_21CacheSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
14
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
14
    auto local_state = LocalStateType::create_unique(state, this);
531
14
    RETURN_IF_ERROR(local_state->init(state, info));
532
14
    state->emplace_local_state(operator_id(), std::move(local_state));
533
14
    return Status::OK();
534
14
}
_ZN5doris9OperatorXINS_22RecCTESourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
169
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
169
    auto local_state = LocalStateType::create_unique(state, this);
531
169
    RETURN_IF_ERROR(local_state->init(state, info));
532
169
    state->emplace_local_state(operator_id(), std::move(local_state));
533
169
    return Status::OK();
534
169
}
_ZN5doris9OperatorXINS_20RecCTEScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.20k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.20k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.20k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.20k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.20k
    return Status::OK();
534
2.20k
}
_ZN5doris9OperatorXINS_25MaterializationLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
801
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
801
    auto local_state = LocalStateType::create_unique(state, this);
531
801
    RETURN_IF_ERROR(local_state->init(state, info));
532
801
    state->emplace_local_state(operator_id(), std::move(local_state));
533
801
    return Status::OK();
534
801
}
_ZN5doris9OperatorXINS_16SelectLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
979
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
979
    auto local_state = LocalStateType::create_unique(state, this);
531
979
    RETURN_IF_ERROR(local_state->init(state, info));
532
979
    state->emplace_local_state(operator_id(), std::move(local_state));
533
979
    return Status::OK();
534
979
}
_ZN5doris9OperatorXINS_22StreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
7.21k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
7.21k
    auto local_state = LocalStateType::create_unique(state, this);
531
7.21k
    RETURN_IF_ERROR(local_state->init(state, info));
532
7.21k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
7.21k
    return Status::OK();
534
7.21k
}
_ZN5doris9OperatorXINS_30DistinctStreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
253k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
253k
    auto local_state = LocalStateType::create_unique(state, this);
531
253k
    RETURN_IF_ERROR(local_state->init(state, info));
532
253k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
253k
    return Status::OK();
534
253k
}
535
536
PipelineXSinkLocalStateBase::PipelineXSinkLocalStateBase(DataSinkOperatorXBase* parent,
537
                                                         RuntimeState* state)
538
1.72M
        : _parent(parent), _state(state) {}
539
540
PipelineXLocalStateBase::PipelineXLocalStateBase(RuntimeState* state, OperatorXBase* parent)
541
1.98M
        : _num_rows_returned(0),
542
1.98M
          _rows_returned_counter(nullptr),
543
1.98M
          _parent(parent),
544
1.98M
          _state(state),
545
1.98M
          _budget(state->batch_size(), state->preferred_block_size_bytes()) {}
546
547
template <typename SharedStateArg>
548
2.00M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
2.00M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
2.00M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
2.00M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
2.00M
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
2.00M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
2.00M
    _operator_profile->add_child(_common_profile.get(), true);
557
2.00M
    _operator_profile->add_child(_custom_profile.get(), true);
558
2.00M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
2.00M
    if constexpr (!is_fake_shared) {
560
1.18M
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
706k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
706k
                                    .first.get()
563
706k
                                    ->template cast<SharedStateArg>();
564
565
706k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
706k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
706k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
706k
        } else if (info.shared_state) {
569
418k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
0
                DCHECK(false);
571
0
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
418k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
418k
            _dependency = _shared_state->create_source_dependency(
576
418k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
418k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
418k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
418k
        } else {
580
65.3k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
4.78k
                DCHECK(false);
582
4.78k
            }
583
65.3k
        }
584
1.18M
    }
585
586
2.00M
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
2.00M
    _rows_returned_counter =
591
2.00M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
2.00M
    _blocks_returned_counter =
593
2.00M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
2.00M
    _output_block_bytes_counter =
595
2.00M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
2.00M
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
2.00M
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
2.00M
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
2.00M
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
2.00M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
2.00M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
2.00M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
2.00M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
2.00M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
2.00M
    _memory_used_counter =
606
2.00M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
2.00M
    _common_profile->add_info_string("IsColocate",
608
2.00M
                                     std::to_string(_parent->is_colocated_operator()));
609
2.00M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
2.00M
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
2.00M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
2.00M
    return Status::OK();
613
2.00M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
70.6k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
70.6k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
70.6k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
70.6k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
70.6k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
70.6k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
70.6k
    _operator_profile->add_child(_common_profile.get(), true);
557
70.6k
    _operator_profile->add_child(_custom_profile.get(), true);
558
70.6k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
70.6k
    if constexpr (!is_fake_shared) {
560
70.6k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
13.2k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
13.2k
                                    .first.get()
563
13.2k
                                    ->template cast<SharedStateArg>();
564
565
13.2k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
13.2k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
13.2k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
57.3k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
56.3k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
56.3k
            _dependency = _shared_state->create_source_dependency(
576
56.3k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
56.3k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
56.3k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
56.3k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
1.01k
        }
584
70.6k
    }
585
586
70.6k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
70.6k
    _rows_returned_counter =
591
70.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
70.6k
    _blocks_returned_counter =
593
70.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
70.6k
    _output_block_bytes_counter =
595
70.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
70.6k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
70.6k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
70.6k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
70.6k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
70.6k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
70.6k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
70.6k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
70.6k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
70.6k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
70.6k
    _memory_used_counter =
606
70.6k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
70.6k
    _common_profile->add_info_string("IsColocate",
608
70.6k
                                     std::to_string(_parent->is_colocated_operator()));
609
70.6k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
70.6k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
70.6k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
70.6k
    return Status::OK();
613
70.6k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
4
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
4
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
4
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
4
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
4
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
4
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
4
    _operator_profile->add_child(_common_profile.get(), true);
557
4
    _operator_profile->add_child(_custom_profile.get(), true);
558
4
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
4
    if constexpr (!is_fake_shared) {
560
4
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
4
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
4
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
4
            _dependency = _shared_state->create_source_dependency(
576
4
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
4
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
4
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
4
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
4
    }
585
586
4
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
4
    _rows_returned_counter =
591
4
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
4
    _blocks_returned_counter =
593
4
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
4
    _output_block_bytes_counter =
595
4
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
4
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
4
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
4
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
4
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
4
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
4
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
4
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
4
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
4
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
4
    _memory_used_counter =
606
4
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
4
    _common_profile->add_info_string("IsColocate",
608
4
                                     std::to_string(_parent->is_colocated_operator()));
609
4
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
4
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
4
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
4
    return Status::OK();
613
4
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
235k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
235k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
235k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
235k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
235k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
235k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
235k
    _operator_profile->add_child(_common_profile.get(), true);
557
235k
    _operator_profile->add_child(_custom_profile.get(), true);
558
235k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
235k
    if constexpr (!is_fake_shared) {
560
235k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
235k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
230k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
230k
            _dependency = _shared_state->create_source_dependency(
576
230k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
230k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
230k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
230k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
5.59k
        }
584
235k
    }
585
586
235k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
235k
    _rows_returned_counter =
591
235k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
235k
    _blocks_returned_counter =
593
235k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
235k
    _output_block_bytes_counter =
595
235k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
235k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
235k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
235k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
235k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
235k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
235k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
235k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
235k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
235k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
235k
    _memory_used_counter =
606
235k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
235k
    _common_profile->add_info_string("IsColocate",
608
235k
                                     std::to_string(_parent->is_colocated_operator()));
609
235k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
235k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
235k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
235k
    return Status::OK();
613
235k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
153
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
153
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
153
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
153
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
153
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
153
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
153
    _operator_profile->add_child(_common_profile.get(), true);
557
153
    _operator_profile->add_child(_custom_profile.get(), true);
558
153
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
153
    if constexpr (!is_fake_shared) {
560
153
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
153
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
153
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
153
            _dependency = _shared_state->create_source_dependency(
576
153
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
153
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
153
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
153
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
153
    }
585
586
153
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
153
    _rows_returned_counter =
591
153
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
153
    _blocks_returned_counter =
593
153
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
153
    _output_block_bytes_counter =
595
153
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
153
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
153
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
153
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
153
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
153
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
153
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
153
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
153
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
153
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
153
    _memory_used_counter =
606
153
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
153
    _common_profile->add_info_string("IsColocate",
608
153
                                     std::to_string(_parent->is_colocated_operator()));
609
153
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
153
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
153
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
153
    return Status::OK();
613
153
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
6.03k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
6.03k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
6.03k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
6.03k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
6.03k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
6.03k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
6.03k
    _operator_profile->add_child(_common_profile.get(), true);
557
6.03k
    _operator_profile->add_child(_custom_profile.get(), true);
558
6.03k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
6.03k
    if constexpr (!is_fake_shared) {
560
6.03k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
6.03k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
5.97k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
5.97k
            _dependency = _shared_state->create_source_dependency(
576
5.97k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
5.97k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
5.97k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
5.97k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
61
        }
584
6.03k
    }
585
586
6.03k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
6.03k
    _rows_returned_counter =
591
6.03k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
6.03k
    _blocks_returned_counter =
593
6.03k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
6.03k
    _output_block_bytes_counter =
595
6.03k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
6.03k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
6.03k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
6.03k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
6.03k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
6.03k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
6.03k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
6.03k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
6.03k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
6.03k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
6.03k
    _memory_used_counter =
606
6.03k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
6.03k
    _common_profile->add_info_string("IsColocate",
608
6.03k
                                     std::to_string(_parent->is_colocated_operator()));
609
6.03k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
6.03k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
6.03k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
6.03k
    return Status::OK();
613
6.03k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
9.92k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
9.92k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
9.92k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
9.92k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
9.92k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
9.92k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
9.92k
    _operator_profile->add_child(_common_profile.get(), true);
557
9.92k
    _operator_profile->add_child(_custom_profile.get(), true);
558
9.92k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
9.92k
    if constexpr (!is_fake_shared) {
560
9.92k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
9.92k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
9.80k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
9.80k
            _dependency = _shared_state->create_source_dependency(
576
9.80k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
9.80k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
9.80k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
9.80k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
119
        }
584
9.92k
    }
585
586
9.92k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
9.92k
    _rows_returned_counter =
591
9.92k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
9.92k
    _blocks_returned_counter =
593
9.92k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
9.92k
    _output_block_bytes_counter =
595
9.92k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
9.92k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
9.92k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
9.92k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
9.92k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
9.92k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
9.92k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
9.92k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
9.92k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
9.92k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
9.92k
    _memory_used_counter =
606
9.92k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
9.92k
    _common_profile->add_info_string("IsColocate",
608
9.92k
                                     std::to_string(_parent->is_colocated_operator()));
609
9.92k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
9.92k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
9.92k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
9.92k
    return Status::OK();
613
9.92k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
102k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
102k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
102k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
102k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
102k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
102k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
102k
    _operator_profile->add_child(_common_profile.get(), true);
557
102k
    _operator_profile->add_child(_custom_profile.get(), true);
558
102k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
102k
    if constexpr (!is_fake_shared) {
560
102k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
102k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
100k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
100k
            _dependency = _shared_state->create_source_dependency(
576
100k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
100k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
100k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
100k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
1.82k
        }
584
102k
    }
585
586
102k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
102k
    _rows_returned_counter =
591
102k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
102k
    _blocks_returned_counter =
593
102k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
102k
    _output_block_bytes_counter =
595
102k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
102k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
102k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
102k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
102k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
102k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
102k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
102k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
102k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
102k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
102k
    _memory_used_counter =
606
102k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
102k
    _common_profile->add_info_string("IsColocate",
608
102k
                                     std::to_string(_parent->is_colocated_operator()));
609
102k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
102k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
102k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
102k
    return Status::OK();
613
102k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
71.0k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
71.0k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
71.0k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
71.0k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
71.0k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
71.0k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
71.0k
    _operator_profile->add_child(_common_profile.get(), true);
557
71.0k
    _operator_profile->add_child(_custom_profile.get(), true);
558
71.0k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
71.0k
    if constexpr (!is_fake_shared) {
560
71.0k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
71.0k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
71.0k
                                    .first.get()
563
71.0k
                                    ->template cast<SharedStateArg>();
564
565
71.0k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
71.0k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
71.0k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
18.4E
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
0
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
0
            _dependency = _shared_state->create_source_dependency(
576
0
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
18.4E
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
18.4E
        }
584
71.0k
    }
585
586
71.0k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
71.0k
    _rows_returned_counter =
591
71.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
71.0k
    _blocks_returned_counter =
593
71.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
71.0k
    _output_block_bytes_counter =
595
71.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
71.0k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
71.0k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
71.0k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
71.0k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
71.0k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
71.0k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
71.0k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
71.0k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
71.0k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
71.0k
    _memory_used_counter =
606
71.0k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
71.0k
    _common_profile->add_info_string("IsColocate",
608
71.0k
                                     std::to_string(_parent->is_colocated_operator()));
609
71.0k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
71.0k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
71.0k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
71.0k
    return Status::OK();
613
71.0k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
121
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
121
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
121
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
121
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
121
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
121
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
121
    _operator_profile->add_child(_common_profile.get(), true);
557
121
    _operator_profile->add_child(_custom_profile.get(), true);
558
121
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
121
    if constexpr (!is_fake_shared) {
560
121
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
121
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
121
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
121
            _dependency = _shared_state->create_source_dependency(
576
121
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
121
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
121
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
121
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
121
    }
585
586
121
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
121
    _rows_returned_counter =
591
121
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
121
    _blocks_returned_counter =
593
121
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
121
    _output_block_bytes_counter =
595
121
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
121
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
121
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
121
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
121
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
121
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
121
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
121
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
121
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
121
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
121
    _memory_used_counter =
606
121
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
121
    _common_profile->add_info_string("IsColocate",
608
121
                                     std::to_string(_parent->is_colocated_operator()));
609
121
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
121
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
121
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
121
    return Status::OK();
613
121
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
812k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
812k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
812k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
812k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
812k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
812k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
812k
    _operator_profile->add_child(_common_profile.get(), true);
557
812k
    _operator_profile->add_child(_custom_profile.get(), true);
558
812k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
    if constexpr (!is_fake_shared) {
560
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
                                    .first.get()
563
                                    ->template cast<SharedStateArg>();
564
565
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
            _dependency = _shared_state->create_source_dependency(
576
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
        }
584
    }
585
586
812k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
812k
    _rows_returned_counter =
591
812k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
812k
    _blocks_returned_counter =
593
812k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
812k
    _output_block_bytes_counter =
595
812k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
812k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
812k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
812k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
812k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
812k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
812k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
812k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
812k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
812k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
812k
    _memory_used_counter =
606
812k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
812k
    _common_profile->add_info_string("IsColocate",
608
812k
                                     std::to_string(_parent->is_colocated_operator()));
609
812k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
812k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
812k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
812k
    return Status::OK();
613
812k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
55.7k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
55.7k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
55.7k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
55.7k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
55.7k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
55.7k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
55.7k
    _operator_profile->add_child(_common_profile.get(), true);
557
55.7k
    _operator_profile->add_child(_custom_profile.get(), true);
558
55.7k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
55.7k
    if constexpr (!is_fake_shared) {
560
55.7k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
55.7k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
3.93k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
3.93k
            _dependency = _shared_state->create_source_dependency(
576
3.93k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
3.93k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
3.93k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
51.8k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
51.8k
        }
584
55.7k
    }
585
586
55.7k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
55.7k
    _rows_returned_counter =
591
55.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
55.7k
    _blocks_returned_counter =
593
55.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
55.7k
    _output_block_bytes_counter =
595
55.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
55.7k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
55.7k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
55.7k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
55.7k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
55.7k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
55.7k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
55.7k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
55.7k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
55.7k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
55.7k
    _memory_used_counter =
606
55.7k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
55.7k
    _common_profile->add_info_string("IsColocate",
608
55.7k
                                     std::to_string(_parent->is_colocated_operator()));
609
55.7k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
55.7k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
55.7k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
55.7k
    return Status::OK();
613
55.7k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
26
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
26
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
26
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
26
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
26
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
26
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
26
    _operator_profile->add_child(_common_profile.get(), true);
557
26
    _operator_profile->add_child(_custom_profile.get(), true);
558
26
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
26
    if constexpr (!is_fake_shared) {
560
26
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
26
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
26
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
26
            _dependency = _shared_state->create_source_dependency(
576
26
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
26
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
26
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
26
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
26
    }
585
586
26
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
26
    _rows_returned_counter =
591
26
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
26
    _blocks_returned_counter =
593
26
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
26
    _output_block_bytes_counter =
595
26
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
26
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
26
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
26
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
26
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
26
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
26
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
26
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
26
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
26
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
26
    _memory_used_counter =
606
26
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
26
    _common_profile->add_info_string("IsColocate",
608
26
                                     std::to_string(_parent->is_colocated_operator()));
609
26
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
26
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
26
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
26
    return Status::OK();
613
26
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
5.16k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
5.16k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
5.16k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
5.16k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
5.16k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
5.16k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
5.16k
    _operator_profile->add_child(_common_profile.get(), true);
557
5.16k
    _operator_profile->add_child(_custom_profile.get(), true);
558
5.16k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
5.16k
    if constexpr (!is_fake_shared) {
560
5.16k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
5.16k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
5.12k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
5.12k
            _dependency = _shared_state->create_source_dependency(
576
5.12k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
5.12k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
5.12k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
5.12k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
46
        }
584
5.16k
    }
585
586
5.16k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
5.16k
    _rows_returned_counter =
591
5.16k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
5.16k
    _blocks_returned_counter =
593
5.16k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
5.16k
    _output_block_bytes_counter =
595
5.16k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
5.16k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
5.16k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
5.16k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
5.16k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
5.16k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
5.16k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
5.16k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
5.16k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
5.16k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
5.16k
    _memory_used_counter =
606
5.16k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
5.16k
    _common_profile->add_info_string("IsColocate",
608
5.16k
                                     std::to_string(_parent->is_colocated_operator()));
609
5.16k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
5.16k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
5.16k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
5.16k
    return Status::OK();
613
5.16k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
408
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
408
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
408
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
408
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
408
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
408
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
408
    _operator_profile->add_child(_common_profile.get(), true);
557
408
    _operator_profile->add_child(_custom_profile.get(), true);
558
408
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
408
    if constexpr (!is_fake_shared) {
560
408
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
408
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
396
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
396
            _dependency = _shared_state->create_source_dependency(
576
396
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
396
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
396
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
396
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
12
        }
584
408
    }
585
586
408
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
408
    _rows_returned_counter =
591
408
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
408
    _blocks_returned_counter =
593
408
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
408
    _output_block_bytes_counter =
595
408
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
408
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
408
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
408
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
408
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
408
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
408
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
408
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
408
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
408
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
408
    _memory_used_counter =
606
408
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
408
    _common_profile->add_info_string("IsColocate",
608
408
                                     std::to_string(_parent->is_colocated_operator()));
609
408
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
408
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
408
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
408
    return Status::OK();
613
408
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
5.39k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
5.39k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
5.39k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
5.39k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
5.39k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
5.39k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
5.39k
    _operator_profile->add_child(_common_profile.get(), true);
557
5.39k
    _operator_profile->add_child(_custom_profile.get(), true);
558
5.39k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
5.39k
    if constexpr (!is_fake_shared) {
560
5.39k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
5.39k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
5.30k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
5.30k
            _dependency = _shared_state->create_source_dependency(
576
5.30k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
5.30k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
5.30k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
5.30k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
88
        }
584
5.39k
    }
585
586
5.39k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
5.39k
    _rows_returned_counter =
591
5.39k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
5.39k
    _blocks_returned_counter =
593
5.39k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
5.39k
    _output_block_bytes_counter =
595
5.39k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
5.39k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
5.39k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
5.39k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
5.39k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
5.39k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
5.39k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
5.39k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
5.39k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
5.39k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
5.39k
    _memory_used_counter =
606
5.39k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
5.39k
    _common_profile->add_info_string("IsColocate",
608
5.39k
                                     std::to_string(_parent->is_colocated_operator()));
609
5.39k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
5.39k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
5.39k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
5.39k
    return Status::OK();
613
5.39k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
626k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
626k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
626k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
626k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
626k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
626k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
626k
    _operator_profile->add_child(_common_profile.get(), true);
557
626k
    _operator_profile->add_child(_custom_profile.get(), true);
558
626k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
626k
    if constexpr (!is_fake_shared) {
560
626k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
622k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
622k
                                    .first.get()
563
622k
                                    ->template cast<SharedStateArg>();
564
565
622k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
622k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
622k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
622k
        } else if (info.shared_state) {
569
0
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
0
                DCHECK(false);
571
0
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
0
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
0
            _dependency = _shared_state->create_source_dependency(
576
0
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
4.78k
        } else {
580
4.78k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
4.78k
                DCHECK(false);
582
4.78k
            }
583
4.78k
        }
584
626k
    }
585
586
626k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
626k
    _rows_returned_counter =
591
626k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
626k
    _blocks_returned_counter =
593
626k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
626k
    _output_block_bytes_counter =
595
626k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
626k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
626k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
626k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
626k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
626k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
626k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
626k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
626k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
626k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
626k
    _memory_used_counter =
606
626k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
626k
    _common_profile->add_info_string("IsColocate",
608
626k
                                     std::to_string(_parent->is_colocated_operator()));
609
626k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
626k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
626k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
626k
    return Status::OK();
613
626k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
169
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
169
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
169
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
169
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
169
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
169
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
169
    _operator_profile->add_child(_common_profile.get(), true);
557
169
    _operator_profile->add_child(_custom_profile.get(), true);
558
169
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
169
    if constexpr (!is_fake_shared) {
560
169
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
169
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
169
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
169
            _dependency = _shared_state->create_source_dependency(
576
169
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
169
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
169
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
169
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
169
    }
585
586
169
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
169
    _rows_returned_counter =
591
169
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
169
    _blocks_returned_counter =
593
169
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
169
    _output_block_bytes_counter =
595
169
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
169
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
169
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
169
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
169
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
169
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
169
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
169
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
169
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
169
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
169
    _memory_used_counter =
606
169
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
169
    _common_profile->add_info_string("IsColocate",
608
169
                                     std::to_string(_parent->is_colocated_operator()));
609
169
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
169
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
169
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
169
    return Status::OK();
613
169
}
614
615
template <typename SharedStateArg>
616
2.01M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
2.01M
    _conjuncts.resize(_parent->_conjuncts.size());
618
2.33M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
316k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
316k
    }
621
2.01M
    if (_parent->has_projection()) {
622
397k
        const auto& projection = *_parent->_projection;
623
397k
        _projections.resize(projection.projections.size());
624
2.47M
        for (size_t i = 0; i < _projections.size(); i++) {
625
2.07M
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
2.07M
        }
627
397k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
420k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
22.6k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
403k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
381k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
381k
                        state, _intermediate_projections[i][j]));
633
381k
            }
634
22.6k
        }
635
397k
    }
636
2.01M
    return Status::OK();
637
2.01M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
70.8k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
70.8k
    _conjuncts.resize(_parent->_conjuncts.size());
618
72.8k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
1.95k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1.95k
    }
621
70.8k
    if (_parent->has_projection()) {
622
70.8k
        const auto& projection = *_parent->_projection;
623
70.8k
        _projections.resize(projection.projections.size());
624
392k
        for (size_t i = 0; i < _projections.size(); i++) {
625
321k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
321k
        }
627
70.8k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
82.4k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
11.6k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
337k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
326k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
326k
                        state, _intermediate_projections[i][j]));
633
326k
            }
634
11.6k
        }
635
70.8k
    }
636
70.8k
    return Status::OK();
637
70.8k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
6
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
6
    _conjuncts.resize(_parent->_conjuncts.size());
618
6
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
6
    if (_parent->has_projection()) {
622
3
        const auto& projection = *_parent->_projection;
623
3
        _projections.resize(projection.projections.size());
624
9
        for (size_t i = 0; i < _projections.size(); i++) {
625
6
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
6
        }
627
3
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
3
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
3
    }
636
6
    return Status::OK();
637
6
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
237k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
237k
    _conjuncts.resize(_parent->_conjuncts.size());
618
237k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
237k
    if (_parent->has_projection()) {
622
134
        const auto& projection = *_parent->_projection;
623
134
        _projections.resize(projection.projections.size());
624
624
        for (size_t i = 0; i < _projections.size(); i++) {
625
490
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
490
        }
627
134
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
134
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
134
    }
636
237k
    return Status::OK();
637
237k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
153
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
153
    _conjuncts.resize(_parent->_conjuncts.size());
618
153
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
153
    if (_parent->has_projection()) {
622
0
        const auto& projection = *_parent->_projection;
623
0
        _projections.resize(projection.projections.size());
624
0
        for (size_t i = 0; i < _projections.size(); i++) {
625
0
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
0
        }
627
0
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
0
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
0
    }
636
153
    return Status::OK();
637
153
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
6.06k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
6.06k
    _conjuncts.resize(_parent->_conjuncts.size());
618
6.16k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
92
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
92
    }
621
6.06k
    if (_parent->has_projection()) {
622
6.06k
        const auto& projection = *_parent->_projection;
623
6.06k
        _projections.resize(projection.projections.size());
624
25.7k
        for (size_t i = 0; i < _projections.size(); i++) {
625
19.6k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
19.6k
        }
627
6.06k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
6.10k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
31
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
254
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
223
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
223
                        state, _intermediate_projections[i][j]));
633
223
            }
634
31
        }
635
6.06k
    }
636
6.06k
    return Status::OK();
637
6.06k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
9.96k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
9.96k
    _conjuncts.resize(_parent->_conjuncts.size());
618
10.8k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
879
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
879
    }
621
9.96k
    if (_parent->has_projection()) {
622
5.03k
        const auto& projection = *_parent->_projection;
623
5.03k
        _projections.resize(projection.projections.size());
624
21.5k
        for (size_t i = 0; i < _projections.size(); i++) {
625
16.5k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
16.5k
        }
627
5.03k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
5.11k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
82
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
622
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
540
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
540
                        state, _intermediate_projections[i][j]));
633
540
            }
634
82
        }
635
5.03k
    }
636
9.96k
    return Status::OK();
637
9.96k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
102k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
102k
    _conjuncts.resize(_parent->_conjuncts.size());
618
104k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
1.49k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1.49k
    }
621
102k
    if (_parent->has_projection()) {
622
32.9k
        const auto& projection = *_parent->_projection;
623
32.9k
        _projections.resize(projection.projections.size());
624
296k
        for (size_t i = 0; i < _projections.size(); i++) {
625
263k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
263k
        }
627
32.9k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
33.7k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
739
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
4.59k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
3.85k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
3.85k
                        state, _intermediate_projections[i][j]));
633
3.85k
            }
634
739
        }
635
32.9k
    }
636
102k
    return Status::OK();
637
102k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
71.1k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
71.1k
    _conjuncts.resize(_parent->_conjuncts.size());
618
71.1k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
23
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
23
    }
621
71.1k
    if (_parent->has_projection()) {
622
310
        const auto& projection = *_parent->_projection;
623
310
        _projections.resize(projection.projections.size());
624
1.26k
        for (size_t i = 0; i < _projections.size(); i++) {
625
951
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
951
        }
627
310
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
310
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
310
    }
636
71.1k
    return Status::OK();
637
71.1k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
124
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
124
    _conjuncts.resize(_parent->_conjuncts.size());
618
124
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
124
    if (_parent->has_projection()) {
622
3
        const auto& projection = *_parent->_projection;
623
3
        _projections.resize(projection.projections.size());
624
11
        for (size_t i = 0; i < _projections.size(); i++) {
625
8
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
8
        }
627
3
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
3
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
3
    }
636
124
    return Status::OK();
637
124
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
817k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
817k
    _conjuncts.resize(_parent->_conjuncts.size());
618
1.12M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
311k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
311k
    }
621
817k
    if (_parent->has_projection()) {
622
270k
        const auto& projection = *_parent->_projection;
623
270k
        _projections.resize(projection.projections.size());
624
1.61M
        for (size_t i = 0; i < _projections.size(); i++) {
625
1.34M
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
1.34M
        }
627
270k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
280k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
10.0k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
58.5k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
48.4k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
48.4k
                        state, _intermediate_projections[i][j]));
633
48.4k
            }
634
10.0k
        }
635
270k
    }
636
817k
    return Status::OK();
637
817k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
56.0k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
56.0k
    _conjuncts.resize(_parent->_conjuncts.size());
618
56.0k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
56.0k
    if (_parent->has_projection()) {
622
12.0k
        const auto& projection = *_parent->_projection;
623
12.0k
        _projections.resize(projection.projections.size());
624
116k
        for (size_t i = 0; i < _projections.size(); i++) {
625
104k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
104k
        }
627
12.0k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
12.1k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
119
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
1.98k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
1.86k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
1.86k
                        state, _intermediate_projections[i][j]));
633
1.86k
            }
634
119
        }
635
12.0k
    }
636
56.0k
    return Status::OK();
637
56.0k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
25
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
25
    _conjuncts.resize(_parent->_conjuncts.size());
618
25
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
25
    if (_parent->has_projection()) {
622
0
        const auto& projection = *_parent->_projection;
623
0
        _projections.resize(projection.projections.size());
624
0
        for (size_t i = 0; i < _projections.size(); i++) {
625
0
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
0
        }
627
0
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
0
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
0
    }
636
25
    return Status::OK();
637
25
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
5.14k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
5.14k
    _conjuncts.resize(_parent->_conjuncts.size());
618
5.53k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
386
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
386
    }
621
5.14k
    if (_parent->has_projection()) {
622
0
        const auto& projection = *_parent->_projection;
623
0
        _projections.resize(projection.projections.size());
624
0
        for (size_t i = 0; i < _projections.size(); i++) {
625
0
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
0
        }
627
0
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
0
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
0
    }
636
5.14k
    return Status::OK();
637
5.14k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
409
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
409
    _conjuncts.resize(_parent->_conjuncts.size());
618
409
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
409
    if (_parent->has_projection()) {
622
0
        const auto& projection = *_parent->_projection;
623
0
        _projections.resize(projection.projections.size());
624
0
        for (size_t i = 0; i < _projections.size(); i++) {
625
0
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
0
        }
627
0
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
0
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
0
    }
636
409
    return Status::OK();
637
409
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
5.39k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
5.39k
    _conjuncts.resize(_parent->_conjuncts.size());
618
5.39k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
5.39k
    if (_parent->has_projection()) {
622
107
        const auto& projection = *_parent->_projection;
623
107
        _projections.resize(projection.projections.size());
624
322
        for (size_t i = 0; i < _projections.size(); i++) {
625
215
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
215
        }
627
107
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
107
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
107
    }
636
5.39k
    return Status::OK();
637
5.39k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
631k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
631k
    _conjuncts.resize(_parent->_conjuncts.size());
618
631k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
631k
    if (_parent->has_projection()) {
622
0
        const auto& projection = *_parent->_projection;
623
0
        _projections.resize(projection.projections.size());
624
0
        for (size_t i = 0; i < _projections.size(); i++) {
625
0
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
0
        }
627
0
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
0
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
0
    }
636
631k
    return Status::OK();
637
631k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4openEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
169
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
169
    _conjuncts.resize(_parent->_conjuncts.size());
618
176
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
7
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
7
    }
621
169
    if (_parent->has_projection()) {
622
166
        const auto& projection = *_parent->_projection;
623
166
        _projections.resize(projection.projections.size());
624
491
        for (size_t i = 0; i < _projections.size(); i++) {
625
325
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
325
        }
627
166
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
169
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
3
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
11
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
8
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
8
                        state, _intermediate_projections[i][j]));
633
8
            }
634
3
        }
635
166
    }
636
169
    return Status::OK();
637
169
}
638
639
template <typename SharedStateArg>
640
10.6k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
10.6k
    if (_terminated) {
642
2
        return Status::OK();
643
2
    }
644
10.6k
    _terminated = true;
645
10.6k
    return Status::OK();
646
10.6k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
333
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
333
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
333
    _terminated = true;
645
333
    return Status::OK();
646
333
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
30
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
30
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
30
    _terminated = true;
645
30
    return Status::OK();
646
30
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
60
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
60
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
60
    _terminated = true;
645
60
    return Status::OK();
646
60
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
93
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
93
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
93
    _terminated = true;
645
93
    return Status::OK();
646
93
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
8.75k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
8.75k
    if (_terminated) {
642
1
        return Status::OK();
643
1
    }
644
8.75k
    _terminated = true;
645
8.75k
    return Status::OK();
646
8.75k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
47
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
47
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
47
    _terminated = true;
645
47
    return Status::OK();
646
47
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
1
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
1
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
1
    _terminated = true;
645
1
    return Status::OK();
646
1
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
4
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
4
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
4
    _terminated = true;
645
4
    return Status::OK();
646
4
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
1.30k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
1.30k
    if (_terminated) {
642
1
        return Status::OK();
643
1
    }
644
1.30k
    _terminated = true;
645
1.30k
    return Status::OK();
646
1.30k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
35
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
35
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
35
    _terminated = true;
645
35
    return Status::OK();
646
35
}
647
648
template <typename SharedStateArg>
649
2.27M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
2.27M
    if (_closed) {
651
259k
        return Status::OK();
652
259k
    }
653
2.01M
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
1.19M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
1.19M
    }
656
2.01M
    _closed = true;
657
2.01M
    return Status::OK();
658
2.27M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
70.8k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
70.8k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
70.8k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
70.8k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
70.8k
    }
656
70.8k
    _closed = true;
657
70.8k
    return Status::OK();
658
70.8k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
7
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
7
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
7
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
7
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
7
    }
656
7
    _closed = true;
657
7
    return Status::OK();
658
7
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
470k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
470k
    if (_closed) {
651
235k
        return Status::OK();
652
235k
    }
653
234k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
234k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
234k
    }
656
234k
    _closed = true;
657
234k
    return Status::OK();
658
470k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
153
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
153
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
153
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
153
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
153
    }
656
153
    _closed = true;
657
153
    return Status::OK();
658
153
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
6.06k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
6.06k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
6.06k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
6.06k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
6.06k
    }
656
6.06k
    _closed = true;
657
6.06k
    return Status::OK();
658
6.06k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
9.89k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
9.89k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
9.89k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
9.89k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
9.89k
    }
656
9.89k
    _closed = true;
657
9.89k
    return Status::OK();
658
9.89k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
102k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
102k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
102k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
102k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
102k
    }
656
102k
    _closed = true;
657
102k
    return Status::OK();
658
102k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
70.7k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
70.7k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
70.7k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
70.7k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
70.7k
    }
656
70.7k
    _closed = true;
657
70.7k
    return Status::OK();
658
70.7k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
120
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
120
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
120
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
120
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
120
    }
656
120
    _closed = true;
657
120
    return Status::OK();
658
120
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
835k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
835k
    if (_closed) {
651
17.5k
        return Status::OK();
652
17.5k
    }
653
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
    }
656
817k
    _closed = true;
657
817k
    return Status::OK();
658
835k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
56.0k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
56.0k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
56.0k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
56.0k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
56.0k
    }
656
56.0k
    _closed = true;
657
56.0k
    return Status::OK();
658
56.0k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
28
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
28
    if (_closed) {
651
14
        return Status::OK();
652
14
    }
653
14
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
14
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
14
    }
656
14
    _closed = true;
657
14
    return Status::OK();
658
28
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
5.13k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
5.13k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
5.13k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
5.13k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
5.13k
    }
656
5.13k
    _closed = true;
657
5.13k
    return Status::OK();
658
5.13k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
615
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
615
    if (_closed) {
651
308
        return Status::OK();
652
308
    }
653
307
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
307
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
307
    }
656
307
    _closed = true;
657
307
    return Status::OK();
658
615
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
11.1k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
11.1k
    if (_closed) {
651
5.75k
        return Status::OK();
652
5.75k
    }
653
5.38k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
5.38k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
5.38k
    }
656
5.38k
    _closed = true;
657
5.38k
    return Status::OK();
658
11.1k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
632k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
632k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
632k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
632k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
632k
    }
656
632k
    _closed = true;
657
632k
    return Status::OK();
658
632k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
336
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
336
    if (_closed) {
651
176
        return Status::OK();
652
176
    }
653
160
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
160
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
160
    }
656
160
    _closed = true;
657
160
    return Status::OK();
658
336
}
659
660
template <typename SharedState>
661
1.73M
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
1.73M
    _operator_profile =
664
1.73M
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
1.73M
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
1.73M
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
1.73M
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
1.73M
    _operator_profile->add_child(_common_profile, true);
673
1.73M
    _operator_profile->add_child(_custom_profile, true);
674
675
1.73M
    _operator_profile->set_metadata(_parent->node_id());
676
1.73M
    _wait_for_finish_dependency_timer =
677
1.73M
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
1.73M
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
1.73M
    if constexpr (!is_fake_shared) {
680
1.21M
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
1.21M
            info.shared_state_map.end()) {
682
316k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
232k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
232k
            }
685
316k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
316k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
316k
                                                  ? 0
688
316k
                                                  : info.task_idx]
689
316k
                                  .get();
690
316k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
901k
        } else {
692
901k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
5
                DCHECK(false);
694
5
            }
695
901k
            _shared_state = info.shared_state->template cast<SharedState>();
696
901k
            _dependency = _shared_state->create_sink_dependency(
697
901k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
901k
        }
699
1.21M
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
1.21M
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
1.21M
    }
702
703
1.73M
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
1.73M
    _rows_input_counter =
708
1.73M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
1.73M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
1.73M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
1.73M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
1.73M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
1.73M
    _memory_used_counter =
714
1.73M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
1.73M
    _common_profile->add_info_string("IsColocate",
716
1.73M
                                     std::to_string(_parent->is_colocated_operator()));
717
1.73M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
1.73M
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
1.73M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
1.73M
    return Status::OK();
721
1.73M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
118k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
118k
    _operator_profile =
664
118k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
118k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
118k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
118k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
118k
    _operator_profile->add_child(_common_profile, true);
673
118k
    _operator_profile->add_child(_custom_profile, true);
674
675
118k
    _operator_profile->set_metadata(_parent->node_id());
676
118k
    _wait_for_finish_dependency_timer =
677
118k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
118k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
118k
    if constexpr (!is_fake_shared) {
680
118k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
118k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
13.4k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
13.4k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
13.4k
                                                  ? 0
688
13.4k
                                                  : info.task_idx]
689
13.4k
                                  .get();
690
13.4k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
105k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
105k
            _shared_state = info.shared_state->template cast<SharedState>();
696
105k
            _dependency = _shared_state->create_sink_dependency(
697
105k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
105k
        }
699
118k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
118k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
118k
    }
702
703
118k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
118k
    _rows_input_counter =
708
118k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
118k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
118k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
118k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
118k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
118k
    _memory_used_counter =
714
118k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
118k
    _common_profile->add_info_string("IsColocate",
716
118k
                                     std::to_string(_parent->is_colocated_operator()));
717
118k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
118k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
118k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
118k
    return Status::OK();
721
118k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
5
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
5
    _operator_profile =
664
5
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
5
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
5
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
5
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
5
    _operator_profile->add_child(_common_profile, true);
673
5
    _operator_profile->add_child(_custom_profile, true);
674
675
5
    _operator_profile->set_metadata(_parent->node_id());
676
5
    _wait_for_finish_dependency_timer =
677
5
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
5
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
5
    if constexpr (!is_fake_shared) {
680
5
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
5
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
5
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
5
            _shared_state = info.shared_state->template cast<SharedState>();
696
5
            _dependency = _shared_state->create_sink_dependency(
697
5
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
5
        }
699
5
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
5
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
5
    }
702
703
5
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
5
    _rows_input_counter =
708
5
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
5
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
5
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
5
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
5
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
5
    _memory_used_counter =
714
5
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
5
    _common_profile->add_info_string("IsColocate",
716
5
                                     std::to_string(_parent->is_colocated_operator()));
717
5
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
5
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
5
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
5
    return Status::OK();
721
5
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
236k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
236k
    _operator_profile =
664
236k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
236k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
236k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
236k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
236k
    _operator_profile->add_child(_common_profile, true);
673
236k
    _operator_profile->add_child(_custom_profile, true);
674
675
236k
    _operator_profile->set_metadata(_parent->node_id());
676
236k
    _wait_for_finish_dependency_timer =
677
236k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
236k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
236k
    if constexpr (!is_fake_shared) {
680
236k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
236k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
236k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
236k
            _shared_state = info.shared_state->template cast<SharedState>();
696
236k
            _dependency = _shared_state->create_sink_dependency(
697
236k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
236k
        }
699
236k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
236k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
236k
    }
702
703
236k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
236k
    _rows_input_counter =
708
236k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
236k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
236k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
236k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
236k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
236k
    _memory_used_counter =
714
236k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
236k
    _common_profile->add_info_string("IsColocate",
716
236k
                                     std::to_string(_parent->is_colocated_operator()));
717
236k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
236k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
236k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
236k
    return Status::OK();
721
236k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
160
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
160
    _operator_profile =
664
160
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
160
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
160
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
160
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
160
    _operator_profile->add_child(_common_profile, true);
673
160
    _operator_profile->add_child(_custom_profile, true);
674
675
160
    _operator_profile->set_metadata(_parent->node_id());
676
160
    _wait_for_finish_dependency_timer =
677
160
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
160
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
160
    if constexpr (!is_fake_shared) {
680
160
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
160
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
160
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
160
            _shared_state = info.shared_state->template cast<SharedState>();
696
160
            _dependency = _shared_state->create_sink_dependency(
697
160
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
160
        }
699
160
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
160
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
160
    }
702
703
160
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
160
    _rows_input_counter =
708
160
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
160
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
160
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
160
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
160
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
160
    _memory_used_counter =
714
160
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
160
    _common_profile->add_info_string("IsColocate",
716
160
                                     std::to_string(_parent->is_colocated_operator()));
717
160
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
160
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
160
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
160
    return Status::OK();
721
160
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
6.05k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
6.05k
    _operator_profile =
664
6.05k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
6.05k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
6.05k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
6.05k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
6.05k
    _operator_profile->add_child(_common_profile, true);
673
6.05k
    _operator_profile->add_child(_custom_profile, true);
674
675
6.05k
    _operator_profile->set_metadata(_parent->node_id());
676
6.05k
    _wait_for_finish_dependency_timer =
677
6.05k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
6.05k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
6.05k
    if constexpr (!is_fake_shared) {
680
6.05k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
6.05k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
6.05k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
6.05k
            _shared_state = info.shared_state->template cast<SharedState>();
696
6.05k
            _dependency = _shared_state->create_sink_dependency(
697
6.05k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
6.05k
        }
699
6.05k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
6.05k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
6.05k
    }
702
703
6.05k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
6.05k
    _rows_input_counter =
708
6.05k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
6.05k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
6.05k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
6.05k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
6.05k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
6.05k
    _memory_used_counter =
714
6.05k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
6.05k
    _common_profile->add_info_string("IsColocate",
716
6.05k
                                     std::to_string(_parent->is_colocated_operator()));
717
6.05k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
6.05k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
6.05k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
6.05k
    return Status::OK();
721
6.05k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
9.95k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
9.95k
    _operator_profile =
664
9.95k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
9.95k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
9.95k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
9.95k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
9.95k
    _operator_profile->add_child(_common_profile, true);
673
9.95k
    _operator_profile->add_child(_custom_profile, true);
674
675
9.95k
    _operator_profile->set_metadata(_parent->node_id());
676
9.95k
    _wait_for_finish_dependency_timer =
677
9.95k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
9.95k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
9.95k
    if constexpr (!is_fake_shared) {
680
9.95k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
9.95k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
9.95k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
9.95k
            _shared_state = info.shared_state->template cast<SharedState>();
696
9.95k
            _dependency = _shared_state->create_sink_dependency(
697
9.95k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
9.95k
        }
699
9.95k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
9.95k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
9.95k
    }
702
703
9.95k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
9.95k
    _rows_input_counter =
708
9.95k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
9.95k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
9.95k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
9.95k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
9.95k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
9.95k
    _memory_used_counter =
714
9.95k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
9.95k
    _common_profile->add_info_string("IsColocate",
716
9.95k
                                     std::to_string(_parent->is_colocated_operator()));
717
9.95k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
9.95k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
9.95k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
9.95k
    return Status::OK();
721
9.95k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
102k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
102k
    _operator_profile =
664
102k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
102k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
102k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
102k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
102k
    _operator_profile->add_child(_common_profile, true);
673
102k
    _operator_profile->add_child(_custom_profile, true);
674
675
102k
    _operator_profile->set_metadata(_parent->node_id());
676
102k
    _wait_for_finish_dependency_timer =
677
102k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
102k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
102k
    if constexpr (!is_fake_shared) {
680
102k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
102k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
102k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
102k
            _shared_state = info.shared_state->template cast<SharedState>();
696
102k
            _dependency = _shared_state->create_sink_dependency(
697
102k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
102k
        }
699
102k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
102k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
102k
    }
702
703
102k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
102k
    _rows_input_counter =
708
102k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
102k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
102k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
102k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
102k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
102k
    _memory_used_counter =
714
102k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
102k
    _common_profile->add_info_string("IsColocate",
716
102k
                                     std::to_string(_parent->is_colocated_operator()));
717
102k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
102k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
102k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
102k
    return Status::OK();
721
102k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
71.0k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
71.0k
    _operator_profile =
664
71.0k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
71.0k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
71.0k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
71.0k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
71.0k
    _operator_profile->add_child(_common_profile, true);
673
71.0k
    _operator_profile->add_child(_custom_profile, true);
674
675
71.0k
    _operator_profile->set_metadata(_parent->node_id());
676
71.0k
    _wait_for_finish_dependency_timer =
677
71.0k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
71.0k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
71.0k
    if constexpr (!is_fake_shared) {
680
71.0k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
71.0k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
71.0k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
71.0k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
71.0k
                                                  ? 0
688
71.0k
                                                  : info.task_idx]
689
71.0k
                                  .get();
690
71.0k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
18.4E
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
18.4E
            _shared_state = info.shared_state->template cast<SharedState>();
696
18.4E
            _dependency = _shared_state->create_sink_dependency(
697
18.4E
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
18.4E
        }
699
71.0k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
71.0k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
71.0k
    }
702
703
71.0k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
71.0k
    _rows_input_counter =
708
71.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
71.0k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
71.0k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
71.0k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
71.0k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
71.0k
    _memory_used_counter =
714
71.0k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
71.0k
    _common_profile->add_info_string("IsColocate",
716
71.0k
                                     std::to_string(_parent->is_colocated_operator()));
717
71.0k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
71.0k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
71.0k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
71.0k
    return Status::OK();
721
71.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
131
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
131
    _operator_profile =
664
131
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
131
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
131
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
131
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
131
    _operator_profile->add_child(_common_profile, true);
673
131
    _operator_profile->add_child(_custom_profile, true);
674
675
131
    _operator_profile->set_metadata(_parent->node_id());
676
131
    _wait_for_finish_dependency_timer =
677
131
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
131
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
131
    if constexpr (!is_fake_shared) {
680
131
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
131
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
131
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
131
            _shared_state = info.shared_state->template cast<SharedState>();
696
131
            _dependency = _shared_state->create_sink_dependency(
697
131
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
131
        }
699
131
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
131
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
131
    }
702
703
131
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
131
    _rows_input_counter =
708
131
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
131
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
131
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
131
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
131
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
131
    _memory_used_counter =
714
131
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
131
    _common_profile->add_info_string("IsColocate",
716
131
                                     std::to_string(_parent->is_colocated_operator()));
717
131
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
131
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
131
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
131
    return Status::OK();
721
131
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
512k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
512k
    _operator_profile =
664
512k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
512k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
512k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
512k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
512k
    _operator_profile->add_child(_common_profile, true);
673
512k
    _operator_profile->add_child(_custom_profile, true);
674
675
512k
    _operator_profile->set_metadata(_parent->node_id());
676
512k
    _wait_for_finish_dependency_timer =
677
512k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
512k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
    if constexpr (!is_fake_shared) {
680
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
                                                  ? 0
688
                                                  : info.task_idx]
689
                                  .get();
690
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
            _shared_state = info.shared_state->template cast<SharedState>();
696
            _dependency = _shared_state->create_sink_dependency(
697
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
        }
699
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
    }
702
703
512k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
512k
    _rows_input_counter =
708
512k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
512k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
512k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
512k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
512k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
512k
    _memory_used_counter =
714
512k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
512k
    _common_profile->add_info_string("IsColocate",
716
512k
                                     std::to_string(_parent->is_colocated_operator()));
717
512k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
512k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
512k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
512k
    return Status::OK();
721
512k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
8.93k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
8.93k
    _operator_profile =
664
8.93k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
8.93k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
8.93k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
8.93k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
8.93k
    _operator_profile->add_child(_common_profile, true);
673
8.93k
    _operator_profile->add_child(_custom_profile, true);
674
675
8.93k
    _operator_profile->set_metadata(_parent->node_id());
676
8.93k
    _wait_for_finish_dependency_timer =
677
8.93k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
8.93k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
8.93k
    if constexpr (!is_fake_shared) {
680
8.93k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
8.93k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
8.93k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
8.93k
            _shared_state = info.shared_state->template cast<SharedState>();
696
8.93k
            _dependency = _shared_state->create_sink_dependency(
697
8.93k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
8.93k
        }
699
8.93k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
8.93k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
8.93k
    }
702
703
8.93k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
8.93k
    _rows_input_counter =
708
8.93k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
8.93k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
8.93k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
8.93k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
8.93k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
8.93k
    _memory_used_counter =
714
8.93k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
8.93k
    _common_profile->add_info_string("IsColocate",
716
8.93k
                                     std::to_string(_parent->is_colocated_operator()));
717
8.93k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
8.93k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
8.93k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
8.93k
    return Status::OK();
721
8.93k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
410
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
410
    _operator_profile =
664
410
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
410
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
410
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
410
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
410
    _operator_profile->add_child(_common_profile, true);
673
410
    _operator_profile->add_child(_custom_profile, true);
674
675
410
    _operator_profile->set_metadata(_parent->node_id());
676
410
    _wait_for_finish_dependency_timer =
677
410
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
410
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
410
    if constexpr (!is_fake_shared) {
680
410
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
410
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
410
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
410
            _shared_state = info.shared_state->template cast<SharedState>();
696
410
            _dependency = _shared_state->create_sink_dependency(
697
410
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
410
        }
699
410
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
410
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
410
    }
702
703
410
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
410
    _rows_input_counter =
708
410
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
410
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
410
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
410
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
410
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
410
    _memory_used_counter =
714
410
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
410
    _common_profile->add_info_string("IsColocate",
716
410
                                     std::to_string(_parent->is_colocated_operator()));
717
410
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
410
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
410
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
410
    return Status::OK();
721
410
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
2.18k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
2.18k
    _operator_profile =
664
2.18k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
2.18k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
2.18k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
2.18k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
2.18k
    _operator_profile->add_child(_common_profile, true);
673
2.18k
    _operator_profile->add_child(_custom_profile, true);
674
675
2.18k
    _operator_profile->set_metadata(_parent->node_id());
676
2.18k
    _wait_for_finish_dependency_timer =
677
2.18k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
2.18k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
2.18k
    if constexpr (!is_fake_shared) {
680
2.18k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
2.18k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
2.18k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
2.18k
            _shared_state = info.shared_state->template cast<SharedState>();
696
2.18k
            _dependency = _shared_state->create_sink_dependency(
697
2.18k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
2.18k
        }
699
2.18k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
2.18k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
2.18k
    }
702
703
2.18k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
2.18k
    _rows_input_counter =
708
2.18k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
2.18k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
2.18k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
2.18k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
2.18k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
2.18k
    _memory_used_counter =
714
2.18k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
2.18k
    _common_profile->add_info_string("IsColocate",
716
2.18k
                                     std::to_string(_parent->is_colocated_operator()));
717
2.18k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
2.18k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
2.18k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
2.18k
    return Status::OK();
721
2.18k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
13.3k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
13.3k
    _operator_profile =
664
13.3k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
13.3k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
13.3k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
13.3k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
13.3k
    _operator_profile->add_child(_common_profile, true);
673
13.3k
    _operator_profile->add_child(_custom_profile, true);
674
675
13.3k
    _operator_profile->set_metadata(_parent->node_id());
676
13.3k
    _wait_for_finish_dependency_timer =
677
13.3k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
13.3k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
13.3k
    if constexpr (!is_fake_shared) {
680
13.3k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
13.3k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
13.3k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
13.3k
            _shared_state = info.shared_state->template cast<SharedState>();
696
13.3k
            _dependency = _shared_state->create_sink_dependency(
697
13.3k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
13.3k
        }
699
13.3k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
13.3k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
13.3k
    }
702
703
13.3k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
13.3k
    _rows_input_counter =
708
13.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
13.3k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
13.3k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
13.3k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
13.3k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
13.3k
    _memory_used_counter =
714
13.3k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
13.3k
    _common_profile->add_info_string("IsColocate",
716
13.3k
                                     std::to_string(_parent->is_colocated_operator()));
717
13.3k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
13.3k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
13.3k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
13.3k
    return Status::OK();
721
13.3k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
232k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
232k
    _operator_profile =
664
232k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
232k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
232k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
232k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
232k
    _operator_profile->add_child(_common_profile, true);
673
232k
    _operator_profile->add_child(_custom_profile, true);
674
675
232k
    _operator_profile->set_metadata(_parent->node_id());
676
232k
    _wait_for_finish_dependency_timer =
677
232k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
232k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
232k
    if constexpr (!is_fake_shared) {
680
232k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
232k
            info.shared_state_map.end()) {
682
232k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
232k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
232k
            }
685
232k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
232k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
232k
                                                  ? 0
688
232k
                                                  : info.task_idx]
689
232k
                                  .get();
690
232k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
232k
        } else {
692
5
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
5
                DCHECK(false);
694
5
            }
695
5
            _shared_state = info.shared_state->template cast<SharedState>();
696
5
            _dependency = _shared_state->create_sink_dependency(
697
5
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
5
        }
699
232k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
232k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
232k
    }
702
703
232k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
232k
    _rows_input_counter =
708
232k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
232k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
232k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
232k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
232k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
232k
    _memory_used_counter =
714
232k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
232k
    _common_profile->add_info_string("IsColocate",
716
232k
                                     std::to_string(_parent->is_colocated_operator()));
717
232k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
232k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
232k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
232k
    return Status::OK();
721
232k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
415k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
415k
    _operator_profile =
664
415k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
415k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
415k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
415k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
415k
    _operator_profile->add_child(_common_profile, true);
673
415k
    _operator_profile->add_child(_custom_profile, true);
674
675
415k
    _operator_profile->set_metadata(_parent->node_id());
676
415k
    _wait_for_finish_dependency_timer =
677
415k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
415k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
415k
    if constexpr (!is_fake_shared) {
680
415k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
415k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
415k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
415k
            _shared_state = info.shared_state->template cast<SharedState>();
696
415k
            _dependency = _shared_state->create_sink_dependency(
697
415k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
415k
        }
699
415k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
415k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
415k
    }
702
703
415k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
415k
    _rows_input_counter =
708
415k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
415k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
415k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
415k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
415k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
415k
    _memory_used_counter =
714
415k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
415k
    _common_profile->add_info_string("IsColocate",
716
415k
                                     std::to_string(_parent->is_colocated_operator()));
717
415k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
415k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
415k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
415k
    return Status::OK();
721
415k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
25
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
25
    _operator_profile =
664
25
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
25
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
25
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
25
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
25
    _operator_profile->add_child(_common_profile, true);
673
25
    _operator_profile->add_child(_custom_profile, true);
674
675
25
    _operator_profile->set_metadata(_parent->node_id());
676
25
    _wait_for_finish_dependency_timer =
677
25
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
25
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
25
    if constexpr (!is_fake_shared) {
680
25
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
25
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
25
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
25
            _shared_state = info.shared_state->template cast<SharedState>();
696
25
            _dependency = _shared_state->create_sink_dependency(
697
25
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
25
        }
699
25
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
25
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
25
    }
702
703
25
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
25
    _rows_input_counter =
708
25
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
25
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
25
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
25
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
25
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
25
    _memory_used_counter =
714
25
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
25
    _common_profile->add_info_string("IsColocate",
716
25
                                     std::to_string(_parent->is_colocated_operator()));
717
25
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
25
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
25
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
25
    return Status::OK();
721
25
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
338
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
338
    _operator_profile =
664
338
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
338
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
338
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
338
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
338
    _operator_profile->add_child(_common_profile, true);
673
338
    _operator_profile->add_child(_custom_profile, true);
674
675
338
    _operator_profile->set_metadata(_parent->node_id());
676
338
    _wait_for_finish_dependency_timer =
677
338
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
338
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
338
    if constexpr (!is_fake_shared) {
680
338
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
338
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
338
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
338
            _shared_state = info.shared_state->template cast<SharedState>();
696
338
            _dependency = _shared_state->create_sink_dependency(
697
338
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
338
        }
699
338
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
338
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
338
    }
702
703
338
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
338
    _rows_input_counter =
708
338
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
338
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
338
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
338
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
338
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
338
    _memory_used_counter =
714
338
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
338
    _common_profile->add_info_string("IsColocate",
716
338
                                     std::to_string(_parent->is_colocated_operator()));
717
338
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
338
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
338
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
338
    return Status::OK();
721
338
}
722
723
template <typename SharedState>
724
1.73M
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
1.73M
    if (_closed) {
726
2
        return Status::OK();
727
2
    }
728
1.73M
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
1.21M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
1.21M
    }
731
1.73M
    _closed = true;
732
1.73M
    return Status::OK();
733
1.73M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
118k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
118k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
118k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
118k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
118k
    }
731
118k
    _closed = true;
732
118k
    return Status::OK();
733
118k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
4
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
4
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
4
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
4
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
4
    }
731
4
    _closed = true;
732
4
    return Status::OK();
733
4
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
236k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
236k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
236k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
236k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
236k
    }
731
236k
    _closed = true;
732
236k
    return Status::OK();
733
236k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
151
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
151
    if (_closed) {
726
2
        return Status::OK();
727
2
    }
728
149
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
149
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
149
    }
731
149
    _closed = true;
732
149
    return Status::OK();
733
151
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
5.98k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
5.98k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
5.98k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
5.98k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
5.98k
    }
731
5.98k
    _closed = true;
732
5.98k
    return Status::OK();
733
5.98k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
9.87k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
9.87k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
9.87k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
9.87k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
9.87k
    }
731
9.87k
    _closed = true;
732
9.87k
    return Status::OK();
733
9.87k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
102k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
102k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
102k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
102k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
102k
    }
731
102k
    _closed = true;
732
102k
    return Status::OK();
733
102k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
70.5k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
70.5k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
70.5k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
70.5k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
70.5k
    }
731
70.5k
    _closed = true;
732
70.5k
    return Status::OK();
733
70.5k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
118
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
118
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
118
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
118
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
118
    }
731
118
    _closed = true;
732
118
    return Status::OK();
733
118
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
513k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
513k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
    }
731
513k
    _closed = true;
732
513k
    return Status::OK();
733
513k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
8.94k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
8.94k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
8.94k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
8.94k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
8.94k
    }
731
8.94k
    _closed = true;
732
8.94k
    return Status::OK();
733
8.94k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
307
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
307
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
307
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
307
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
307
    }
731
307
    _closed = true;
732
307
    return Status::OK();
733
307
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
2.18k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
2.18k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
2.18k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
2.18k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
2.18k
    }
731
2.18k
    _closed = true;
732
2.18k
    return Status::OK();
733
2.18k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
13.3k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
13.3k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
13.3k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
13.3k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
13.3k
    }
731
13.3k
    _closed = true;
732
13.3k
    return Status::OK();
733
13.3k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
233k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
233k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
233k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
233k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
233k
    }
731
233k
    _closed = true;
732
233k
    return Status::OK();
733
233k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
415k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
415k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
415k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
415k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
415k
    }
731
415k
    _closed = true;
732
415k
    return Status::OK();
733
415k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
14
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
14
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
14
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
14
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
14
    }
731
14
    _closed = true;
732
14
    return Status::OK();
733
14
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
338
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
338
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
338
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
338
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
338
    }
731
338
    _closed = true;
732
338
    return Status::OK();
733
338
}
734
735
template <typename LocalStateType>
736
Status StreamingOperatorX<LocalStateType>::get_block_impl(RuntimeState* state, Block* block,
737
1.48k
                                                          bool* eos) {
738
1.48k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
1.48k
    return pull(state, block, eos);
740
1.48k
}
_ZN5doris18StreamingOperatorXINS_23AssertNumRowsLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
40
                                                          bool* eos) {
738
40
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
40
    return pull(state, block, eos);
740
40
}
_ZN5doris18StreamingOperatorXINS_16SelectLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
1.44k
                                                          bool* eos) {
738
1.44k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
1.44k
    return pull(state, block, eos);
740
1.44k
}
741
742
template <typename LocalStateType>
743
Status StatefulOperatorX<LocalStateType>::get_block_impl(RuntimeState* state, Block* block,
744
483k
                                                         bool* eos) {
745
483k
    auto& local_state = get_local_state(state);
746
483k
    if (need_more_input_data(state)) {
747
451k
        local_state._child_block->clear_column_data(
748
451k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
451k
                        .num_slots());
750
451k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
451k
                state, local_state._child_block.get(), &local_state._child_eos));
752
451k
        *eos = local_state._child_eos;
753
451k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
56.0k
            return Status::OK();
755
56.0k
        }
756
395k
        {
757
395k
            SCOPED_TIMER(local_state.exec_time_counter());
758
395k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
395k
        }
760
395k
    }
761
762
427k
    if (!need_more_input_data(state)) {
763
399k
        SCOPED_TIMER(local_state.exec_time_counter());
764
399k
        bool new_eos = false;
765
399k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
399k
        if (new_eos) {
767
320k
            *eos = true;
768
320k
        } else if (!need_more_input_data(state)) {
769
24.4k
            *eos = false;
770
24.4k
        }
771
399k
    }
772
427k
    return Status::OK();
773
427k
}
_ZN5doris17StatefulOperatorXINS_23HashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
139k
                                                         bool* eos) {
745
139k
    auto& local_state = get_local_state(state);
746
139k
    if (need_more_input_data(state)) {
747
119k
        local_state._child_block->clear_column_data(
748
119k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
119k
                        .num_slots());
750
119k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
119k
                state, local_state._child_block.get(), &local_state._child_eos));
752
119k
        *eos = local_state._child_eos;
753
119k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
34.1k
            return Status::OK();
755
34.1k
        }
756
85.4k
        {
757
85.4k
            SCOPED_TIMER(local_state.exec_time_counter());
758
85.4k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
85.4k
        }
760
85.4k
    }
761
762
105k
    if (!need_more_input_data(state)) {
763
105k
        SCOPED_TIMER(local_state.exec_time_counter());
764
105k
        bool new_eos = false;
765
105k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
105k
        if (new_eos) {
767
46.1k
            *eos = true;
768
59.1k
        } else if (!need_more_input_data(state)) {
769
11.6k
            *eos = false;
770
11.6k
        }
771
105k
    }
772
105k
    return Status::OK();
773
105k
}
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_34PartitionedHashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
_ZN5doris17StatefulOperatorXINS_16RepeatLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
4.47k
                                                         bool* eos) {
745
4.47k
    auto& local_state = get_local_state(state);
746
4.47k
    if (need_more_input_data(state)) {
747
2.61k
        local_state._child_block->clear_column_data(
748
2.61k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
2.61k
                        .num_slots());
750
2.61k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
2.61k
                state, local_state._child_block.get(), &local_state._child_eos));
752
2.61k
        *eos = local_state._child_eos;
753
2.61k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
640
            return Status::OK();
755
640
        }
756
1.97k
        {
757
1.97k
            SCOPED_TIMER(local_state.exec_time_counter());
758
1.97k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
1.97k
        }
760
1.97k
    }
761
762
3.85k
    if (!need_more_input_data(state)) {
763
3.85k
        SCOPED_TIMER(local_state.exec_time_counter());
764
3.85k
        bool new_eos = false;
765
3.85k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
3.85k
        if (new_eos) {
767
1.44k
            *eos = true;
768
2.41k
        } else if (!need_more_input_data(state)) {
769
1.86k
            *eos = false;
770
1.86k
        }
771
3.85k
    }
772
3.83k
    return Status::OK();
773
3.83k
}
_ZN5doris17StatefulOperatorXINS_25MaterializationLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
1.84k
                                                         bool* eos) {
745
1.84k
    auto& local_state = get_local_state(state);
746
1.84k
    if (need_more_input_data(state)) {
747
1.84k
        local_state._child_block->clear_column_data(
748
1.84k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
1.84k
                        .num_slots());
750
1.84k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
1.84k
                state, local_state._child_block.get(), &local_state._child_eos));
752
1.84k
        *eos = local_state._child_eos;
753
1.84k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
781
            return Status::OK();
755
781
        }
756
1.06k
        {
757
1.06k
            SCOPED_TIMER(local_state.exec_time_counter());
758
1.06k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
1.06k
        }
760
1.06k
    }
761
762
1.06k
    if (!need_more_input_data(state)) {
763
1.06k
        SCOPED_TIMER(local_state.exec_time_counter());
764
1.06k
        bool new_eos = false;
765
1.06k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
1.06k
        if (new_eos) {
767
801
            *eos = true;
768
801
        } else if (!need_more_input_data(state)) {
769
0
            *eos = false;
770
0
        }
771
1.06k
    }
772
1.06k
    return Status::OK();
773
1.06k
}
_ZN5doris17StatefulOperatorXINS_22StreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
16.9k
                                                         bool* eos) {
745
16.9k
    auto& local_state = get_local_state(state);
746
16.9k
    if (need_more_input_data(state)) {
747
16.9k
        local_state._child_block->clear_column_data(
748
16.9k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
16.9k
                        .num_slots());
750
16.9k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
16.9k
                state, local_state._child_block.get(), &local_state._child_eos));
752
16.9k
        *eos = local_state._child_eos;
753
16.9k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
3.60k
            return Status::OK();
755
3.60k
        }
756
13.3k
        {
757
13.3k
            SCOPED_TIMER(local_state.exec_time_counter());
758
13.3k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
13.3k
        }
760
13.3k
    }
761
762
13.3k
    if (!need_more_input_data(state)) {
763
7.28k
        SCOPED_TIMER(local_state.exec_time_counter());
764
7.28k
        bool new_eos = false;
765
7.28k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
7.28k
        if (new_eos) {
767
7.15k
            *eos = true;
768
7.15k
        } else if (!need_more_input_data(state)) {
769
1
            *eos = false;
770
1
        }
771
7.28k
    }
772
13.3k
    return Status::OK();
773
13.3k
}
_ZN5doris17StatefulOperatorXINS_30DistinctStreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
291k
                                                         bool* eos) {
745
291k
    auto& local_state = get_local_state(state);
746
292k
    if (need_more_input_data(state)) {
747
292k
        local_state._child_block->clear_column_data(
748
292k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
292k
                        .num_slots());
750
292k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
292k
                state, local_state._child_block.get(), &local_state._child_eos));
752
292k
        *eos = local_state._child_eos;
753
292k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
16.0k
            return Status::OK();
755
16.0k
        }
756
276k
        {
757
276k
            SCOPED_TIMER(local_state.exec_time_counter());
758
276k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
276k
        }
760
276k
    }
761
762
275k
    if (!need_more_input_data(state)) {
763
254k
        SCOPED_TIMER(local_state.exec_time_counter());
764
254k
        bool new_eos = false;
765
254k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
254k
        if (new_eos) {
767
253k
            *eos = true;
768
253k
        } else if (!need_more_input_data(state)) {
769
5
            *eos = false;
770
5
        }
771
254k
    }
772
275k
    return Status::OK();
773
275k
}
_ZN5doris17StatefulOperatorXINS_29NestedLoopJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
20.6k
                                                         bool* eos) {
745
20.6k
    auto& local_state = get_local_state(state);
746
20.6k
    if (need_more_input_data(state)) {
747
10.0k
        local_state._child_block->clear_column_data(
748
10.0k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
10.0k
                        .num_slots());
750
10.0k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
10.0k
                state, local_state._child_block.get(), &local_state._child_eos));
752
10.0k
        *eos = local_state._child_eos;
753
10.0k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
417
            return Status::OK();
755
417
        }
756
9.59k
        {
757
9.59k
            SCOPED_TIMER(local_state.exec_time_counter());
758
9.59k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
9.59k
        }
760
9.59k
    }
761
762
20.2k
    if (!need_more_input_data(state)) {
763
19.6k
        SCOPED_TIMER(local_state.exec_time_counter());
764
19.6k
        bool new_eos = false;
765
19.6k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
19.6k
        if (new_eos) {
767
6.02k
            *eos = true;
768
13.6k
        } else if (!need_more_input_data(state)) {
769
10.6k
            *eos = false;
770
10.6k
        }
771
19.6k
    }
772
20.2k
    return Status::OK();
773
20.2k
}
_ZN5doris17StatefulOperatorXINS_23TableFunctionLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
8.62k
                                                         bool* eos) {
745
8.62k
    auto& local_state = get_local_state(state);
746
8.62k
    if (need_more_input_data(state)) {
747
8.26k
        local_state._child_block->clear_column_data(
748
8.26k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
8.26k
                        .num_slots());
750
8.26k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
8.26k
                state, local_state._child_block.get(), &local_state._child_eos));
752
8.26k
        *eos = local_state._child_eos;
753
8.26k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
393
            return Status::OK();
755
393
        }
756
7.87k
        {
757
7.87k
            SCOPED_TIMER(local_state.exec_time_counter());
758
7.87k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
7.87k
        }
760
7.87k
    }
761
762
8.24k
    if (!need_more_input_data(state)) {
763
8.24k
        SCOPED_TIMER(local_state.exec_time_counter());
764
8.24k
        bool new_eos = false;
765
8.24k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
8.24k
        if (new_eos) {
767
5.71k
            *eos = true;
768
5.71k
        } else if (!need_more_input_data(state)) {
769
366
            *eos = false;
770
366
        }
771
8.24k
    }
772
8.22k
    return Status::OK();
773
8.22k
}
774
775
template <typename Writer, typename Parent>
776
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
777
49.9k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
49.9k
    RETURN_IF_ERROR(Base::init(state, info));
779
49.9k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
49.9k
                                                         "AsyncWriterDependency", true);
781
49.9k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
49.9k
                             _finish_dependency));
783
784
49.9k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
49.9k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
49.9k
    return Status::OK();
787
49.9k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
372
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
372
    RETURN_IF_ERROR(Base::init(state, info));
779
372
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
372
                                                         "AsyncWriterDependency", true);
781
372
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
372
                             _finish_dependency));
783
784
372
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
372
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
372
    return Status::OK();
787
372
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
49.5k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
49.5k
    RETURN_IF_ERROR(Base::init(state, info));
779
49.5k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
49.5k
                                                         "AsyncWriterDependency", true);
781
49.5k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
49.5k
                             _finish_dependency));
783
784
49.5k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
49.5k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
49.5k
    return Status::OK();
787
49.5k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
18
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
18
    RETURN_IF_ERROR(Base::init(state, info));
779
18
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
18
                                                         "AsyncWriterDependency", true);
781
18
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
18
                             _finish_dependency));
783
784
18
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
18
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
18
    return Status::OK();
787
18
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
16
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
16
    RETURN_IF_ERROR(Base::init(state, info));
779
16
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
16
                                                         "AsyncWriterDependency", true);
781
16
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
16
                             _finish_dependency));
783
784
16
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
16
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
16
    return Status::OK();
787
16
}
788
789
template <typename Writer, typename Parent>
790
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
791
50.6k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
50.6k
    RETURN_IF_ERROR(Base::open(state));
793
50.6k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
386k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
335k
        RETURN_IF_ERROR(
796
335k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
335k
    }
798
50.6k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
50.6k
    return Status::OK();
800
50.6k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
372
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
372
    RETURN_IF_ERROR(Base::open(state));
793
372
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
1.86k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
1.49k
        RETURN_IF_ERROR(
796
1.49k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
1.49k
    }
798
372
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
372
    return Status::OK();
800
372
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
50.2k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
50.2k
    RETURN_IF_ERROR(Base::open(state));
793
50.2k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
384k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
334k
        RETURN_IF_ERROR(
796
334k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
334k
    }
798
50.2k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
50.2k
    return Status::OK();
800
50.2k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
18
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
18
    RETURN_IF_ERROR(Base::open(state));
793
18
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
324
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
306
        RETURN_IF_ERROR(
796
306
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
306
    }
798
18
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
18
    return Status::OK();
800
18
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
16
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
16
    RETURN_IF_ERROR(Base::open(state));
793
16
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
33
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
17
        RETURN_IF_ERROR(
796
17
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
17
    }
798
16
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
16
    return Status::OK();
800
16
}
801
802
template <typename Writer, typename Parent>
803
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
804
66.2k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
66.2k
    return _writer->sink(block, eos);
806
66.2k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
1.60k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
1.60k
    return _writer->sink(block, eos);
806
1.60k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
64.5k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
64.5k
    return _writer->sink(block, eos);
806
64.5k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
18
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
18
    return _writer->sink(block, eos);
806
18
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
52
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
52
    return _writer->sink(block, eos);
806
52
}
807
808
template <typename Writer, typename Parent>
809
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
810
50.7k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
50.7k
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
50.7k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
50.7k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
816
    // if the init failed, the _writer may be nullptr. so here need check
817
50.7k
    if (_writer) {
818
50.7k
        Status st = _writer->get_writer_status();
819
50.7k
        if (exec_status.ok()) {
820
50.6k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
50.6k
                                                       : Status::Cancelled("force close"));
822
50.6k
        } else {
823
122
            _writer->force_close(exec_status);
824
122
        }
825
        // If there is an error in process_block thread, then we should get the writer
826
        // status before call force_close. For example, the thread may failed in commit
827
        // transaction.
828
50.7k
        RETURN_IF_ERROR(st);
829
50.7k
    }
830
50.6k
    return Base::close(state, exec_status);
831
50.7k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
361
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
361
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
361
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
361
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
816
    // if the init failed, the _writer may be nullptr. so here need check
817
361
    if (_writer) {
818
361
        Status st = _writer->get_writer_status();
819
361
        if (exec_status.ok()) {
820
361
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
361
                                                       : Status::Cancelled("force close"));
822
361
        } else {
823
0
            _writer->force_close(exec_status);
824
0
        }
825
        // If there is an error in process_block thread, then we should get the writer
826
        // status before call force_close. For example, the thread may failed in commit
827
        // transaction.
828
361
        RETURN_IF_ERROR(st);
829
361
    }
830
361
    return Base::close(state, exec_status);
831
361
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
50.3k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
50.3k
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
50.3k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
50.3k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
816
    // if the init failed, the _writer may be nullptr. so here need check
817
50.3k
    if (_writer) {
818
50.3k
        Status st = _writer->get_writer_status();
819
50.3k
        if (exec_status.ok()) {
820
50.2k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
50.2k
                                                       : Status::Cancelled("force close"));
822
50.2k
        } else {
823
122
            _writer->force_close(exec_status);
824
122
        }
825
        // If there is an error in process_block thread, then we should get the writer
826
        // status before call force_close. For example, the thread may failed in commit
827
        // transaction.
828
50.3k
        RETURN_IF_ERROR(st);
829
50.3k
    }
830
50.2k
    return Base::close(state, exec_status);
831
50.3k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
18
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
18
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
18
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
18
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
816
    // if the init failed, the _writer may be nullptr. so here need check
817
18
    if (_writer) {
818
18
        Status st = _writer->get_writer_status();
819
18
        if (exec_status.ok()) {
820
18
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
18
                                                       : Status::Cancelled("force close"));
822
18
        } else {
823
0
            _writer->force_close(exec_status);
824
0
        }
825
        // If there is an error in process_block thread, then we should get the writer
826
        // status before call force_close. For example, the thread may failed in commit
827
        // transaction.
828
18
        RETURN_IF_ERROR(st);
829
18
    }
830
18
    return Base::close(state, exec_status);
831
18
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
16
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
16
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
16
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
16
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
816
    // if the init failed, the _writer may be nullptr. so here need check
817
16
    if (_writer) {
818
16
        Status st = _writer->get_writer_status();
819
16
        if (exec_status.ok()) {
820
16
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
16
                                                       : Status::Cancelled("force close"));
822
16
        } else {
823
0
            _writer->force_close(exec_status);
824
0
        }
825
        // If there is an error in process_block thread, then we should get the writer
826
        // status before call force_close. For example, the thread may failed in commit
827
        // transaction.
828
16
        RETURN_IF_ERROR(st);
829
16
    }
830
16
    return Base::close(state, exec_status);
831
16
}
832
833
// An instantiation added outside the macros below needs the matching
834
// 'extern template' declaration in the operator's header (enforced by
835
// build-support/check-extern-template-pairing.py). Instantiations expanded
836
// through DECLARE_OPERATOR are invisible to that check -- macro bodies are
837
// skipped -- so their extern pairing has to be kept in sync by hand.
838
#define DECLARE_OPERATOR(LOCAL_STATE) template class DataSinkOperatorX<LOCAL_STATE>;
839
DECLARE_OPERATOR(HashJoinBuildSinkLocalState)
840
DECLARE_OPERATOR(ResultSinkLocalState)
841
DECLARE_OPERATOR(JdbcTableSinkLocalState)
842
DECLARE_OPERATOR(MemoryScratchSinkLocalState)
843
DECLARE_OPERATOR(ResultFileSinkLocalState)
844
DECLARE_OPERATOR(OlapTableSinkLocalState)
845
DECLARE_OPERATOR(OlapTableSinkV2LocalState)
846
DECLARE_OPERATOR(HiveTableSinkLocalState)
847
DECLARE_OPERATOR(TVFTableSinkLocalState)
848
DECLARE_OPERATOR(IcebergTableSinkLocalState)
849
DECLARE_OPERATOR(PaimonTableSinkLocalState)
850
DECLARE_OPERATOR(SpillIcebergTableSinkLocalState)
851
DECLARE_OPERATOR(IcebergDeleteSinkLocalState)
852
DECLARE_OPERATOR(IcebergMergeSinkLocalState)
853
DECLARE_OPERATOR(MCTableSinkLocalState)
854
DECLARE_OPERATOR(AnalyticSinkLocalState)
855
DECLARE_OPERATOR(BlackholeSinkLocalState)
856
DECLARE_OPERATOR(SortSinkLocalState)
857
DECLARE_OPERATOR(SpillSortSinkLocalState)
858
DECLARE_OPERATOR(LocalExchangeSinkLocalState)
859
DECLARE_OPERATOR(AggSinkLocalState)
860
DECLARE_OPERATOR(BucketedAggSinkLocalState)
861
DECLARE_OPERATOR(PartitionedAggSinkLocalState)
862
DECLARE_OPERATOR(ExchangeSinkLocalState)
863
DECLARE_OPERATOR(NestedLoopJoinBuildSinkLocalState)
864
DECLARE_OPERATOR(UnionSinkLocalState)
865
DECLARE_OPERATOR(MultiCastDataStreamSinkLocalState)
866
DECLARE_OPERATOR(PartitionSortSinkLocalState)
867
DECLARE_OPERATOR(SetProbeSinkLocalState<true>)
868
DECLARE_OPERATOR(SetProbeSinkLocalState<false>)
869
DECLARE_OPERATOR(SetSinkLocalState<true>)
870
DECLARE_OPERATOR(SetSinkLocalState<false>)
871
DECLARE_OPERATOR(PartitionedHashJoinSinkLocalState)
872
DECLARE_OPERATOR(GroupCommitBlockSinkLocalState)
873
DECLARE_OPERATOR(CacheSinkLocalState)
874
DECLARE_OPERATOR(DictSinkLocalState)
875
DECLARE_OPERATOR(RecCTESinkLocalState)
876
DECLARE_OPERATOR(RecCTEAnchorSinkLocalState)
877
878
#undef DECLARE_OPERATOR
879
880
#define DECLARE_OPERATOR(LOCAL_STATE) template class OperatorX<LOCAL_STATE>;
881
DECLARE_OPERATOR(HashJoinProbeLocalState)
882
DECLARE_OPERATOR(OlapScanLocalState)
883
DECLARE_OPERATOR(GroupCommitLocalState)
884
DECLARE_OPERATOR(JDBCScanLocalState)
885
DECLARE_OPERATOR(FileScanLocalState)
886
DECLARE_OPERATOR(AnalyticLocalState)
887
DECLARE_OPERATOR(SortLocalState)
888
DECLARE_OPERATOR(SpillSortLocalState)
889
DECLARE_OPERATOR(LocalMergeSortLocalState)
890
DECLARE_OPERATOR(AggLocalState)
891
DECLARE_OPERATOR(BucketedAggLocalState)
892
DECLARE_OPERATOR(PartitionedAggLocalState)
893
DECLARE_OPERATOR(TableFunctionLocalState)
894
DECLARE_OPERATOR(ExchangeLocalState)
895
DECLARE_OPERATOR(RepeatLocalState)
896
DECLARE_OPERATOR(NestedLoopJoinProbeLocalState)
897
DECLARE_OPERATOR(AssertNumRowsLocalState)
898
DECLARE_OPERATOR(EmptySetLocalState)
899
DECLARE_OPERATOR(UnionSourceLocalState)
900
DECLARE_OPERATOR(MultiCastDataStreamSourceLocalState)
901
DECLARE_OPERATOR(PartitionSortSourceLocalState)
902
DECLARE_OPERATOR(SetSourceLocalState<true>)
903
DECLARE_OPERATOR(SetSourceLocalState<false>)
904
DECLARE_OPERATOR(DataGenLocalState)
905
DECLARE_OPERATOR(SchemaScanLocalState)
906
DECLARE_OPERATOR(MetaScanLocalState)
907
DECLARE_OPERATOR(LocalExchangeSourceLocalState)
908
DECLARE_OPERATOR(PartitionedHashJoinProbeLocalState)
909
DECLARE_OPERATOR(CacheSourceLocalState)
910
DECLARE_OPERATOR(RecCTESourceLocalState)
911
DECLARE_OPERATOR(RecCTEScanLocalState)
912
913
#ifdef BE_TEST
914
DECLARE_OPERATOR(MockLocalState)
915
DECLARE_OPERATOR(MockScanLocalState)
916
#endif
917
#undef DECLARE_OPERATOR
918
919
template class StreamingOperatorX<AssertNumRowsLocalState>;
920
template class StreamingOperatorX<SelectLocalState>;
921
922
template class StatefulOperatorX<HashJoinProbeLocalState>;
923
template class StatefulOperatorX<PartitionedHashJoinProbeLocalState>;
924
template class StatefulOperatorX<RepeatLocalState>;
925
template class StatefulOperatorX<MaterializationLocalState>;
926
template class StatefulOperatorX<StreamingAggLocalState>;
927
template class StatefulOperatorX<DistinctStreamingAggLocalState>;
928
template class StatefulOperatorX<NestedLoopJoinProbeLocalState>;
929
template class StatefulOperatorX<TableFunctionLocalState>;
930
931
template class PipelineXSinkLocalState<HashJoinSharedState>;
932
template class PipelineXSinkLocalState<PartitionedHashJoinSharedState>;
933
template class PipelineXSinkLocalState<SortSharedState>;
934
template class PipelineXSinkLocalState<SpillSortSharedState>;
935
template class PipelineXSinkLocalState<NestedLoopJoinSharedState>;
936
template class PipelineXSinkLocalState<AnalyticSharedState>;
937
template class PipelineXSinkLocalState<AggSharedState>;
938
template class PipelineXSinkLocalState<BucketedAggSharedState>;
939
template class PipelineXSinkLocalState<PartitionedAggSharedState>;
940
template class PipelineXSinkLocalState<FakeSharedState>;
941
template class PipelineXSinkLocalState<UnionSharedState>;
942
template class PipelineXSinkLocalState<PartitionSortNodeSharedState>;
943
template class PipelineXSinkLocalState<MultiCastSharedState>;
944
template class PipelineXSinkLocalState<SetSharedState>;
945
template class PipelineXSinkLocalState<LocalExchangeSharedState>;
946
template class PipelineXSinkLocalState<BasicSharedState>;
947
template class PipelineXSinkLocalState<DataQueueSharedState>;
948
template class PipelineXSinkLocalState<RecCTESharedState>;
949
950
template class PipelineXLocalState<HashJoinSharedState>;
951
template class PipelineXLocalState<PartitionedHashJoinSharedState>;
952
template class PipelineXLocalState<SortSharedState>;
953
template class PipelineXLocalState<SpillSortSharedState>;
954
template class PipelineXLocalState<NestedLoopJoinSharedState>;
955
template class PipelineXLocalState<AnalyticSharedState>;
956
template class PipelineXLocalState<AggSharedState>;
957
template class PipelineXLocalState<BucketedAggSharedState>;
958
template class PipelineXLocalState<PartitionedAggSharedState>;
959
template class PipelineXLocalState<FakeSharedState>;
960
template class PipelineXLocalState<UnionSharedState>;
961
template class PipelineXLocalState<DataQueueSharedState>;
962
template class PipelineXLocalState<MultiCastSharedState>;
963
template class PipelineXLocalState<PartitionSortNodeSharedState>;
964
template class PipelineXLocalState<SetSharedState>;
965
template class PipelineXLocalState<LocalExchangeSharedState>;
966
template class PipelineXLocalState<BasicSharedState>;
967
template class PipelineXLocalState<RecCTESharedState>;
968
969
template class AsyncWriterSink<doris::VFileResultWriter, ResultFileSinkOperatorX>;
970
template class AsyncWriterSink<doris::VJdbcTableWriter, JdbcTableSinkOperatorX>;
971
template class AsyncWriterSink<doris::VTabletWriter, OlapTableSinkOperatorX>;
972
template class AsyncWriterSink<doris::VTabletWriterV2, OlapTableSinkV2OperatorX>;
973
template class AsyncWriterSink<doris::VHiveTableWriter, HiveTableSinkOperatorX>;
974
template class AsyncWriterSink<doris::VIcebergDeleteSink, IcebergDeleteSinkOperatorX>;
975
template class AsyncWriterSink<doris::VIcebergMergeSink, IcebergMergeSinkOperatorX>;
976
template class AsyncWriterSink<doris::VMCTableWriter, MCTableSinkOperatorX>;
977
template class AsyncWriterSink<doris::VTVFTableWriter, TVFTableSinkOperatorX>;
978
979
#ifdef BE_TEST
980
template class OperatorX<DummyOperatorLocalState>;
981
template class DataSinkOperatorX<DummySinkLocalState>;
982
#endif
983
984
} // namespace doris