Coverage Report

Created: 2026-11-03 12:48

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.91M
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
1.91M
    if (_parent->nereids_id() == -1) {
123
1.01M
        return fmt::format("(id={})", _parent->node_id());
124
1.01M
    } else {
125
895k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
895k
    }
127
1.91M
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
74.2k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
74.2k
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
74.2k
    } else {
125
74.2k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
74.2k
    }
127
74.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
232k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
232k
    if (_parent->nereids_id() == -1) {
123
12
        return fmt::format("(id={})", _parent->node_id());
124
232k
    } else {
125
232k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
232k
    }
127
232k
}
_ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
158
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
158
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
158
    } else {
125
158
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
158
    }
127
158
}
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
5.58k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
5.58k
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
5.58k
    } else {
125
5.58k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
5.58k
    }
127
5.58k
}
_ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
12.7k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
12.7k
    if (_parent->nereids_id() == -1) {
123
60
        return fmt::format("(id={})", _parent->node_id());
124
12.6k
    } else {
125
12.6k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
12.6k
    }
127
12.7k
}
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
99.9k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
99.9k
    if (_parent->nereids_id() == -1) {
123
29
        return fmt::format("(id={})", _parent->node_id());
124
99.9k
    } else {
125
99.9k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
99.9k
    }
127
99.9k
}
_ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
52.1k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
52.1k
    if (_parent->nereids_id() == -1) {
123
2
        return fmt::format("(id={})", _parent->node_id());
124
52.1k
    } else {
125
52.1k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
52.1k
    }
127
52.1k
}
_ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
122
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
122
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
122
    } else {
125
122
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
122
    }
127
122
}
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
655k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
655k
    if (_parent->nereids_id() == -1) {
123
298k
        return fmt::format("(id={})", _parent->node_id());
124
356k
    } else {
125
356k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
356k
    }
127
655k
}
_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.58k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
4.58k
    if (_parent->nereids_id() == -1) {
123
4.58k
        return fmt::format("(id={})", _parent->node_id());
124
4.58k
    } else {
125
1
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
1
    }
127
4.58k
}
_ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
468
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
468
    if (_parent->nereids_id() == -1) {
123
102
        return fmt::format("(id={})", _parent->node_id());
124
366
    } else {
125
366
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
366
    }
127
468
}
_ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
5.02k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
5.02k
    if (_parent->nereids_id() == -1) {
123
13
        return fmt::format("(id={})", _parent->node_id());
124
5.01k
    } else {
125
5.01k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
5.01k
    }
127
5.02k
}
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
715k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
715k
    if (_parent->nereids_id() == -1) {
123
715k
        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
715k
}
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.27M
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
1.27M
    if (_parent->nereids_id() == -1) {
132
736k
        return fmt::format("(id={})", _parent->node_id());
133
736k
    } else {
134
539k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
539k
    }
136
1.27M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
122k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
122k
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
122k
    } else {
134
122k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
122k
    }
136
122k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
5
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
5
    if (_parent->nereids_id() == -1) {
132
1
        return fmt::format("(id={})", _parent->node_id());
133
4
    } else {
134
4
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
4
    }
136
5
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
235k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
235k
    if (_parent->nereids_id() == -1) {
132
9
        return fmt::format("(id={})", _parent->node_id());
133
235k
    } else {
134
235k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
235k
    }
136
235k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
165
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
165
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
165
    } else {
134
165
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
165
    }
136
165
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
5.60k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
5.60k
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
5.60k
    } else {
134
5.60k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
5.60k
    }
136
5.60k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
13.1k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
13.1k
    if (_parent->nereids_id() == -1) {
132
60
        return fmt::format("(id={})", _parent->node_id());
133
13.0k
    } else {
134
13.0k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
13.0k
    }
136
13.1k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
100k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
100k
    if (_parent->nereids_id() == -1) {
132
29
        return fmt::format("(id={})", _parent->node_id());
133
100k
    } else {
134
100k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
100k
    }
136
100k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
52.0k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
52.0k
    if (_parent->nereids_id() == -1) {
132
4
        return fmt::format("(id={})", _parent->node_id());
133
52.0k
    } else {
134
52.0k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
52.0k
    }
136
52.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
132
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
132
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
132
    } else {
134
132
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
132
    }
136
132
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
28
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
28
    if (_parent->nereids_id() == -1) {
132
28
        return fmt::format("(id={})", _parent->node_id());
133
28
    } else {
134
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
0
    }
136
28
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
9.89k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
9.89k
    if (_parent->nereids_id() == -1) {
132
3
        return fmt::format("(id={})", _parent->node_id());
133
9.89k
    } else {
134
9.89k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
9.89k
    }
136
9.89k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
466
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
466
    if (_parent->nereids_id() == -1) {
132
102
        return fmt::format("(id={})", _parent->node_id());
133
364
    } else {
134
364
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
364
    }
136
466
}
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
293k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
293k
    if (_parent->nereids_id() == -1) {
132
293k
        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
293k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
429k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
430k
    if (_parent->nereids_id() == -1) {
132
430k
        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
429k
}
_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.7k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
33.7k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
33.7k
    _terminated = true;
144
33.7k
    return Status::OK();
145
33.7k
}
_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
3.39k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
3.39k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
3.39k
    _terminated = true;
144
3.39k
    return Status::OK();
145
3.39k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_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_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
4
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
4
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
4
    _terminated = true;
144
4
    return Status::OK();
145
4
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
2.14k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
2.14k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
2.14k
    _terminated = true;
144
2.14k
    return Status::OK();
145
2.14k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
2.10k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
2.10k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
2.10k
    _terminated = true;
144
2.10k
    return Status::OK();
145
2.10k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
831
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
831
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
831
    _terminated = true;
144
831
    return Status::OK();
145
831
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
528
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
528
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
528
    _terminated = true;
144
528
    return Status::OK();
145
528
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
6
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
6
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
6
    _terminated = true;
144
6
    return Status::OK();
145
6
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
95
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
95
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
95
    _terminated = true;
144
95
    return Status::OK();
145
95
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
12
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
12
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
12
    _terminated = true;
144
12
    return Status::OK();
145
12
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
476
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
476
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
476
    _terminated = true;
144
476
    return Status::OK();
145
476
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
127
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
127
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
127
    _terminated = true;
144
127
    return Status::OK();
145
127
}
146
147
328k
DataDistribution OperatorBase::required_data_distribution(RuntimeState* /*state*/) const {
148
328k
    return _child && _child->is_serial_operator() && !is_source()
149
328k
                   ? DataDistribution(TLocalPartitionType::PASSTHROUGH)
150
328k
                   : DataDistribution(TLocalPartitionType::NOOP);
151
328k
}
152
153
25.4k
bool OperatorBase::child_breaks_local_key_distribution(RuntimeState* state) const {
154
25.4k
    if (!_child) {
155
24.7k
        return false;
156
24.7k
    }
157
654
    if (_child->is_serial_operator()) {
158
31
        return true;
159
31
    }
160
623
    const auto child_distribution = _child->required_data_distribution(state);
161
623
    return child_distribution.need_local_exchange() &&
162
623
           !is_shuffled_exchange(child_distribution.distribution_type);
163
654
}
164
165
template <typename SharedStateArg>
166
14.0k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
14.0k
    fmt::memory_buffer debug_string_buffer;
168
14.0k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
14.0k
    return fmt::to_string(debug_string_buffer);
170
14.0k
}
_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
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
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
55
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
55
    fmt::memory_buffer debug_string_buffer;
168
55
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
55
    return fmt::to_string(debug_string_buffer);
170
55
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
13.9k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
13.9k
    fmt::memory_buffer debug_string_buffer;
168
13.9k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
13.9k
    return fmt::to_string(debug_string_buffer);
170
13.9k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
1
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
1
    fmt::memory_buffer debug_string_buffer;
168
1
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
1
    return fmt::to_string(debug_string_buffer);
170
1
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
60
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
60
    fmt::memory_buffer debug_string_buffer;
168
60
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
60
    return fmt::to_string(debug_string_buffer);
170
60
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
171
172
template <typename SharedStateArg>
173
14.0k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
14.0k
    fmt::memory_buffer debug_string_buffer;
175
14.0k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
14.0k
    return fmt::to_string(debug_string_buffer);
177
14.0k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
10
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
10
    fmt::memory_buffer debug_string_buffer;
175
10
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
10
    return fmt::to_string(debug_string_buffer);
177
10
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
55
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
55
    fmt::memory_buffer debug_string_buffer;
175
55
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
55
    return fmt::to_string(debug_string_buffer);
177
55
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
40
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
40
    fmt::memory_buffer debug_string_buffer;
175
40
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
40
    return fmt::to_string(debug_string_buffer);
177
40
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
50
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
50
    fmt::memory_buffer debug_string_buffer;
175
50
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
50
    return fmt::to_string(debug_string_buffer);
177
50
}
_ZNK5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
13.8k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
13.8k
    fmt::memory_buffer debug_string_buffer;
175
13.8k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
13.8k
    return fmt::to_string(debug_string_buffer);
177
13.8k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
178
179
14.0k
std::string OperatorXBase::debug_string(int indentation_level) const {
180
14.0k
    fmt::memory_buffer debug_string_buffer;
181
14.0k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, parallel_tasks={}, _is_serial_operator={}",
182
14.0k
                   std::string(indentation_level * 2, ' '), _op_name, node_id(), _parallel_tasks,
183
14.0k
                   _is_serial_operator);
184
14.0k
    return fmt::to_string(debug_string_buffer);
185
14.0k
}
186
187
14.0k
std::string OperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
188
14.0k
    return state->get_local_state(operator_id())->debug_string(indentation_level);
189
14.0k
}
190
191
719k
Status OperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
192
719k
    std::string node_name = print_plan_node_type(tnode.node_type);
193
719k
    _nereids_id = tnode.nereids_id;
194
719k
    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
719k
    auto substr = node_name.substr(0, node_name.find("_NODE"));
208
719k
    _op_name = substr + "_OPERATOR";
209
210
719k
    if (tnode.__isset.vconjunct) {
211
0
        return Status::InternalError("vconjunct is not supported yet");
212
719k
    } else if (tnode.__isset.conjuncts) {
213
286k
        for (const auto& conjunct : tnode.conjuncts) {
214
286k
            VExprContextSPtr context;
215
286k
            RETURN_IF_ERROR(VExpr::create_expr_tree(conjunct, context));
216
286k
            _conjuncts.emplace_back(context);
217
286k
        }
218
106k
    }
219
220
    // create the projections expr
221
719k
    if (tnode.__isset.projections) {
222
277k
        RETURN_IF_ERROR(VExpr::create_expr_trees(tnode.projections, _projection->projections));
223
277k
    }
224
719k
    if (!tnode.intermediate_projections_list.empty()) {
225
6.80k
        DCHECK(has_projection()) << "no final projections";
226
6.80k
        _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.80k
    }
233
719k
    return Status::OK();
234
719k
}
235
236
746k
Status OperatorXBase::prepare(RuntimeState* state) {
237
746k
    for (auto& conjunct : _conjuncts) {
238
285k
        RETURN_IF_ERROR(conjunct->prepare(state, operator_row_desc_before_projection()));
239
285k
    }
240
746k
    if (state->enable_adjust_conjunct_order_by_cost()) {
241
695k
        std::ranges::stable_sort(_conjuncts, [](const auto& a, const auto& b) {
242
349k
            return a->execute_cost() < b->execute_cost();
243
349k
        });
244
695k
    };
245
246
746k
    if (has_projection()) {
247
277k
        auto& projection = *_projection;
248
289k
        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
277k
        const auto& final_projection_input_row_desc =
256
277k
                projection.intermediate_output_row_descriptors.empty()
257
277k
                        ? operator_row_desc_before_projection()
258
277k
                        : projection.intermediate_output_row_descriptors.back();
259
277k
        RETURN_IF_ERROR(
260
277k
                VExpr::prepare(projection.projections, state, final_projection_input_row_desc));
261
277k
        RETURN_IF_ERROR(VExpr::check_expr_output_type(projection.projections,
262
277k
                                                      projection.output_row_descriptor));
263
277k
    }
264
265
746k
    for (auto& conjunct : _conjuncts) {
266
285k
        RETURN_IF_ERROR(conjunct->open(state));
267
285k
    }
268
746k
    if (has_projection()) {
269
277k
        RETURN_IF_ERROR(VExpr::open(_projection->projections, state));
270
277k
        for (auto& projections : _projection->intermediate_projections) {
271
12.2k
            RETURN_IF_ERROR(VExpr::open(projections, state));
272
12.2k
        }
273
277k
    }
274
746k
    if (_child && !is_source()) {
275
105k
        RETURN_IF_ERROR(_child->prepare(state));
276
105k
    }
277
278
746k
    if (VExpr::contains_blockable_function(_conjuncts) ||
279
746k
        (has_projection() && VExpr::contains_blockable_function(_projection->projections))) {
280
0
        _blockable = true;
281
0
    }
282
283
746k
    return Status::OK();
284
746k
}
285
286
10.4k
Status OperatorXBase::terminate(RuntimeState* state) {
287
10.4k
    if (_child && !is_source()) {
288
701
        RETURN_IF_ERROR(_child->terminate(state));
289
701
    }
290
10.4k
    auto result = state->get_local_state_result(operator_id());
291
10.4k
    if (!result) {
292
0
        return result.error();
293
0
    }
294
10.4k
    return result.value()->terminate(state);
295
10.4k
}
296
297
5.19M
Status OperatorXBase::close(RuntimeState* state) {
298
5.19M
    if (_child && !is_source()) {
299
858k
        RETURN_IF_ERROR(_child->close(state));
300
858k
    }
301
5.19M
    auto result = state->get_local_state_result(operator_id());
302
5.19M
    if (!result) {
303
0
        return result.error();
304
0
    }
305
5.19M
    return result.value()->close(state);
306
5.19M
}
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
694k
Status PipelineXLocalStateBase::filter_block(const VExprContextSPtrs& expr_contexts, Block* block) {
313
694k
    RETURN_IF_ERROR(VExprContext::filter_block(expr_contexts, block, block->columns()));
314
315
694k
    _estimate_memory_usage += VExprContext::get_memory_usage(expr_contexts);
316
694k
    return Status::OK();
317
694k
}
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
149k
        return Status::OK();
