Coverage Report

Created: 2026-11-03 10:06

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.92M
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
1.92M
    if (_parent->nereids_id() == -1) {
123
1.01M
        return fmt::format("(id={})", _parent->node_id());
124
1.01M
    } else {
125
909k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
909k
    }
127
1.92M
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
71.2k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
71.2k
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
71.2k
    } else {
125
71.2k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
71.2k
    }
127
71.2k
}
_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
253k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
253k
    if (_parent->nereids_id() == -1) {
123
12
        return fmt::format("(id={})", _parent->node_id());
124
253k
    } else {
125
253k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
253k
    }
127
253k
}
_ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
152
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
152
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
152
    } else {
125
152
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
152
    }
127
152
}
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
5.59k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
5.59k
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
5.59k
    } else {
125
5.59k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
5.59k
    }
127
5.59k
}
_ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
10.2k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
10.2k
    if (_parent->nereids_id() == -1) {
123
60
        return fmt::format("(id={})", _parent->node_id());
124
10.2k
    } else {
125
10.2k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
10.2k
    }
127
10.2k
}
_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
80.4k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
80.4k
    if (_parent->nereids_id() == -1) {
123
2
        return fmt::format("(id={})", _parent->node_id());
124
80.4k
    } else {
125
80.4k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
80.4k
    }
127
80.4k
}
_ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
107
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
107
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
107
    } else {
125
107
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
107
    }
127
107
}
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
618k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
618k
    if (_parent->nereids_id() == -1) {
123
292k
        return fmt::format("(id={})", _parent->node_id());
124
325k
    } else {
125
325k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
325k
    }
127
618k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
56.3k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
56.3k
    if (_parent->nereids_id() == -1) {
123
2
        return fmt::format("(id={})", _parent->node_id());
124
56.3k
    } else {
125
56.3k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
56.3k
    }
127
56.3k
}
_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
4.49k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
4.49k
    if (_parent->nereids_id() == -1) {
123
4.49k
        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
4.49k
}
_ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
417
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
417
    if (_parent->nereids_id() == -1) {
123
102
        return fmt::format("(id={})", _parent->node_id());
124
315
    } else {
125
315
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
315
    }
127
417
}
_ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
5.16k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
5.16k
    if (_parent->nereids_id() == -1) {
123
13
        return fmt::format("(id={})", _parent->node_id());
124
5.14k
    } else {
125
5.14k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
5.14k
    }
127
5.16k
}
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
717k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
717k
    if (_parent->nereids_id() == -1) {
123
717k
        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
717k
}
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.32M
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
1.32M
    if (_parent->nereids_id() == -1) {
132
738k
        return fmt::format("(id={})", _parent->node_id());
133
738k
    } else {
134
583k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
583k
    }
136
1.32M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
119k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
119k
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
119k
    } else {
134
119k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
119k
    }
136
119k
}
_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
255k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
255k
    if (_parent->nereids_id() == -1) {
132
9
        return fmt::format("(id={})", _parent->node_id());
133
255k
    } else {
134
255k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
255k
    }
136
255k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
161
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
161
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
161
    } else {
134
161
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
161
    }
136
161
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
5.61k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
5.61k
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
5.61k
    } else {
134
5.61k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
5.61k
    }
136
5.61k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
10.3k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
10.3k
    if (_parent->nereids_id() == -1) {
132
60
        return fmt::format("(id={})", _parent->node_id());
133
10.2k
    } else {
134
10.2k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
10.2k
    }
136
10.3k
}
_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
80.1k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
80.1k
    if (_parent->nereids_id() == -1) {
132
4
        return fmt::format("(id={})", _parent->node_id());
133
80.1k
    } else {
134
80.1k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
80.1k
    }
136
80.1k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
117
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
117
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
117
    } else {
134
117
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
117
    }
136
117
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
42
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
42
    if (_parent->nereids_id() == -1) {
132
41
        return fmt::format("(id={})", _parent->node_id());
133
41
    } else {
134
1
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
1
    }
136
42
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
10.8k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
10.8k
    if (_parent->nereids_id() == -1) {
132
3
        return fmt::format("(id={})", _parent->node_id());
133
10.8k
    } else {
134
10.8k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
10.8k
    }
136
10.8k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
416
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
416
    if (_parent->nereids_id() == -1) {
132
102
        return fmt::format("(id={})", _parent->node_id());
133
314
    } else {
134
314
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
314
    }
136
416
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
12.5k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
12.5k
    if (_parent->nereids_id() == -1) {
132
12.5k
        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
12.5k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
283k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
283k
    if (_parent->nereids_id() == -1) {
132
283k
        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
283k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
441k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
441k
    if (_parent->nereids_id() == -1) {
132
441k
        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
441k
}
_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
33.0k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
33.0k
    if (_terminated) {
141
1
        return Status::OK();
142
1
    }
143
33.0k
    _terminated = true;
144
33.0k
    return Status::OK();
145
33.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
24.0k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
24.0k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
24.0k
    _terminated = true;
144
24.0k
    return Status::OK();
145
24.0k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
2.13k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
2.13k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
2.13k
    _terminated = true;
144
2.13k
    return Status::OK();
145
2.13k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
3
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
3
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
3
    _terminated = true;
144
3
    return Status::OK();
145
3
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
1.93k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
1.93k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
1.93k
    _terminated = true;
144
1.93k
    return Status::OK();
145
1.93k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
3.45k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
3.45k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
3.45k
    _terminated = true;
144
3.45k
    return Status::OK();
145
3.45k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
632
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
632
    if (_terminated) {
141
1
        return Status::OK();
142
1
    }
143
631
    _terminated = true;
144
631
    return Status::OK();
145
632
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
246
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
246
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
246
    _terminated = true;
144
246
    return Status::OK();
145
246
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
2
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
2
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
2
    _terminated = true;
144
2
    return Status::OK();
145
2
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
130
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
130
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
130
    _terminated = true;
144
130
    return Status::OK();
145
130
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
8
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
8
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
8
    _terminated = true;
144
8
    return Status::OK();
145
8
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
315
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
315
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
315
    _terminated = true;
144
315
    return Status::OK();
145
315
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
134
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
134
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
134
    _terminated = true;
144
134
    return Status::OK();
145
134
}
146
147
322k
DataDistribution OperatorBase::required_data_distribution(RuntimeState* /*state*/) const {
148
322k
    return _child && _child->is_serial_operator() && !is_source()
149
322k
                   ? DataDistribution(TLocalPartitionType::PASSTHROUGH)
150
322k
                   : DataDistribution(TLocalPartitionType::NOOP);
151
322k
}
152
153
25.8k
bool OperatorBase::child_breaks_local_key_distribution(RuntimeState* state) const {
154
25.8k
    if (!_child) {
155
24.9k
        return false;
156
24.9k
    }
157
825
    if (_child->is_serial_operator()) {
158
63
        return true;
159
63
    }
160
762
    const auto child_distribution = _child->required_data_distribution(state);
161
762
    return child_distribution.need_local_exchange() &&
162
762
           !is_shuffled_exchange(child_distribution.distribution_type);
163
825
}
164
165
template <typename SharedStateArg>
166
13.6k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
13.6k
    fmt::memory_buffer debug_string_buffer;
168
13.6k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
13.6k
    return fmt::to_string(debug_string_buffer);
170
13.6k
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
10
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
10
    fmt::memory_buffer debug_string_buffer;
168
10
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
10
    return fmt::to_string(debug_string_buffer);
170
10
}
_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
7
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
7
    fmt::memory_buffer debug_string_buffer;
168
7
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
7
    return fmt::to_string(debug_string_buffer);
170
7
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
27
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
27
    fmt::memory_buffer debug_string_buffer;
168
27
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
27
    return fmt::to_string(debug_string_buffer);
170
27
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
13.6k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
13.6k
    fmt::memory_buffer debug_string_buffer;
168
13.6k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
13.6k
    return fmt::to_string(debug_string_buffer);
170
13.6k
}
_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
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
171
172
template <typename SharedStateArg>
173
13.6k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
13.6k
    fmt::memory_buffer debug_string_buffer;
175
13.6k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
13.6k
    return fmt::to_string(debug_string_buffer);
177
13.6k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
7
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
7
    fmt::memory_buffer debug_string_buffer;
175
7
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
7
    return fmt::to_string(debug_string_buffer);
177
7
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
27
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
27
    fmt::memory_buffer debug_string_buffer;
175
27
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
27
    return fmt::to_string(debug_string_buffer);
177
27
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
34
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
34
    fmt::memory_buffer debug_string_buffer;
175
34
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
34
    return fmt::to_string(debug_string_buffer);
177
34
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
13.6k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
13.6k
    fmt::memory_buffer debug_string_buffer;
175
13.6k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
13.6k
    return fmt::to_string(debug_string_buffer);
177
13.6k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
178
179
13.7k
std::string OperatorXBase::debug_string(int indentation_level) const {
180
13.7k
    fmt::memory_buffer debug_string_buffer;
181
13.7k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, parallel_tasks={}, _is_serial_operator={}",
182
13.7k
                   std::string(indentation_level * 2, ' '), _op_name, node_id(), _parallel_tasks,
183
13.7k
                   _is_serial_operator);
184
13.7k
    return fmt::to_string(debug_string_buffer);
185
13.7k
}
186
187
13.6k
std::string OperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
188
13.6k
    return state->get_local_state(operator_id())->debug_string(indentation_level);
189
13.6k
}
190
191
705k
Status OperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
192
705k
    std::string node_name = print_plan_node_type(tnode.node_type);
193
705k
    _nereids_id = tnode.nereids_id;
194
705k
    if (!tnode.intermediate_output_tuple_id_list.empty()) {
195
6.80k
        if (!has_projection()) {
196
0
            return Status::InternalError("no final output tuple id");
197
0
        }
198
6.80k
        if (tnode.intermediate_output_tuple_id_list.size() !=
199
6.80k
            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.80k
    }
207
705k
    auto substr = node_name.substr(0, node_name.find("_NODE"));
208
705k
    _op_name = substr + "_OPERATOR";
209
210
705k
    if (tnode.__isset.vconjunct) {
211
0
        return Status::InternalError("vconjunct is not supported yet");
212
705k
    } 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
705k
    if (tnode.__isset.projections) {
222
276k
        RETURN_IF_ERROR(VExpr::create_expr_trees(tnode.projections, _projection->projections));
223
276k
    }
224
705k
    if (!tnode.intermediate_projections_list.empty()) {
225
6.81k
        DCHECK(has_projection()) << "no final projections";
226
6.81k
        _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.81k
    }
233
705k
    return Status::OK();
234
705k
}
235
236
731k
Status OperatorXBase::prepare(RuntimeState* state) {
237
731k
    for (auto& conjunct : _conjuncts) {
238
285k
        RETURN_IF_ERROR(conjunct->prepare(state, operator_row_desc_before_projection()));
239
285k
    }
240
731k
    if (state->enable_adjust_conjunct_order_by_cost()) {
241
681k
        std::ranges::stable_sort(_conjuncts, [](const auto& a, const auto& b) {
242
348k
            return a->execute_cost() < b->execute_cost();
243
348k
        });
244
681k
    };
245
246
731k
    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
731k
    for (auto& conjunct : _conjuncts) {
266
285k
        RETURN_IF_ERROR(conjunct->open(state));
267
285k
    }
268
731k
    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
731k
    if (_child && !is_source()) {
275
94.7k
        RETURN_IF_ERROR(_child->prepare(state));
276
94.7k
    }
277
278
731k
    if (VExpr::contains_blockable_function(_conjuncts) ||
279
731k
        (has_projection() && VExpr::contains_blockable_function(_projection->projections))) {
280
0
        _blockable = true;
281
0
    }
282
283
731k
    return Status::OK();
284
731k
}
285
286
9.77k
Status OperatorXBase::terminate(RuntimeState* state) {
287
9.77k
    if (_child && !is_source()) {
288
727
        RETURN_IF_ERROR(_child->terminate(state));
289
727
    }
290
9.77k
    auto result = state->get_local_state_result(operator_id());
291
9.77k
    if (!result) {
292
0
        return result.error();
293
0
    }
294
9.77k
    return result.value()->terminate(state);
295
9.77k
}
296
297
5.13M
Status OperatorXBase::close(RuntimeState* state) {
298
5.13M
    if (_child && !is_source()) {
299
781k
        RETURN_IF_ERROR(_child->close(state));
300
781k
    }
301
5.13M
    auto result = state->get_local_state_result(operator_id());
302
5.13M
    if (!result) {
303
0
        return result.error();
304
0
    }
305
5.13M
    return result.value()->close(state);
306
5.13M
}
307
308
302k
void PipelineXLocalStateBase::clear_origin_block() {
309
302k
    _origin_block.clear_column_data(_parent->operator_row_desc_before_projection().num_slots());
310
302k
}
311
312
889k
Status PipelineXLocalStateBase::filter_block(const VExprContextSPtrs& expr_contexts, Block* block) {
313
889k
    RETURN_IF_ERROR(VExprContext::filter_block(expr_contexts, block, block->columns()));
314
315
889k
    _estimate_memory_usage += VExprContext::get_memory_usage(expr_contexts);
316
889k
    return Status::OK();
317
889k
}
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
302k
                                     Block* output_block) const {
326
302k
    auto* local_state = state->get_local_state(operator_id());
327
302k
    SCOPED_TIMER(local_state->exec_time_counter());
328
302k
    SCOPED_TIMER(local_state->_projection_timer);
329
302k
    const size_t rows = origin_block->rows();
330
302k
    if (rows == 0) {
331
148k
        return Status::OK();
332
148k
    }
333
154k
    SCOPED_PEAK_MEM(&local_state->_estimate_memory_usage);
334
335
154k
    {
336
154k
        Block input_block = *origin_block;
337
338
154k
        ColumnsWithTypeAndName new_columns;
339
154k
        for (const auto& projections : local_state->_intermediate_projections) {
340
5.37k
            if (projections.empty()) {
341
0
                return Status::InternalError("meet empty intermediate projection, node id: {}",
342
0
                                             node_id());
343
0
            }
344
5.37k
            new_columns.resize(projections.size());
345
124k
            for (int i = 0; i < projections.size(); i++) {
346
119k
                RETURN_IF_ERROR(projections[i]->execute(&input_block, new_columns[i]));
347
119k
                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
119k
            }
355
5.36k
            Block tmp_block {new_columns};
356
5.36k
            input_block.swap(tmp_block);
357
5.36k
        }
358
359
154k
        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
154k
        auto scoped_mutable_block = VectorizedUtils::build_scoped_mutable_mem_reuse_block(
367
154k
                output_block, _projection->output_row_descriptor);
368
154k
        auto& mutable_columns = scoped_mutable_block.mutable_columns();
369
154k
        DCHECK_EQ(mutable_columns.size(), local_state->_projections.size()) << debug_string();
370
154k
        Columns shared_columns(mutable_columns.size());
371
372
844k
        for (int i = 0; i < mutable_columns.size(); ++i) {
373
689k
            ColumnPtr column_ptr;
374
689k
            RETURN_IF_ERROR(local_state->_projections[i]->execute(&input_block, column_ptr));
375
689k
            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
689k
            column_ptr = column_ptr->convert_to_full_column_if_const();
382
689k
            if (is_column_nullable(*mutable_columns[i]) && !is_column_nullable(*column_ptr)) {
383
0
                column_ptr = make_nullable(column_ptr, false);
384
0
            }
385
689k
            if (column_ptr->is_exclusive()) {
386
241k
                mutable_columns[i] = IColumn::mutate(std::move(column_ptr));
387
448k
            } else {
388
448k
                shared_columns[i] = std::move(column_ptr);
389
448k
            }
390
689k
        }
391
392
154k
        scoped_mutable_block.restore();
393
844k
        for (int i = 0; i < shared_columns.size(); ++i) {
394
689k
            if (shared_columns[i]) {
395
448k
                output_block->replace_by_position(i, std::move(shared_columns[i]));
396
448k
            }
397
689k
        }
398
154k
    }
399
400
0
    origin_block->clear_column_data(
401
154k
            local_state->_parent->operator_row_desc_before_projection().num_slots());
402
154k
    DCHECK_EQ(output_block->rows(), rows);
403
404
154k
    return Status::OK();
405
154k
}
406
407
4.40M
Status OperatorXBase::get_block_after_projects(RuntimeState* state, Block* block, bool* eos) {
408
4.40M
    DBUG_EXECUTE_IF("Pipeline::return_empty_block", {
409
4.40M
        if (this->_op_name == "AGGREGATION_OPERATOR" || this->_op_name == "HASH_JOIN_OPERATOR" ||
410
4.40M
            this->_op_name == "PARTITIONED_AGGREGATION_OPERATOR" ||
411
4.40M
            this->_op_name == "PARTITIONED_HASH_JOIN_OPERATOR" ||
412
4.40M
            this->_op_name == "CROSS_JOIN_OPERATOR" || this->_op_name == "SORT_OPERATOR") {
413
4.40M
            if (_debug_point_count++ % 2 == 0) {
414
4.40M
                return Status::OK();
415
4.40M
            }
416
4.40M
        }
417
4.40M
    });
418
419
4.40M
    Status status;
420
4.40M
    auto* local_state = state->get_local_state(operator_id());
421
4.40M
    Defer defer([&]() {
422
4.40M
        if (status.ok()) {
423
4.40M
            local_state->update_output_block_counters(*block);
424
4.40M
        }
425
4.40M
    });
426
4.40M
    if (has_projection()) {
427
302k
        local_state->clear_origin_block();
428
302k
        status = get_block(state, &local_state->_origin_block, eos);
429
302k
        if (UNLIKELY(!status.ok())) {
430
43
            return status;
431
43
        }
432
302k
        status = do_projections(state, &local_state->_origin_block, block);
433
302k
        return status;
434
302k
    }
435
4.10M
    status = get_block(state, block, eos);
436
4.10M
    RETURN_IF_ERROR(block->check_type_and_column());
437
4.10M
    return status;
438
4.10M
}
439
440
3.01M
void PipelineXLocalStateBase::reached_limit(Block* block, bool* eos) {
441
3.01M
    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
3.01M
    DBUG_EXECUTE_IF("Pipeline::reached_limit_early", {
447
3.01M
        auto op_name = to_lower(_parent->_op_name);
448
3.01M
        auto arg_op_name = dp->param<std::string>("op_name");
449
3.01M
        arg_op_name = to_lower(arg_op_name);
450
451
3.01M
        if (op_name == arg_op_name) {
452
3.01M
            *eos = true;
453
3.01M
        }
454
3.01M
    });
455
456
3.01M
    if (auto rows = block->rows()) {
457
828k
        _num_rows_returned += rows;
458
828k
        _state->get_query_ctx()->resource_ctx()->io_context()->update_process_rows(rows);
459
828k
    }
460
3.01M
}
461
462
33.0k
Status DataSinkOperatorXBase::terminate(RuntimeState* state) {
463
33.0k
    auto result = state->get_sink_local_state_result();
464
33.0k
    if (!result) {
465
0
        return result.error();
466
0
    }
467
33.0k
    return result.value()->terminate(state);
468
33.0k
}
469
470
13.6k
std::string DataSinkOperatorXBase::debug_string(int indentation_level) const {
471
13.6k
    fmt::memory_buffer debug_string_buffer;
472
473
13.6k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, _is_serial_operator={}",
474
13.6k
                   std::string(indentation_level * 2, ' '), _name, node_id(), _is_serial_operator);
475
13.6k
    return fmt::to_string(debug_string_buffer);
476
13.6k
}
477
478
13.6k
std::string DataSinkOperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
479
13.6k
    return state->get_sink_local_state()->debug_string(indentation_level);
480
13.6k
}
481
482
364k
Status DataSinkOperatorXBase::init(const TDataSink& tsink) {
483
364k
    std::string op_name = "UNKNOWN_SINK";
484
364k
    auto it = _TDataSinkType_VALUES_TO_NAMES.find(tsink.type);
485
486
365k
    if (it != _TDataSinkType_VALUES_TO_NAMES.end()) {
487
365k
        op_name = it->second;
488
365k
    }
489
364k
    _name = op_name + "_OPERATOR";
490
364k
    return Status::OK();
491
364k
}
492
493
318k
Status DataSinkOperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
494
318k
    std::string op_name = print_plan_node_type(tnode.node_type);
495
318k
    _nereids_id = tnode.nereids_id;
496
318k
    auto substr = op_name.substr(0, op_name.find("_NODE"));
497
318k
    _name = substr + "_SINK_OPERATOR";
498
318k
    return Status::OK();
499
318k
}
500
501
template <typename LocalStateType>
502
Status DataSinkOperatorX<LocalStateType>::setup_local_state(RuntimeState* state,
503
1.88M
                                                            LocalSinkStateInfo& info) {
504
1.88M
    auto local_state = LocalStateType::create_unique(this, state);
505
1.88M
    RETURN_IF_ERROR(local_state->init(state, info));
506
1.88M
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
1.88M
    return Status::OK();
508
1.88M
}
_ZN5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
119k
                                                            LocalSinkStateInfo& info) {
504
119k
    auto local_state = LocalStateType::create_unique(this, state);
505
119k
    RETURN_IF_ERROR(local_state->init(state, info));
506
119k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
119k
    return Status::OK();
508
119k
}
_ZN5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
392k
                                                            LocalSinkStateInfo& info) {
504
392k
    auto local_state = LocalStateType::create_unique(this, state);
505
392k
    RETURN_IF_ERROR(local_state->init(state, info));
506
392k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
392k
    return Status::OK();
508
392k
}
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
367
                                                            LocalSinkStateInfo& info) {
504
367
    auto local_state = LocalStateType::create_unique(this, state);
505
367
    RETURN_IF_ERROR(local_state->init(state, info));
506
367
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
367
    return Status::OK();
508
367
}
_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
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
}
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
10.2k
                                                            LocalSinkStateInfo& info) {
504
10.2k
    auto local_state = LocalStateType::create_unique(this, state);
505
10.2k
    RETURN_IF_ERROR(local_state->init(state, info));
506
10.2k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
10.2k
    return Status::OK();
508
10.2k
}
_ZN5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
20
                                                            LocalSinkStateInfo& info) {
504
20
    auto local_state = LocalStateType::create_unique(this, state);
505
20
    RETURN_IF_ERROR(local_state->init(state, info));
506
20
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
20
    return Status::OK();
508
20
}
_ZN5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
255k
                                                            LocalSinkStateInfo& info) {
504
255k
    auto local_state = LocalStateType::create_unique(this, state);
505
255k
    RETURN_IF_ERROR(local_state->init(state, info));
506
255k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
255k
    return Status::OK();
508
255k
}
_ZN5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
157
                                                            LocalSinkStateInfo& info) {
504
157
    auto local_state = LocalStateType::create_unique(this, state);
505
157
    RETURN_IF_ERROR(local_state->init(state, info));
506
157
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
157
    return Status::OK();
508
157
}
_ZN5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
283k
                                                            LocalSinkStateInfo& info) {
504
283k
    auto local_state = LocalStateType::create_unique(this, state);
505
283k
    RETURN_IF_ERROR(local_state->init(state, info));
506
283k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
283k
    return Status::OK();
508
283k
}
_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
80.1k
                                                            LocalSinkStateInfo& info) {
504
80.1k
    auto local_state = LocalStateType::create_unique(this, state);
505
80.1k
    RETURN_IF_ERROR(local_state->init(state, info));
506
80.1k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
80.1k
    return Status::OK();
508
80.1k
}
_ZN5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
116
                                                            LocalSinkStateInfo& info) {
504
116
    auto local_state = LocalStateType::create_unique(this, state);
505
116
    RETURN_IF_ERROR(local_state->init(state, info));
506
116
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
116
    return Status::OK();
508
116
}
_ZN5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
556k
                                                            LocalSinkStateInfo& info) {
504
556k
    auto local_state = LocalStateType::create_unique(this, state);
505
556k
    RETURN_IF_ERROR(local_state->init(state, info));
506
556k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
556k
    return Status::OK();
508
556k
}
_ZN5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
5.61k
                                                            LocalSinkStateInfo& info) {
504
5.61k
    auto local_state = LocalStateType::create_unique(this, state);
505
5.61k
    RETURN_IF_ERROR(local_state->init(state, info));
506
5.61k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
5.61k
    return Status::OK();
508
5.61k
}
_ZN5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
10.8k
                                                            LocalSinkStateInfo& info) {
504
10.8k
    auto local_state = LocalStateType::create_unique(this, state);
505
10.8k
    RETURN_IF_ERROR(local_state->init(state, info));
506
10.8k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
10.8k
    return Status::OK();
508
10.8k
}
_ZN5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
1.92k
                                                            LocalSinkStateInfo& info) {
504
1.92k
    auto local_state = LocalStateType::create_unique(this, state);
505
1.92k
    RETURN_IF_ERROR(local_state->init(state, info));
506
1.92k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
1.92k
    return Status::OK();
508
1.92k
}
_ZN5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
314
                                                            LocalSinkStateInfo& info) {
504
314
    auto local_state = LocalStateType::create_unique(this, state);
505
314
    RETURN_IF_ERROR(local_state->init(state, info));
506
314
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
314
    return Status::OK();
508
314
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
4.80k
                                                            LocalSinkStateInfo& info) {
504
4.80k
    auto local_state = LocalStateType::create_unique(this, state);
505
4.80k
    RETURN_IF_ERROR(local_state->init(state, info));
506
4.80k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
4.80k
    return Status::OK();
508
4.80k
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.54k
                                                            LocalSinkStateInfo& info) {
504
2.54k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.54k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.54k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.54k
    return Status::OK();
508
2.54k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE17setup_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_17SetSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.48k
                                                            LocalSinkStateInfo& info) {
504
2.48k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.48k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.48k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.48k
    return Status::OK();
508
2.48k
}
_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
103
                                                            LocalSinkStateInfo& info) {
504
103
    auto local_state = LocalStateType::create_unique(this, state);
505
103
    RETURN_IF_ERROR(local_state->init(state, info));
506
103
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
103
    return Status::OK();
508
103
}
_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.48M
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.48M
    } else {
519
1.48M
        auto ss = LocalStateType::SharedStateType::create_shared();
520
1.48M
        ss->id = operator_id();
521
1.48M
        for (auto& dest : dests_id()) {
522
1.47M
            ss->related_op_ids.insert(dest);
523
1.47M
        }
524
1.48M
        return ss;
525
1.48M
    }