332
149k
    }
333
152k
    SCOPED_PEAK_MEM(&local_state->_estimate_memory_usage);
334
335
152k
    {
336
152k
        Block input_block = *origin_block;
337
338
152k
        ColumnsWithTypeAndName new_columns;
339
152k
        for (const auto& projections : local_state->_intermediate_projections) {
340
5.16k
            if (projections.empty()) {
341
0
                return Status::InternalError("meet empty intermediate projection, node id: {}",
342
0
                                             node_id());
343
0
            }
344
5.16k
            new_columns.resize(projections.size());
345
123k
            for (int i = 0; i < projections.size(); i++) {
346
118k
                RETURN_IF_ERROR(projections[i]->execute(&input_block, new_columns[i]));
347
118k
                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
118k
            }
355
5.15k
            Block tmp_block {new_columns};
356
5.15k
            input_block.swap(tmp_block);
357
5.15k
        }
358
359
152k
        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
152k
        auto scoped_mutable_block = VectorizedUtils::build_scoped_mutable_mem_reuse_block(
367
152k
                output_block, _projection->output_row_descriptor);
368
152k
        auto& mutable_columns = scoped_mutable_block.mutable_columns();
369
152k
        DCHECK_EQ(mutable_columns.size(), local_state->_projections.size()) << debug_string();
370
152k
        Columns shared_columns(mutable_columns.size());
371
372
847k
        for (int i = 0; i < mutable_columns.size(); ++i) {
373
695k
            ColumnPtr column_ptr;
374
695k
            RETURN_IF_ERROR(local_state->_projections[i]->execute(&input_block, column_ptr));
375
695k
            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
695k
            column_ptr = column_ptr->convert_to_full_column_if_const();
382
695k
            if (is_column_nullable(*mutable_columns[i]) && !is_column_nullable(*column_ptr)) {
383
0
                column_ptr = make_nullable(column_ptr, false);
384
0
            }
385
695k
            if (column_ptr->is_exclusive()) {
386
242k
                mutable_columns[i] = IColumn::mutate(std::move(column_ptr));
387
452k
            } else {
388
452k
                shared_columns[i] = std::move(column_ptr);
389
452k
            }
390
695k
        }
391
392
152k
        scoped_mutable_block.restore();
393
848k
        for (int i = 0; i < shared_columns.size(); ++i) {
394
695k
            if (shared_columns[i]) {
395
453k
                output_block->replace_by_position(i, std::move(shared_columns[i]));
396
453k
            }
397
695k
        }
398
152k
    }
399
400
0
    origin_block->clear_column_data(
401
152k
            local_state->_parent->operator_row_desc_before_projection().num_slots());
402
152k
    DCHECK_EQ(output_block->rows(), rows);
403
404
152k
    return Status::OK();
405
152k
}
406
407
4.20M
Status OperatorXBase::get_block_after_projects(RuntimeState* state, Block* block, bool* eos) {
408
4.20M
    DBUG_EXECUTE_IF("Pipeline::return_empty_block", {
409
4.20M
        if (this->_op_name == "AGGREGATION_OPERATOR" || this->_op_name == "HASH_JOIN_OPERATOR" ||
410
4.20M
            this->_op_name == "PARTITIONED_AGGREGATION_OPERATOR" ||
411
4.20M
            this->_op_name == "PARTITIONED_HASH_JOIN_OPERATOR" ||
412
4.20M
            this->_op_name == "CROSS_JOIN_OPERATOR" || this->_op_name == "SORT_OPERATOR") {
413
4.20M
            if (_debug_point_count++ % 2 == 0) {
414
4.20M
                return Status::OK();
415
4.20M
            }
416
4.20M
        }
417
4.20M
    });
418
419
4.20M
    Status status;
420
4.20M
    auto* local_state = state->get_local_state(operator_id());
421
4.20M
    Defer defer([&]() {
422
4.20M
        if (status.ok()) {
423
4.20M
            local_state->update_output_block_counters(*block);
424
4.20M
        }
425
4.19M
    });
426
4.20M
    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
42
            return status;
431
42
        }
432
302k
        status = do_projections(state, &local_state->_origin_block, block);
433
302k
        return status;
434
302k
    }
435
3.89M
    status = get_block(state, block, eos);
436
3.89M
    RETURN_IF_ERROR(block->check_type_and_column());
437
3.89M
    return status;
438
3.89M
}
439
440
2.80M
void PipelineXLocalStateBase::reached_limit(Block* block, bool* eos) {
441
2.80M
    if (_parent->_limit != -1 and _num_rows_returned + block->rows() >= _parent->_limit) {
442
10.0k
        block->set_num_rows(_parent->_limit - _num_rows_returned);
443
10.0k
        *eos = true;
444
10.0k
    }
445
446
2.80M
    DBUG_EXECUTE_IF("Pipeline::reached_limit_early", {
447
2.80M
        auto op_name = to_lower(_parent->_op_name);
448
2.80M
        auto arg_op_name = dp->param<std::string>("op_name");
449
2.80M
        arg_op_name = to_lower(arg_op_name);
450
451
2.80M
        if (op_name == arg_op_name) {
452
2.80M
            *eos = true;
453
2.80M
        }
454
2.80M
    });
455
456
2.80M
    if (auto rows = block->rows()) {
457
807k
        _num_rows_returned += rows;
458
807k
        _state->get_query_ctx()->resource_ctx()->io_context()->update_process_rows(rows);
459
807k
    }
460
2.80M
}
461
462
33.7k
Status DataSinkOperatorXBase::terminate(RuntimeState* state) {
463
33.7k
    auto result = state->get_sink_local_state_result();
464
33.7k
    if (!result) {
465
0
        return result.error();
466
0
    }
467
33.7k
    return result.value()->terminate(state);
468
33.7k
}
469
470
14.0k
std::string DataSinkOperatorXBase::debug_string(int indentation_level) const {
471
14.0k
    fmt::memory_buffer debug_string_buffer;
472
473
14.0k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, _is_serial_operator={}",
474
14.0k
                   std::string(indentation_level * 2, ' '), _name, node_id(), _is_serial_operator);
475
14.0k
    return fmt::to_string(debug_string_buffer);
476
14.0k
}
477
478
14.0k
std::string DataSinkOperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
479
14.0k
    return state->get_sink_local_state()->debug_string(indentation_level);
480
14.0k
}
481
482
370k
Status DataSinkOperatorXBase::init(const TDataSink& tsink) {
483
370k
    std::string op_name = "UNKNOWN_SINK";
484
370k
    auto it = _TDataSinkType_VALUES_TO_NAMES.find(tsink.type);
485
486
371k
    if (it != _TDataSinkType_VALUES_TO_NAMES.end()) {
487
371k
        op_name = it->second;
488
371k
    }
489
370k
    _name = op_name + "_OPERATOR";
490
370k
    return Status::OK();
491
370k
}
492
493
317k
Status DataSinkOperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
494
317k
    std::string op_name = print_plan_node_type(tnode.node_type);
495
317k
    _nereids_id = tnode.nereids_id;
496
317k
    auto substr = op_name.substr(0, op_name.find("_NODE"));
497
317k
    _name = substr + "_SINK_OPERATOR";
498
317k
    return Status::OK();
499
317k
}
500
501
template <typename LocalStateType>
502
Status DataSinkOperatorX<LocalStateType>::setup_local_state(RuntimeState* state,
503
1.83M
                                                            LocalSinkStateInfo& info) {
504
1.83M
    auto local_state = LocalStateType::create_unique(this, state);
505
1.83M
    RETURN_IF_ERROR(local_state->init(state, info));
506
1.83M
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
1.83M
    return Status::OK();
508
1.83M
}
_ZN5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
122k
                                                            LocalSinkStateInfo& info) {
504
122k
    auto local_state = LocalStateType::create_unique(this, state);
505
122k
    RETURN_IF_ERROR(local_state->init(state, info));
506
122k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
122k
    return Status::OK();
508
122k
}
_ZN5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
383k
                                                            LocalSinkStateInfo& info) {
504
383k
    auto local_state = LocalStateType::create_unique(this, state);
505
383k
    RETURN_IF_ERROR(local_state->init(state, info));
506
383k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
383k
    return Status::OK();
508
383k
}
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
390
                                                            LocalSinkStateInfo& info) {
504
390
    auto local_state = LocalStateType::create_unique(this, state);
505
390
    RETURN_IF_ERROR(local_state->init(state, info));
506
390
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
390
    return Status::OK();
508
390
}
_ZN5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
48.3k
                                                            LocalSinkStateInfo& info) {
504
48.3k
    auto local_state = LocalStateType::create_unique(this, state);
505
48.3k
    RETURN_IF_ERROR(local_state->init(state, info));
506
48.3k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
48.3k
    return Status::OK();
508
48.3k
}
_ZN5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
26
                                                            LocalSinkStateInfo& info) {
504
26
    auto local_state = LocalStateType::create_unique(this, state);
505
26
    RETURN_IF_ERROR(local_state->init(state, info));
506
26
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
26
    return Status::OK();
508
26
}
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
13.0k
                                                            LocalSinkStateInfo& info) {
504
13.0k
    auto local_state = LocalStateType::create_unique(this, state);
505
13.0k
    RETURN_IF_ERROR(local_state->init(state, info));
506
13.0k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
13.0k
    return Status::OK();
508
13.0k
}
_ZN5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE17setup_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_18SortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
236k
                                                            LocalSinkStateInfo& info) {
504
236k
    auto local_state = LocalStateType::create_unique(this, state);
505
236k
    RETURN_IF_ERROR(local_state->init(state, info));
506
236k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
236k
    return Status::OK();
508
236k
}
_ZN5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
165
                                                            LocalSinkStateInfo& info) {
504
165
    auto local_state = LocalStateType::create_unique(this, state);
505
165
    RETURN_IF_ERROR(local_state->init(state, info));
506
165
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
165
    return Status::OK();
508
165
}
_ZN5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
293k
                                                            LocalSinkStateInfo& info) {
504
293k
    auto local_state = LocalStateType::create_unique(this, state);
505
293k
    RETURN_IF_ERROR(local_state->init(state, info));
506
293k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
293k
    return Status::OK();
508
293k
}
_ZN5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
100k
                                                            LocalSinkStateInfo& info) {
504
100k
    auto local_state = LocalStateType::create_unique(this, state);
505
100k
    RETURN_IF_ERROR(local_state->init(state, info));
506
100k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
100k
    return Status::OK();
508
100k
}
_ZN5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
52.0k
                                                            LocalSinkStateInfo& info) {
504
52.0k
    auto local_state = LocalStateType::create_unique(this, state);
505
52.0k
    RETURN_IF_ERROR(local_state->init(state, info));
506
52.0k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
52.0k
    return Status::OK();
508
52.0k
}
_ZN5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
132
                                                            LocalSinkStateInfo& info) {
504
132
    auto local_state = LocalStateType::create_unique(this, state);
505
132
    RETURN_IF_ERROR(local_state->init(state, info));
506
132
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
132
    return Status::OK();
508
132
}
_ZN5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
554k
                                                            LocalSinkStateInfo& info) {
504
554k
    auto local_state = LocalStateType::create_unique(this, state);
505
554k
    RETURN_IF_ERROR(local_state->init(state, info));
506
554k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
554k
    return Status::OK();
508
554k
}
_ZN5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
5.60k
                                                            LocalSinkStateInfo& info) {
504
5.60k
    auto local_state = LocalStateType::create_unique(this, state);
505
5.60k
    RETURN_IF_ERROR(local_state->init(state, info));
506
5.60k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
5.60k
    return Status::OK();
508
5.60k
}
_ZN5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
9.89k
                                                            LocalSinkStateInfo& info) {
504
9.89k
    auto local_state = LocalStateType::create_unique(this, state);
505
9.89k
    RETURN_IF_ERROR(local_state->init(state, info));
506
9.89k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
9.89k
    return Status::OK();
508
9.89k
}
_ZN5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
1.89k
                                                            LocalSinkStateInfo& info) {
504
1.89k
    auto local_state = LocalStateType::create_unique(this, state);
505
1.89k
    RETURN_IF_ERROR(local_state->init(state, info));
506
1.89k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
1.89k
    return Status::OK();
508
1.89k
}
_ZN5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
363
                                                            LocalSinkStateInfo& info) {
504
363
    auto local_state = LocalStateType::create_unique(this, state);
505
363
    RETURN_IF_ERROR(local_state->init(state, info));
506
363
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
363
    return Status::OK();
508
363
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
4.81k
                                                            LocalSinkStateInfo& info) {
504
4.81k
    auto local_state = LocalStateType::create_unique(this, state);
505
4.81k
    RETURN_IF_ERROR(local_state->init(state, info));
506
4.81k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
4.81k
    return Status::OK();
508
4.81k
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.58k
                                                            LocalSinkStateInfo& info) {
504
2.58k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.58k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.58k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.58k
    return Status::OK();
508
2.58k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.58k
                                                            LocalSinkStateInfo& info) {
504
2.58k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.58k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.58k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.58k
    return Status::OK();
508
2.58k
}
_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
568
                                                            LocalSinkStateInfo& info) {
504
568
    auto local_state = LocalStateType::create_unique(this, state);
505
568
    RETURN_IF_ERROR(local_state->init(state, info));
506
568
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
568
    return Status::OK();
508
568
}
_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
104
                                                            LocalSinkStateInfo& info) {
504
104
    auto local_state = LocalStateType::create_unique(this, state);
505
104
    RETURN_IF_ERROR(local_state->init(state, info));
506
104
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
104
    return Status::OK();
508
104
}
_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.45M
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.45M
    } else {
519
1.45M
        auto ss = LocalStateType::SharedStateType::create_shared();
520
1.45M
        ss->id = operator_id();
521
1.45M
        for (auto& dest : dests_id()) {
522
1.44M
            ss->related_op_ids.insert(dest);
523
1.44M
        }
524
1.45M
        return ss;
525
1.45M
    }