526
1.48M
}
_ZNK5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
104k
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
104k
    } else {
519
104k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
104k
        ss->id = operator_id();
521
104k
        for (auto& dest : dests_id()) {
522
104k
            ss->related_op_ids.insert(dest);
523
104k
        }
524
104k
        return ss;
525
104k
    }
526
104k
}
_ZNK5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
393k
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
393k
    } else {
519
393k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
393k
        ss->id = operator_id();
521
393k
        for (auto& dest : dests_id()) {
522
389k
            ss->related_op_ids.insert(dest);
523
389k
        }
524
393k
        return ss;
525
393k
    }
526
393k
}
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
367
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
367
    } else {
519
367
        auto ss = LocalStateType::SharedStateType::create_shared();
520
367
        ss->id = operator_id();
521
368
        for (auto& dest : dests_id()) {
522
368
            ss->related_op_ids.insert(dest);
523
368
        }
524
367
        return ss;
525
367
    }
526
367
}
_ZNK5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
50.1k
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.1k
    } else {
519
50.1k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
50.1k
        ss->id = operator_id();
521
50.1k
        for (auto& dest : dests_id()) {
522
49.5k
            ss->related_op_ids.insert(dest);
523
49.5k
        }
524
50.1k
        return ss;
525
50.1k
    }
526
50.1k
}
_ZNK5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE19create_shared_stateEv
Line
Count
Source
511
14
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
14
    } else {
519
14
        auto ss = LocalStateType::SharedStateType::create_shared();
520
14
        ss->id = operator_id();
521
14
        for (auto& dest : dests_id()) {
522
14
            ss->related_op_ids.insert(dest);
523
14
        }
524
14
        return ss;
525
14
    }
526
14
}
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
10.3k
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
10.3k
    } else {
519
10.3k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
10.3k
        ss->id = operator_id();
521
10.3k
        for (auto& dest : dests_id()) {
522
10.3k
            ss->related_op_ids.insert(dest);
523
10.3k
        }
524
10.3k
        return ss;
525
10.3k
    }
526
10.3k
}
_ZNK5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
19
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
19
    } else {
519
19
        auto ss = LocalStateType::SharedStateType::create_shared();
520
19
        ss->id = operator_id();
521
19
        for (auto& dest : dests_id()) {
522
19
            ss->related_op_ids.insert(dest);
523
19
        }
524
19
        return ss;
525
19
    }
526
19
}
_ZNK5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
256k
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
256k
    } else {
519
256k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
256k
        ss->id = operator_id();
521
256k
        for (auto& dest : dests_id()) {
522
255k
            ss->related_op_ids.insert(dest);
523
255k
        }
524
256k
        return ss;
525
256k
    }
526
256k
}
_ZNK5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
161
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
161
    } else {
519
161
        auto ss = LocalStateType::SharedStateType::create_shared();
520
161
        ss->id = operator_id();
521
161
        for (auto& dest : dests_id()) {
522
161
            ss->related_op_ids.insert(dest);
523
161
        }
524
161
        return ss;
525
161
    }
526
161
}
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
113
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
113
    } else {
519
113
        auto ss = LocalStateType::SharedStateType::create_shared();
520
113
        ss->id = operator_id();
521
116
        for (auto& dest : dests_id()) {
522
116
            ss->related_op_ids.insert(dest);
523
116
        }
524
113
        return ss;
525
113
    }
526
113
}
_ZNK5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
557k
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
557k
    } else {
519
557k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
557k
        ss->id = operator_id();
521
557k
        for (auto& dest : dests_id()) {
522
549k
            ss->related_op_ids.insert(dest);
523
549k
        }
524
557k
        return ss;
525
557k
    }
526
557k
}
_ZNK5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
5.62k
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
5.62k
    } else {
519
5.62k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
5.62k
        ss->id = operator_id();
521
5.62k
        for (auto& dest : dests_id()) {
522
5.61k
            ss->related_op_ids.insert(dest);
523
5.61k
        }
524
5.62k
        return ss;
525
5.62k
    }
526
5.62k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
416
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
416
    } else {
519
416
        auto ss = LocalStateType::SharedStateType::create_shared();
520
416
        ss->id = operator_id();
521
417
        for (auto& dest : dests_id()) {
522
417
            ss->related_op_ids.insert(dest);
523
417
        }
524
416
        return ss;
525
416
    }
526
416
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE19create_shared_stateEv
Line
Count
Source
511
2.62k
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.62k
    } else {
519
2.62k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
2.62k
        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.62k
        return ss;
525
2.62k
    }
526
2.62k
}
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE19create_shared_stateEv
Line
Count
Source
511
2.49k
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.49k
    } else {
519
2.49k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
2.49k
        ss->id = operator_id();
521
2.49k
        for (auto& dest : dests_id()) {
522
2.49k
            ss->related_op_ids.insert(dest);
523
2.49k
        }
524
2.49k
        return ss;
525
2.49k
    }
526
2.49k
}
_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
554
            ss->related_op_ids.insert(dest);
523
554
        }
524
567
        return ss;
525
567
    }
526
567
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
106
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
106
    } else {
519
106
        auto ss = LocalStateType::SharedStateType::create_shared();
520
106
        ss->id = operator_id();
521
106
        for (auto& dest : dests_id()) {
522
106
            ss->related_op_ids.insert(dest);
523
106
        }
524
106
        return ss;
525
106
    }
526
106
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE19create_shared_stateEv
527
528
template <typename LocalStateType>
529
2.20M
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.20M
    auto local_state = LocalStateType::create_unique(state, this);
531
2.20M
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.20M
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.20M
    return Status::OK();
534
2.20M
}
_ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
71.4k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
71.4k
    auto local_state = LocalStateType::create_unique(state, this);
531
71.4k
    RETURN_IF_ERROR(local_state->init(state, info));
532
71.4k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
71.4k
    return Status::OK();
534
71.4k
}
_ZN5doris9OperatorXINS_18OlapScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
257k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
257k
    auto local_state = LocalStateType::create_unique(state, this);
531
257k
    RETURN_IF_ERROR(local_state->init(state, info));
532
257k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
257k
    return Status::OK();
534
257k
}
_ZN5doris9OperatorXINS_21GroupCommitLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
138
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
138
    auto local_state = LocalStateType::create_unique(state, this);
531
138
    RETURN_IF_ERROR(local_state->init(state, info));
532
138
    state->emplace_local_state(operator_id(), std::move(local_state));
533
138
    return Status::OK();
534
138
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_18JDBCScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_18FileScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
3.38k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
3.38k
    auto local_state = LocalStateType::create_unique(state, this);
531
3.38k
    RETURN_IF_ERROR(local_state->init(state, info));
532
3.38k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
3.38k
    return Status::OK();
534
3.38k
}
_ZN5doris9OperatorXINS_18AnalyticLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
10.2k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
10.2k
    auto local_state = LocalStateType::create_unique(state, this);
531
10.2k
    RETURN_IF_ERROR(local_state->init(state, info));
532
10.2k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
10.2k
    return Status::OK();
534
10.2k
}
_ZN5doris9OperatorXINS_14SortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
9.57k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
9.57k
    auto local_state = LocalStateType::create_unique(state, this);
531
9.57k
    RETURN_IF_ERROR(local_state->init(state, info));
532
9.57k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
9.57k
    return Status::OK();
534
9.57k
}
_ZN5doris9OperatorXINS_19SpillSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
145
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
145
    auto local_state = LocalStateType::create_unique(state, this);
531
145
    RETURN_IF_ERROR(local_state->init(state, info));
532
145
    state->emplace_local_state(operator_id(), std::move(local_state));
533
145
    return Status::OK();
534
145
}
_ZN5doris9OperatorXINS_24LocalMergeSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
245k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
245k
    auto local_state = LocalStateType::create_unique(state, this);
531
245k
    RETURN_IF_ERROR(local_state->init(state, info));
532
245k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
245k
    return Status::OK();
534
245k
}
_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
80.6k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
80.6k
    auto local_state = LocalStateType::create_unique(state, this);
531
80.6k
    RETURN_IF_ERROR(local_state->init(state, info));
532
80.6k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
80.6k
    return Status::OK();
534
80.6k
}
_ZN5doris9OperatorXINS_24PartitionedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
108
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
108
    auto local_state = LocalStateType::create_unique(state, this);
531
108
    RETURN_IF_ERROR(local_state->init(state, info));
532
108
    state->emplace_local_state(operator_id(), std::move(local_state));
533
108
    return Status::OK();
534
108
}
_ZN5doris9OperatorXINS_23TableFunctionLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
4.61k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
4.61k
    auto local_state = LocalStateType::create_unique(state, this);
531
4.61k
    RETURN_IF_ERROR(local_state->init(state, info));
532
4.61k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
4.61k
    return Status::OK();
534
4.61k
}
_ZN5doris9OperatorXINS_18ExchangeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
295k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
295k
    auto local_state = LocalStateType::create_unique(state, this);
531
295k
    RETURN_IF_ERROR(local_state->init(state, info));
532
295k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
295k
    return Status::OK();
534
295k
}
_ZN5doris9OperatorXINS_16RepeatLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.39k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.39k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.39k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.39k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.39k
    return Status::OK();
534
1.39k
}
_ZN5doris9OperatorXINS_29NestedLoopJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
5.60k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
5.60k
    auto local_state = LocalStateType::create_unique(state, this);
531
5.60k
    RETURN_IF_ERROR(local_state->init(state, info));
532
5.60k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
5.60k
    return Status::OK();