526
1.45M
}
_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
103k
            ss->related_op_ids.insert(dest);
523
103k
        }
524
104k
        return ss;
525
104k
    }
526
104k
}
_ZNK5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
384k
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
384k
    } else {
519
384k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
384k
        ss->id = operator_id();
521
384k
        for (auto& dest : dests_id()) {
522
382k
            ss->related_op_ids.insert(dest);
523
382k
        }
524
384k
        return ss;
525
384k
    }
526
384k
}
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
390
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
390
    } else {
519
390
        auto ss = LocalStateType::SharedStateType::create_shared();
520
390
        ss->id = operator_id();
521
390
        for (auto& dest : dests_id()) {
522
390
            ss->related_op_ids.insert(dest);
523
390
        }
524
390
        return ss;
525
390
    }
526
390
}
_ZNK5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
48.4k
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
48.4k
    } else {
519
48.4k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
48.4k
        ss->id = operator_id();
521
48.4k
        for (auto& dest : dests_id()) {
522
48.2k
            ss->related_op_ids.insert(dest);
523
48.2k
        }
524
48.4k
        return ss;
525
48.4k
    }
526
48.4k
}
_ZNK5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE19create_shared_stateEv
Line
Count
Source
511
26
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
26
    } else {
519
26
        auto ss = LocalStateType::SharedStateType::create_shared();
520
26
        ss->id = operator_id();
521
26
        for (auto& dest : dests_id()) {
522
26
            ss->related_op_ids.insert(dest);
523
26
        }
524
26
        return ss;
525
26
    }
526
26
}
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
13.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
13.1k
    } else {
519
13.1k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
13.1k
        ss->id = operator_id();
521
13.1k
        for (auto& dest : dests_id()) {
522
13.0k
            ss->related_op_ids.insert(dest);
523
13.0k
        }
524
13.1k
        return ss;
525
13.1k
    }
526
13.1k
}
_ZNK5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE19create_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_18SortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
236k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
236k
    } else {
519
236k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
236k
        ss->id = operator_id();
521
237k
        for (auto& dest : dests_id()) {
522
237k
            ss->related_op_ids.insert(dest);
523
237k
        }
524
236k
        return ss;
525
236k
    }
526
236k
}
_ZNK5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
167
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
167
    } else {
519
167
        auto ss = LocalStateType::SharedStateType::create_shared();
520
167
        ss->id = operator_id();
521
167
        for (auto& dest : dests_id()) {
522
167
            ss->related_op_ids.insert(dest);
523
167
        }
524
167
        return ss;
525
167
    }
526
167
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
100k
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
100k
    } else {
519
100k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
100k
        ss->id = operator_id();
521
100k
        for (auto& dest : dests_id()) {
522
100k
            ss->related_op_ids.insert(dest);
523
100k
        }
524
100k
        return ss;
525
100k
    }
526
100k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
131
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
131
    } else {
519
131
        auto ss = LocalStateType::SharedStateType::create_shared();
520
131
        ss->id = operator_id();
521
131
        for (auto& dest : dests_id()) {
522
131
            ss->related_op_ids.insert(dest);
523
131
        }
524
131
        return ss;
525
131
    }
526
131
}
_ZNK5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
555k
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
555k
    } else {
519
555k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
555k
        ss->id = operator_id();
521
555k
        for (auto& dest : dests_id()) {
522
549k
            ss->related_op_ids.insert(dest);
523
549k
        }
524
555k
        return ss;
525
555k
    }
526
555k
}
_ZNK5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
5.61k
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.61k
    } else {
519
5.61k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
5.61k
        ss->id = operator_id();
521
5.61k
        for (auto& dest : dests_id()) {
522
5.61k
            ss->related_op_ids.insert(dest);
523
5.61k
        }
524
5.61k
        return ss;
525
5.61k
    }
526
5.61k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
467
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
467
    } else {
519
467
        auto ss = LocalStateType::SharedStateType::create_shared();
520
467
        ss->id = operator_id();
521
468
        for (auto& dest : dests_id()) {
522
468
            ss->related_op_ids.insert(dest);
523
468
        }
524
467
        return ss;
525
467
    }
526
467
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE19create_shared_stateEv
Line
Count
Source
511
2.58k
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.58k
    } else {
519
2.58k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
2.58k
        ss->id = operator_id();
521
2.59k
        for (auto& dest : dests_id()) {
522
2.59k
            ss->related_op_ids.insert(dest);
523
2.59k
        }
524
2.58k
        return ss;
525
2.58k
    }
526
2.58k
}
_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
569
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
569
    } else {
519
569
        auto ss = LocalStateType::SharedStateType::create_shared();
520
569
        ss->id = operator_id();
521
569
        for (auto& dest : dests_id()) {
522
563
            ss->related_op_ids.insert(dest);
523
563
        }
524
569
        return ss;
525
569
    }
526
569
}
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.19M
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.19M
    auto local_state = LocalStateType::create_unique(state, this);
531
2.19M
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.19M
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.19M
    return Status::OK();
534
2.19M
}
_ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
74.4k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
74.4k
    auto local_state = LocalStateType::create_unique(state, this);
531
74.4k
    RETURN_IF_ERROR(local_state->init(state, info));
532
74.4k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
74.4k
    return Status::OK();
534
74.4k
}
_ZN5doris9OperatorXINS_18OlapScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
248k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
248k
    auto local_state = LocalStateType::create_unique(state, this);
531
248k
    RETURN_IF_ERROR(local_state->init(state, info));
532
248k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
248k
    return Status::OK();
534
248k
}
_ZN5doris9OperatorXINS_21GroupCommitLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
137
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
137
    auto local_state = LocalStateType::create_unique(state, this);
531
137
    RETURN_IF_ERROR(local_state->init(state, info));
532
137
    state->emplace_local_state(operator_id(), std::move(local_state));
533
137
    return Status::OK();
534
137
}
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
12.9k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
12.9k
    auto local_state = LocalStateType::create_unique(state, this);
531
12.9k
    RETURN_IF_ERROR(local_state->init(state, info));
532
12.9k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
12.9k
    return Status::OK();
534
12.9k
}
_ZN5doris9OperatorXINS_14SortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
12.2k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
12.2k
    auto local_state = LocalStateType::create_unique(state, this);
531
12.2k
    RETURN_IF_ERROR(local_state->init(state, info));
532
12.2k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
12.2k
    return Status::OK();
534
12.2k
}
_ZN5doris9OperatorXINS_19SpillSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
158
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
158
    auto local_state = LocalStateType::create_unique(state, this);
531
158
    RETURN_IF_ERROR(local_state->init(state, info));
532
158
    state->emplace_local_state(operator_id(), std::move(local_state));
533
158
    return Status::OK();
534
158
}
_ZN5doris9OperatorXINS_24LocalMergeSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
223k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
223k
    auto local_state = LocalStateType::create_unique(state, this);
531
223k
    RETURN_IF_ERROR(local_state->init(state, info));
532
223k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
223k
    return Status::OK();
534
223k
}
_ZN5doris9OperatorXINS_13AggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
100k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
100k
    auto local_state = LocalStateType::create_unique(state, this);
531
100k
    RETURN_IF_ERROR(local_state->init(state, info));
532
100k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
100k
    return Status::OK();
534
100k
}
_ZN5doris9OperatorXINS_21BucketedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
52.2k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
52.2k
    auto local_state = LocalStateType::create_unique(state, this);
531
52.2k
    RETURN_IF_ERROR(local_state->init(state, info));
532
52.2k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
52.2k
    return Status::OK();
534
52.2k
}
_ZN5doris9OperatorXINS_24PartitionedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
122
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
122
    auto local_state = LocalStateType::create_unique(state, this);
531
122
    RETURN_IF_ERROR(local_state->init(state, info));
532
122
    state->emplace_local_state(operator_id(), std::move(local_state));
533
122
    return Status::OK();
534
122
}
_ZN5doris9OperatorXINS_23TableFunctionLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
5.34k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
5.34k
    auto local_state = LocalStateType::create_unique(state, this);
531
5.34k
    RETURN_IF_ERROR(local_state->init(state, info));
532
5.34k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
5.34k
    return Status::OK();
534
5.34k
}
_ZN5doris9OperatorXINS_18ExchangeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
301k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
301k
    auto local_state = LocalStateType::create_unique(state, this);
531
301k
    RETURN_IF_ERROR(local_state->init(state, info));
532
301k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
301k
    return Status::OK();
534
301k
}
_ZN5doris9OperatorXINS_16RepeatLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.23k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.23k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.23k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.23k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.23k
    return Status::OK();
534
1.23k
}
_ZN5doris9OperatorXINS_29NestedLoopJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
5.59k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
5.59k
    auto local_state = LocalStateType::create_unique(state, this);
531
5.59k
    RETURN_IF_ERROR(local_state->init(state, info));
532
5.59k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
5.59k
    return Status::OK();
534
5.59k
}
_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.4k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
56.4k
    auto local_state = LocalStateType::create_unique(state, this);
531
56.4k
    RETURN_IF_ERROR(local_state->init(state, info));
532
56.4k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
56.4k
    return Status::OK();
534
56.4k
}
_ZN5doris9OperatorXINS_35MultiCastDataStreamSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
4.59k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
4.59k
    auto local_state = LocalStateType::create_unique(state, this);
531
4.59k
    RETURN_IF_ERROR(local_state->init(state, info));
532
4.59k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
4.59k
    return Status::OK();
534
4.59k
}
_ZN5doris9OperatorXINS_29PartitionSortSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
367
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
367
    auto local_state = LocalStateType::create_unique(state, this);
531
367
    RETURN_IF_ERROR(local_state->init(state, info));
532
367
    state->emplace_local_state(operator_id(), std::move(local_state));
533
367
    return Status::OK();
534
367
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.59k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.59k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.59k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.59k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.59k
    return Status::OK();
534
2.59k
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.47k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.47k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.47k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.47k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.47k
    return Status::OK();
534
2.47k
}
_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.8k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
10.8k
    auto local_state = LocalStateType::create_unique(state, this);
531
10.8k
    RETURN_IF_ERROR(local_state->init(state, info));
532
10.8k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
10.8k
    return Status::OK();
534
10.8k
}
_ZN5doris9OperatorXINS_29LocalExchangeSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
725k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
725k
    auto local_state = LocalStateType::create_unique(state, this);
531
725k
    RETURN_IF_ERROR(local_state->init(state, info));
532
725k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
725k
    return Status::OK();