534
5.60k
}
_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
56.5k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
56.5k
    auto local_state = LocalStateType::create_unique(state, this);
531
56.5k
    RETURN_IF_ERROR(local_state->init(state, info));
532
56.5k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
56.5k
    return Status::OK();
534
56.5k
}
_ZN5doris9OperatorXINS_35MultiCastDataStreamSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
4.50k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
4.50k
    auto local_state = LocalStateType::create_unique(state, this);
531
4.50k
    RETURN_IF_ERROR(local_state->init(state, info));
532
4.50k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
4.50k
    return Status::OK();
534
4.50k
}
_ZN5doris9OperatorXINS_29PartitionSortSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
315
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
315
    auto local_state = LocalStateType::create_unique(state, this);
531
315
    RETURN_IF_ERROR(local_state->init(state, info));
532
315
    state->emplace_local_state(operator_id(), std::move(local_state));
533
315
    return Status::OK();
534
315
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.64k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.64k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.64k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.64k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.64k
    return Status::OK();
534
2.64k
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.50k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.50k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.50k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.50k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.50k
    return Status::OK();
534
2.50k
}
_ZN5doris9OperatorXINS_17DataGenLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
613
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
613
    auto local_state = LocalStateType::create_unique(state, this);
531
613
    RETURN_IF_ERROR(local_state->init(state, info));
532
613
    state->emplace_local_state(operator_id(), std::move(local_state));
533
613
    return Status::OK();
534
613
}
_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
726k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
726k
    auto local_state = LocalStateType::create_unique(state, this);
531
726k
    RETURN_IF_ERROR(local_state->init(state, info));
532
726k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
726k
    return Status::OK();
534
726k
}
_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
799
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
799
    auto local_state = LocalStateType::create_unique(state, this);
531
799
    RETURN_IF_ERROR(local_state->init(state, info));
532
799
    state->emplace_local_state(operator_id(), std::move(local_state));
533
799
    return Status::OK();
534
799
}
_ZN5doris9OperatorXINS_16SelectLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.01k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.01k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.01k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.01k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.01k
    return Status::OK();
534
1.01k
}
_ZN5doris9OperatorXINS_22StreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
6.68k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
6.68k
    auto local_state = LocalStateType::create_unique(state, this);
531
6.68k
    RETURN_IF_ERROR(local_state->init(state, info));
532
6.68k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
6.68k
    return Status::OK();
534
6.68k
}
_ZN5doris9OperatorXINS_30DistinctStreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
296k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
296k
    auto local_state = LocalStateType::create_unique(state, this);
531
296k
    RETURN_IF_ERROR(local_state->init(state, info));
532
296k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
296k
    return Status::OK();
534
296k
}
535
536
PipelineXSinkLocalStateBase::PipelineXSinkLocalStateBase(DataSinkOperatorXBase* parent,
537
                                                         RuntimeState* state)
538
1.87M
        : _parent(parent), _state(state) {}
539
540
PipelineXLocalStateBase::PipelineXLocalStateBase(RuntimeState* state, OperatorXBase* parent)
541
2.19M
        : _num_rows_returned(0),
542
2.19M
          _rows_returned_counter(nullptr),
543
2.19M
          _parent(parent),
544
2.19M
          _state(state),
545
2.19M
          _budget(state->batch_size(), state->preferred_block_size_bytes()) {}
546
547
template <typename SharedStateArg>
548
2.20M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
2.20M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
2.20M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
2.20M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
2.20M
    _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.20M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
2.20M
    _operator_profile->add_child(_common_profile.get(), true);
557
2.20M
    _operator_profile->add_child(_custom_profile.get(), true);
558
2.20M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
2.20M
    if constexpr (!is_fake_shared) {
560
1.32M
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
815k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
815k
                                    .first.get()
563
815k
                                    ->template cast<SharedStateArg>();
564
565
815k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
815k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
815k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
815k
        } else if (info.shared_state) {
569
435k
            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
435k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
435k
            _dependency = _shared_state->create_source_dependency(
576
435k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
435k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
435k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
435k
        } else {
580
71.2k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
8.69k
                DCHECK(false);
582
8.69k
            }
583
71.2k
        }
584
1.32M
    }
585
586
2.20M
    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.20M
    _rows_returned_counter =
591
2.20M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
2.20M
    _blocks_returned_counter =
593
2.20M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
2.20M
    _output_block_bytes_counter =
595
2.20M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
2.20M
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
2.20M
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
2.20M
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
2.20M
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
2.20M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
2.20M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
2.20M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
2.20M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
2.20M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
2.20M
    _memory_used_counter =
606
2.20M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
2.20M
    _common_profile->add_info_string("IsColocate",
608
2.20M
                                     std::to_string(_parent->is_colocated_operator()));
609
2.20M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
2.20M
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
2.20M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
2.20M
    return Status::OK();
613
2.20M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
71.6k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
71.6k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
71.6k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
71.6k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
71.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
71.6k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
71.6k
    _operator_profile->add_child(_common_profile.get(), true);
557
71.6k
    _operator_profile->add_child(_custom_profile.get(), true);
558
71.6k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
71.6k
    if constexpr (!is_fake_shared) {
560
71.6k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
14.7k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
14.7k
                                    .first.get()
563
14.7k
                                    ->template cast<SharedStateArg>();
564
565
14.7k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
14.7k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
14.7k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
56.9k
        } 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
55.8k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
55.8k
            _dependency = _shared_state->create_source_dependency(
576
55.8k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
55.8k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
55.8k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
55.8k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
1.04k
        }
584
71.6k
    }
585
586
71.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
71.6k
    _rows_returned_counter =
591
71.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
71.6k
    _blocks_returned_counter =
593
71.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
71.6k
    _output_block_bytes_counter =
595
71.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
71.6k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
71.6k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
71.6k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
71.6k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
71.6k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
71.6k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
71.6k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
71.6k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
71.6k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
71.6k
    _memory_used_counter =
606
71.6k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
71.6k
    _common_profile->add_info_string("IsColocate",
608
71.6k
                                     std::to_string(_parent->is_colocated_operator()));
609
71.6k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
71.6k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
71.6k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
71.6k
    return Status::OK();
613
71.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
255k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
255k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
255k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
255k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
255k
    _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
255k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
255k
    _operator_profile->add_child(_common_profile.get(), true);
557
255k
    _operator_profile->add_child(_custom_profile.get(), true);
558
255k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
255k
    if constexpr (!is_fake_shared) {
560
255k
        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
255k
        } 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
248k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
248k
            _dependency = _shared_state->create_source_dependency(
576
248k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
248k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
248k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
248k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
6.87k
        }
584
255k
    }
585
586
255k
    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
255k
    _rows_returned_counter =
591
255k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
255k
    _blocks_returned_counter =
593
255k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
255k
    _output_block_bytes_counter =
595
255k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
255k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
255k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
255k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
255k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
255k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
255k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
255k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
255k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
255k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
255k
    _memory_used_counter =
606
255k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
255k
    _common_profile->add_info_string("IsColocate",
608
255k
                                     std::to_string(_parent->is_colocated_operator()));
609
255k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
255k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
255k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
255k
    return Status::OK();
613
255k
}
_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
5.62k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
5.62k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
5.62k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
5.62k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
5.62k
    _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.62k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
5.62k
    _operator_profile->add_child(_common_profile.get(), true);
557
5.62k
    _operator_profile->add_child(_custom_profile.get(), true);
558
5.62k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
5.62k
    if constexpr (!is_fake_shared) {
560
5.62k
        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.62k
        } 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.59k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
5.59k
            _dependency = _shared_state->create_source_dependency(
576
5.59k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
5.59k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
5.59k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
5.59k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
29
        }
584
5.62k
    }
585
586
5.62k
    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.62k
    _rows_returned_counter =
591
5.62k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
5.62k
    _blocks_returned_counter =
593
5.62k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
5.62k
    _output_block_bytes_counter =
595
5.62k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
5.62k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
5.62k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
5.62k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
5.62k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
5.62k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
5.62k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
5.62k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
5.62k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
5.62k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
5.62k
    _memory_used_counter =
606
5.62k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
5.62k
    _common_profile->add_info_string("IsColocate",
608
5.62k
                                     std::to_string(_parent->is_colocated_operator()));
609
5.62k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
5.62k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
5.62k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
5.62k
    return Status::OK();
613
5.62k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
10.3k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
10.3k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
10.3k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
10.3k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
10.3k
    _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
10.3k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
10.3k
    _operator_profile->add_child(_common_profile.get(), true);
557
10.3k
    _operator_profile->add_child(_custom_profile.get(), true);
558
10.3k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
10.3k
    if constexpr (!is_fake_shared) {
560
10.3k
        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
10.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
10.2k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
10.2k
            _dependency = _shared_state->create_source_dependency(
576
10.2k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
10.2k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
10.2k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
10.2k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
123
        }
584
10.3k
    }
585
586
10.3k
    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
10.3k
    _rows_returned_counter =
591
10.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
10.3k
    _blocks_returned_counter =
593
10.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
10.3k
    _output_block_bytes_counter =
595
10.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
10.3k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
10.3k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
10.3k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
10.3k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
10.3k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
10.3k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
10.3k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
10.3k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
10.3k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
10.3k
    _memory_used_counter =
606
10.3k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
10.3k
    _common_profile->add_info_string("IsColocate",
608
10.3k
                                     std::to_string(_parent->is_colocated_operator()));
609
10.3k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
10.3k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
10.3k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
10.3k
    return Status::OK();
613
10.3k
}
_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.97k
        }
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
80.6k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
80.6k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
80.6k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
80.6k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
80.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
80.6k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
80.6k
    _operator_profile->add_child(_common_profile.get(), true);
557
80.6k
    _operator_profile->add_child(_custom_profile.get(), true);
558
80.6k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
80.6k
    if constexpr (!is_fake_shared) {
560
80.6k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
80.3k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
80.3k
                                    .first.get()
563
80.3k
                                    ->template cast<SharedStateArg>();
564
565
80.3k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
80.3k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
80.3k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
80.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
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
241
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
241
        }
584
80.6k
    }
585
586
80.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
80.6k
    _rows_returned_counter =
591
80.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
80.6k
    _blocks_returned_counter =
593
80.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
80.6k
    _output_block_bytes_counter =
595
80.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
80.6k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
80.6k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
80.6k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
80.6k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
80.6k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
80.6k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
80.6k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
80.6k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
80.6k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
80.6k
    _memory_used_counter =
606
80.6k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
80.6k
    _common_profile->add_info_string("IsColocate",
608
80.6k
                                     std::to_string(_parent->is_colocated_operator()));
609
80.6k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
80.6k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
80.6k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
80.6k
    return Status::OK();
613
80.6k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
108
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
108
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
108
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
108
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
108
    _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
108
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
108
    _operator_profile->add_child(_common_profile.get(), true);
557
108
    _operator_profile->add_child(_custom_profile.get(), true);
558
108
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
108
    if constexpr (!is_fake_shared) {
560
108
        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
108
        } 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
107
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
107
            _dependency = _shared_state->create_source_dependency(
576
107
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
107
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
107
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
107
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
1
        }
584
108
    }
585
586
108
    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
108
    _rows_returned_counter =
591
108
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
108
    _blocks_returned_counter =
593
108
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
108
    _output_block_bytes_counter =
595
108
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
108
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
108
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
108
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
108
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
108
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
108
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
108
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
108
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
108
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
108
    _memory_used_counter =
606
108
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
108
    _common_profile->add_info_string("IsColocate",
608
108
                                     std::to_string(_parent->is_colocated_operator()));
609
108
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
108
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
108
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
108
    return Status::OK();
613
108
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
882k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
882k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
882k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
882k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
882k
    _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
882k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
882k
    _operator_profile->add_child(_common_profile.get(), true);
557
882k
    _operator_profile->add_child(_custom_profile.get(), true);
558
882k
    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
882k
    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
882k
    _rows_returned_counter =
591
882k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
882k
    _blocks_returned_counter =
593
882k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
882k
    _output_block_bytes_counter =