534
725k
}
_ZN5doris9OperatorXINS_34PartitionedHashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
3
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
3
    auto local_state = LocalStateType::create_unique(state, this);
531
3
    RETURN_IF_ERROR(local_state->init(state, info));
532
3
    state->emplace_local_state(operator_id(), std::move(local_state));
533
3
    return Status::OK();
534
3
}
_ZN5doris9OperatorXINS_21CacheSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
14
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
14
    auto local_state = LocalStateType::create_unique(state, this);
531
14
    RETURN_IF_ERROR(local_state->init(state, info));
532
14
    state->emplace_local_state(operator_id(), std::move(local_state));
533
14
    return Status::OK();
534
14
}
_ZN5doris9OperatorXINS_22RecCTESourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
169
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
169
    auto local_state = LocalStateType::create_unique(state, this);
531
169
    RETURN_IF_ERROR(local_state->init(state, info));
532
169
    state->emplace_local_state(operator_id(), std::move(local_state));
533
169
    return Status::OK();
534
169
}
_ZN5doris9OperatorXINS_20RecCTEScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.20k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.20k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.20k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.20k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.20k
    return Status::OK();
534
2.20k
}
_ZN5doris9OperatorXINS_25MaterializationLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
801
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
801
    auto local_state = LocalStateType::create_unique(state, this);
531
801
    RETURN_IF_ERROR(local_state->init(state, info));
532
801
    state->emplace_local_state(operator_id(), std::move(local_state));
533
801
    return Status::OK();
534
801
}
_ZN5doris9OperatorXINS_16SelectLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
949
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
949
    auto local_state = LocalStateType::create_unique(state, this);
531
949
    RETURN_IF_ERROR(local_state->init(state, info));
532
949
    state->emplace_local_state(operator_id(), std::move(local_state));
533
949
    return Status::OK();
534
949
}
_ZN5doris9OperatorXINS_22StreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
7.39k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
7.39k
    auto local_state = LocalStateType::create_unique(state, this);
531
7.39k
    RETURN_IF_ERROR(local_state->init(state, info));
532
7.39k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
7.39k
    return Status::OK();
534
7.39k
}
_ZN5doris9OperatorXINS_30DistinctStreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
329k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
329k
    auto local_state = LocalStateType::create_unique(state, this);
531
329k
    RETURN_IF_ERROR(local_state->init(state, info));
532
329k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
329k
    return Status::OK();
534
329k
}
535
536
PipelineXSinkLocalStateBase::PipelineXSinkLocalStateBase(DataSinkOperatorXBase* parent,
537
                                                         RuntimeState* state)
538
1.82M
        : _parent(parent), _state(state) {}
539
540
PipelineXLocalStateBase::PipelineXLocalStateBase(RuntimeState* state, OperatorXBase* parent)
541
2.17M
        : _num_rows_returned(0),
542
2.17M
          _rows_returned_counter(nullptr),
543
2.17M
          _parent(parent),
544
2.17M
          _state(state),
545
2.17M
          _budget(state->batch_size(), state->preferred_block_size_bytes()) {}
546
547
template <typename SharedStateArg>
548
2.18M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
2.18M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
2.18M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
2.18M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
2.18M
    _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.18M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
2.18M
    _operator_profile->add_child(_common_profile.get(), true);
557
2.18M
    _operator_profile->add_child(_custom_profile.get(), true);
558
2.18M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
2.18M
    if constexpr (!is_fake_shared) {
560
1.27M
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
790k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
790k
                                    .first.get()
563
790k
                                    ->template cast<SharedStateArg>();
564
565
790k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
790k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
790k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
790k
        } else if (info.shared_state) {
569
417k
            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
417k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
417k
            _dependency = _shared_state->create_source_dependency(
576
417k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
417k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
417k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
417k
        } else {
580
68.1k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
7.22k
                DCHECK(false);
582
7.22k
            }
583
68.1k
        }
584
1.27M
    }
585
586
2.18M
    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.18M
    _rows_returned_counter =
591
2.18M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
2.18M
    _blocks_returned_counter =
593
2.18M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
2.18M
    _output_block_bytes_counter =
595
2.18M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
2.18M
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
2.18M
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
2.18M
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
2.18M
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
2.18M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
2.18M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
2.18M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
2.18M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
2.18M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
2.18M
    _memory_used_counter =
606
2.18M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
2.18M
    _common_profile->add_info_string("IsColocate",
608
2.18M
                                     std::to_string(_parent->is_colocated_operator()));
609
2.18M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
2.18M
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
2.18M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
2.18M
    return Status::OK();
613
2.18M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
74.6k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
74.6k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
74.6k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
74.6k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
74.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
74.6k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
74.6k
    _operator_profile->add_child(_common_profile.get(), true);
557
74.6k
    _operator_profile->add_child(_custom_profile.get(), true);
558
74.6k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
74.6k
    if constexpr (!is_fake_shared) {
560
74.6k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
18.3k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
18.3k
                                    .first.get()
563
18.3k
                                    ->template cast<SharedStateArg>();
564
565
18.3k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
18.3k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
18.3k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
56.2k
        } 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.5k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
55.5k
            _dependency = _shared_state->create_source_dependency(
576
55.5k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
55.5k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
55.5k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
55.5k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
707
        }
584
74.6k
    }
585
586
74.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
74.6k
    _rows_returned_counter =
591
74.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
74.6k
    _blocks_returned_counter =
593
74.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
74.6k
    _output_block_bytes_counter =
595
74.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
74.6k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
74.6k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
74.6k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
74.6k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
74.6k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
74.6k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
74.6k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
74.6k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
74.6k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
74.6k
    _memory_used_counter =
606
74.6k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
74.6k
    _common_profile->add_info_string("IsColocate",
608
74.6k
                                     std::to_string(_parent->is_colocated_operator()));
609
74.6k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
74.6k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
74.6k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
74.6k
    return Status::OK();
613
74.6k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
4
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
4
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
4
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
4
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
4
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
4
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
4
    _operator_profile->add_child(_common_profile.get(), true);
557
4
    _operator_profile->add_child(_custom_profile.get(), true);
558
4
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
4
    if constexpr (!is_fake_shared) {
560
4
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
4
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
4
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
4
            _dependency = _shared_state->create_source_dependency(
576
4
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
4
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
4
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
4
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
4
    }
585
586
4
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
4
    _rows_returned_counter =
591
4
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
4
    _blocks_returned_counter =
593
4
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
4
    _output_block_bytes_counter =
595
4
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
4
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
4
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
4
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
4
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
4
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
4
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
4
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
4
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
4
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
4
    _memory_used_counter =
606
4
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
4
    _common_profile->add_info_string("IsColocate",
608
4
                                     std::to_string(_parent->is_colocated_operator()));
609
4
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
4
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
4
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
4
    return Status::OK();
613
4
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
235k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
235k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
235k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
235k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
235k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
235k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
235k
    _operator_profile->add_child(_common_profile.get(), true);
557
235k
    _operator_profile->add_child(_custom_profile.get(), true);
558
235k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
235k
    if constexpr (!is_fake_shared) {
560
235k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
235k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
229k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
229k
            _dependency = _shared_state->create_source_dependency(
576
229k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
229k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
229k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
229k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
6.10k
        }
584
235k
    }
585
586
235k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
235k
    _rows_returned_counter =
591
235k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
235k
    _blocks_returned_counter =
593
235k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
235k
    _output_block_bytes_counter =
595
235k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
235k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
235k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
235k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
235k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
235k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
235k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
235k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
235k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
235k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
235k
    _memory_used_counter =
606
235k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
235k
    _common_profile->add_info_string("IsColocate",
608
235k
                                     std::to_string(_parent->is_colocated_operator()));
609
235k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
235k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
235k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
235k
    return Status::OK();
613
235k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
158
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
158
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
158
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
158
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
158
    _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
158
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
158
    _operator_profile->add_child(_common_profile.get(), true);
557
158
    _operator_profile->add_child(_custom_profile.get(), true);
558
158
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
158
    if constexpr (!is_fake_shared) {
560
158
        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
158
        } 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
158
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
158
            _dependency = _shared_state->create_source_dependency(
576
158
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
158
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
158
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
158
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
158
    }
585
586
158
    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
158
    _rows_returned_counter =
591
158
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
158
    _blocks_returned_counter =
593
158
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
158
    _output_block_bytes_counter =
595
158
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
158
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
158
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
158
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
158
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
158
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
158
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
158
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
158
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
158
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
158
    _memory_used_counter =
606
158
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
158
    _common_profile->add_info_string("IsColocate",
608
158
                                     std::to_string(_parent->is_colocated_operator()));
609
158
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
158
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
158
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
158
    return Status::OK();
613
158
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
5.60k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
5.60k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
5.60k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
5.60k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
5.60k
    _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.60k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
5.60k
    _operator_profile->add_child(_common_profile.get(), true);
557
5.60k
    _operator_profile->add_child(_custom_profile.get(), true);
558
5.60k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
5.60k
    if constexpr (!is_fake_shared) {
560
5.60k
        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.60k
        } 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.57k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
5.57k
            _dependency = _shared_state->create_source_dependency(
576
5.57k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
5.57k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
5.57k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
5.57k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
30
        }
584
5.60k
    }
585
586
5.60k
    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.60k
    _rows_returned_counter =
591
5.60k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
5.60k
    _blocks_returned_counter =
593
5.60k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
5.60k
    _output_block_bytes_counter =
595
5.60k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
5.60k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
5.60k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
5.60k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
5.60k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
5.60k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
5.60k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
5.60k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
5.60k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
5.60k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
5.60k
    _memory_used_counter =
606
5.60k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
5.60k
    _common_profile->add_info_string("IsColocate",
608
5.60k
                                     std::to_string(_parent->is_colocated_operator()));
609
5.60k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
5.60k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
5.60k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
5.60k
    return Status::OK();
613
5.60k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
13.0k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
13.0k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
13.0k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
13.0k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
13.0k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
13.0k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
13.0k
    _operator_profile->add_child(_common_profile.get(), true);
557
13.0k
    _operator_profile->add_child(_custom_profile.get(), true);
558
13.0k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
13.0k
    if constexpr (!is_fake_shared) {
560
13.0k
        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
13.0k
        } 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
12.6k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
12.6k
            _dependency = _shared_state->create_source_dependency(
576
12.6k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
12.6k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
12.6k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
12.6k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
441
        }
584
13.0k
    }
585
586
13.0k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
13.0k
    _rows_returned_counter =
591
13.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
13.0k
    _blocks_returned_counter =
593
13.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
13.0k
    _output_block_bytes_counter =
595
13.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
13.0k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
13.0k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
13.0k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
13.0k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
13.0k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
13.0k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
13.0k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
13.0k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
13.0k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
13.0k
    _memory_used_counter =
606
13.0k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
13.0k
    _common_profile->add_info_string("IsColocate",
608
13.0k
                                     std::to_string(_parent->is_colocated_operator()));
609
13.0k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
13.0k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
13.0k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
13.0k
    return Status::OK();
613
13.0k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
100k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
100k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
100k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
100k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
100k
    _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
100k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
100k
    _operator_profile->add_child(_common_profile.get(), true);
557
100k
    _operator_profile->add_child(_custom_profile.get(), true);
558
100k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
100k
    if constexpr (!is_fake_shared) {
560
100k
        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
100k
        } 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
99.4k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
99.4k
            _dependency = _shared_state->create_source_dependency(
576
99.4k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
99.4k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
99.4k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
99.4k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
1.30k
        }
584
100k
    }
585
586
100k
    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
100k
    _rows_returned_counter =
591
100k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
100k
    _blocks_returned_counter =
593
100k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
100k
    _output_block_bytes_counter =
595
100k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
100k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
100k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
100k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
100k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
100k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
100k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
100k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
100k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
100k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
100k
    _memory_used_counter =
606
100k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
100k
    _common_profile->add_info_string("IsColocate",
608
100k
                                     std::to_string(_parent->is_colocated_operator()));
609
100k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
100k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
100k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
100k
    return Status::OK();
613
100k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
52.2k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
52.2k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
52.2k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
52.2k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
52.2k
    _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
52.2k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
52.2k
    _operator_profile->add_child(_common_profile.get(), true);
557
52.2k
    _operator_profile->add_child(_custom_profile.get(), true);
558
52.2k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
52.2k
    if constexpr (!is_fake_shared) {
560
52.2k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
52.2k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
52.2k
                                    .first.get()
563
52.2k
                                    ->template cast<SharedStateArg>();
564
565
52.2k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
52.2k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
52.2k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
18.4E
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
0
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
0
            _dependency = _shared_state->create_source_dependency(
576
0
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
18.4E
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
18.4E
        }
584
52.2k
    }
585
586
52.2k
    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
52.2k
    _rows_returned_counter =
591
52.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
52.2k
    _blocks_returned_counter =
593
52.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
52.2k
    _output_block_bytes_counter =
595
52.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
52.2k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
52.2k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
52.2k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
52.2k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
52.2k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
52.2k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
52.2k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
52.2k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
52.2k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
52.2k
    _memory_used_counter =
606
52.2k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
52.2k
    _common_profile->add_info_string("IsColocate",
608
52.2k
                                     std::to_string(_parent->is_colocated_operator()));
609
52.2k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
52.2k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
52.2k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
52.2k
    return Status::OK();
613
52.2k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
122
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
122
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
122
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
122
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
122
    _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
122
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
122
    _operator_profile->add_child(_common_profile.get(), true);
557
122
    _operator_profile->add_child(_custom_profile.get(), true);
558
122
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
122
    if constexpr (!is_fake_shared) {
560
122
        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
122
        } 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
122
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
122
            _dependency = _shared_state->create_source_dependency(
576
122
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
122
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
122
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
122
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
122
    }
585
586
122
    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
122
    _rows_returned_counter =
591
122
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
122
    _blocks_returned_counter =
593
122
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
122
    _output_block_bytes_counter =
595
122
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
122
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
122
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
122
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
122
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
122
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
122
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
122
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
122
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
122
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
122
    _memory_used_counter =
606
122
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
122
    _common_profile->add_info_string("IsColocate",
608
122
                                     std::to_string(_parent->is_colocated_operator()));
609
122
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
122
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
122
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
122
    return Status::OK();
613
122
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
912k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
912k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
912k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
912k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
912k
    _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
912k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
912k
    _operator_profile->add_child(_common_profile.get(), true);
557
912k
    _operator_profile->add_child(_custom_profile.get(), true);
558
912k
    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
912k
    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
912k
    _rows_returned_counter =
591
912k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
912k
    _blocks_returned_counter =
593
912k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
912k
    _output_block_bytes_counter =
595
912k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
912k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
912k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
912k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
912k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
912k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
912k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
912k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
912k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
912k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
912k
    _memory_used_counter =
606
912k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
912k
    _common_profile->add_info_string("IsColocate",
608
912k
                                     std::to_string(_parent->is_colocated_operator()));
609
912k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
912k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
912k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
912k
    return Status::OK();
613
912k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
56.3k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
56.3k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
56.3k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
56.3k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
56.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
56.3k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
56.3k
    _operator_profile->add_child(_common_profile.get(), true);
557
56.3k
    _operator_profile->add_child(_custom_profile.get(), true);
558
56.3k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
56.3k
    if constexpr (!is_fake_shared) {
560
56.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
56.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
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.1k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
52.1k
        }
584
56.3k
    }
585
586
56.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
56.3k
    _rows_returned_counter =
591
56.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
56.3k
    _blocks_returned_counter =
593
56.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
56.3k
    _output_block_bytes_counter =
595
56.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
56.3k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
56.3k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
56.3k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
56.3k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
56.3k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
56.3k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
56.3k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
56.3k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
56.3k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
56.3k
    _memory_used_counter =
606
56.3k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
56.3k
    _common_profile->add_info_string("IsColocate",
608
56.3k
                                     std::to_string(_parent->is_colocated_operator()));
609
56.3k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
56.3k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
56.3k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
56.3k
    return Status::OK();
613
56.3k
}
_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.59k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
4.59k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
4.59k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
4.59k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
4.59k
    _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.59k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
4.59k
    _operator_profile->add_child(_common_profile.get(), true);
557
4.59k
    _operator_profile->add_child(_custom_profile.get(), true);
558
4.59k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
4.59k
    if constexpr (!is_fake_shared) {
560
4.59k
        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.59k
        } 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.59k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
4.59k
            _dependency = _shared_state->create_source_dependency(
576
4.59k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
4.59k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
4.59k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
4.59k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
6
        }
584
4.59k
    }
585
586
4.59k
    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.59k
    _rows_returned_counter =
591
4.59k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
4.59k
    _blocks_returned_counter =
593
4.59k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
4.59k
    _output_block_bytes_counter =
595
4.59k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
4.59k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
4.59k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
4.59k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
4.59k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
4.59k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
4.59k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
4.59k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
4.59k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
4.59k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
4.59k
    _memory_used_counter =
606
4.59k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
4.59k
    _common_profile->add_info_string("IsColocate",
608
4.59k
                                     std::to_string(_parent->is_colocated_operator()));
609
4.59k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
4.59k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
4.59k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
4.59k
    return Status::OK();
613
4.59k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
468
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
468
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
468
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
468
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
468
    _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
468
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
468
    _operator_profile->add_child(_common_profile.get(), true);
557
468
    _operator_profile->add_child(_custom_profile.get(), true);
558
468
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
468
    if constexpr (!is_fake_shared) {
560
468
        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
468
        } 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
465
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
465
            _dependency = _shared_state->create_source_dependency(
576
465
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
465
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
465
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
465
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
3
        }
584
468
    }
585
586
468
    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
468
    _rows_returned_counter =
591
468
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
468
    _blocks_returned_counter =
593
468
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
468
    _output_block_bytes_counter =
595
468
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
468
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
468
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
468
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
468
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
468
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
468
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
468
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
468
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
468
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
468
    _memory_used_counter =
606
468
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
468
    _common_profile->add_info_string("IsColocate",
608
468
                                     std::to_string(_parent->is_colocated_operator()));
609
468
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
468
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
468
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
468
    return Status::OK();
613
468
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
5.11k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
5.11k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
5.11k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
5.11k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
5.11k
    _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.11k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
5.11k
    _operator_profile->add_child(_common_profile.get(), true);
557
5.11k
    _operator_profile->add_child(_custom_profile.get(), true);
558
5.11k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
5.11k
    if constexpr (!is_fake_shared) {
560
5.11k
        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.11k
        } 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.90k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
4.90k
            _dependency = _shared_state->create_source_dependency(
576
4.90k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
4.90k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
4.90k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
4.90k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
210
        }
584
5.11k
    }
585
586
5.11k
    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.11k
    _rows_returned_counter =
591
5.11k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
5.11k
    _blocks_returned_counter =
593
5.11k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
5.11k
    _output_block_bytes_counter =
595
5.11k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
5.11k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
5.11k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
5.11k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
5.11k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
5.11k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
5.11k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
5.11k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
5.11k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
5.11k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
5.11k
    _memory_used_counter =
606
5.11k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
5.11k
    _common_profile->add_info_string("IsColocate",
608
5.11k
                                     std::to_string(_parent->is_colocated_operator()));
609
5.11k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
5.11k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
5.11k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
5.11k
    return Status::OK();
613
5.11k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
727k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
727k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
727k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
727k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
727k
    _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
727k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
727k
    _operator_profile->add_child(_common_profile.get(), true);
557
727k
    _operator_profile->add_child(_custom_profile.get(), true);
558
727k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
727k
    if constexpr (!is_fake_shared) {
560
727k
        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
7.22k
        } else {
580
7.22k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
7.22k
                DCHECK(false);
582
7.22k
            }
583
7.22k
        }
584
727k
    }
585
586
727k
    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
727k
    _rows_returned_counter =
591
727k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
727k
    _blocks_returned_counter =
593
727k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
727k
    _output_block_bytes_counter =
595
727k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
727k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
727k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
727k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
727k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
727k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
727k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
727k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
727k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
727k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
727k
    _memory_used_counter =
606
727k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
727k
    _common_profile->add_info_string("IsColocate",
608
727k
                                     std::to_string(_parent->is_colocated_operator()));
609
727k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
727k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
727k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
727k
    return Status::OK();
613
727k
}
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.20M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
2.20M
    _conjuncts.resize(_parent->_conjuncts.size());
618
2.52M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
315k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
315k
    }
621
2.20M
    if (_parent->has_projection()) {
622
400k
        const auto& projection = *_parent->_projection;
623
400k
        _projections.resize(projection.projections.size());
624
2.47M
        for (size_t i = 0; i < _projections.size(); i++) {
625
2.07M
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
2.07M
        }
627
400k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
422k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
21.5k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
381k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
359k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
359k
                        state, _intermediate_projections[i][j]));
633
359k
            }
634
21.5k
        }
635
400k
    }
636
2.20M
    return Status::OK();
637
2.20M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
74.9k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
74.9k
    _conjuncts.resize(_parent->_conjuncts.size());
618
76.6k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
1.67k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1.67k
    }
621
74.9k
    if (_parent->has_projection()) {
622
74.9k
        const auto& projection = *_parent->_projection;
623
74.9k
        _projections.resize(projection.projections.size());
624
402k
        for (size_t i = 0; i < _projections.size(); i++) {
625
327k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
327k
        }
627
74.9k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
84.9k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
10.0k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
310k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
300k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
300k
                        state, _intermediate_projections[i][j]));
633
300k
            }
634
10.0k
        }
635
74.9k
    }
636
74.9k
    return Status::OK();
637
74.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
237k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
237k
    _conjuncts.resize(_parent->_conjuncts.size());
618
237k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
237k
    if (_parent->has_projection()) {
622
134
        const auto& projection = *_parent->_projection;
623
134
        _projections.resize(projection.projections.size());
624
624
        for (size_t i = 0; i < _projections.size(); i++) {
625
490
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
490
        }
627
134
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
134
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
134
    }
636
237k
    return Status::OK();
637
237k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
152
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
152
    _conjuncts.resize(_parent->_conjuncts.size());
618
152
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
152
    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
152
    return Status::OK();
637
152
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
5.61k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
5.61k
    _conjuncts.resize(_parent->_conjuncts.size());
618
5.68k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
73
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
73
    }
621
5.61k
    if (_parent->has_projection()) {
622
5.61k
        const auto& projection = *_parent->_projection;
623
5.61k
        _projections.resize(projection.projections.size());
624
23.5k
        for (size_t i = 0; i < _projections.size(); i++) {
625
17.9k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
17.9k
        }
627
5.61k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
5.65k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
39
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
381
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
342
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
342
                        state, _intermediate_projections[i][j]));
633
342
            }
634
39
        }
635
5.61k
    }
636
5.61k
    return Status::OK();
637
5.61k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
13.2k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
13.2k
    _conjuncts.resize(_parent->_conjuncts.size());
618
14.2k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
1.00k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1.00k
    }
621
13.2k
    if (_parent->has_projection()) {
622
7.11k
        const auto& projection = *_parent->_projection;
623
7.11k
        _projections.resize(projection.projections.size());
624
30.0k
        for (size_t i = 0; i < _projections.size(); i++) {
625
22.8k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
22.8k
        }
627
7.11k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
7.19k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
87
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
657
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
570
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
570
                        state, _intermediate_projections[i][j]));
633
570
            }
634
87
        }
635
7.11k
    }
636
13.2k
    return Status::OK();
637
13.2k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
101k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
101k
    _conjuncts.resize(_parent->_conjuncts.size());
618
102k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
1.43k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1.43k
    }
621
101k
    if (_parent->has_projection()) {
622
32.3k
        const auto& projection = *_parent->_projection;
623
32.3k
        _projections.resize(projection.projections.size());
624
297k
        for (size_t i = 0; i < _projections.size(); i++) {
625
265k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
265k
        }
627
32.3k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
33.0k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
736
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
4.69k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
3.95k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
3.95k
                        state, _intermediate_projections[i][j]));
633
3.95k
            }
634
736
        }
635
32.3k
    }
636
101k
    return Status::OK();
637
101k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
52.2k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
52.2k
    _conjuncts.resize(_parent->_conjuncts.size());
618
52.3k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
67
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
67
    }
621
52.2k
    if (_parent->has_projection()) {
622
419
        const auto& projection = *_parent->_projection;
623
419
        _projections.resize(projection.projections.size());
624
1.63k
        for (size_t i = 0; i < _projections.size(); i++) {
625
1.22k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
1.22k
        }
627
419
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
421
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
2
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
11
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
9
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
9
                        state, _intermediate_projections[i][j]));
633
9
            }
634
2
        }
635
419
    }
636
52.2k
    return Status::OK();
637
52.2k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
126
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
126
    _conjuncts.resize(_parent->_conjuncts.size());
618
126
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
126
    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
126
    return Status::OK();
637
126
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
921k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
921k
    _conjuncts.resize(_parent->_conjuncts.size());
618
1.23M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
310k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
310k
    }
621
921k
    if (_parent->has_projection()) {
622
267k
        const auto& projection = *_parent->_projection;
623
267k
        _projections.resize(projection.projections.size());
624
1.60M
        for (size_t i = 0; i < _projections.size(); i++) {
625
1.33M
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
1.33M
        }
627
267k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
277k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
10.4k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
60.7k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
50.2k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
50.2k
                        state, _intermediate_projections[i][j]));
633
50.2k
            }
634
10.4k
        }
635
267k
    }
636
921k
    return Status::OK();
637
921k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
56.6k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
56.6k
    _conjuncts.resize(_parent->_conjuncts.size());