595
882k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
882k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
882k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
882k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
882k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
882k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
882k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
882k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
882k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
882k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
882k
    _memory_used_counter =
606
882k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
882k
    _common_profile->add_info_string("IsColocate",
608
882k
                                     std::to_string(_parent->is_colocated_operator()));
609
882k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
882k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
882k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
882k
    return Status::OK();
613
882k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
56.4k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
56.4k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
56.4k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
56.4k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
56.4k
    _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
56.4k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
56.4k
    _operator_profile->add_child(_common_profile.get(), true);
557
56.4k
    _operator_profile->add_child(_custom_profile.get(), true);
558
56.4k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
56.4k
    if constexpr (!is_fake_shared) {
560
56.4k
        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
56.4k
        } 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.21k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
4.21k
            _dependency = _shared_state->create_source_dependency(
576
4.21k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
4.21k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
4.21k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
52.2k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
52.2k
        }
584
56.4k
    }
585
586
56.4k
    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
56.4k
    _rows_returned_counter =
591
56.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
56.4k
    _blocks_returned_counter =
593
56.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
56.4k
    _output_block_bytes_counter =
595
56.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
56.4k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
56.4k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
56.4k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
56.4k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
56.4k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
56.4k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
56.4k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
56.4k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
56.4k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
56.4k
    _memory_used_counter =
606
56.4k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
56.4k
    _common_profile->add_info_string("IsColocate",
608
56.4k
                                     std::to_string(_parent->is_colocated_operator()));
609
56.4k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
56.4k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
56.4k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
56.4k
    return Status::OK();
613
56.4k
}
_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
4.50k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
4.50k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
4.50k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
4.50k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
4.50k
    _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.50k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
4.50k
    _operator_profile->add_child(_common_profile.get(), true);
557
4.50k
    _operator_profile->add_child(_custom_profile.get(), true);
558
4.50k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
4.50k
    if constexpr (!is_fake_shared) {
560
4.50k
        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.50k
        } 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.49k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
4.49k
            _dependency = _shared_state->create_source_dependency(
576
4.49k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
4.49k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
4.49k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
4.49k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
15
        }
584
4.50k
    }
585
586
4.50k
    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.50k
    _rows_returned_counter =
591
4.50k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
4.50k
    _blocks_returned_counter =
593
4.50k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
4.50k
    _output_block_bytes_counter =
595
4.50k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
4.50k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
4.50k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
4.50k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
4.50k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
4.50k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
4.50k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
4.50k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
4.50k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
4.50k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
4.50k
    _memory_used_counter =
606
4.50k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
4.50k
    _common_profile->add_info_string("IsColocate",
608
4.50k
                                     std::to_string(_parent->is_colocated_operator()));
609
4.50k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
4.50k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
4.50k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
4.50k
    return Status::OK();
613
4.50k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
417
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
417
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
417
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
417
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
417
    _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
417
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
417
    _operator_profile->add_child(_common_profile.get(), true);
557
417
    _operator_profile->add_child(_custom_profile.get(), true);
558
417
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
417
    if constexpr (!is_fake_shared) {
560
417
        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
417
        } 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
415
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
415
            _dependency = _shared_state->create_source_dependency(
576
415
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
415
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
415
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
415
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
2
        }
584
417
    }
585
586
417
    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
417
    _rows_returned_counter =
591
417
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
417
    _blocks_returned_counter =
593
417
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
417
    _output_block_bytes_counter =
595
417
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
417
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
417
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
417
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
417
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
417
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
417
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
417
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
417
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
417
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
417
    _memory_used_counter =
606
417
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
417
    _common_profile->add_info_string("IsColocate",
608
417
                                     std::to_string(_parent->is_colocated_operator()));
609
417
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
417
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
417
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
417
    return Status::OK();
613
417
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4initEPNS_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.14k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
5.14k
            _dependency = _shared_state->create_source_dependency(
576
5.14k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
5.14k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
5.14k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
5.14k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
26
        }
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_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
729k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
729k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
729k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
729k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
729k
    _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
729k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
729k
    _operator_profile->add_child(_common_profile.get(), true);
557
729k
    _operator_profile->add_child(_custom_profile.get(), true);
558
729k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
729k
    if constexpr (!is_fake_shared) {
560
729k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
720k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
720k
                                    .first.get()
563
720k
                                    ->template cast<SharedStateArg>();
564
565
720k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
720k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
720k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
720k
        } 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
8.69k
        } else {
580
8.69k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
8.69k
                DCHECK(false);
582
8.69k
            }
583
8.69k
        }
584
729k
    }
585
586
729k
    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
729k
    _rows_returned_counter =
591
729k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
729k
    _blocks_returned_counter =
593
729k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
729k
    _output_block_bytes_counter =
595
729k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
729k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
729k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
729k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
729k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
729k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
729k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
729k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
729k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
729k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
729k
    _memory_used_counter =
606
729k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
729k
    _common_profile->add_info_string("IsColocate",
608
729k
                                     std::to_string(_parent->is_colocated_operator()));
609
729k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
729k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
729k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
729k
    return Status::OK();
613
729k
}
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.21M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
2.21M
    _conjuncts.resize(_parent->_conjuncts.size());
618
2.53M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
314k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
314k
    }
621
2.21M
    if (_parent->has_projection()) {
622
400k
        const auto& projection = *_parent->_projection;
623
400k
        _projections.resize(projection.projections.size());
624
2.46M
        for (size_t i = 0; i < _projections.size(); i++) {
625
2.06M
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
2.06M
        }
627
400k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
423k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
23.7k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
399k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
376k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
376k
                        state, _intermediate_projections[i][j]));
633
376k
            }
634
23.7k
        }
635
400k
    }
636
2.21M
    return Status::OK();
637
2.21M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
71.9k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
71.9k
    _conjuncts.resize(_parent->_conjuncts.size());
618
73.7k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
1.80k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1.80k
    }
621
71.9k
    if (_parent->has_projection()) {
622
71.8k
        const auto& projection = *_parent->_projection;
623
71.8k
        _projections.resize(projection.projections.size());
624
387k
        for (size_t i = 0; i < _projections.size(); i++) {
625
316k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
316k
        }
627
71.8k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
81.7k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
9.83k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
318k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
308k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
308k
                        state, _intermediate_projections[i][j]));
633
308k
            }
634
9.83k
        }
635
71.8k
    }
636
71.9k
    return Status::OK();
637
71.9k
}
_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
257k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
257k
    _conjuncts.resize(_parent->_conjuncts.size());
618
257k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
257k
    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
257k
    return Status::OK();
637
257k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
144
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
144
    _conjuncts.resize(_parent->_conjuncts.size());
618
144
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
144
    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
144
    return Status::OK();
637
144
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
5.62k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
5.62k
    _conjuncts.resize(_parent->_conjuncts.size());
618
5.68k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
61
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
61
    }
621
5.63k
    if (_parent->has_projection()) {
622
5.63k
        const auto& projection = *_parent->_projection;
623
5.63k
        _projections.resize(projection.projections.size());
624
23.9k
        for (size_t i = 0; i < _projections.size(); i++) {
625
18.2k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
18.2k
        }
627
5.63k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
5.69k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
59
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
502
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
443
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
443
                        state, _intermediate_projections[i][j]));
633
443
            }
634
59
        }
635
5.63k
    }
636
5.62k
    return Status::OK();
637
5.62k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
10.3k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
10.3k
    _conjuncts.resize(_parent->_conjuncts.size());
618
11.1k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
755
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
755
    }
621
10.3k
    if (_parent->has_projection()) {
622
5.71k
        const auto& projection = *_parent->_projection;
623
5.71k
        _projections.resize(projection.projections.size());
624
22.5k
        for (size_t i = 0; i < _projections.size(); i++) {
625
16.8k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
16.8k
        }
627
5.71k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
5.80k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
93
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
707
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
614
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
614
                        state, _intermediate_projections[i][j]));
633
614
            }
634
93
        }
635
5.71k
    }
636
10.3k
    return Status::OK();
637
10.3k
}
_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.63k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1.63k
    }
621
102k
    if (_parent->has_projection()) {
622
31.5k
        const auto& projection = *_parent->_projection;
623
31.5k
        _projections.resize(projection.projections.size());
624
291k
        for (size_t i = 0; i < _projections.size(); i++) {
625
260k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
260k
        }
627
31.5k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
32.2k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
733
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
4.64k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
3.90k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
3.90k
                        state, _intermediate_projections[i][j]));
633
3.90k
            }
634
733
        }
635
31.5k
    }
636
102k
    return Status::OK();
637
102k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
80.6k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
80.6k
    _conjuncts.resize(_parent->_conjuncts.size());
618
80.6k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
7
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
7
    }
621
80.6k
    if (_parent->has_projection()) {
622
250
        const auto& projection = *_parent->_projection;
623
250
        _projections.resize(projection.projections.size());
624
1.13k
        for (size_t i = 0; i < _projections.size(); i++) {
625
883
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
883
        }
627
250
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
250
        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
250
    }
636
80.6k
    return Status::OK();
637
80.6k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
112
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
112
    _conjuncts.resize(_parent->_conjuncts.size());
618
112
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
112
    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
112
    return Status::OK();
637
112
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
887k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
887k
    _conjuncts.resize(_parent->_conjuncts.size());
618
1.19M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
310k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
310k
    }
621
887k
    if (_parent->has_projection()) {
622
272k
        const auto& projection = *_parent->_projection;
623
272k
        _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
272k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
285k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
12.9k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
74.2k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
61.2k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
61.2k
                        state, _intermediate_projections[i][j]));
633
61.2k
            }
634
12.9k
        }
635
272k
    }
636
887k
    return Status::OK();
637
887k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
56.7k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
56.7k
    _conjuncts.resize(_parent->_conjuncts.size());
618
56.7k
    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.7k
    if (_parent->has_projection()) {
622
11.9k
        const auto& projection = *_parent->_projection;
623
11.9k
        _projections.resize(projection.projections.size());
624
115k
        for (size_t i = 0; i < _projections.size(); i++) {
625
103k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
103k
        }
627
11.9k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
12.0k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
115
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
1.57k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
1.46k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
1.46k
                        state, _intermediate_projections[i][j]));
633
1.46k
            }
634
115
        }
635
11.9k
    }
636
56.7k
    return Status::OK();
637
56.7k
}
_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
4.50k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
4.50k
    _conjuncts.resize(_parent->_conjuncts.size());
618
4.74k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
243
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
243
    }
621
4.50k
    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
4.50k
    return Status::OK();
637
4.50k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
416
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
416
    _conjuncts.resize(_parent->_conjuncts.size());
618
416
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
416
    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
416
    return Status::OK();
637
416
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
5.17k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
5.17k
    _conjuncts.resize(_parent->_conjuncts.size());
618
5.17k
    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.17k
    if (_parent->has_projection()) {
622
76
        const auto& projection = *_parent->_projection;
623
76
        _projections.resize(projection.projections.size());
624
260
        for (size_t i = 0; i < _projections.size(); i++) {
625
184
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
184
        }
627
76
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
76
        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
76
    }
636
5.17k
    return Status::OK();
637
5.17k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
732k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
732k
    _conjuncts.resize(_parent->_conjuncts.size());
618
732k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
732k
    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
732k
    return Status::OK();
637
732k
}
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
9.78k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
9.78k
    if (_terminated) {
642
2
        return Status::OK();
643
2
    }
644
9.78k
    _terminated = true;
645
9.78k
    return Status::OK();
646
9.78k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
395
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
395
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
395
    _terminated = true;
645
395
    return Status::OK();
646
395
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
87
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
87
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
87
    _terminated = true;
645
87
    return Status::OK();
646
87
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
26
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
26
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
26
    _terminated = true;
645
26
    return Status::OK();
646
26
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_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
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
76
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
76
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
76
    _terminated = true;
645
76
    return Status::OK();
646
76
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_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_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
7.72k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
7.72k
    if (_terminated) {
642
1
        return Status::OK();
643
1
    }
644
7.72k
    _terminated = true;
645
7.72k
    return Status::OK();
646
7.72k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE9terminateEPNS_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_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
2
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
2
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
2
    _terminated = true;
645
2
    return Status::OK();
646
2
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
33
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
33
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
33
    _terminated = true;
645
33
    return Status::OK();
646
33
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
1.37k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
1.37k
    if (_terminated) {
642
1
        return Status::OK();
643
1
    }
644
1.37k
    _terminated = true;
645
1.37k
    return Status::OK();
646
1.37k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
34
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
34
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
34
    _terminated = true;
645
34
    return Status::OK();
646
34
}
647
648
template <typename SharedStateArg>
649
2.49M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
2.49M
    if (_closed) {
651
277k
        return Status::OK();
652
277k
    }
653
2.21M
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
1.32M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
1.32M
    }
656
2.21M
    _closed = true;
657
2.21M
    return Status::OK();
658
2.49M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
71.8k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
71.8k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
71.8k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
71.8k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
71.8k
    }
656
71.8k
    _closed = true;
657
71.8k
    return Status::OK();
658
71.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
508k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
508k
    if (_closed) {
651
255k
        return Status::OK();
652
255k
    }
653
253k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
253k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
253k
    }
656
253k
    _closed = true;
657
253k
    return Status::OK();
658
508k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
154
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
154
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
154
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
154
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
154
    }
656
154
    _closed = true;
657
154
    return Status::OK();
658
154
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
5.61k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
5.61k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
5.61k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
5.61k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
5.61k
    }
656
5.61k
    _closed = true;
657
5.61k
    return Status::OK();
658
5.61k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
10.3k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
10.3k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
10.3k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
10.3k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
10.3k
    }
656
10.3k
    _closed = true;
657
10.3k
    return Status::OK();
658
10.3k
}
_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
80.2k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
80.2k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
80.2k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
80.2k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
80.2k
    }
656
80.2k
    _closed = true;
657
80.2k
    return Status::OK();
658
80.2k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
106
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
106
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
106
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
106
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
106
    }
656
106
    _closed = true;
657
106
    return Status::OK();
658
106
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
903k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
903k
    if (_closed) {
651
16.1k
        return Status::OK();
652
16.1k
    }
653
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
    }
656
887k
    _closed = true;
657
887k
    return Status::OK();
658
903k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
56.6k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
56.6k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
56.6k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
56.6k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
56.6k
    }
656
56.6k
    _closed = true;
657
56.6k
    return Status::OK();
658
56.6k
}
_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
4.48k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
4.48k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
4.48k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
4.48k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
4.48k
    }
656
4.48k
    _closed = true;
657
4.48k
    return Status::OK();
658
4.48k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
629
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
629
    if (_closed) {
651
315
        return Status::OK();
652
315
    }
653
314
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
314
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
314
    }
656
314
    _closed = true;
657
314
    return Status::OK();
658
629
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
10.6k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
10.6k
    if (_closed) {
651
5.54k
        return Status::OK();
652
5.54k
    }
653
5.15k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
5.15k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
5.15k
    }
656
5.15k
    _closed = true;
657
5.15k
    return Status::OK();
658
10.6k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
734k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
734k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
734k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
734k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
734k
    }
656
734k
    _closed = true;
657
734k
    return Status::OK();
658
734k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
339
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
339
    if (_closed) {
651
179
        return Status::OK();
652
179
    }
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
339
}
659
660
template <typename SharedState>
661
1.88M
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
1.88M
    _operator_profile =
664
1.88M
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
1.88M
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
1.88M
    _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.88M
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
1.88M
    _operator_profile->add_child(_common_profile, true);
673
1.88M
    _operator_profile->add_child(_custom_profile, true);
674
675
1.88M
    _operator_profile->set_metadata(_parent->node_id());
676
1.88M
    _wait_for_finish_dependency_timer =
677
1.88M
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
1.88M
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
1.88M
    if constexpr (!is_fake_shared) {
680
1.32M
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
1.32M
            info.shared_state_map.end()) {
682
379k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
284k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
284k
            }
685
379k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
379k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
379k
                                                  ? 0
688
379k
                                                  : info.task_idx]
689
379k
                                  .get();
690
379k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
949k
        } else {
692
18.4E
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
18.4E
                DCHECK(false);
694
18.4E
            }
695
949k
            _shared_state = info.shared_state->template cast<SharedState>();
696
949k
            _dependency = _shared_state->create_sink_dependency(
697
949k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
949k
        }
699
1.32M
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
1.32M
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
1.32M
    }
702
703
1.88M
    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.88M
    _rows_input_counter =
708
1.88M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
1.88M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
1.88M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
1.88M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
1.88M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
1.88M
    _memory_used_counter =
714
1.88M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
1.88M
    _common_profile->add_info_string("IsColocate",
716
1.88M
                                     std::to_string(_parent->is_colocated_operator()));
717
1.88M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
1.88M
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
1.88M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
1.88M
    return Status::OK();
721
1.88M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
119k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
119k
    _operator_profile =
664
119k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
119k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
119k
    _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
119k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
119k
    _operator_profile->add_child(_common_profile, true);
673
119k
    _operator_profile->add_child(_custom_profile, true);
674
675
119k
    _operator_profile->set_metadata(_parent->node_id());
676
119k
    _wait_for_finish_dependency_timer =
677
119k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
119k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
119k
    if constexpr (!is_fake_shared) {
680
119k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
119k
            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
15.0k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
15.0k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
15.0k
                                                  ? 0
688
15.0k
                                                  : info.task_idx]
689
15.0k
                                  .get();
690
15.0k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
104k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
104k
            _shared_state = info.shared_state->template cast<SharedState>();
696
104k
            _dependency = _shared_state->create_sink_dependency(
697
104k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
104k
        }
699
119k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
119k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
119k
    }
702
703
119k
    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
119k
    _rows_input_counter =
708
119k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
119k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
119k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
119k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
119k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
119k
    _memory_used_counter =
714
119k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
119k
    _common_profile->add_info_string("IsColocate",
716
119k
                                     std::to_string(_parent->is_colocated_operator()));
717
119k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
119k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
119k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
119k
    return Status::OK();
721
119k
}
_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
256k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
256k
    _operator_profile =
664
256k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
256k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
256k
    _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
256k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
256k
    _operator_profile->add_child(_common_profile, true);
673
256k
    _operator_profile->add_child(_custom_profile, true);
674
675
256k
    _operator_profile->set_metadata(_parent->node_id());
676
256k
    _wait_for_finish_dependency_timer =
677
256k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
256k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
256k
    if constexpr (!is_fake_shared) {
680
256k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
256k
            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
256k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
256k
            _shared_state = info.shared_state->template cast<SharedState>();
696
256k
            _dependency = _shared_state->create_sink_dependency(
697
256k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
256k
        }
699
256k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
256k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
256k
    }
702
703
256k
    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
256k
    _rows_input_counter =
708
256k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
256k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
256k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
256k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
256k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
256k
    _memory_used_counter =
714
256k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
256k
    _common_profile->add_info_string("IsColocate",
716
256k
                                     std::to_string(_parent->is_colocated_operator()));
717
256k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
256k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
256k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
256k
    return Status::OK();
721
256k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
161
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
161
    _operator_profile =
664
161
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
161
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
161
    _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
161
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
161
    _operator_profile->add_child(_common_profile, true);
673
161
    _operator_profile->add_child(_custom_profile, true);
674
675
161
    _operator_profile->set_metadata(_parent->node_id());
676
161
    _wait_for_finish_dependency_timer =
677
161
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
161
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
161
    if constexpr (!is_fake_shared) {
680
161
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
161
            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
161
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
161
            _shared_state = info.shared_state->template cast<SharedState>();
696
161
            _dependency = _shared_state->create_sink_dependency(
697
161
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
161
        }
699
161
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
161
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
161
    }
702
703
161
    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
161
    _rows_input_counter =
708
161
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
161
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
161
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
161
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
161
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
161
    _memory_used_counter =
714
161
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
161
    _common_profile->add_info_string("IsColocate",
716
161
                                     std::to_string(_parent->is_colocated_operator()));
717
161
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
161
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
161
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
161
    return Status::OK();
721
161
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
5.62k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
5.62k
    _operator_profile =
664
5.62k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
5.62k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
5.62k
    _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.62k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
5.62k
    _operator_profile->add_child(_common_profile, true);
673
5.62k
    _operator_profile->add_child(_custom_profile, true);
674
675
5.62k
    _operator_profile->set_metadata(_parent->node_id());
676
5.62k
    _wait_for_finish_dependency_timer =
677
5.62k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
5.62k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
5.62k
    if constexpr (!is_fake_shared) {
680
5.62k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
5.62k
            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.62k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
5.62k
            _shared_state = info.shared_state->template cast<SharedState>();
696
5.62k
            _dependency = _shared_state->create_sink_dependency(
697
5.62k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
5.62k
        }
699
5.62k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
5.62k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
5.62k
    }
702
703
5.62k
    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.62k
    _rows_input_counter =
708
5.62k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
5.62k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
5.62k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
5.62k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
5.62k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
5.62k
    _memory_used_counter =
714
5.62k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
5.62k
    _common_profile->add_info_string("IsColocate",
716
5.62k
                                     std::to_string(_parent->is_colocated_operator()));
717
5.62k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
5.62k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
5.62k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
5.62k
    return Status::OK();
721
5.62k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
10.3k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
10.3k
    _operator_profile =
664
10.3k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
10.3k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
10.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
10.3k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
10.3k
    _operator_profile->add_child(_common_profile, true);
673
10.3k
    _operator_profile->add_child(_custom_profile, true);
674
675
10.3k
    _operator_profile->set_metadata(_parent->node_id());
676
10.3k
    _wait_for_finish_dependency_timer =
677
10.3k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
10.3k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
10.3k
    if constexpr (!is_fake_shared) {
680
10.3k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
10.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
10.3k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
10.3k
            _shared_state = info.shared_state->template cast<SharedState>();
696
10.3k
            _dependency = _shared_state->create_sink_dependency(
697
10.3k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
10.3k
        }
699
10.3k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
10.3k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
10.3k
    }
702
703
10.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
10.3k
    _rows_input_counter =
708
10.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
10.3k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
10.3k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
10.3k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
10.3k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
10.3k
    _memory_used_counter =
714
10.3k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
10.3k
    _common_profile->add_info_string("IsColocate",
716
10.3k
                                     std::to_string(_parent->is_colocated_operator()));
717
10.3k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
10.3k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
10.3k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
10.3k
    return Status::OK();
721
10.3k
}
_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
80.4k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
80.4k
    _operator_profile =
664
80.4k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
80.4k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
80.4k
    _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
80.4k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
80.4k
    _operator_profile->add_child(_common_profile, true);
673
80.4k
    _operator_profile->add_child(_custom_profile, true);
674
675
80.4k
    _operator_profile->set_metadata(_parent->node_id());
676
80.4k
    _wait_for_finish_dependency_timer =
677
80.4k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
80.4k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
80.4k
    if constexpr (!is_fake_shared) {
680
80.4k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
80.4k
            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
80.3k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
80.3k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
80.3k
                                                  ? 0
688
80.3k
                                                  : info.task_idx]
689
80.3k
                                  .get();
690
80.3k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
80.3k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
91
            _shared_state = info.shared_state->template cast<SharedState>();
696
91
            _dependency = _shared_state->create_sink_dependency(
697
91
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
91
        }
699
80.4k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
80.4k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
80.4k
    }
702
703
80.4k
    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
80.4k
    _rows_input_counter =
708
80.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
80.4k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
80.4k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
80.4k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
80.4k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
80.4k
    _memory_used_counter =
714
80.4k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
80.4k
    _common_profile->add_info_string("IsColocate",
716
80.4k
                                     std::to_string(_parent->is_colocated_operator()));
717
80.4k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
80.4k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
80.4k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
80.4k
    return Status::OK();
721
80.4k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
117
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
117
    _operator_profile =
664
117
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
117
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
117
    _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
117
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
117
    _operator_profile->add_child(_common_profile, true);
673
117
    _operator_profile->add_child(_custom_profile, true);