618
56.6k
    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.6k
    if (_parent->has_projection()) {
622
12.2k
        const auto& projection = *_parent->_projection;
623
12.2k
        _projections.resize(projection.projections.size());
624
117k
        for (size_t i = 0; i < _projections.size(); i++) {
625
104k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
104k
        }
627
12.2k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
12.4k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
200
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
4.16k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
3.96k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
3.96k
                        state, _intermediate_projections[i][j]));
633
3.96k
            }
634
200
        }
635
12.2k
    }
636
56.6k
    return Status::OK();
637
56.6k
}
_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.58k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
4.58k
    _conjuncts.resize(_parent->_conjuncts.size());
618
5.41k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
823
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
823
    }
621
4.58k
    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.58k
    return Status::OK();
637
4.58k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
469
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
469
    _conjuncts.resize(_parent->_conjuncts.size());
618
469
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
469
    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
469
    return Status::OK();
637
469
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
5.14k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
5.14k
    _conjuncts.resize(_parent->_conjuncts.size());
618
5.14k
    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.14k
    if (_parent->has_projection()) {
622
67
        const auto& projection = *_parent->_projection;
623
67
        _projections.resize(projection.projections.size());
624
241
        for (size_t i = 0; i < _projections.size(); i++) {
625
174
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
174
        }
627
67
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
67
        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
67
    }
636
5.14k
    return Status::OK();
637
5.14k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
733k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
733k
    _conjuncts.resize(_parent->_conjuncts.size());
618
733k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
733k
    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
733k
    return Status::OK();
637
733k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4openEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
169
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
169
    _conjuncts.resize(_parent->_conjuncts.size());
618
176
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
7
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
7
    }
621
169
    if (_parent->has_projection()) {
622
166
        const auto& projection = *_parent->_projection;
623
166
        _projections.resize(projection.projections.size());
624
491
        for (size_t i = 0; i < _projections.size(); i++) {
625
325
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
325
        }
627
166
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
169
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
3
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
11
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
8
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
8
                        state, _intermediate_projections[i][j]));
633
8
            }
634
3
        }
635
166
    }
636
169
    return Status::OK();
637
169
}
638
639
template <typename SharedStateArg>
640
10.4k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
10.4k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
10.4k
    _terminated = true;
645
10.4k
    return Status::OK();
646
10.4k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
481
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
481
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
481
    _terminated = true;
645
481
    return Status::OK();
646
481
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
57
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
57
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
57
    _terminated = true;
645
57
    return Status::OK();
646
57
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
47
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
47
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
47
    _terminated = true;
645
47
    return Status::OK();
646
47
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
9
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
9
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
9
    _terminated = true;
645
9
    return Status::OK();
646
9
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
22
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
22
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
22
    _terminated = true;
645
22
    return Status::OK();
646
22
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
7.93k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
7.93k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
7.93k
    _terminated = true;
645
7.93k
    return Status::OK();
646
7.93k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
113
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
113
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
113
    _terminated = true;
645
113
    return Status::OK();
646
113
}
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
338
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
338
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
338
    _terminated = true;
645
338
    return Status::OK();
646
338
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
1.44k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
1.44k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
1.44k
    _terminated = true;
645
1.44k
    return Status::OK();
646
1.44k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
36
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
36
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
36
    _terminated = true;
645
36
    return Status::OK();
646
36
}
647
648
template <typename SharedStateArg>
649
2.46M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
2.46M
    if (_closed) {
651
258k
        return Status::OK();
652
258k
    }
653
2.20M
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
1.28M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
1.28M
    }
656
2.20M
    _closed = true;
657
2.20M
    return Status::OK();
658
2.46M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
74.8k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
74.8k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
74.8k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
74.8k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
74.8k
    }
656
74.8k
    _closed = true;
657
74.8k
    return Status::OK();
658
74.8k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
7
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
7
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
7
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
7
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
7
    }
656
7
    _closed = true;
657
7
    return Status::OK();
658
7
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
470k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
470k
    if (_closed) {
651
236k
        return Status::OK();
652
236k
    }
653
234k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
234k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
234k
    }
656
234k
    _closed = true;
657
234k
    return Status::OK();
658
470k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
158
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
158
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
158
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
158
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
158
    }
656
158
    _closed = true;
657
158
    return Status::OK();
658
158
}
_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
13.1k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
13.1k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
13.1k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
13.1k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
13.1k
    }
656
13.1k
    _closed = true;
657
13.1k
    return Status::OK();
658
13.1k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
100k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
100k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
100k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
100k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
100k
    }
656
100k
    _closed = true;
657
100k
    return Status::OK();
658
100k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
51.9k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
51.9k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
51.9k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
51.9k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
51.9k
    }
656
51.9k
    _closed = true;
657
51.9k
    return Status::OK();
658
51.9k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
121
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
121
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
121
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
121
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
121
    }
656
121
    _closed = true;
657
121
    return Status::OK();
658
121
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
938k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
938k
    if (_closed) {
651
16.4k
        return Status::OK();
652
16.4k
    }
653
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
    }
656
921k
    _closed = true;
657
921k
    return Status::OK();
658
938k
}
_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.58k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
4.58k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
4.58k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
4.58k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
4.58k
    }
656
4.58k
    _closed = true;
657
4.58k
    return Status::OK();
658
4.58k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
730
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
730
    if (_closed) {
651
367
        return Status::OK();
652
367
    }
653
363
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
363
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
363
    }
656
363
    _closed = true;
657
363
    return Status::OK();
658
730
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
10.5k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
10.5k
    if (_closed) {
651
5.40k
        return Status::OK();
652
5.40k
    }
653
5.13k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
5.13k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
5.13k
    }
656
5.13k
    _closed = true;
657
5.13k
    return Status::OK();
658
10.5k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
735k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
735k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
735k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
735k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
735k
    }
656
735k
    _closed = true;
657
735k
    return Status::OK();
658
735k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
338
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
338
    if (_closed) {
651
178
        return Status::OK();
652
178
    }
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
338
}
659
660
template <typename SharedState>
661
1.84M
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
1.84M
    _operator_profile =
664
1.84M
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
1.84M
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
1.84M
    _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.84M
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
1.84M
    _operator_profile->add_child(_common_profile, true);
673
1.84M
    _operator_profile->add_child(_custom_profile, true);
674
675
1.84M
    _operator_profile->set_metadata(_parent->node_id());
676
1.84M
    _wait_for_finish_dependency_timer =
677
1.84M
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
1.84M
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
1.84M
    if constexpr (!is_fake_shared) {
680
1.28M
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
1.28M
            info.shared_state_map.end()) {
682
365k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
294k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
294k
            }
685
365k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
365k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
365k
                                                  ? 0
688
365k
                                                  : info.task_idx]
689
365k
                                  .get();
690
365k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
920k
        } else {
692
920k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
10
                DCHECK(false);
694
10
            }
695
920k
            _shared_state = info.shared_state->template cast<SharedState>();
696
920k
            _dependency = _shared_state->create_sink_dependency(
697
920k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
920k
        }
699
1.28M
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
1.28M
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
1.28M
    }
702
703
1.84M
    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.84M
    _rows_input_counter =
708
1.84M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
1.84M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
1.84M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
1.84M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
1.84M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
1.84M
    _memory_used_counter =
714
1.84M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
1.84M
    _common_profile->add_info_string("IsColocate",
716
1.84M
                                     std::to_string(_parent->is_colocated_operator()));
717
1.84M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
1.84M
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
1.84M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
1.84M
    return Status::OK();
721
1.84M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
122k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
122k
    _operator_profile =
664
122k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
122k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
122k
    _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
122k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
122k
    _operator_profile->add_child(_common_profile, true);
673
122k
    _operator_profile->add_child(_custom_profile, true);
674
675
122k
    _operator_profile->set_metadata(_parent->node_id());
676
122k
    _wait_for_finish_dependency_timer =
677
122k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
122k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
122k
    if constexpr (!is_fake_shared) {
680
122k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
122k
            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
18.7k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
18.7k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
18.7k
                                                  ? 0
688
18.7k
                                                  : info.task_idx]
689
18.7k
                                  .get();
690
18.7k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
103k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
103k
            _shared_state = info.shared_state->template cast<SharedState>();
696
103k
            _dependency = _shared_state->create_sink_dependency(
697
103k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
103k
        }
699
122k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
122k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
122k
    }
702
703
122k
    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
122k
    _rows_input_counter =
708
122k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
122k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
122k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
122k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
122k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
122k
    _memory_used_counter =
714
122k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
122k
    _common_profile->add_info_string("IsColocate",
716
122k
                                     std::to_string(_parent->is_colocated_operator()));
717
122k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
122k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
122k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
122k
    return Status::OK();
721
122k
}
_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
237k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
237k
    _operator_profile =
664
237k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
237k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
237k
    _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
237k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
237k
    _operator_profile->add_child(_common_profile, true);
673
237k
    _operator_profile->add_child(_custom_profile, true);
674
675
237k
    _operator_profile->set_metadata(_parent->node_id());
676
237k
    _wait_for_finish_dependency_timer =
677
237k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
237k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
237k
    if constexpr (!is_fake_shared) {
680
237k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
237k
            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
237k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
237k
            _shared_state = info.shared_state->template cast<SharedState>();
696
237k
            _dependency = _shared_state->create_sink_dependency(
697
237k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
237k
        }
699
237k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
237k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
237k
    }
702
703
237k
    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
237k
    _rows_input_counter =
708
237k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
237k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
237k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
237k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
237k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
237k
    _memory_used_counter =
714
237k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
237k
    _common_profile->add_info_string("IsColocate",
716
237k
                                     std::to_string(_parent->is_colocated_operator()));
717
237k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
237k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
237k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
237k
    return Status::OK();
721
237k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
165
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
165
    _operator_profile =
664
165
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
165
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
165
    _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
165
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
165
    _operator_profile->add_child(_common_profile, true);
673
165
    _operator_profile->add_child(_custom_profile, true);
674
675
165
    _operator_profile->set_metadata(_parent->node_id());
676
165
    _wait_for_finish_dependency_timer =
677
165
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
165
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
165
    if constexpr (!is_fake_shared) {
680
165
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
165
            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
165
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
165
            _shared_state = info.shared_state->template cast<SharedState>();
696
165
            _dependency = _shared_state->create_sink_dependency(
697
165
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
165
        }
699
165
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
165
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
165
    }
702
703
165
    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
165
    _rows_input_counter =
708
165
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
165
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
165
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
165
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
165
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
165
    _memory_used_counter =
714
165
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
165
    _common_profile->add_info_string("IsColocate",
716
165
                                     std::to_string(_parent->is_colocated_operator()));
717
165
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
165
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
165
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
165
    return Status::OK();
721
165
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
5.61k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
5.61k
    _operator_profile =
664
5.61k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
5.61k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
5.61k
    _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.61k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
5.61k
    _operator_profile->add_child(_common_profile, true);
673
5.61k
    _operator_profile->add_child(_custom_profile, true);
674
675
5.61k
    _operator_profile->set_metadata(_parent->node_id());
676
5.61k
    _wait_for_finish_dependency_timer =
677
5.61k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
5.61k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
5.61k
    if constexpr (!is_fake_shared) {
680
5.61k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
5.61k
            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.61k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
5.61k
            _shared_state = info.shared_state->template cast<SharedState>();
696
5.61k
            _dependency = _shared_state->create_sink_dependency(
697
5.61k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
5.61k
        }
699
5.61k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
5.61k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
5.61k
    }
702
703
5.61k
    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.61k
    _rows_input_counter =
708
5.61k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
5.61k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
5.61k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
5.61k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
5.61k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
5.61k
    _memory_used_counter =
714
5.61k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
5.61k
    _common_profile->add_info_string("IsColocate",
716
5.61k
                                     std::to_string(_parent->is_colocated_operator()));
717
5.61k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
5.61k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
5.61k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
5.61k
    return Status::OK();
721
5.61k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
13.2k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
13.2k
    _operator_profile =
664
13.2k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
13.2k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
13.2k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
13.2k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
13.2k
    _operator_profile->add_child(_common_profile, true);
673
13.2k
    _operator_profile->add_child(_custom_profile, true);
674
675
13.2k
    _operator_profile->set_metadata(_parent->node_id());
676
13.2k
    _wait_for_finish_dependency_timer =
677
13.2k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
13.2k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
13.2k
    if constexpr (!is_fake_shared) {
680
13.2k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
13.2k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
13.2k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
13.2k
            _shared_state = info.shared_state->template cast<SharedState>();
696
13.2k
            _dependency = _shared_state->create_sink_dependency(
697
13.2k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
13.2k
        }
699
13.2k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
13.2k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
13.2k
    }
702
703
13.2k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
13.2k
    _rows_input_counter =
708
13.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
13.2k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
13.2k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
13.2k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
13.2k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
13.2k
    _memory_used_counter =
714
13.2k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
13.2k
    _common_profile->add_info_string("IsColocate",
716
13.2k
                                     std::to_string(_parent->is_colocated_operator()));
717
13.2k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
13.2k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
13.2k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
13.2k
    return Status::OK();
721
13.2k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
100k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
100k
    _operator_profile =