674
675
117
    _operator_profile->set_metadata(_parent->node_id());
676
117
    _wait_for_finish_dependency_timer =
677
117
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
117
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
117
    if constexpr (!is_fake_shared) {
680
117
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
117
            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
117
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
117
            _shared_state = info.shared_state->template cast<SharedState>();
696
117
            _dependency = _shared_state->create_sink_dependency(
697
117
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
117
        }
699
117
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
117
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
117
    }
702
703
117
    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
117
    _rows_input_counter =
708
117
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
117
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
117
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
117
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
117
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
117
    _memory_used_counter =
714
117
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
117
    _common_profile->add_info_string("IsColocate",
716
117
                                     std::to_string(_parent->is_colocated_operator()));
717
117
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
117
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
117
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
117
    return Status::OK();
721
117
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
558k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
558k
    _operator_profile =
664
558k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
558k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
558k
    _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
558k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
558k
    _operator_profile->add_child(_common_profile, true);
673
558k
    _operator_profile->add_child(_custom_profile, true);
674
675
558k
    _operator_profile->set_metadata(_parent->node_id());
676
558k
    _wait_for_finish_dependency_timer =
677
558k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
558k
    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
558k
    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
558k
    _rows_input_counter =
708
558k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
558k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
558k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
558k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
558k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
558k
    _memory_used_counter =
714
558k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
558k
    _common_profile->add_info_string("IsColocate",
716
558k
                                     std::to_string(_parent->is_colocated_operator()));
717
558k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
558k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
558k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
558k
    return Status::OK();
721
558k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
10.8k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
10.8k
    _operator_profile =
664
10.8k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
10.8k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
10.8k
    _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
10.8k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
10.8k
    _operator_profile->add_child(_common_profile, true);
673
10.8k
    _operator_profile->add_child(_custom_profile, true);
674
675
10.8k
    _operator_profile->set_metadata(_parent->node_id());
676
10.8k
    _wait_for_finish_dependency_timer =
677
10.8k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
10.8k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
10.8k
    if constexpr (!is_fake_shared) {
680
10.8k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
10.8k
            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
10.8k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
10.8k
            _shared_state = info.shared_state->template cast<SharedState>();
696
10.8k
            _dependency = _shared_state->create_sink_dependency(
697
10.8k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
10.8k
        }
699
10.8k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
10.8k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
10.8k
    }
702
703
10.8k
    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
10.8k
    _rows_input_counter =
708
10.8k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
10.8k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
10.8k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
10.8k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
10.8k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
10.8k
    _memory_used_counter =
714
10.8k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
10.8k
    _common_profile->add_info_string("IsColocate",
716
10.8k
                                     std::to_string(_parent->is_colocated_operator()));
717
10.8k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
10.8k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
10.8k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
10.8k
    return Status::OK();
721
10.8k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
415
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
415
    _operator_profile =
664
415
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
415
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
415
    _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
415
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
415
    _operator_profile->add_child(_common_profile, true);
673
415
    _operator_profile->add_child(_custom_profile, true);
674
675
415
    _operator_profile->set_metadata(_parent->node_id());
676
415
    _wait_for_finish_dependency_timer =
677
415
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
415
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
415
    if constexpr (!is_fake_shared) {
680
415
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
415
            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
415
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
415
            _shared_state = info.shared_state->template cast<SharedState>();
696
415
            _dependency = _shared_state->create_sink_dependency(
697
415
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
415
        }
699
415
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
415
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
415
    }
702
703
416
    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
415
    _rows_input_counter =
708
415
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
415
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
415
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
415
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
415
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
415
    _memory_used_counter =
714
415
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
415
    _common_profile->add_info_string("IsColocate",
716
415
                                     std::to_string(_parent->is_colocated_operator()));
717
415
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
415
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
415
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
415
    return Status::OK();
721
415
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
1.91k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
1.91k
    _operator_profile =
664
1.91k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
1.91k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
1.91k
    _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.91k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
1.91k
    _operator_profile->add_child(_common_profile, true);
673
1.91k
    _operator_profile->add_child(_custom_profile, true);
674
675
1.91k
    _operator_profile->set_metadata(_parent->node_id());
676
1.91k
    _wait_for_finish_dependency_timer =
677
1.91k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
1.91k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
1.91k
    if constexpr (!is_fake_shared) {
680
1.91k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
1.91k
            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
1.91k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
1.91k
            _shared_state = info.shared_state->template cast<SharedState>();
696
1.91k
            _dependency = _shared_state->create_sink_dependency(
697
1.91k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
1.91k
        }
699
1.91k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
1.91k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
1.91k
    }
702
703
1.91k
    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.91k
    _rows_input_counter =
708
1.91k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
1.91k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
1.91k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
1.91k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
1.91k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
1.91k
    _memory_used_counter =
714
1.91k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
1.91k
    _common_profile->add_info_string("IsColocate",
716
1.91k
                                     std::to_string(_parent->is_colocated_operator()));
717
1.91k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
1.91k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
1.91k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
1.91k
    return Status::OK();
721
1.91k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
12.5k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
12.5k
    _operator_profile =
664
12.5k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
12.5k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
12.5k
    _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
12.5k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
12.5k
    _operator_profile->add_child(_common_profile, true);
673
12.5k
    _operator_profile->add_child(_custom_profile, true);
674
675
12.5k
    _operator_profile->set_metadata(_parent->node_id());
676
12.5k
    _wait_for_finish_dependency_timer =
677
12.5k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
12.5k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
12.5k
    if constexpr (!is_fake_shared) {
680
12.5k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
12.5k
            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
12.5k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
12.5k
            _shared_state = info.shared_state->template cast<SharedState>();
696
12.5k
            _dependency = _shared_state->create_sink_dependency(
697
12.5k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
12.5k
        }
699
12.5k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
12.5k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
12.5k
    }
702
703
12.5k
    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
12.5k
    _rows_input_counter =
708
12.5k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
12.5k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
12.5k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
12.5k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
12.5k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
12.5k
    _memory_used_counter =
714
12.5k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
12.5k
    _common_profile->add_info_string("IsColocate",
716
12.5k
                                     std::to_string(_parent->is_colocated_operator()));
717
12.5k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
12.5k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
12.5k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
12.5k
    return Status::OK();
721
12.5k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
283k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
283k
    _operator_profile =
664
283k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
283k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
283k
    _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
283k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
283k
    _operator_profile->add_child(_common_profile, true);
673
283k
    _operator_profile->add_child(_custom_profile, true);
674
675
283k
    _operator_profile->set_metadata(_parent->node_id());
676
283k
    _wait_for_finish_dependency_timer =
677
283k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
283k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
283k
    if constexpr (!is_fake_shared) {
680
283k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
284k
            info.shared_state_map.end()) {
682
284k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
284k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
284k
            }
685
284k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
284k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
284k
                                                  ? 0
688
284k
                                                  : info.task_idx]
689
284k
                                  .get();
690
284k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
18.4E
        } else {
692
18.4E
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
18.4E
                DCHECK(false);
694
18.4E
            }
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
283k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
283k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
283k
    }
702
703
283k
    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
283k
    _rows_input_counter =
708
283k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
283k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
283k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
283k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
283k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
283k
    _memory_used_counter =
714
283k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
283k
    _common_profile->add_info_string("IsColocate",
716
283k
                                     std::to_string(_parent->is_colocated_operator()));
717
283k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
283k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
283k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
283k
    return Status::OK();
721
283k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
443k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
443k
    _operator_profile =
664
443k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
443k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
443k
    _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
443k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
443k
    _operator_profile->add_child(_common_profile, true);
673
443k
    _operator_profile->add_child(_custom_profile, true);
674
675
443k
    _operator_profile->set_metadata(_parent->node_id());
676
443k
    _wait_for_finish_dependency_timer =
677
443k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
443k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
443k
    if constexpr (!is_fake_shared) {
680
443k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
443k
            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
443k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
443k
            _shared_state = info.shared_state->template cast<SharedState>();
696
443k
            _dependency = _shared_state->create_sink_dependency(
697
443k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
443k
        }
699
443k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
443k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
443k
    }
702
703
443k
    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
443k
    _rows_input_counter =
708
443k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
443k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
443k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
443k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
443k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
443k
    _memory_used_counter =
714
443k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
443k
    _common_profile->add_info_string("IsColocate",
716
443k
                                     std::to_string(_parent->is_colocated_operator()));
717
443k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
443k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
443k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
443k
    return Status::OK();
721
443k
}
_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.89M
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
1.89M
    if (_closed) {
726
2
        return Status::OK();
727
2
    }
728
1.89M
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
1.33M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
1.33M
    }
731
1.89M
    _closed = true;
732
1.89M
    return Status::OK();
733
1.89M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
119k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
119k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
119k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
119k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
119k
    }
731
119k
    _closed = true;
732
119k
    return Status::OK();
733
119k
}
_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
255k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
255k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
255k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
255k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
255k
    }
731
255k
    _closed = true;
732
255k
    return Status::OK();
733
255k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
152
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
152
    if (_closed) {
726
2
        return Status::OK();
727
2
    }
728
150
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
150
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
150
    }
731
150
    _closed = true;
732
150
    return Status::OK();
733
152
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
5.58k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
5.58k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
5.58k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
5.58k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
5.58k
    }
731
5.58k
    _closed = true;
732
5.58k
    return Status::OK();
733
5.58k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
10.3k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
10.3k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
10.3k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
10.3k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
10.3k
    }
731
10.3k
    _closed = true;
732
10.3k
    return Status::OK();
733
10.3k
}
_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
80.1k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
80.1k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
80.1k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
80.1k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
80.1k
    }
731
80.1k
    _closed = true;
732
80.1k
    return Status::OK();
733
80.1k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
107
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
107
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
107
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
107
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
107
    }
731
107
    _closed = true;
732
107
    return Status::OK();
733
107
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
560k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
560k
    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
560k
    _closed = true;
732
560k
    return Status::OK();
733
560k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
10.9k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
10.9k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
10.9k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
10.9k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
10.9k
    }
731
10.9k
    _closed = true;
732
10.9k
    return Status::OK();
733
10.9k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
315
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
315
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
315
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
315
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
315
    }
731
315
    _closed = true;
732
315
    return Status::OK();
733
315
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
1.91k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
1.91k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
1.91k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
1.91k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
1.91k
    }
731
1.91k
    _closed = true;
732
1.91k
    return Status::OK();
733
1.91k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
12.5k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
12.5k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
12.5k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
12.5k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
12.5k
    }
731
12.5k
    _closed = true;
732
12.5k
    return Status::OK();
733
12.5k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
285k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
285k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
285k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
285k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
285k
    }
731
285k
    _closed = true;
732
285k
    return Status::OK();
733
285k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
446k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
446k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
446k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
446k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
446k
    }
731
446k
    _closed = true;
732
446k
    return Status::OK();
733
446k
}
_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.38k
                                                          bool* eos) {
738
1.38k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
1.38k
    return pull(state, block, eos);
740
1.38k
}
_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.34k
                                                          bool* eos) {
738
1.34k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
1.34k
    return pull(state, block, eos);
740
1.34k
}
741
742
template <typename LocalStateType>
743
Status StatefulOperatorX<LocalStateType>::get_block_impl(RuntimeState* state, Block* block,
744
543k
                                                         bool* eos) {
745
543k
    auto& local_state = get_local_state(state);
746
543k
    if (need_more_input_data(state)) {
747
509k
        local_state._child_block->clear_column_data(
748
509k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
509k
                        .num_slots());
750
509k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
509k
                state, local_state._child_block.get(), &local_state._child_eos));
752
509k
        *eos = local_state._child_eos;
753
509k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
76.4k
            return Status::OK();
755
76.4k
        }
756
432k
        {
757
432k
            SCOPED_TIMER(local_state.exec_time_counter());
758
432k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
432k
        }
760
432k
    }
761
762
466k
    if (!need_more_input_data(state)) {
763
440k
        SCOPED_TIMER(local_state.exec_time_counter());
764
440k
        bool new_eos = false;
765
440k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
440k
        if (new_eos) {
767
362k
            *eos = true;
768
362k
        } else if (!need_more_input_data(state)) {
769
26.7k
            *eos = false;
770
26.7k
        }
771
440k
    }