664
100k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
100k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
100k
    _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
100k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
100k
    _operator_profile->add_child(_common_profile, true);
673
100k
    _operator_profile->add_child(_custom_profile, true);
674
675
100k
    _operator_profile->set_metadata(_parent->node_id());
676
100k
    _wait_for_finish_dependency_timer =
677
100k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
100k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
100k
    if constexpr (!is_fake_shared) {
680
100k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
100k
            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
100k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
100k
            _shared_state = info.shared_state->template cast<SharedState>();
696
100k
            _dependency = _shared_state->create_sink_dependency(
697
100k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
100k
        }
699
100k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
100k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
100k
    }
702
703
100k
    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
100k
    _rows_input_counter =
708
100k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
100k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
100k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
100k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
100k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
100k
    _memory_used_counter =
714
100k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
100k
    _common_profile->add_info_string("IsColocate",
716
100k
                                     std::to_string(_parent->is_colocated_operator()));
717
100k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
100k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
100k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
100k
    return Status::OK();
721
100k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
52.2k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
52.2k
    _operator_profile =
664
52.2k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
52.2k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
52.2k
    _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
52.2k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
52.2k
    _operator_profile->add_child(_common_profile, true);
673
52.2k
    _operator_profile->add_child(_custom_profile, true);
674
675
52.2k
    _operator_profile->set_metadata(_parent->node_id());
676
52.2k
    _wait_for_finish_dependency_timer =
677
52.2k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
52.2k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
52.2k
    if constexpr (!is_fake_shared) {
680
52.2k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
52.2k
            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
52.2k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
52.2k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
52.2k
                                                  ? 0
688
52.2k
                                                  : info.task_idx]
689
52.2k
                                  .get();
690
52.2k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
18.4E
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
18.4E
            _shared_state = info.shared_state->template cast<SharedState>();
696
18.4E
            _dependency = _shared_state->create_sink_dependency(
697
18.4E
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
18.4E
        }
699
52.2k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
52.2k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
52.2k
    }
702
703
52.2k
    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
52.2k
    _rows_input_counter =
708
52.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
52.2k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
52.2k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
52.2k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
52.2k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
52.2k
    _memory_used_counter =
714
52.2k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
52.2k
    _common_profile->add_info_string("IsColocate",
716
52.2k
                                     std::to_string(_parent->is_colocated_operator()));
717
52.2k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
52.2k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
52.2k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
52.2k
    return Status::OK();
721
52.2k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
132
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
132
    _operator_profile =
664
132
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
132
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
132
    _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
132
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
132
    _operator_profile->add_child(_common_profile, true);
673
132
    _operator_profile->add_child(_custom_profile, true);
674
675
132
    _operator_profile->set_metadata(_parent->node_id());
676
132
    _wait_for_finish_dependency_timer =
677
132
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
132
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
132
    if constexpr (!is_fake_shared) {
680
132
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
132
            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
132
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
132
            _shared_state = info.shared_state->template cast<SharedState>();
696
132
            _dependency = _shared_state->create_sink_dependency(
697
132
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
132
        }
699
132
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
132
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
132
    }
702
703
132
    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
132
    _rows_input_counter =
708
132
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
132
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
132
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
132
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
132
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
132
    _memory_used_counter =
714
132
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
132
    _common_profile->add_info_string("IsColocate",
716
132
                                     std::to_string(_parent->is_colocated_operator()));
717
132
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
132
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
132
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
132
    return Status::OK();
721
132
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
556k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
556k
    _operator_profile =
664
556k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
556k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
556k
    _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
556k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
556k
    _operator_profile->add_child(_common_profile, true);
673
556k
    _operator_profile->add_child(_custom_profile, true);
674
675
556k
    _operator_profile->set_metadata(_parent->node_id());
676
556k
    _wait_for_finish_dependency_timer =
677
556k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
556k
    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
556k
    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
556k
    _rows_input_counter =
708
556k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
556k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
556k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
556k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
556k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
556k
    _memory_used_counter =
714
556k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
556k
    _common_profile->add_info_string("IsColocate",
716
556k
                                     std::to_string(_parent->is_colocated_operator()));
717
556k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
556k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
556k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
556k
    return Status::OK();
721
556k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
9.93k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
9.93k
    _operator_profile =
664
9.93k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
9.93k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
9.93k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
9.93k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
9.93k
    _operator_profile->add_child(_common_profile, true);
673
9.93k
    _operator_profile->add_child(_custom_profile, true);
674
675
9.93k
    _operator_profile->set_metadata(_parent->node_id());
676
9.93k
    _wait_for_finish_dependency_timer =
677
9.93k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
9.93k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
9.93k
    if constexpr (!is_fake_shared) {
680
9.93k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
9.93k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
9.93k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
9.93k
            _shared_state = info.shared_state->template cast<SharedState>();
696
9.93k
            _dependency = _shared_state->create_sink_dependency(
697
9.93k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
9.93k
        }
699
9.93k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
9.93k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
9.93k
    }
702
703
9.93k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
9.93k
    _rows_input_counter =
708
9.93k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
9.93k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
9.93k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
9.93k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
9.93k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
9.93k
    _memory_used_counter =
714
9.93k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
9.93k
    _common_profile->add_info_string("IsColocate",
716
9.93k
                                     std::to_string(_parent->is_colocated_operator()));
717
9.93k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
9.93k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
9.93k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
9.93k
    return Status::OK();
721
9.93k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
467
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
467
    _operator_profile =
664
467
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
467
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
467
    _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
467
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
467
    _operator_profile->add_child(_common_profile, true);
673
467
    _operator_profile->add_child(_custom_profile, true);
674
675
467
    _operator_profile->set_metadata(_parent->node_id());
676
467
    _wait_for_finish_dependency_timer =
677
467
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
467
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
467
    if constexpr (!is_fake_shared) {
680
467
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
467
            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
467
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
467
            _shared_state = info.shared_state->template cast<SharedState>();
696
467
            _dependency = _shared_state->create_sink_dependency(
697
467
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
467
        }
699
467
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
467
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
467
    }
702
703
467
    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
467
    _rows_input_counter =
708
467
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
467
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
467
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
467
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
467
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
467
    _memory_used_counter =
714
467
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
467
    _common_profile->add_info_string("IsColocate",
716
467
                                     std::to_string(_parent->is_colocated_operator()));
717
467
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
467
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
467
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
467
    return Status::OK();
721
467
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
1.89k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
1.89k
    _operator_profile =
664
1.89k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
1.89k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
1.89k
    _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.89k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
1.89k
    _operator_profile->add_child(_common_profile, true);
673
1.89k
    _operator_profile->add_child(_custom_profile, true);
674
675
1.89k
    _operator_profile->set_metadata(_parent->node_id());
676
1.89k
    _wait_for_finish_dependency_timer =
677
1.89k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
1.89k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
1.89k
    if constexpr (!is_fake_shared) {
680
1.89k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
1.89k
            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.89k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
1.89k
            _shared_state = info.shared_state->template cast<SharedState>();
696
1.89k
            _dependency = _shared_state->create_sink_dependency(
697
1.89k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
1.89k
        }
699
1.89k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
1.89k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
1.89k
    }
702
703
1.89k
    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.89k
    _rows_input_counter =
708
1.89k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
1.89k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
1.89k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
1.89k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
1.89k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
1.89k
    _memory_used_counter =
714
1.89k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
1.89k
    _common_profile->add_info_string("IsColocate",
716
1.89k
                                     std::to_string(_parent->is_colocated_operator()));
717
1.89k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
1.89k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
1.89k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
1.89k
    return Status::OK();
721
1.89k
}
_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
294k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
294k
    _operator_profile =
664
294k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
294k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
294k
    _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
294k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
294k
    _operator_profile->add_child(_common_profile, true);
673
294k
    _operator_profile->add_child(_custom_profile, true);
674
675
294k
    _operator_profile->set_metadata(_parent->node_id());
676
294k
    _wait_for_finish_dependency_timer =
677
294k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
294k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
294k
    if constexpr (!is_fake_shared) {
680
294k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
294k
            info.shared_state_map.end()) {
682
294k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
294k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
294k
            }
685
294k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
294k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
294k
                                                  ? 0
688
294k
                                                  : info.task_idx]
689
294k
                                  .get();
690
294k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
294k
        } else {
692
10
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
10
                DCHECK(false);
694
10
            }
695
10
            _shared_state = info.shared_state->template cast<SharedState>();
696
10
            _dependency = _shared_state->create_sink_dependency(
697
10
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
10
        }
699
294k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
294k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
294k
    }
702
703
294k
    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
294k
    _rows_input_counter =
708
294k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
294k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
294k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
294k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
294k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
294k
    _memory_used_counter =
714
294k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
294k
    _common_profile->add_info_string("IsColocate",
716
294k
                                     std::to_string(_parent->is_colocated_operator()));
717
294k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
294k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
294k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
294k
    return Status::OK();
721
294k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
433k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
433k
    _operator_profile =
664
433k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
433k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
433k
    _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
433k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
433k
    _operator_profile->add_child(_common_profile, true);
673
433k
    _operator_profile->add_child(_custom_profile, true);
674
675
433k
    _operator_profile->set_metadata(_parent->node_id());
676
433k
    _wait_for_finish_dependency_timer =
677
433k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
433k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
433k
    if constexpr (!is_fake_shared) {
680
433k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
433k
            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
433k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
433k
            _shared_state = info.shared_state->template cast<SharedState>();
696
433k
            _dependency = _shared_state->create_sink_dependency(
697
433k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
433k
        }
699
433k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
433k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
433k
    }
702
703
433k
    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
433k
    _rows_input_counter =
708
433k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
433k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
433k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
433k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
433k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
433k
    _memory_used_counter =
714
433k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
433k
    _common_profile->add_info_string("IsColocate",
716
433k
                                     std::to_string(_parent->is_colocated_operator()));
717
433k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
433k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
433k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
433k
    return Status::OK();
721
433k
}
_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.84M
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
1.84M
    if (_closed) {
726
2
        return Status::OK();
727
2
    }
728
1.84M
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
1.28M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
1.28M
    }
731
1.84M
    _closed = true;
732
1.84M
    return Status::OK();
733
1.84M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
122k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
122k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
122k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
122k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
122k
    }
731
122k
    _closed = true;
732
122k
    return Status::OK();
733
122k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
4
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
4
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
4
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
4
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
4
    }
731
4
    _closed = true;
732
4
    return Status::OK();
733
4
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
236k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
236k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
236k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
236k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
236k
    }
731
236k
    _closed = true;
732
236k
    return Status::OK();
733
236k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
156
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
156
    if (_closed) {
726
2
        return Status::OK();
727
2
    }
728
154
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
154
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
154
    }
731
154
    _closed = true;
732
154
    return Status::OK();
733
156
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
5.57k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
5.57k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
5.57k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
5.57k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
5.57k
    }
731
5.57k
    _closed = true;
732
5.57k
    return Status::OK();
733
5.57k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
13.1k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
13.1k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
13.1k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
13.1k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
13.1k
    }
731
13.1k
    _closed = true;
732
13.1k
    return Status::OK();
733
13.1k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
100k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
100k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
100k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
100k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
100k
    }
731
100k
    _closed = true;
732
100k
    return Status::OK();
733
100k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
51.8k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
51.8k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
51.8k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
51.8k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
51.8k
    }
731
51.8k
    _closed = true;
732
51.8k
    return Status::OK();
733
51.8k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
121
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
121
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
121
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
121
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
121
    }
731
121
    _closed = true;
732
121
    return Status::OK();
733
121
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
558k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
558k
    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
558k
    _closed = true;
732
558k
    return Status::OK();
733
558k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
9.95k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
9.95k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
9.95k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
9.95k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
9.95k
    }
731
9.95k
    _closed = true;
732
9.95k
    return Status::OK();
733
9.95k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
361
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
361
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
361
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
361
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
361
    }
731
361
    _closed = true;
732
361
    return Status::OK();
733
361
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
1.90k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
1.90k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
1.90k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
1.90k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
1.90k
    }
731
1.90k
    _closed = true;
732
1.90k
    return Status::OK();
733
1.90k
}
_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
295k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
295k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
295k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
295k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
295k
    }
731
295k
    _closed = true;
732
295k
    return Status::OK();
733
295k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
435k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
435k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
435k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
435k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
435k
    }
731
435k
    _closed = true;
732
435k
    return Status::OK();
733
435k
}
_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.52k
                                                          bool* eos) {
738
1.52k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
1.52k
    return pull(state, block, eos);
740
1.52k
}
_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.48k
                                                          bool* eos) {
738
1.48k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
1.48k
    return pull(state, block, eos);
740
1.48k
}
741
742
template <typename LocalStateType>
743
Status StatefulOperatorX<LocalStateType>::get_block_impl(RuntimeState* state, Block* block,
744
571k
                                                         bool* eos) {
745
571k
    auto& local_state = get_local_state(state);
746
571k
    if (need_more_input_data(state)) {
747
537k
        local_state._child_block->clear_column_data(
748
537k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
537k
                        .num_slots());
750
537k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
537k
                state, local_state._child_block.get(), &local_state._child_eos));