772
466k
    return Status::OK();
773
466k
}
_ZN5doris17StatefulOperatorXINS_23HashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
135k
                                                         bool* eos) {
745
135k
    auto& local_state = get_local_state(state);
746
135k
    if (need_more_input_data(state)) {
747
115k
        local_state._child_block->clear_column_data(
748
115k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
115k
                        .num_slots());
750
115k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
115k
                state, local_state._child_block.get(), &local_state._child_eos));
752
115k
        *eos = local_state._child_eos;
753
115k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
32.2k
            return Status::OK();
755
32.2k
        }
756
83.1k
        {
757
83.1k
            SCOPED_TIMER(local_state.exec_time_counter());
758
83.1k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
83.1k
        }
760
83.1k
    }
761
762
103k
    if (!need_more_input_data(state)) {
763
103k
        SCOPED_TIMER(local_state.exec_time_counter());
764
103k
        bool new_eos = false;
765
103k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
103k
        if (new_eos) {
767
47.3k
            *eos = true;
768
56.4k
        } else if (!need_more_input_data(state)) {
769
12.3k
            *eos = false;
770
12.3k
        }
771
103k
    }
772
103k
    return Status::OK();
773
103k
}
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_34PartitionedHashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
_ZN5doris17StatefulOperatorXINS_16RepeatLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
4.53k
                                                         bool* eos) {
745
4.53k
    auto& local_state = get_local_state(state);
746
4.53k
    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
656
            return Status::OK();
755
656
        }
756
1.95k
        {
757
1.95k
            SCOPED_TIMER(local_state.exec_time_counter());
758
1.95k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
1.95k
        }
760
1.95k
    }
761
762
3.89k
    if (!need_more_input_data(state)) {
763
3.89k
        SCOPED_TIMER(local_state.exec_time_counter());
764
3.89k
        bool new_eos = false;
765
3.89k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
3.89k
        if (new_eos) {
767
1.39k
            *eos = true;
768
2.49k
        } else if (!need_more_input_data(state)) {
769
1.92k
            *eos = false;
770
1.92k
        }
771
3.89k
    }
772
3.88k
    return Status::OK();
773
3.88k
}
_ZN5doris17StatefulOperatorXINS_25MaterializationLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
1.85k
                                                         bool* eos) {
745
1.85k
    auto& local_state = get_local_state(state);
746
1.85k
    if (need_more_input_data(state)) {
747
1.85k
        local_state._child_block->clear_column_data(
748
1.85k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
1.85k
                        .num_slots());
750
1.85k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
1.85k
                state, local_state._child_block.get(), &local_state._child_eos));
752
1.85k
        *eos = local_state._child_eos;
753
1.85k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
776
            return Status::OK();
755
776
        }
756
1.07k
        {
757
1.07k
            SCOPED_TIMER(local_state.exec_time_counter());
758
1.07k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
1.07k
        }
760
1.07k
    }
761
762
1.07k
    if (!need_more_input_data(state)) {
763
1.07k
        SCOPED_TIMER(local_state.exec_time_counter());
764
1.07k
        bool new_eos = false;
765
1.07k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
1.07k
        if (new_eos) {
767
799
            *eos = true;
768
799
        } else if (!need_more_input_data(state)) {
769
0
            *eos = false;
770
0
        }
771
1.07k
    }
772
1.07k
    return Status::OK();
773
1.07k
}
_ZN5doris17StatefulOperatorXINS_22StreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
16.0k
                                                         bool* eos) {
745
16.0k
    auto& local_state = get_local_state(state);
746
16.0k
    if (need_more_input_data(state)) {
747
16.0k
        local_state._child_block->clear_column_data(
748
16.0k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
16.0k
                        .num_slots());
750
16.0k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
16.0k
                state, local_state._child_block.get(), &local_state._child_eos));
752
16.0k
        *eos = local_state._child_eos;
753
16.0k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
3.82k
            return Status::OK();
755
3.82k
        }
756
12.1k
        {
757
12.1k
            SCOPED_TIMER(local_state.exec_time_counter());
758
12.1k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
12.1k
        }
760
12.1k
    }
761
762
12.2k
    if (!need_more_input_data(state)) {
763
6.73k
        SCOPED_TIMER(local_state.exec_time_counter());
764
6.73k
        bool new_eos = false;
765
6.73k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
6.73k
        if (new_eos) {
767
6.59k
            *eos = true;
768
6.59k
        } else if (!need_more_input_data(state)) {
769
8
            *eos = false;
770
8
        }
771
6.73k
    }
772
12.2k
    return Status::OK();
773
12.2k
}
_ZN5doris17StatefulOperatorXINS_30DistinctStreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
355k
                                                         bool* eos) {
745
355k
    auto& local_state = get_local_state(state);
746
356k
    if (need_more_input_data(state)) {
747
356k
        local_state._child_block->clear_column_data(
748
356k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
356k
                        .num_slots());
750
356k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
356k
                state, local_state._child_block.get(), &local_state._child_eos));
752
356k
        *eos = local_state._child_eos;
753
356k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
37.8k
            return Status::OK();
755
37.8k
        }
756
318k
        {
757
318k
            SCOPED_TIMER(local_state.exec_time_counter());
758
318k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
318k
        }
760
318k
    }
761
762
317k
    if (!need_more_input_data(state)) {
763
297k
        SCOPED_TIMER(local_state.exec_time_counter());
764
297k
        bool new_eos = false;
765
297k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
297k
        if (new_eos) {
767
296k
            *eos = true;
768
296k
        } else if (!need_more_input_data(state)) {
769
6
            *eos = false;
770
6
        }
771
297k
    }
772
317k
    return Status::OK();
773
317k
}
_ZN5doris17StatefulOperatorXINS_29NestedLoopJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
21.6k
                                                         bool* eos) {
745
21.6k
    auto& local_state = get_local_state(state);
746
21.6k
    if (need_more_input_data(state)) {
747
9.62k
        local_state._child_block->clear_column_data(
748
9.62k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
9.62k
                        .num_slots());
750
9.62k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
9.62k
                state, local_state._child_block.get(), &local_state._child_eos));
752
9.61k
        *eos = local_state._child_eos;
753
9.61k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
406
            return Status::OK();
755
406
        }
756
9.21k
        {
757
9.21k
            SCOPED_TIMER(local_state.exec_time_counter());
758
9.21k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
9.21k
        }
760
9.21k
    }
761
762
21.2k
    if (!need_more_input_data(state)) {
763
20.6k
        SCOPED_TIMER(local_state.exec_time_counter());
764
20.6k
        bool new_eos = false;
765
20.6k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
20.6k
        if (new_eos) {
767
5.58k
            *eos = true;
768
15.0k
        } else if (!need_more_input_data(state)) {
769
12.0k
            *eos = false;
770
12.0k
        }
771
20.6k
    }
772
21.2k
    return Status::OK();
773
21.2k
}
_ZN5doris17StatefulOperatorXINS_23TableFunctionLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
7.61k
                                                         bool* eos) {
745
7.61k
    auto& local_state = get_local_state(state);
746
7.61k
    if (need_more_input_data(state)) {
747
7.25k
        local_state._child_block->clear_column_data(
748
7.25k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
7.25k
                        .num_slots());
750
7.25k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
7.25k
                state, local_state._child_block.get(), &local_state._child_eos));
752
7.25k
        *eos = local_state._child_eos;
753
7.25k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
689
            return Status::OK();
755
689
        }
756
6.56k
        {
757
6.56k
            SCOPED_TIMER(local_state.exec_time_counter());
758
6.56k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
6.56k
        }
760
6.56k
    }
761
762
6.92k
    if (!need_more_input_data(state)) {
763
6.92k
        SCOPED_TIMER(local_state.exec_time_counter());
764
6.92k
        bool new_eos = false;
765
6.92k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
6.92k
        if (new_eos) {
767
4.54k
            *eos = true;
768
4.54k
        } else if (!need_more_input_data(state)) {
769
366
            *eos = false;
770
366
        }
771
6.92k
    }
772
6.91k
    return Status::OK();
773
6.91k
}
774
775
template <typename Writer, typename Parent>
776
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
777
49.8k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
49.8k
    RETURN_IF_ERROR(Base::init(state, info));
779
49.8k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
49.8k
                                                         "AsyncWriterDependency", true);
781
49.8k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
49.8k
                             _finish_dependency));
783
784
49.8k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
49.8k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
49.8k
    return Status::OK();
787
49.8k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
366
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
366
    RETURN_IF_ERROR(Base::init(state, info));
779
366
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
366
                                                         "AsyncWriterDependency", true);
781
366
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
366
                             _finish_dependency));
783
784
366
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
366
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
366
    return Status::OK();
787
366
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
49.4k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
49.4k
    RETURN_IF_ERROR(Base::init(state, info));
779
49.4k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
49.4k
                                                         "AsyncWriterDependency", true);
781
49.4k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
49.4k
                             _finish_dependency));
783
784
49.4k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
49.4k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
49.4k
    return Status::OK();
787
49.4k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
14
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
14
    RETURN_IF_ERROR(Base::init(state, info));
779
14
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
14
                                                         "AsyncWriterDependency", true);
781
14
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
14
                             _finish_dependency));
783
784
14
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
14
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
14
    return Status::OK();
787
14
}
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
395k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
344k
        RETURN_IF_ERROR(
796
344k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
344k
    }
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
368
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
368
    RETURN_IF_ERROR(Base::open(state));
793
368
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
1.85k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
1.48k
        RETURN_IF_ERROR(
796
1.48k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
1.48k
    }
798
368
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
368
    return Status::OK();
800
368
}
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
393k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
342k
        RETURN_IF_ERROR(
796
342k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
342k
    }
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
14
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
14
    RETURN_IF_ERROR(Base::open(state));
793
14
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
252
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
238
        RETURN_IF_ERROR(
796
238
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
238
    }
798
14
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
14
    return Status::OK();
800
14
}
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
65.8k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
65.8k
    return _writer->sink(block, eos);
806
65.8k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
1.18k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
1.18k
    return _writer->sink(block, eos);
806
1.18k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
64.6k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
64.6k
    return _writer->sink(block, eos);
806
64.6k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
14
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
14
    return _writer->sink(block, eos);
806
14
}
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.8k
    if (_writer) {
818
50.8k
        Status st = _writer->get_writer_status();
819
50.8k
        if (exec_status.ok()) {
820
50.5k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
50.5k
                                                       : Status::Cancelled("force close"));
822
50.5k
        } else {
823
245
            _writer->force_close(exec_status);
824
245
        }
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.8k
        RETURN_IF_ERROR(st);
829
50.8k
    }
830
50.7k
    return Base::close(state, exec_status);
831
50.7k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
357
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
357
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
357
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
357
    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
357
    if (_writer) {
818
357
        Status st = _writer->get_writer_status();
819
357
        if (exec_status.ok()) {
820
357
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
357
                                                       : Status::Cancelled("force close"));
822
357
        } 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
357
        RETURN_IF_ERROR(st);
829
357
    }
830
357
    return Base::close(state, exec_status);
831
357
}
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.4k
    if (_writer) {
818
50.4k
        Status st = _writer->get_writer_status();
819
50.4k
        if (exec_status.ok()) {
820
50.1k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
50.1k
                                                       : Status::Cancelled("force close"));
822
50.1k
        } else {
823
245
            _writer->force_close(exec_status);
824
245
        }
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.4k
        RETURN_IF_ERROR(st);
829
50.4k
    }
830
50.3k
    return Base::close(state, exec_status);
831
50.3k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
14
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
14
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
14
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
14
    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
14
    if (_writer) {
818
14
        Status st = _writer->get_writer_status();
819
14
        if (exec_status.ok()) {
820
14
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
14
                                                       : Status::Cancelled("force close"));
822
14
        } 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
14
        RETURN_IF_ERROR(st);
829
14
    }
830
14
    return Base::close(state, exec_status);
831
14
}
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