752
537k
        *eos = local_state._child_eos;
753
537k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
62.4k
            return Status::OK();
755
62.4k
        }
756
475k
        {
757
475k
            SCOPED_TIMER(local_state.exec_time_counter());
758
475k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
475k
        }
760
475k
    }
761
762
508k
    if (!need_more_input_data(state)) {
763
479k
        SCOPED_TIMER(local_state.exec_time_counter());
764
479k
        bool new_eos = false;
765
479k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
479k
        if (new_eos) {
767
401k
            *eos = true;
768
401k
        } else if (!need_more_input_data(state)) {
769
23.4k
            *eos = false;
770
23.4k
        }
771
479k
    }
772
508k
    return Status::OK();
773
508k
}
_ZN5doris17StatefulOperatorXINS_23HashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
131k
                                                         bool* eos) {
745
131k
    auto& local_state = get_local_state(state);
746
131k
    if (need_more_input_data(state)) {
747
110k
        local_state._child_block->clear_column_data(
748
110k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
110k
                        .num_slots());
750
110k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
110k
                state, local_state._child_block.get(), &local_state._child_eos));
752
110k
        *eos = local_state._child_eos;
753
110k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
23.8k
            return Status::OK();
755
23.8k
        }
756
86.1k
        {
757
86.1k
            SCOPED_TIMER(local_state.exec_time_counter());
758
86.1k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
86.1k
        }
760
86.1k
    }
761
762
107k
    if (!need_more_input_data(state)) {
763
107k
        SCOPED_TIMER(local_state.exec_time_counter());
764
107k
        bool new_eos = false;
765
107k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
107k
        if (new_eos) {
767
50.4k
            *eos = true;
768
56.7k
        } else if (!need_more_input_data(state)) {
769
10.3k
            *eos = false;
770
10.3k
        }
771
107k
    }
772
107k
    return Status::OK();
773
107k
}
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_34PartitionedHashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
_ZN5doris17StatefulOperatorXINS_16RepeatLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
4.19k
                                                         bool* eos) {
745
4.19k
    auto& local_state = get_local_state(state);
746
4.19k
    if (need_more_input_data(state)) {
747
2.29k
        local_state._child_block->clear_column_data(
748
2.29k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
2.29k
                        .num_slots());
750
2.29k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
2.29k
                state, local_state._child_block.get(), &local_state._child_eos));
752
2.29k
        *eos = local_state._child_eos;
753
2.29k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
361
            return Status::OK();
755
361
        }
756
1.93k
        {
757
1.93k
            SCOPED_TIMER(local_state.exec_time_counter());
758
1.93k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
1.93k
        }
760
1.93k
    }
761
762
3.84k
    if (!need_more_input_data(state)) {
763
3.84k
        SCOPED_TIMER(local_state.exec_time_counter());
764
3.84k
        bool new_eos = false;
765
3.84k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
3.84k
        if (new_eos) {
767
1.24k
            *eos = true;
768
2.59k
        } else if (!need_more_input_data(state)) {
769
1.89k
            *eos = false;
770
1.89k
        }
771
3.84k
    }
772
3.83k
    return Status::OK();
773
3.83k
}
_ZN5doris17StatefulOperatorXINS_25MaterializationLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
1.86k
                                                         bool* eos) {
745
1.86k
    auto& local_state = get_local_state(state);
746
1.86k
    if (need_more_input_data(state)) {
747
1.86k
        local_state._child_block->clear_column_data(
748
1.86k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
1.86k
                        .num_slots());
750
1.86k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
1.86k
                state, local_state._child_block.get(), &local_state._child_eos));
752
1.86k
        *eos = local_state._child_eos;
753
1.86k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
789
            return Status::OK();
755
789
        }
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
801
            *eos = true;
768
801
        } 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
17.6k
                                                         bool* eos) {
745
17.6k
    auto& local_state = get_local_state(state);
746
17.6k
    if (need_more_input_data(state)) {
747
17.6k
        local_state._child_block->clear_column_data(
748
17.6k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
17.6k
                        .num_slots());
750
17.6k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
17.6k
                state, local_state._child_block.get(), &local_state._child_eos));
752
17.6k
        *eos = local_state._child_eos;
753
17.6k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
4.21k
            return Status::OK();
755
4.21k
        }
756
13.4k
        {
757
13.4k
            SCOPED_TIMER(local_state.exec_time_counter());
758
13.4k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
13.4k
        }
760
13.4k
    }
761
762
13.4k
    if (!need_more_input_data(state)) {
763
7.49k
        SCOPED_TIMER(local_state.exec_time_counter());
764
7.49k
        bool new_eos = false;
765
7.49k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
7.49k
        if (new_eos) {
767
7.37k
            *eos = true;
768
7.37k
        } else if (!need_more_input_data(state)) {
769
8
            *eos = false;
770
8
        }
771
7.49k
    }
772
13.4k
    return Status::OK();
773
13.4k
}
_ZN5doris17StatefulOperatorXINS_30DistinctStreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
386k
                                                         bool* eos) {
745
386k
    auto& local_state = get_local_state(state);
746
387k
    if (need_more_input_data(state)) {
747
387k
        local_state._child_block->clear_column_data(
748
387k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
387k
                        .num_slots());
750
387k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
387k
                state, local_state._child_block.get(), &local_state._child_eos));
752
387k
        *eos = local_state._child_eos;
753
387k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
31.9k
            return Status::OK();
755
31.9k
        }
756
355k
        {
757
355k
            SCOPED_TIMER(local_state.exec_time_counter());
758
355k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
355k
        }
760
355k
    }
761
762
354k
    if (!need_more_input_data(state)) {
763
332k
        SCOPED_TIMER(local_state.exec_time_counter());
764
332k
        bool new_eos = false;
765
332k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
332k
        if (new_eos) {
767
330k
            *eos = true;
768
330k
        } else if (!need_more_input_data(state)) {
769
6
            *eos = false;
770
6
        }
771
332k
    }
772
354k
    return Status::OK();
773
354k
}
_ZN5doris17StatefulOperatorXINS_29NestedLoopJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
21.0k
                                                         bool* eos) {
745
21.0k
    auto& local_state = get_local_state(state);
746
21.0k
    if (need_more_input_data(state)) {
747
10.2k
        local_state._child_block->clear_column_data(
748
10.2k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
10.2k
                        .num_slots());
750
10.2k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
10.2k
                state, local_state._child_block.get(), &local_state._child_eos));
752
10.2k
        *eos = local_state._child_eos;
753
10.2k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
623
            return Status::OK();
755
623
        }
756
9.61k
        {
757
9.61k
            SCOPED_TIMER(local_state.exec_time_counter());
758
9.61k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
9.61k
        }
760
9.61k
    }
761
762
20.4k
    if (!need_more_input_data(state)) {
763
19.7k
        SCOPED_TIMER(local_state.exec_time_counter());
764
19.7k
        bool new_eos = false;
765
19.7k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
19.7k
        if (new_eos) {
767
5.58k
            *eos = true;
768
14.1k
        } else if (!need_more_input_data(state)) {
769
10.7k
            *eos = false;
770
10.7k
        }
771
19.7k
    }
772
20.4k
    return Status::OK();
773
20.4k
}
_ZN5doris17StatefulOperatorXINS_23TableFunctionLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
8.45k
                                                         bool* eos) {
745
8.45k
    auto& local_state = get_local_state(state);
746
8.45k
    if (need_more_input_data(state)) {
747
8.09k
        local_state._child_block->clear_column_data(
748
8.09k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
8.09k
                        .num_slots());
750
8.09k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
8.09k
                state, local_state._child_block.get(), &local_state._child_eos));
752
8.09k
        *eos = local_state._child_eos;
753
8.09k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
720
            return Status::OK();
755
720
        }
756
7.37k
        {
757
7.37k
            SCOPED_TIMER(local_state.exec_time_counter());
758
7.37k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
7.37k
        }
760
7.37k
    }
761
762
7.73k
    if (!need_more_input_data(state)) {
763
7.73k
        SCOPED_TIMER(local_state.exec_time_counter());
764
7.73k
        bool new_eos = false;
765
7.73k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
7.73k
        if (new_eos) {
767
5.18k
            *eos = true;
768
5.18k
        } else if (!need_more_input_data(state)) {
769
366
            *eos = false;
770
366
        }
771
7.73k
    }
772
7.73k
    return Status::OK();
773
7.73k
}
774
775
template <typename Writer, typename Parent>
776
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
777
48.4k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
48.4k
    RETURN_IF_ERROR(Base::init(state, info));
779
48.4k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
48.4k
                                                         "AsyncWriterDependency", true);
781
48.4k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
48.4k
                             _finish_dependency));
783
784
48.4k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
48.4k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
48.4k
    return Status::OK();
787
48.4k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
390
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
390
    RETURN_IF_ERROR(Base::init(state, info));
779
390
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
390
                                                         "AsyncWriterDependency", true);
781
390
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
390
                             _finish_dependency));
783
784
390
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
390
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
390
    return Status::OK();
787
390
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
48.0k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
48.0k
    RETURN_IF_ERROR(Base::init(state, info));
779
48.0k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
48.0k
                                                         "AsyncWriterDependency", true);
781
48.0k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
48.0k
                             _finish_dependency));
783
784
48.0k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
48.0k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
48.0k
    return Status::OK();
787
48.0k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
26
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
26
    RETURN_IF_ERROR(Base::init(state, info));
779
26
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
26
                                                         "AsyncWriterDependency", true);
781
26
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
26
                             _finish_dependency));
783
784
26
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
26
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
26
    return Status::OK();
787
26
}
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
49.0k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
49.0k
    RETURN_IF_ERROR(Base::open(state));
793
49.0k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
375k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
326k
        RETURN_IF_ERROR(
796
326k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
326k
    }
798
49.0k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
49.0k
    return Status::OK();
800
49.0k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
389
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
389
    RETURN_IF_ERROR(Base::open(state));
793
389
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
1.91k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
1.53k
        RETURN_IF_ERROR(
796
1.53k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
1.53k
    }
798
389
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
389
    return Status::OK();
800
389
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
48.6k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
48.6k
    RETURN_IF_ERROR(Base::open(state));
793
48.6k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
372k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
324k
        RETURN_IF_ERROR(
796
324k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
324k
    }
798
48.6k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
48.6k
    return Status::OK();
800
48.6k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
26
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
26
    RETURN_IF_ERROR(Base::open(state));
793
26
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
468
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
442
        RETURN_IF_ERROR(
796
442
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
442
    }
798
26
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
26
    return Status::OK();
800
26
}
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
64.9k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
64.9k
    return _writer->sink(block, eos);
806
64.9k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
1.80k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
1.80k
    return _writer->sink(block, eos);
806
1.80k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
63.0k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
63.0k
    return _writer->sink(block, eos);
806
63.0k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
26
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
26
    return _writer->sink(block, eos);
806
26
}
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
49.1k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
49.1k
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
49.1k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
49.1k
    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
49.1k
    if (_writer) {
818
49.1k
        Status st = _writer->get_writer_status();
819
49.1k
        if (exec_status.ok()) {
820
49.0k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
49.0k
                                                       : Status::Cancelled("force close"));
822
49.0k
        } else {
823
131
            _writer->force_close(exec_status);
824
131
        }
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
49.1k
        RETURN_IF_ERROR(st);
829
49.1k
    }
830
49.0k
    return Base::close(state, exec_status);
831
49.1k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
379
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
379
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
379
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
379
    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
379
    if (_writer) {
818
379
        Status st = _writer->get_writer_status();
819
379
        if (exec_status.ok()) {
820
379
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
379
                                                       : Status::Cancelled("force close"));
822
379
        } 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
379
        RETURN_IF_ERROR(st);
829
379
    }
830
379
    return Base::close(state, exec_status);
831
379
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
48.7k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
48.7k
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
48.7k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
48.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
48.7k
    if (_writer) {
818
48.7k
        Status st = _writer->get_writer_status();
819
48.7k
        if (exec_status.ok()) {
820
48.6k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
48.6k
                                                       : Status::Cancelled("force close"));
822
48.6k
        } else {
823
131
            _writer->force_close(exec_status);
824
131
        }
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
48.7k
        RETURN_IF_ERROR(st);
829
48.7k
    }
830
48.6k
    return Base::close(state, exec_status);
831
48.7k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
26
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
26
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
26
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
26
    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
26
    if (_writer) {
818
26
        Status st = _writer->get_writer_status();
819
26
        if (exec_status.ok()) {
820
26
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
26
                                                       : Status::Cancelled("force close"));
822
26
        } 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
26
        RETURN_IF_ERROR(st);
829
26
    }
830
26
    return Base::close(state, exec_status);
831
26
}
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