Coverage Report

Created: 2026-10-31 08:50

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.89M
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
1.89M
    if (_parent->nereids_id() == -1) {
123
1.00M
        return fmt::format("(id={})", _parent->node_id());
124
1.00M
    } else {
125
891k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
891k
    }
127
1.89M
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
70.1k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
70.1k
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
70.1k
    } else {
125
70.1k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
70.1k
    }
127
70.1k
}
_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
233k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
233k
    if (_parent->nereids_id() == -1) {
123
12
        return fmt::format("(id={})", _parent->node_id());
124
233k
    } else {
125
233k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
233k
    }
127
233k
}
_ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
157
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
157
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
157
    } else {
125
157
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
157
    }
127
157
}
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
5.49k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
5.49k
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
5.49k
    } else {
125
5.49k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
5.49k
    }
127
5.49k
}
_ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
11.2k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
11.2k
    if (_parent->nereids_id() == -1) {
123
60
        return fmt::format("(id={})", _parent->node_id());
124
11.2k
    } else {
125
11.2k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
11.2k
    }
127
11.2k
}
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
106k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
106k
    if (_parent->nereids_id() == -1) {
123
29
        return fmt::format("(id={})", _parent->node_id());
124
106k
    } else {
125
106k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
106k
    }
127
106k
}
_ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
98.0k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
98.0k
    if (_parent->nereids_id() == -1) {
123
2
        return fmt::format("(id={})", _parent->node_id());
124
98.0k
    } else {
125
98.0k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
98.0k
    }
127
98.0k
}
_ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
121
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
121
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
121
    } else {
125
121
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
121
    }
127
121
}
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
576k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
576k
    if (_parent->nereids_id() == -1) {
123
272k
        return fmt::format("(id={})", _parent->node_id());
124
303k
    } else {
125
303k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
303k
    }
127
576k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
56.0k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
56.0k
    if (_parent->nereids_id() == -1) {
123
2
        return fmt::format("(id={})", _parent->node_id());
124
56.0k
    } else {
125
56.0k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
56.0k
    }
127
56.0k
}
_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.69k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
4.69k
    if (_parent->nereids_id() == -1) {
123
4.68k
        return fmt::format("(id={})", _parent->node_id());
124
4.68k
    } else {
125
3
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
3
    }
127
4.69k
}
_ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
784
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
784
    if (_parent->nereids_id() == -1) {
123
102
        return fmt::format("(id={})", _parent->node_id());
124
682
    } else {
125
682
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
682
    }
127
784
}
_ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
5.18k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
5.18k
    if (_parent->nereids_id() == -1) {
123
13
        return fmt::format("(id={})", _parent->node_id());
124
5.17k
    } else {
125
5.17k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
5.17k
    }
127
5.18k
}
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
722k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
722k
    if (_parent->nereids_id() == -1) {
123
722k
        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
722k
}
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.33M
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
1.33M
    if (_parent->nereids_id() == -1) {
132
747k
        return fmt::format("(id={})", _parent->node_id());
133
747k
    } else {
134
588k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
588k
    }
136
1.33M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
118k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
118k
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
118k
    } else {
134
118k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
118k
    }
136
118k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
5
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
5
    if (_parent->nereids_id() == -1) {
132
1
        return fmt::format("(id={})", _parent->node_id());
133
4
    } else {
134
4
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
4
    }
136
5
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
238k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
238k
    if (_parent->nereids_id() == -1) {
132
9
        return fmt::format("(id={})", _parent->node_id());
133
238k
    } else {
134
238k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
238k
    }
136
238k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
164
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
164
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
164
    } else {
134
164
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
164
    }
136
164
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
5.53k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
5.53k
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
5.53k
    } else {
134
5.53k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
5.53k
    }
136
5.53k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
11.2k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
11.2k
    if (_parent->nereids_id() == -1) {
132
60
        return fmt::format("(id={})", _parent->node_id());
133
11.2k
    } else {
134
11.2k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
11.2k
    }
136
11.2k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
106k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
106k
    if (_parent->nereids_id() == -1) {
132
29
        return fmt::format("(id={})", _parent->node_id());
133
106k
    } else {
134
106k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
106k
    }
136
106k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
97.7k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
97.7k
    if (_parent->nereids_id() == -1) {
132
4
        return fmt::format("(id={})", _parent->node_id());
133
97.7k
    } else {
134
97.7k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
97.7k
    }
136
97.7k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
131
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
131
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
131
    } else {
134
131
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
131
    }
136
131
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
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_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
10.1k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
10.1k
    if (_parent->nereids_id() == -1) {
132
3
        return fmt::format("(id={})", _parent->node_id());
133
10.1k
    } else {
134
10.1k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
10.1k
    }
136
10.1k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
789
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
789
    if (_parent->nereids_id() == -1) {
132
102
        return fmt::format("(id={})", _parent->node_id());
133
687
    } else {
134
687
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
687
    }
136
789
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
12.9k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
12.9k
    if (_parent->nereids_id() == -1) {
132
12.9k
        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.9k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
284k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
284k
    if (_parent->nereids_id() == -1) {
132
284k
        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
284k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
449k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
449k
    if (_parent->nereids_id() == -1) {
132
449k
        return fmt::format("(id={})", _parent->node_id());
133
449k
    } else {
134
9
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
9
    }
136
449k
}
_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
32.5k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
32.5k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
32.5k
    _terminated = true;
144
32.5k
    return Status::OK();
145
32.5k
}
_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.15k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
3.15k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
3.15k
    _terminated = true;
144
3.15k
    return Status::OK();
145
3.15k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_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
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_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_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
1.67k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
1.67k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
1.67k
    _terminated = true;
144
1.67k
    return Status::OK();
145
1.67k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
2.35k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
2.35k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
2.35k
    _terminated = true;
144
2.35k
    return Status::OK();
145
2.35k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
534
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
534
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
534
    _terminated = true;
144
534
    return Status::OK();
145
534
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
320
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
320
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
320
    _terminated = true;
144
320
    return Status::OK();
145
320
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
2
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
2
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
2
    _terminated = true;
144
2
    return Status::OK();
145
2
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
120
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
120
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
120
    _terminated = true;
144
120
    return Status::OK();
145
120
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
10
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
10
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
10
    _terminated = true;
144
10
    return Status::OK();
145
10
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
234
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
234
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
234
    _terminated = true;
144
234
    return Status::OK();
145
234
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
134
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
134
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
134
    _terminated = true;
144
134
    return Status::OK();
145
134
}
146
147
314k
DataDistribution OperatorBase::required_data_distribution(RuntimeState* /*state*/) const {
148
314k
    return _child && _child->is_serial_operator() && !is_source()
149
314k
                   ? DataDistribution(TLocalPartitionType::PASSTHROUGH)
150
314k
                   : DataDistribution(TLocalPartitionType::NOOP);
151
314k
}
152
153
23.3k
bool OperatorBase::child_breaks_local_key_distribution(RuntimeState* state) const {
154
23.3k
    if (!_child) {
155
22.7k
        return false;
156
22.7k
    }
157
650
    if (_child->is_serial_operator()) {
158
49
        return true;
159
49
    }
160
601
    const auto child_distribution = _child->required_data_distribution(state);
161
601
    return child_distribution.need_local_exchange() &&
162
601
           !is_shuffled_exchange(child_distribution.distribution_type);
163
650
}
164
165
template <typename SharedStateArg>
166
15.5k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
15.5k
    fmt::memory_buffer debug_string_buffer;
168
15.5k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
15.5k
    return fmt::to_string(debug_string_buffer);
170
15.5k
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
18
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
18
    fmt::memory_buffer debug_string_buffer;
168
18
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
18
    return fmt::to_string(debug_string_buffer);
170
18
}
_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
6
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
6
    fmt::memory_buffer debug_string_buffer;
168
6
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
6
    return fmt::to_string(debug_string_buffer);
170
6
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
45
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
45
    fmt::memory_buffer debug_string_buffer;
168
45
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
45
    return fmt::to_string(debug_string_buffer);
170
45
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
15.4k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
15.4k
    fmt::memory_buffer debug_string_buffer;
168
15.4k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
15.4k
    return fmt::to_string(debug_string_buffer);
170
15.4k
}
_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
54
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
54
    fmt::memory_buffer debug_string_buffer;
168
54
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
54
    return fmt::to_string(debug_string_buffer);
170
54
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
171
172
template <typename SharedStateArg>
173
15.4k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
15.4k
    fmt::memory_buffer debug_string_buffer;
175
15.4k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
15.4k
    return fmt::to_string(debug_string_buffer);
177
15.4k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
6
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
6
    fmt::memory_buffer debug_string_buffer;
175
6
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
6
    return fmt::to_string(debug_string_buffer);
177
6
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
45
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
45
    fmt::memory_buffer debug_string_buffer;
175
45
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
45
    return fmt::to_string(debug_string_buffer);
177
45
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
48
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
48
    fmt::memory_buffer debug_string_buffer;
175
48
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
48
    return fmt::to_string(debug_string_buffer);
177
48
}
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
34
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
34
    fmt::memory_buffer debug_string_buffer;
175
34
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
34
    return fmt::to_string(debug_string_buffer);
177
34
}
_ZNK5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
15.3k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
15.3k
    fmt::memory_buffer debug_string_buffer;
175
15.3k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
15.3k
    return fmt::to_string(debug_string_buffer);
177
15.3k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
178
179
15.5k
std::string OperatorXBase::debug_string(int indentation_level) const {
180
15.5k
    fmt::memory_buffer debug_string_buffer;
181
15.5k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, parallel_tasks={}, _is_serial_operator={}",
182
15.5k
                   std::string(indentation_level * 2, ' '), _op_name, node_id(), _parallel_tasks,
183
15.5k
                   _is_serial_operator);
184
15.5k
    return fmt::to_string(debug_string_buffer);
185
15.5k
}
186
187
15.5k
std::string OperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
188
15.5k
    return state->get_local_state(operator_id())->debug_string(indentation_level);
189
15.5k
}
190
191
689k
Status OperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
192
689k
    std::string node_name = print_plan_node_type(tnode.node_type);
193
689k
    _nereids_id = tnode.nereids_id;
194
689k
    if (!tnode.intermediate_output_tuple_id_list.empty()) {
195
6.79k
        if (!has_projection()) {
196
0
            return Status::InternalError("no final output tuple id");
197
0
        }
198
6.79k
        if (tnode.intermediate_output_tuple_id_list.size() !=
199
6.79k
            tnode.intermediate_projections_list.size()) {
200
0
            return Status::InternalError(
201
0
                    "intermediate_output_tuple_id_list size:{} not match "
202
0
                    "intermediate_projections_list size:{}",
203
0
                    tnode.intermediate_output_tuple_id_list.size(),
204
0
                    tnode.intermediate_projections_list.size());
205
0
        }
206
6.79k
    }
207
689k
    auto substr = node_name.substr(0, node_name.find("_NODE"));
208
689k
    _op_name = substr + "_OPERATOR";
209
210
689k
    if (tnode.__isset.vconjunct) {
211
0
        return Status::InternalError("vconjunct is not supported yet");
212
689k
    } else if (tnode.__isset.conjuncts) {
213
284k
        for (const auto& conjunct : tnode.conjuncts) {
214
284k
            VExprContextSPtr context;
215
284k
            RETURN_IF_ERROR(VExpr::create_expr_tree(conjunct, context));
216
284k
            _conjuncts.emplace_back(context);
217
284k
        }
218
106k
    }
219
220
    // create the projections expr
221
689k
    if (tnode.__isset.projections) {
222
276k
        RETURN_IF_ERROR(VExpr::create_expr_trees(tnode.projections, _projection->projections));
223
276k
    }
224
689k
    if (!tnode.intermediate_projections_list.empty()) {
225
6.79k
        DCHECK(has_projection()) << "no final projections";
226
6.79k
        _projection->intermediate_projections.reserve(tnode.intermediate_projections_list.size());
227
12.2k
        for (const auto& tnode_projections : tnode.intermediate_projections_list) {
228
12.2k
            VExprContextSPtrs projections;
229
12.2k
            RETURN_IF_ERROR(VExpr::create_expr_trees(tnode_projections, projections));
230
12.2k
            _projection->intermediate_projections.push_back(projections);
231
12.2k
        }
232
6.79k
    }
233
689k
    return Status::OK();
234
689k
}
235
236
716k
Status OperatorXBase::prepare(RuntimeState* state) {
237
716k
    for (auto& conjunct : _conjuncts) {
238
283k
        RETURN_IF_ERROR(conjunct->prepare(state, operator_row_desc_before_projection()));
239
283k
    }
240
716k
    if (state->enable_adjust_conjunct_order_by_cost()) {
241
666k
        std::ranges::stable_sort(_conjuncts, [](const auto& a, const auto& b) {
242
346k
            return a->execute_cost() < b->execute_cost();
243
346k
        });
244
666k
    };
245
246
716k
    if (has_projection()) {
247
276k
        auto& projection = *_projection;
248
288k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
249
12.2k
            const auto& input_row_desc =
250
12.2k
                    i == 0 ? operator_row_desc_before_projection()
251
12.2k
                           : projection.intermediate_output_row_descriptors[i - 1];
252
12.2k
            RETURN_IF_ERROR(
253
12.2k
                    VExpr::prepare(projection.intermediate_projections[i], state, input_row_desc));
254
12.2k
        }
255
276k
        const auto& final_projection_input_row_desc =
256
276k
                projection.intermediate_output_row_descriptors.empty()
257
276k
                        ? operator_row_desc_before_projection()
258
276k
                        : projection.intermediate_output_row_descriptors.back();
259
276k
        RETURN_IF_ERROR(
260
276k
                VExpr::prepare(projection.projections, state, final_projection_input_row_desc));
261
276k
        RETURN_IF_ERROR(VExpr::check_expr_output_type(projection.projections,
262
276k
                                                      projection.output_row_descriptor));
263
276k
    }
264
265
716k
    for (auto& conjunct : _conjuncts) {
266
283k
        RETURN_IF_ERROR(conjunct->open(state));
267
283k
    }
268
716k
    if (has_projection()) {
269
276k
        RETURN_IF_ERROR(VExpr::open(_projection->projections, state));
270
276k
        for (auto& projections : _projection->intermediate_projections) {
271
12.2k
            RETURN_IF_ERROR(VExpr::open(projections, state));
272
12.2k
        }
273
276k
    }
274
716k
    if (_child && !is_source()) {
275
86.9k
        RETURN_IF_ERROR(_child->prepare(state));
276
86.9k
    }
277
278
716k
    if (VExpr::contains_blockable_function(_conjuncts) ||
279
716k
        (has_projection() && VExpr::contains_blockable_function(_projection->projections))) {
280
0
        _blockable = true;
281
0
    }
282
283
716k
    return Status::OK();
284
716k
}
285
286
9.54k
Status OperatorXBase::terminate(RuntimeState* state) {
287
9.54k
    if (_child && !is_source()) {
288
968
        RETURN_IF_ERROR(_child->terminate(state));
289
968
    }
290
9.54k
    auto result = state->get_local_state_result(operator_id());
291
9.54k
    if (!result) {
292
0
        return result.error();
293
0
    }
294
9.54k
    return result.value()->terminate(state);
295
9.54k
}
296
297
5.01M
Status OperatorXBase::close(RuntimeState* state) {
298
5.01M
    if (_child && !is_source()) {
299
735k
        RETURN_IF_ERROR(_child->close(state));
300
735k
    }
301
5.01M
    auto result = state->get_local_state_result(operator_id());
302
5.01M
    if (!result) {
303
0
        return result.error();
304
0
    }
305
5.01M
    return result.value()->close(state);
306
5.01M
}
307
308
291k
void PipelineXLocalStateBase::clear_origin_block() {
309
291k
    _origin_block.clear_column_data(_parent->operator_row_desc_before_projection().num_slots());
310
291k
}
311
312
921k
Status PipelineXLocalStateBase::filter_block(const VExprContextSPtrs& expr_contexts, Block* block) {
313
921k
    RETURN_IF_ERROR(VExprContext::filter_block(expr_contexts, block, block->columns()));
314
315
921k
    _estimate_memory_usage += VExprContext::get_memory_usage(expr_contexts);
316
921k
    return Status::OK();
317
921k
}
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
291k
                                     Block* output_block) const {
326
291k
    auto* local_state = state->get_local_state(operator_id());
327
291k
    SCOPED_TIMER(local_state->exec_time_counter());
328
291k
    SCOPED_TIMER(local_state->_projection_timer);
329
291k
    const size_t rows = origin_block->rows();
330
291k
    if (rows == 0) {
331
145k
        return Status::OK();
332
145k
    }
333
146k
    SCOPED_PEAK_MEM(&local_state->_estimate_memory_usage);
334
335
146k
    {
336
146k
        Block input_block = *origin_block;
337
338
146k
        ColumnsWithTypeAndName new_columns;
339
146k
        for (const auto& projections : local_state->_intermediate_projections) {
340
5.34k
            if (projections.empty()) {
341
0
                return Status::InternalError("meet empty intermediate projection, node id: {}",
342
0
                                             node_id());
343
0
            }
344
5.34k
            new_columns.resize(projections.size());
345
125k
            for (int i = 0; i < projections.size(); i++) {
346
120k
                RETURN_IF_ERROR(projections[i]->execute(&input_block, new_columns[i]));
347
120k
                if (new_columns[i].column->size() != rows) {
348
0
                    return Status::InternalError(
349
0
                            "intermediate projection result column size {} not equal input rows "
350
0
                            "{}, expr: {}",
351
0
                            new_columns[i].column->size(), rows,
352
0
                            projections[i]->root()->debug_string());
353
0
                }
354
120k
            }
355
5.32k
            Block tmp_block {new_columns};
356
5.32k
            input_block.swap(tmp_block);
357
5.32k
        }
358
359
146k
        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
146k
        auto scoped_mutable_block = VectorizedUtils::build_scoped_mutable_mem_reuse_block(
367
146k
                output_block, _projection->output_row_descriptor);
368
146k
        auto& mutable_columns = scoped_mutable_block.mutable_columns();
369
146k
        DCHECK_EQ(mutable_columns.size(), local_state->_projections.size()) << debug_string();
370
146k
        Columns shared_columns(mutable_columns.size());
371
372
822k
        for (int i = 0; i < mutable_columns.size(); ++i) {
373
675k
            ColumnPtr column_ptr;
374
675k
            RETURN_IF_ERROR(local_state->_projections[i]->execute(&input_block, column_ptr));
375
675k
            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
675k
            column_ptr = column_ptr->convert_to_full_column_if_const();
382
675k
            if (is_column_nullable(*mutable_columns[i]) && !is_column_nullable(*column_ptr)) {
383
0
                column_ptr = make_nullable(column_ptr, false);
384
0
            }
385
675k
            if (column_ptr->is_exclusive()) {
386
241k
                mutable_columns[i] = IColumn::mutate(std::move(column_ptr));
387
434k
            } else {
388
434k
                shared_columns[i] = std::move(column_ptr);
389
434k
            }
390
675k
        }
391
392
146k
        scoped_mutable_block.restore();
393
822k
        for (int i = 0; i < shared_columns.size(); ++i) {
394
675k
            if (shared_columns[i]) {
395
434k
                output_block->replace_by_position(i, std::move(shared_columns[i]));
396
434k
            }
397
675k
        }
398
146k
    }
399
400
0
    origin_block->clear_column_data(
401
146k
            local_state->_parent->operator_row_desc_before_projection().num_slots());
402
146k
    DCHECK_EQ(output_block->rows(), rows);
403
404
146k
    return Status::OK();
405
146k
}
406
407
4.40M
Status OperatorXBase::get_block_after_projects(RuntimeState* state, Block* block, bool* eos) {
408
4.40M
    DBUG_EXECUTE_IF("Pipeline::return_empty_block", {
409
4.40M
        if (this->_op_name == "AGGREGATION_OPERATOR" || this->_op_name == "HASH_JOIN_OPERATOR" ||
410
4.40M
            this->_op_name == "PARTITIONED_AGGREGATION_OPERATOR" ||
411
4.40M
            this->_op_name == "PARTITIONED_HASH_JOIN_OPERATOR" ||
412
4.40M
            this->_op_name == "CROSS_JOIN_OPERATOR" || this->_op_name == "SORT_OPERATOR") {
413
4.40M
            if (_debug_point_count++ % 2 == 0) {
414
4.40M
                return Status::OK();
415
4.40M
            }
416
4.40M
        }
417
4.40M
    });
418
419
4.40M
    Status status;
420
4.40M
    auto* local_state = state->get_local_state(operator_id());
421
4.40M
    Defer defer([&]() {
422
4.40M
        if (status.ok()) {
423
4.40M
            local_state->update_output_block_counters(*block);
424
4.40M
        }
425
4.40M
    });
426
4.40M
    if (has_projection()) {
427
291k
        local_state->clear_origin_block();
428
291k
        status = get_block(state, &local_state->_origin_block, eos);
429
291k
        if (UNLIKELY(!status.ok())) {
430
43
            return status;
431
43
        }
432
291k
        status = do_projections(state, &local_state->_origin_block, block);
433
291k
        return status;
434
291k
    }
435
4.11M
    status = get_block(state, block, eos);
436
4.11M
    RETURN_IF_ERROR(block->check_type_and_column());
437
4.11M
    return status;
438
4.11M
}
439
440
3.03M
void PipelineXLocalStateBase::reached_limit(Block* block, bool* eos) {
441
3.03M
    if (_parent->_limit != -1 and _num_rows_returned + block->rows() >= _parent->_limit) {
442
10.0k
        block->set_num_rows(_parent->_limit - _num_rows_returned);
443
10.0k
        *eos = true;
444
10.0k
    }
445
446
3.03M
    DBUG_EXECUTE_IF("Pipeline::reached_limit_early", {
447
3.03M
        auto op_name = to_lower(_parent->_op_name);
448
3.03M
        auto arg_op_name = dp->param<std::string>("op_name");
449
3.03M
        arg_op_name = to_lower(arg_op_name);
450
451
3.03M
        if (op_name == arg_op_name) {
452
3.03M
            *eos = true;
453
3.03M
        }
454
3.03M
    });
455
456
3.03M
    if (auto rows = block->rows()) {
457
827k
        _num_rows_returned += rows;
458
827k
        _state->get_query_ctx()->resource_ctx()->io_context()->update_process_rows(rows);
459
827k
    }
460
3.03M
}
461
462
32.5k
Status DataSinkOperatorXBase::terminate(RuntimeState* state) {
463
32.5k
    auto result = state->get_sink_local_state_result();
464
32.5k
    if (!result) {
465
0
        return result.error();
466
0
    }
467
32.5k
    return result.value()->terminate(state);
468
32.5k
}
469
470
15.4k
std::string DataSinkOperatorXBase::debug_string(int indentation_level) const {
471
15.4k
    fmt::memory_buffer debug_string_buffer;
472
473
15.4k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, _is_serial_operator={}",
474
15.4k
                   std::string(indentation_level * 2, ' '), _name, node_id(), _is_serial_operator);
475
15.4k
    return fmt::to_string(debug_string_buffer);
476
15.4k
}
477
478
15.4k
std::string DataSinkOperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
479
15.4k
    return state->get_sink_local_state()->debug_string(indentation_level);
480
15.4k
}
481
482
359k
Status DataSinkOperatorXBase::init(const TDataSink& tsink) {
483
359k
    std::string op_name = "UNKNOWN_SINK";
484
359k
    auto it = _TDataSinkType_VALUES_TO_NAMES.find(tsink.type);
485
486
360k
    if (it != _TDataSinkType_VALUES_TO_NAMES.end()) {
487
360k
        op_name = it->second;
488
360k
    }
489
359k
    _name = op_name + "_OPERATOR";
490
359k
    return Status::OK();
491
359k
}
492
493
315k
Status DataSinkOperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
494
315k
    std::string op_name = print_plan_node_type(tnode.node_type);
495
315k
    _nereids_id = tnode.nereids_id;
496
315k
    auto substr = op_name.substr(0, op_name.find("_NODE"));
497
315k
    _name = substr + "_SINK_OPERATOR";
498
315k
    return Status::OK();
499
315k
}
500
501
template <typename LocalStateType>
502
Status DataSinkOperatorX<LocalStateType>::setup_local_state(RuntimeState* state,
503
1.86M
                                                            LocalSinkStateInfo& info) {
504
1.86M
    auto local_state = LocalStateType::create_unique(this, state);
505
1.86M
    RETURN_IF_ERROR(local_state->init(state, info));
506
1.86M
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
1.86M
    return Status::OK();
508
1.86M
}
_ZN5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
118k
                                                            LocalSinkStateInfo& info) {
504
118k
    auto local_state = LocalStateType::create_unique(this, state);
505
118k
    RETURN_IF_ERROR(local_state->init(state, info));
506
118k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
118k
    return Status::OK();
508
118k
}
_ZN5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
400k
                                                            LocalSinkStateInfo& info) {
504
400k
    auto local_state = LocalStateType::create_unique(this, state);
505
400k
    RETURN_IF_ERROR(local_state->init(state, info));
506
400k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
400k
    return Status::OK();
508
400k
}
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
366
                                                            LocalSinkStateInfo& info) {
504
366
    auto local_state = LocalStateType::create_unique(this, state);
505
366
    RETURN_IF_ERROR(local_state->init(state, info));
506
366
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
366
    return Status::OK();
508
366
}
_ZN5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
49.8k
                                                            LocalSinkStateInfo& info) {
504
49.8k
    auto local_state = LocalStateType::create_unique(this, state);
505
49.8k
    RETURN_IF_ERROR(local_state->init(state, info));
506
49.8k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
49.8k
    return Status::OK();
508
49.8k
}
_ZN5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
34
                                                            LocalSinkStateInfo& info) {
504
34
    auto local_state = LocalStateType::create_unique(this, state);
505
34
    RETURN_IF_ERROR(local_state->init(state, info));
506
34
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
34
    return Status::OK();
508
34
}
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
11.1k
                                                            LocalSinkStateInfo& info) {
504
11.1k
    auto local_state = LocalStateType::create_unique(this, state);
505
11.1k
    RETURN_IF_ERROR(local_state->init(state, info));
506
11.1k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
11.1k
    return Status::OK();
508
11.1k
}
_ZN5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
3
                                                            LocalSinkStateInfo& info) {
504
3
    auto local_state = LocalStateType::create_unique(this, state);
505
3
    RETURN_IF_ERROR(local_state->init(state, info));
506
3
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
3
    return Status::OK();
508
3
}
_ZN5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
238k
                                                            LocalSinkStateInfo& info) {
504
238k
    auto local_state = LocalStateType::create_unique(this, state);
505
238k
    RETURN_IF_ERROR(local_state->init(state, info));
506
238k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
238k
    return Status::OK();
508
238k
}
_ZN5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
164
                                                            LocalSinkStateInfo& info) {
504
164
    auto local_state = LocalStateType::create_unique(this, state);
505
164
    RETURN_IF_ERROR(local_state->init(state, info));
506
164
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
164
    return Status::OK();
508
164
}
_ZN5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
284k
                                                            LocalSinkStateInfo& info) {
504
284k
    auto local_state = LocalStateType::create_unique(this, state);
505
284k
    RETURN_IF_ERROR(local_state->init(state, info));
506
284k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
284k
    return Status::OK();
508
284k
}
_ZN5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
107k
                                                            LocalSinkStateInfo& info) {
504
107k
    auto local_state = LocalStateType::create_unique(this, state);
505
107k
    RETURN_IF_ERROR(local_state->init(state, info));
506
107k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
107k
    return Status::OK();
508
107k
}
_ZN5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
97.7k
                                                            LocalSinkStateInfo& info) {
504
97.7k
    auto local_state = LocalStateType::create_unique(this, state);
505
97.7k
    RETURN_IF_ERROR(local_state->init(state, info));
506
97.7k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
97.7k
    return Status::OK();
508
97.7k
}
_ZN5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
131
                                                            LocalSinkStateInfo& info) {
504
131
    auto local_state = LocalStateType::create_unique(this, state);
505
131
    RETURN_IF_ERROR(local_state->init(state, info));
506
131
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
131
    return Status::OK();
508
131
}
_ZN5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
525k
                                                            LocalSinkStateInfo& info) {
504
525k
    auto local_state = LocalStateType::create_unique(this, state);
505
525k
    RETURN_IF_ERROR(local_state->init(state, info));
506
525k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
525k
    return Status::OK();
508
525k
}
_ZN5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
5.54k
                                                            LocalSinkStateInfo& info) {
504
5.54k
    auto local_state = LocalStateType::create_unique(this, state);
505
5.54k
    RETURN_IF_ERROR(local_state->init(state, info));
506
5.54k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
5.54k
    return Status::OK();
508
5.54k
}
_ZN5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
10.1k
                                                            LocalSinkStateInfo& info) {
504
10.1k
    auto local_state = LocalStateType::create_unique(this, state);
505
10.1k
    RETURN_IF_ERROR(local_state->init(state, info));
506
10.1k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
10.1k
    return Status::OK();
508
10.1k
}
_ZN5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
1.98k
                                                            LocalSinkStateInfo& info) {
504
1.98k
    auto local_state = LocalStateType::create_unique(this, state);
505
1.98k
    RETURN_IF_ERROR(local_state->init(state, info));
506
1.98k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
1.98k
    return Status::OK();
508
1.98k
}
_ZN5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
686
                                                            LocalSinkStateInfo& info) {
504
686
    auto local_state = LocalStateType::create_unique(this, state);
505
686
    RETURN_IF_ERROR(local_state->init(state, info));
506
686
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
686
    return Status::OK();
508
686
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
4.95k
                                                            LocalSinkStateInfo& info) {
504
4.95k
    auto local_state = LocalStateType::create_unique(this, state);
505
4.95k
    RETURN_IF_ERROR(local_state->init(state, info));
506
4.95k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
4.95k
    return Status::OK();
508
4.95k
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.66k
                                                            LocalSinkStateInfo& info) {
504
2.66k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.66k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.66k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.66k
    return Status::OK();
508
2.66k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.73k
                                                            LocalSinkStateInfo& info) {
504
2.73k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.73k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.73k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.73k
    return Status::OK();
508
2.73k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.56k
                                                            LocalSinkStateInfo& info) {
504
2.56k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.56k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.56k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.56k
    return Status::OK();
508
2.56k
}
_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
565
                                                            LocalSinkStateInfo& info) {
504
565
    auto local_state = LocalStateType::create_unique(this, state);
505
565
    RETURN_IF_ERROR(local_state->init(state, info));
506
565
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
565
    return Status::OK();
508
565
}
_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
106
                                                            LocalSinkStateInfo& info) {
504
106
    auto local_state = LocalStateType::create_unique(this, state);
505
106
    RETURN_IF_ERROR(local_state->init(state, info));
506
106
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
106
    return Status::OK();
508
106
}
_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
106k
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
106k
    } else {
519
106k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
106k
        ss->id = operator_id();
521
106k
        for (auto& dest : dests_id()) {
522
106k
            ss->related_op_ids.insert(dest);
523
106k
        }
524
106k
        return ss;
525
106k
    }
526
106k
}
_ZNK5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
401k
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
401k
    } else {
519
401k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
401k
        ss->id = operator_id();
521
401k
        for (auto& dest : dests_id()) {
522
398k
            ss->related_op_ids.insert(dest);
523
398k
        }
524
401k
        return ss;
525
401k
    }
526
401k
}
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
366
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
366
    } else {
519
366
        auto ss = LocalStateType::SharedStateType::create_shared();
520
366
        ss->id = operator_id();
521
366
        for (auto& dest : dests_id()) {
522
366
            ss->related_op_ids.insert(dest);
523
366
        }
524
366
        return ss;
525
366
    }
526
366
}
_ZNK5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
50.0k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
50.0k
    } else {
519
50.0k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
50.0k
        ss->id = operator_id();
521
50.0k
        for (auto& dest : dests_id()) {
522
49.4k
            ss->related_op_ids.insert(dest);
523
49.4k
        }
524
50.0k
        return ss;
525
50.0k
    }
526
50.0k
}
_ZNK5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE19create_shared_stateEv
Line
Count
Source
511
34
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
34
    } else {
519
34
        auto ss = LocalStateType::SharedStateType::create_shared();
520
34
        ss->id = operator_id();
521
34
        for (auto& dest : dests_id()) {
522
34
            ss->related_op_ids.insert(dest);
523
34
        }
524
34
        return ss;
525
34
    }
526
34
}
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
11.3k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
11.3k
    } else {
519
11.3k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
11.3k
        ss->id = operator_id();
521
11.3k
        for (auto& dest : dests_id()) {
522
11.3k
            ss->related_op_ids.insert(dest);
523
11.3k
        }
524
11.3k
        return ss;
525
11.3k
    }
526
11.3k
}
_ZNK5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE19create_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_18SortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
240k
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
240k
    } else {
519
240k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
240k
        ss->id = operator_id();
521
240k
        for (auto& dest : dests_id()) {
522
239k
            ss->related_op_ids.insert(dest);
523
239k
        }
524
240k
        return ss;
525
240k
    }
526
240k
}
_ZNK5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
166
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
166
    } else {
519
166
        auto ss = LocalStateType::SharedStateType::create_shared();
520
166
        ss->id = operator_id();
521
166
        for (auto& dest : dests_id()) {
522
166
            ss->related_op_ids.insert(dest);
523
166
        }
524
166
        return ss;
525
166
    }
526
166
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
107k
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
107k
    } else {
519
107k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
107k
        ss->id = operator_id();
521
107k
        for (auto& dest : dests_id()) {
522
107k
            ss->related_op_ids.insert(dest);
523
107k
        }
524
107k
        return ss;
525
107k
    }
526
107k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
130
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
130
    } else {
519
130
        auto ss = LocalStateType::SharedStateType::create_shared();
520
130
        ss->id = operator_id();
521
130
        for (auto& dest : dests_id()) {
522
130
            ss->related_op_ids.insert(dest);
523
130
        }
524
130
        return ss;
525
130
    }
526
130
}
_ZNK5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
528k
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
528k
    } else {
519
528k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
528k
        ss->id = operator_id();
521
528k
        for (auto& dest : dests_id()) {
522
520k
            ss->related_op_ids.insert(dest);
523
520k
        }
524
528k
        return ss;
525
528k
    }
526
528k
}
_ZNK5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
5.55k
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.55k
    } else {
519
5.55k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
5.55k
        ss->id = operator_id();
521
5.55k
        for (auto& dest : dests_id()) {
522
5.55k
            ss->related_op_ids.insert(dest);
523
5.55k
        }
524
5.55k
        return ss;
525
5.55k
    }
526
5.55k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
789
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
789
    } else {
519
789
        auto ss = LocalStateType::SharedStateType::create_shared();
520
789
        ss->id = operator_id();
521
791
        for (auto& dest : dests_id()) {
522
791
            ss->related_op_ids.insert(dest);
523
791
        }
524
789
        return ss;
525
789
    }
526
789
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE19create_shared_stateEv
Line
Count
Source
511
2.73k
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.73k
    } else {
519
2.73k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
2.73k
        ss->id = operator_id();
521
2.73k
        for (auto& dest : dests_id()) {
522
2.71k
            ss->related_op_ids.insert(dest);
523
2.71k
        }
524
2.73k
        return ss;
525
2.73k
    }
526
2.73k
}
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE19create_shared_stateEv
Line
Count
Source
511
2.56k
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.56k
    } else {
519
2.56k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
2.56k
        ss->id = operator_id();
521
2.56k
        for (auto& dest : dests_id()) {
522
2.54k
            ss->related_op_ids.insert(dest);
523
2.54k
        }
524
2.56k
        return ss;
525
2.56k
    }
526
2.56k
}
_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
564
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
564
    } else {
519
564
        auto ss = LocalStateType::SharedStateType::create_shared();
520
564
        ss->id = operator_id();
521
564
        for (auto& dest : dests_id()) {
522
553
            ss->related_op_ids.insert(dest);
523
553
        }
524
564
        return ss;
525
564
    }
526
564
}
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.16M
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.16M
    auto local_state = LocalStateType::create_unique(state, this);
531
2.16M
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.16M
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.16M
    return Status::OK();
534
2.16M
}
_ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
70.5k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
70.5k
    auto local_state = LocalStateType::create_unique(state, this);
531
70.5k
    RETURN_IF_ERROR(local_state->init(state, info));
532
70.5k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
70.5k
    return Status::OK();
534
70.5k
}
_ZN5doris9OperatorXINS_18OlapScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
252k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
252k
    auto local_state = LocalStateType::create_unique(state, this);
531
252k
    RETURN_IF_ERROR(local_state->init(state, info));
532
252k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
252k
    return Status::OK();
534
252k
}
_ZN5doris9OperatorXINS_21GroupCommitLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
131
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
131
    auto local_state = LocalStateType::create_unique(state, this);
531
131
    RETURN_IF_ERROR(local_state->init(state, info));
532
131
    state->emplace_local_state(operator_id(), std::move(local_state));
533
131
    return Status::OK();
534
131
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_18JDBCScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_18FileScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
3.36k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
3.36k
    auto local_state = LocalStateType::create_unique(state, this);
531
3.36k
    RETURN_IF_ERROR(local_state->init(state, info));
532
3.36k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
3.36k
    return Status::OK();
534
3.36k
}
_ZN5doris9OperatorXINS_18AnalyticLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
11.1k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
11.1k
    auto local_state = LocalStateType::create_unique(state, this);
531
11.1k
    RETURN_IF_ERROR(local_state->init(state, info));
532
11.1k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
11.1k
    return Status::OK();
534
11.1k
}
_ZN5doris9OperatorXINS_14SortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
10.2k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
10.2k
    auto local_state = LocalStateType::create_unique(state, this);
531
10.2k
    RETURN_IF_ERROR(local_state->init(state, info));
532
10.2k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
10.2k
    return Status::OK();
534
10.2k
}
_ZN5doris9OperatorXINS_19SpillSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
157
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
157
    auto local_state = LocalStateType::create_unique(state, this);
531
157
    RETURN_IF_ERROR(local_state->init(state, info));
532
157
    state->emplace_local_state(operator_id(), std::move(local_state));
533
157
    return Status::OK();
534
157
}
_ZN5doris9OperatorXINS_24LocalMergeSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
227k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
227k
    auto local_state = LocalStateType::create_unique(state, this);
531
227k
    RETURN_IF_ERROR(local_state->init(state, info));
532
227k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
227k
    return Status::OK();
534
227k
}
_ZN5doris9OperatorXINS_13AggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
107k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
107k
    auto local_state = LocalStateType::create_unique(state, this);
531
107k
    RETURN_IF_ERROR(local_state->init(state, info));
532
107k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
107k
    return Status::OK();
534
107k
}
_ZN5doris9OperatorXINS_21BucketedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
98.2k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
98.2k
    auto local_state = LocalStateType::create_unique(state, this);
531
98.2k
    RETURN_IF_ERROR(local_state->init(state, info));
532
98.2k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
98.2k
    return Status::OK();
534
98.2k
}
_ZN5doris9OperatorXINS_24PartitionedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
121
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
121
    auto local_state = LocalStateType::create_unique(state, this);
531
121
    RETURN_IF_ERROR(local_state->init(state, info));
532
121
    state->emplace_local_state(operator_id(), std::move(local_state));
533
121
    return Status::OK();
534
121
}
_ZN5doris9OperatorXINS_23TableFunctionLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
5.39k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
5.39k
    auto local_state = LocalStateType::create_unique(state, this);
531
5.39k
    RETURN_IF_ERROR(local_state->init(state, info));
532
5.39k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
5.39k
    return Status::OK();
534
5.39k
}
_ZN5doris9OperatorXINS_18ExchangeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
273k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
273k
    auto local_state = LocalStateType::create_unique(state, this);
531
273k
    RETURN_IF_ERROR(local_state->init(state, info));
532
273k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
273k
    return Status::OK();
534
273k
}
_ZN5doris9OperatorXINS_16RepeatLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.51k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.51k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.51k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.51k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.51k
    return Status::OK();
534
1.51k
}
_ZN5doris9OperatorXINS_29NestedLoopJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
5.51k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
5.51k
    auto local_state = LocalStateType::create_unique(state, this);
531
5.51k
    RETURN_IF_ERROR(local_state->init(state, info));
532
5.51k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
5.51k
    return Status::OK();
534
5.51k
}
_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.58k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.58k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.58k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.58k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.58k
    return Status::OK();
534
1.58k
}
_ZN5doris9OperatorXINS_21UnionSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
56.1k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
56.1k
    auto local_state = LocalStateType::create_unique(state, this);
531
56.1k
    RETURN_IF_ERROR(local_state->init(state, info));
532
56.1k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
56.1k
    return Status::OK();
534
56.1k
}
_ZN5doris9OperatorXINS_35MultiCastDataStreamSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
4.69k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
4.69k
    auto local_state = LocalStateType::create_unique(state, this);
531
4.69k
    RETURN_IF_ERROR(local_state->init(state, info));
532
4.69k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
4.69k
    return Status::OK();
534
4.69k
}
_ZN5doris9OperatorXINS_29PartitionSortSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
683
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
683
    auto local_state = LocalStateType::create_unique(state, this);
531
683
    RETURN_IF_ERROR(local_state->init(state, info));
532
683
    state->emplace_local_state(operator_id(), std::move(local_state));
533
683
    return Status::OK();
534
683
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.72k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.72k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.72k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.72k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.72k
    return Status::OK();
534
2.72k
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.55k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.55k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.55k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.55k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.55k
    return Status::OK();
534
2.55k
}
_ZN5doris9OperatorXINS_17DataGenLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
607
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
607
    auto local_state = LocalStateType::create_unique(state, this);
531
607
    RETURN_IF_ERROR(local_state->init(state, info));
532
607
    state->emplace_local_state(operator_id(), std::move(local_state));
533
607
    return Status::OK();
534
607
}
_ZN5doris9OperatorXINS_20SchemaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.72k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.72k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.72k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.72k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.72k
    return Status::OK();
534
1.72k
}
_ZN5doris9OperatorXINS_18MetaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
10.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
730k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
730k
    auto local_state = LocalStateType::create_unique(state, this);
531
730k
    RETURN_IF_ERROR(local_state->init(state, info));
532
730k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
730k
    return Status::OK();
534
730k
}
_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
802
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
802
    auto local_state = LocalStateType::create_unique(state, this);
531
802
    RETURN_IF_ERROR(local_state->init(state, info));
532
802
    state->emplace_local_state(operator_id(), std::move(local_state));
533
802
    return Status::OK();
534
802
}
_ZN5doris9OperatorXINS_16SelectLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
911
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
911
    auto local_state = LocalStateType::create_unique(state, this);
531
911
    RETURN_IF_ERROR(local_state->init(state, info));
532
911
    state->emplace_local_state(operator_id(), std::move(local_state));
533
911
    return Status::OK();
534
911
}
_ZN5doris9OperatorXINS_22StreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
7.93k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
7.93k
    auto local_state = LocalStateType::create_unique(state, this);
531
7.93k
    RETURN_IF_ERROR(local_state->init(state, info));
532
7.93k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
7.93k
    return Status::OK();
534
7.93k
}
_ZN5doris9OperatorXINS_30DistinctStreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
271k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
271k
    auto local_state = LocalStateType::create_unique(state, this);
531
271k
    RETURN_IF_ERROR(local_state->init(state, info));
532
271k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
271k
    return Status::OK();
534
271k
}
535
536
PipelineXSinkLocalStateBase::PipelineXSinkLocalStateBase(DataSinkOperatorXBase* parent,
537
                                                         RuntimeState* state)
538
1.86M
        : _parent(parent), _state(state) {}
539
540
PipelineXLocalStateBase::PipelineXLocalStateBase(RuntimeState* state, OperatorXBase* parent)
541
2.14M
        : _num_rows_returned(0),
542
2.14M
          _rows_returned_counter(nullptr),
543
2.14M
          _parent(parent),
544
2.14M
          _state(state),
545
2.14M
          _budget(state->batch_size(), state->preferred_block_size_bytes()) {}
546
547
template <typename SharedStateArg>
548
2.16M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
2.16M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
2.16M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
2.16M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
2.16M
    _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.16M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
2.16M
    _operator_profile->add_child(_common_profile.get(), true);
557
2.16M
    _operator_profile->add_child(_custom_profile.get(), true);
558
2.16M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
2.16M
    if constexpr (!is_fake_shared) {
560
1.33M
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
835k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
835k
                                    .first.get()
563
835k
                                    ->template cast<SharedStateArg>();
564
565
835k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
835k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
835k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
835k
        } else if (info.shared_state) {
569
423k
            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
423k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
423k
            _dependency = _shared_state->create_source_dependency(
576
423k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
423k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
423k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
423k
        } else {
580
75.3k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
9.35k
                DCHECK(false);
582
9.35k
            }
583
75.3k
        }
584
1.33M
    }
585
586
2.16M
    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.16M
    _rows_returned_counter =
591
2.16M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
2.16M
    _blocks_returned_counter =
593
2.16M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
2.16M
    _output_block_bytes_counter =
595
2.16M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
2.16M
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
2.16M
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
2.16M
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
2.16M
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
2.16M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
2.16M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
2.16M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
2.16M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
2.16M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
2.16M
    _memory_used_counter =
606
2.16M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
2.16M
    _common_profile->add_info_string("IsColocate",
608
2.16M
                                     std::to_string(_parent->is_colocated_operator()));
609
2.16M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
2.16M
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
2.16M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
2.16M
    return Status::OK();
613
2.16M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
70.7k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
70.7k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
70.7k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
70.7k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
70.7k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
70.7k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
70.7k
    _operator_profile->add_child(_common_profile.get(), true);
557
70.7k
    _operator_profile->add_child(_custom_profile.get(), true);
558
70.7k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
70.7k
    if constexpr (!is_fake_shared) {
560
70.7k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
11.9k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
11.9k
                                    .first.get()
563
11.9k
                                    ->template cast<SharedStateArg>();
564
565
11.9k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
11.9k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
11.9k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
58.8k
        } 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
57.8k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
57.8k
            _dependency = _shared_state->create_source_dependency(
576
57.8k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
57.8k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
57.8k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
57.8k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
942
        }
584
70.7k
    }
585
586
70.7k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
70.7k
    _rows_returned_counter =
591
70.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
70.7k
    _blocks_returned_counter =
593
70.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
70.7k
    _output_block_bytes_counter =
595
70.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
70.7k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
70.7k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
70.7k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
70.7k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
70.7k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
70.7k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
70.7k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
70.7k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
70.7k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
70.7k
    _memory_used_counter =
606
70.7k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
70.7k
    _common_profile->add_info_string("IsColocate",
608
70.7k
                                     std::to_string(_parent->is_colocated_operator()));
609
70.7k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
70.7k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
70.7k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
70.7k
    return Status::OK();
613
70.7k
}
_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
238k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
238k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
238k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
238k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
238k
    _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
238k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
238k
    _operator_profile->add_child(_common_profile.get(), true);
557
238k
    _operator_profile->add_child(_custom_profile.get(), true);
558
238k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
238k
    if constexpr (!is_fake_shared) {
560
238k
        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
238k
        } 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
227k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
227k
            _dependency = _shared_state->create_source_dependency(
576
227k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
227k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
227k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
227k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
10.9k
        }
584
238k
    }
585
586
238k
    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
238k
    _rows_returned_counter =
591
238k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
238k
    _blocks_returned_counter =
593
238k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
238k
    _output_block_bytes_counter =
595
238k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
238k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
238k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
238k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
238k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
238k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
238k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
238k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
238k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
238k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
238k
    _memory_used_counter =
606
238k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
238k
    _common_profile->add_info_string("IsColocate",
608
238k
                                     std::to_string(_parent->is_colocated_operator()));
609
238k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
238k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
238k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
238k
    return Status::OK();
613
238k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
157
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
157
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
157
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
157
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
157
    _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
157
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
157
    _operator_profile->add_child(_common_profile.get(), true);
557
157
    _operator_profile->add_child(_custom_profile.get(), true);
558
157
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
157
    if constexpr (!is_fake_shared) {
560
157
        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
157
        } 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
157
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
157
            _dependency = _shared_state->create_source_dependency(
576
157
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
157
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
157
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
157
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
157
    }
585
586
157
    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
157
    _rows_returned_counter =
591
157
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
157
    _blocks_returned_counter =
593
157
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
157
    _output_block_bytes_counter =
595
157
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
157
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
157
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
157
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
157
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
157
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
157
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
157
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
157
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
157
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
157
    _memory_used_counter =
606
157
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
157
    _common_profile->add_info_string("IsColocate",
608
157
                                     std::to_string(_parent->is_colocated_operator()));
609
157
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
157
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
157
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
157
    return Status::OK();
613
157
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
5.53k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
5.53k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
5.53k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
5.53k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
5.53k
    _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.53k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
5.53k
    _operator_profile->add_child(_common_profile.get(), true);
557
5.53k
    _operator_profile->add_child(_custom_profile.get(), true);
558
5.53k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
5.53k
    if constexpr (!is_fake_shared) {
560
5.53k
        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.53k
        } 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.50k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
5.50k
            _dependency = _shared_state->create_source_dependency(
576
5.50k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
5.50k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
5.50k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
5.50k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
34
        }
584
5.53k
    }
585
586
5.53k
    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.53k
    _rows_returned_counter =
591
5.53k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
5.53k
    _blocks_returned_counter =
593
5.53k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
5.53k
    _output_block_bytes_counter =
595
5.53k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
5.53k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
5.53k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
5.53k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
5.53k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
5.53k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
5.53k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
5.53k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
5.53k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
5.53k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
5.53k
    _memory_used_counter =
606
5.53k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
5.53k
    _common_profile->add_info_string("IsColocate",
608
5.53k
                                     std::to_string(_parent->is_colocated_operator()));
609
5.53k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
5.53k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
5.53k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
5.53k
    return Status::OK();
613
5.53k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
11.3k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
11.3k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
11.3k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
11.3k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
11.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
11.3k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
11.3k
    _operator_profile->add_child(_common_profile.get(), true);
557
11.3k
    _operator_profile->add_child(_custom_profile.get(), true);
558
11.3k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
11.3k
    if constexpr (!is_fake_shared) {
560
11.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
11.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
11.1k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
11.1k
            _dependency = _shared_state->create_source_dependency(
576
11.1k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
11.1k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
11.1k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
11.1k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
202
        }
584
11.3k
    }
585
586
11.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
11.3k
    _rows_returned_counter =
591
11.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
11.3k
    _blocks_returned_counter =
593
11.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
11.3k
    _output_block_bytes_counter =
595
11.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
11.3k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
11.3k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
11.3k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
11.3k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
11.3k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
11.3k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
11.3k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
11.3k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
11.3k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
11.3k
    _memory_used_counter =
606
11.3k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
11.3k
    _common_profile->add_info_string("IsColocate",
608
11.3k
                                     std::to_string(_parent->is_colocated_operator()));
609
11.3k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
11.3k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
11.3k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
11.3k
    return Status::OK();
613
11.3k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
107k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
107k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
107k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
107k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
107k
    _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
107k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
107k
    _operator_profile->add_child(_common_profile.get(), true);
557
107k
    _operator_profile->add_child(_custom_profile.get(), true);
558
107k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
107k
    if constexpr (!is_fake_shared) {
560
107k
        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
107k
        } 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
105k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
105k
            _dependency = _shared_state->create_source_dependency(
576
105k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
105k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
105k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
105k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
1.71k
        }
584
107k
    }
585
586
107k
    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
107k
    _rows_returned_counter =
591
107k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
107k
    _blocks_returned_counter =
593
107k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
107k
    _output_block_bytes_counter =
595
107k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
107k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
107k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
107k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
107k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
107k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
107k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
107k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
107k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
107k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
107k
    _memory_used_counter =
606
107k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
107k
    _common_profile->add_info_string("IsColocate",
608
107k
                                     std::to_string(_parent->is_colocated_operator()));
609
107k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
107k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
107k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
107k
    return Status::OK();
613
107k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
98.2k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
98.2k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
98.2k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
98.2k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
98.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
98.2k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
98.2k
    _operator_profile->add_child(_common_profile.get(), true);
557
98.2k
    _operator_profile->add_child(_custom_profile.get(), true);
558
98.2k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
98.2k
    if constexpr (!is_fake_shared) {
560
98.2k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
98.2k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
98.2k
                                    .first.get()
563
98.2k
                                    ->template cast<SharedStateArg>();
564
565
98.2k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
98.2k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
98.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
98.2k
    }
585
586
98.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
98.2k
    _rows_returned_counter =
591
98.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
98.2k
    _blocks_returned_counter =
593
98.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
98.2k
    _output_block_bytes_counter =
595
98.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
98.2k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
98.2k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
98.2k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
98.2k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
98.2k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
98.2k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
98.2k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
98.2k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
98.2k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
98.2k
    _memory_used_counter =
606
98.2k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
98.2k
    _common_profile->add_info_string("IsColocate",
608
98.2k
                                     std::to_string(_parent->is_colocated_operator()));
609
98.2k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
98.2k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
98.2k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
98.2k
    return Status::OK();
613
98.2k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
121
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
121
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
121
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
121
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
121
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
121
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
121
    _operator_profile->add_child(_common_profile.get(), true);
557
121
    _operator_profile->add_child(_custom_profile.get(), true);
558
121
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
121
    if constexpr (!is_fake_shared) {
560
121
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
121
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
121
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
121
            _dependency = _shared_state->create_source_dependency(
576
121
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
121
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
121
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
121
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
121
    }
585
586
121
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
121
    _rows_returned_counter =
591
121
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
121
    _blocks_returned_counter =
593
121
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
121
    _output_block_bytes_counter =
595
121
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
121
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
121
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
121
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
121
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
121
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
121
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
121
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
121
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
121
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
121
    _memory_used_counter =
606
121
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
121
    _common_profile->add_info_string("IsColocate",
608
121
                                     std::to_string(_parent->is_colocated_operator()));
609
121
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
121
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
121
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
121
    return Status::OK();
613
121
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
833k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
833k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
833k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
833k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
833k
    _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
833k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
833k
    _operator_profile->add_child(_common_profile.get(), true);
557
833k
    _operator_profile->add_child(_custom_profile.get(), true);
558
833k
    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
833k
    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
833k
    _rows_returned_counter =
591
833k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
833k
    _blocks_returned_counter =
593
833k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
833k
    _output_block_bytes_counter =
595
833k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
833k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
833k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
833k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
833k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
833k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
833k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
833k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
833k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
833k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
833k
    _memory_used_counter =
606
833k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
833k
    _common_profile->add_info_string("IsColocate",
608
833k
                                     std::to_string(_parent->is_colocated_operator()));
609
833k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
833k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
833k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
833k
    return Status::OK();
613
833k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
56.0k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
56.0k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
56.0k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
56.0k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
56.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
56.0k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
56.0k
    _operator_profile->add_child(_common_profile.get(), true);
557
56.0k
    _operator_profile->add_child(_custom_profile.get(), true);
558
56.0k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
56.0k
    if constexpr (!is_fake_shared) {
560
56.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
56.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
4.16k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
4.16k
            _dependency = _shared_state->create_source_dependency(
576
4.16k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
4.16k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
4.16k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
51.8k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
51.8k
        }
584
56.0k
    }
585
586
56.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
56.0k
    _rows_returned_counter =
591
56.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
56.0k
    _blocks_returned_counter =
593
56.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
56.0k
    _output_block_bytes_counter =
595
56.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
56.0k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
56.0k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
56.0k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
56.0k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
56.0k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
56.0k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
56.0k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
56.0k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
56.0k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
56.0k
    _memory_used_counter =
606
56.0k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
56.0k
    _common_profile->add_info_string("IsColocate",
608
56.0k
                                     std::to_string(_parent->is_colocated_operator()));
609
56.0k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
56.0k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
56.0k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
56.0k
    return Status::OK();
613
56.0k
}
_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.70k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
4.70k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
4.70k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
4.70k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
4.70k
    _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.70k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
4.70k
    _operator_profile->add_child(_common_profile.get(), true);
557
4.70k
    _operator_profile->add_child(_custom_profile.get(), true);
558
4.70k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
4.70k
    if constexpr (!is_fake_shared) {
560
4.70k
        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.70k
        } 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.65k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
4.65k
            _dependency = _shared_state->create_source_dependency(
576
4.65k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
4.65k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
4.65k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
4.65k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
50
        }
584
4.70k
    }
585
586
4.70k
    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.70k
    _rows_returned_counter =
591
4.70k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
4.70k
    _blocks_returned_counter =
593
4.70k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
4.70k
    _output_block_bytes_counter =
595
4.70k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
4.70k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
4.70k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
4.70k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
4.70k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
4.70k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
4.70k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
4.70k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
4.70k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
4.70k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
4.70k
    _memory_used_counter =
606
4.70k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
4.70k
    _common_profile->add_info_string("IsColocate",
608
4.70k
                                     std::to_string(_parent->is_colocated_operator()));
609
4.70k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
4.70k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
4.70k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
4.70k
    return Status::OK();
613
4.70k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
790
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
790
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
790
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
790
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
790
    _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
790
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
790
    _operator_profile->add_child(_common_profile.get(), true);
557
790
    _operator_profile->add_child(_custom_profile.get(), true);
558
790
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
790
    if constexpr (!is_fake_shared) {
560
790
        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
790
        } 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
781
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
781
            _dependency = _shared_state->create_source_dependency(
576
781
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
781
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
781
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
781
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
9
        }
584
790
    }
585
586
790
    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
790
    _rows_returned_counter =
591
790
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
790
    _blocks_returned_counter =
593
790
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
790
    _output_block_bytes_counter =
595
790
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
790
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
790
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
790
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
790
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
790
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
790
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
790
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
790
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
790
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
790
    _memory_used_counter =
606
790
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
790
    _common_profile->add_info_string("IsColocate",
608
790
                                     std::to_string(_parent->is_colocated_operator()));
609
790
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
790
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
790
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
790
    return Status::OK();
613
790
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
5.33k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
5.33k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
5.33k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
5.33k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
5.33k
    _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.33k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
5.33k
    _operator_profile->add_child(_common_profile.get(), true);
557
5.33k
    _operator_profile->add_child(_custom_profile.get(), true);
558
5.33k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
5.33k
    if constexpr (!is_fake_shared) {
560
5.33k
        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.33k
        } 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.05k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
5.05k
            _dependency = _shared_state->create_source_dependency(
576
5.05k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
5.05k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
5.05k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
5.05k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
283
        }
584
5.33k
    }
585
586
5.33k
    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.33k
    _rows_returned_counter =
591
5.33k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
5.33k
    _blocks_returned_counter =
593
5.33k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
5.33k
    _output_block_bytes_counter =
595
5.33k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
5.33k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
5.33k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
5.33k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
5.33k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
5.33k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
5.33k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
5.33k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
5.33k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
5.33k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
5.33k
    _memory_used_counter =
606
5.33k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
5.33k
    _common_profile->add_info_string("IsColocate",
608
5.33k
                                     std::to_string(_parent->is_colocated_operator()));
609
5.33k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
5.33k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
5.33k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
5.33k
    return Status::OK();
613
5.33k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
734k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
734k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
734k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
734k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
734k
    _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
734k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
734k
    _operator_profile->add_child(_common_profile.get(), true);
557
734k
    _operator_profile->add_child(_custom_profile.get(), true);
558
734k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
734k
    if constexpr (!is_fake_shared) {
560
734k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
725k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
725k
                                    .first.get()
563
725k
                                    ->template cast<SharedStateArg>();
564
565
725k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
725k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
725k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
725k
        } 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
9.35k
        } else {
580
9.35k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
9.35k
                DCHECK(false);
582
9.35k
            }
583
9.35k
        }
584
734k
    }
585
586
734k
    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
734k
    _rows_returned_counter =
591
734k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
734k
    _blocks_returned_counter =
593
734k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
734k
    _output_block_bytes_counter =
595
734k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
734k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
734k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
734k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
734k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
734k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
734k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
734k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
734k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
734k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
734k
    _memory_used_counter =
606
734k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
734k
    _common_profile->add_info_string("IsColocate",
608
734k
                                     std::to_string(_parent->is_colocated_operator()));
609
734k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
734k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
734k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
734k
    return Status::OK();
613
734k
}
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.17M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
2.17M
    _conjuncts.resize(_parent->_conjuncts.size());
618
2.49M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
311k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
311k
    }
621
2.17M
    if (_parent->has_projection()) {
622
398k
        const auto& projection = *_parent->_projection;
623
398k
        _projections.resize(projection.projections.size());
624
2.43M
        for (size_t i = 0; i < _projections.size(); i++) {
625
2.03M
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
2.03M
        }
627
398k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
420k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
22.2k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
402k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
380k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
380k
                        state, _intermediate_projections[i][j]));
633
380k
            }
634
22.2k
        }
635
398k
    }
636
2.17M
    return Status::OK();
637
2.17M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
70.9k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
70.9k
    _conjuncts.resize(_parent->_conjuncts.size());
618
72.6k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
1.72k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1.72k
    }
621
70.9k
    if (_parent->has_projection()) {
622
70.9k
        const auto& projection = *_parent->_projection;
623
70.9k
        _projections.resize(projection.projections.size());
624
375k
        for (size_t i = 0; i < _projections.size(); i++) {
625
304k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
304k
        }
627
70.9k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
81.6k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
10.7k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
334k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
323k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
323k
                        state, _intermediate_projections[i][j]));
633
323k
            }
634
10.7k
        }
635
70.9k
    }
636
70.9k
    return Status::OK();
637
70.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
241k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
241k
    _conjuncts.resize(_parent->_conjuncts.size());
618
241k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
241k
    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
241k
    return Status::OK();
637
241k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
150
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
150
    _conjuncts.resize(_parent->_conjuncts.size());
618
150
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
150
    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
150
    return Status::OK();
637
150
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
5.56k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
5.56k
    _conjuncts.resize(_parent->_conjuncts.size());
618
5.70k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
141
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
141
    }
621
5.56k
    if (_parent->has_projection()) {
622
5.56k
        const auto& projection = *_parent->_projection;
623
5.56k
        _projections.resize(projection.projections.size());
624
21.4k
        for (size_t i = 0; i < _projections.size(); i++) {
625
15.8k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
15.8k
        }
627
5.56k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
5.61k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
52
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
349
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
297
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
297
                        state, _intermediate_projections[i][j]));
633
297
            }
634
52
        }
635
5.56k
    }
636
5.56k
    return Status::OK();
637
5.56k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
11.3k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
11.3k
    _conjuncts.resize(_parent->_conjuncts.size());
618
12.5k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
1.15k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1.15k
    }
621
11.3k
    if (_parent->has_projection()) {
622
5.59k
        const auto& projection = *_parent->_projection;
623
5.59k
        _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.59k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
5.67k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
88
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
669
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
581
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
581
                        state, _intermediate_projections[i][j]));
633
581
            }
634
88
        }
635
5.59k
    }
636
11.3k
    return Status::OK();
637
11.3k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
107k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
107k
    _conjuncts.resize(_parent->_conjuncts.size());
618
109k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
1.42k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1.42k
    }
621
107k
    if (_parent->has_projection()) {
622
33.9k
        const auto& projection = *_parent->_projection;
623
33.9k
        _projections.resize(projection.projections.size());
624
298k
        for (size_t i = 0; i < _projections.size(); i++) {
625
264k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
264k
        }
627
33.9k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
34.7k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
779
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
5.01k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
4.23k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
4.23k
                        state, _intermediate_projections[i][j]));
633
4.23k
            }
634
779
        }
635
33.9k
    }
636
107k
    return Status::OK();
637
107k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
98.2k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
98.2k
    _conjuncts.resize(_parent->_conjuncts.size());
618
98.3k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
14
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
14
    }
621
98.2k
    if (_parent->has_projection()) {
622
282
        const auto& projection = *_parent->_projection;
623
282
        _projections.resize(projection.projections.size());
624
1.24k
        for (size_t i = 0; i < _projections.size(); i++) {
625
960
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
960
        }
627
282
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
285
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
3
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
15
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
12
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
12
                        state, _intermediate_projections[i][j]));
633
12
            }
634
3
        }
635
282
    }
636
98.2k
    return Status::OK();
637
98.2k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
125
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
125
    _conjuncts.resize(_parent->_conjuncts.size());
618
125
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
125
    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
125
    return Status::OK();
637
125
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
837k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
837k
    _conjuncts.resize(_parent->_conjuncts.size());
618
1.14M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
306k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
306k
    }
621
837k
    if (_parent->has_projection()) {
622
269k
        const auto& projection = *_parent->_projection;
623
269k
        _projections.resize(projection.projections.size());
624
1.59M
        for (size_t i = 0; i < _projections.size(); i++) {
625
1.32M
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
1.32M
        }
627
269k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
279k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
10.4k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
60.8k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
50.3k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
50.3k
                        state, _intermediate_projections[i][j]));
633
50.3k
            }
634
10.4k
        }
635
269k
    }
636
837k
    return Status::OK();
637
837k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
56.3k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
56.3k
    _conjuncts.resize(_parent->_conjuncts.size());
618
56.3k
    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.3k
    if (_parent->has_projection()) {
622
11.9k
        const auto& projection = *_parent->_projection;
623
11.9k
        _projections.resize(projection.projections.size());
624
115k
        for (size_t i = 0; i < _projections.size(); i++) {
625
103k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
103k
        }
627
11.9k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
12.0k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
106
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
1.44k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
1.33k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
1.33k
                        state, _intermediate_projections[i][j]));
633
1.33k
            }
634
106
        }
635
11.9k
    }
636
56.3k
    return Status::OK();
637
56.3k
}
_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.69k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
4.69k
    _conjuncts.resize(_parent->_conjuncts.size());
618
5.17k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
482
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
482
    }
621
4.69k
    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.69k
    return Status::OK();
637
4.69k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
790
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
790
    _conjuncts.resize(_parent->_conjuncts.size());
618
790
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
790
    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
790
    return Status::OK();
637
790
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
5.38k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
5.38k
    _conjuncts.resize(_parent->_conjuncts.size());
618
5.38k
    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.38k
    if (_parent->has_projection()) {
622
80
        const auto& projection = *_parent->_projection;
623
80
        _projections.resize(projection.projections.size());
624
268
        for (size_t i = 0; i < _projections.size(); i++) {
625
188
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
188
        }
627
80
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
80
        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
80
    }
636
5.38k
    return Status::OK();
637
5.38k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
738k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
738k
    _conjuncts.resize(_parent->_conjuncts.size());
618
738k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
738k
    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
738k
    return Status::OK();
637
738k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4openEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
169
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
169
    _conjuncts.resize(_parent->_conjuncts.size());
618
176
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
7
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
7
    }
621
169
    if (_parent->has_projection()) {
622
166
        const auto& projection = *_parent->_projection;
623
166
        _projections.resize(projection.projections.size());
624
491
        for (size_t i = 0; i < _projections.size(); i++) {
625
325
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
325
        }
627
166
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
169
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
3
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
11
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
8
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
8
                        state, _intermediate_projections[i][j]));
633
8
            }
634
3
        }
635
166
    }
636
169
    return Status::OK();
637
169
}
638
639
template <typename SharedStateArg>
640
9.55k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
9.55k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
9.55k
    _terminated = true;
645
9.55k
    return Status::OK();
646
9.55k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
575
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
575
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
575
    _terminated = true;
645
575
    return Status::OK();
646
575
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
31
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
31
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
31
    _terminated = true;
645
31
    return Status::OK();
646
31
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
81
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
81
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
81
    _terminated = true;
645
81
    return Status::OK();
646
81
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
1
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
1
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
1
    _terminated = true;
645
1
    return Status::OK();
646
1
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
99
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
99
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
99
    _terminated = true;
645
99
    return Status::OK();
646
99
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
7.40k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
7.40k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
7.40k
    _terminated = true;
645
7.40k
    return Status::OK();
646
7.40k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
33
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
33
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
33
    _terminated = true;
645
33
    return Status::OK();
646
33
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
4
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
4
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
4
    _terminated = true;
645
4
    return Status::OK();
646
4
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
200
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
200
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
200
    _terminated = true;
645
200
    return Status::OK();
646
200
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
1.09k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
1.09k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
1.09k
    _terminated = true;
645
1.09k
    return Status::OK();
646
1.09k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
28
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
28
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
28
    _terminated = true;
645
28
    return Status::OK();
646
28
}
647
648
template <typename SharedStateArg>
649
2.44M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
2.44M
    if (_closed) {
651
263k
        return Status::OK();
652
263k
    }
653
2.17M
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
1.33M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
1.33M
    }
656
2.17M
    _closed = true;
657
2.17M
    return Status::OK();
658
2.44M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
70.8k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
70.8k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
70.8k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
70.8k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
70.8k
    }
656
70.8k
    _closed = true;
657
70.8k
    return Status::OK();
658
70.8k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
7
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
7
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
7
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
7
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
7
    }
656
7
    _closed = true;
657
7
    return Status::OK();
658
7
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
477k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
477k
    if (_closed) {
651
239k
        return Status::OK();
652
239k
    }
653
238k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
238k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
238k
    }
656
238k
    _closed = true;
657
238k
    return Status::OK();
658
477k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
157
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
157
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
157
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
157
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
157
    }
656
157
    _closed = true;
657
157
    return Status::OK();
658
157
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
5.56k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
5.56k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
5.56k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
5.56k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
5.56k
    }
656
5.56k
    _closed = true;
657
5.56k
    return Status::OK();
658
5.56k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
11.2k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
11.2k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
11.2k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
11.2k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
11.2k
    }
656
11.2k
    _closed = true;
657
11.2k
    return Status::OK();
658
11.2k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
107k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
107k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
107k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
107k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
107k
    }
656
107k
    _closed = true;
657
107k
    return Status::OK();
658
107k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
97.8k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
97.8k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
97.8k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
97.8k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
97.8k
    }
656
97.8k
    _closed = true;
657
97.8k
    return Status::OK();
658
97.8k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
120
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
120
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
120
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
120
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
120
    }
656
120
    _closed = true;
657
120
    return Status::OK();
658
120
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
854k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
854k
    if (_closed) {
651
17.1k
        return Status::OK();
652
17.1k
    }
653
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
    }
656
837k
    _closed = true;
657
837k
    return Status::OK();
658
854k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
56.3k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
56.3k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
56.3k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
56.3k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
56.3k
    }
656
56.3k
    _closed = true;
657
56.3k
    return Status::OK();
658
56.3k
}
_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.65k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
4.65k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
4.65k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
4.65k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
4.65k
    }
656
4.65k
    _closed = true;
657
4.65k
    return Status::OK();
658
4.65k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
1.37k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
1.37k
    if (_closed) {
651
689
        return Status::OK();
652
689
    }
653
688
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
688
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
688
    }
656
688
    _closed = true;
657
688
    return Status::OK();
658
1.37k
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
10.9k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
10.9k
    if (_closed) {
651
5.54k
        return Status::OK();
652
5.54k
    }
653
5.37k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
5.37k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
5.37k
    }
656
5.37k
    _closed = true;
657
5.37k
    return Status::OK();
658
10.9k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
740k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
740k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
740k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
740k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
740k
    }
656
740k
    _closed = true;
657
740k
    return Status::OK();
658
740k
}
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.87M
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
1.87M
    _operator_profile =
664
1.87M
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
1.87M
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
1.87M
    _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.87M
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
1.87M
    _operator_profile->add_child(_common_profile, true);
673
1.87M
    _operator_profile->add_child(_custom_profile, true);
674
675
1.87M
    _operator_profile->set_metadata(_parent->node_id());
676
1.87M
    _wait_for_finish_dependency_timer =
677
1.87M
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
1.87M
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
1.87M
    if constexpr (!is_fake_shared) {
680
1.34M
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
1.34M
            info.shared_state_map.end()) {
682
395k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
285k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
285k
            }
685
395k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
395k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
395k
                                                  ? 0
688
395k
                                                  : info.task_idx]
689
395k
                                  .get();
690
395k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
950k
        } else {
692
18.4E
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
18.4E
                DCHECK(false);
694
18.4E
            }
695
950k
            _shared_state = info.shared_state->template cast<SharedState>();
696
950k
            _dependency = _shared_state->create_sink_dependency(
697
950k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
950k
        }
699
1.34M
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
1.34M
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
1.34M
    }
702
703
1.87M
    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.87M
    _rows_input_counter =
708
1.87M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
1.87M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
1.87M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
1.87M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
1.87M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
1.87M
    _memory_used_counter =
714
1.87M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
1.87M
    _common_profile->add_info_string("IsColocate",
716
1.87M
                                     std::to_string(_parent->is_colocated_operator()));
717
1.87M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
1.87M
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
1.87M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
1.87M
    return Status::OK();
721
1.87M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
118k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
118k
    _operator_profile =
664
118k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
118k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
118k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
118k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
118k
    _operator_profile->add_child(_common_profile, true);
673
118k
    _operator_profile->add_child(_custom_profile, true);
674
675
118k
    _operator_profile->set_metadata(_parent->node_id());
676
118k
    _wait_for_finish_dependency_timer =
677
118k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
118k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
118k
    if constexpr (!is_fake_shared) {
680
118k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
118k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
12.2k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
12.2k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
12.2k
                                                  ? 0
688
12.2k
                                                  : info.task_idx]
689
12.2k
                                  .get();
690
12.2k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
106k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
106k
            _shared_state = info.shared_state->template cast<SharedState>();
696
106k
            _dependency = _shared_state->create_sink_dependency(
697
106k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
106k
        }
699
118k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
118k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
118k
    }
702
703
118k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
118k
    _rows_input_counter =
708
118k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
118k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
118k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
118k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
118k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
118k
    _memory_used_counter =
714
118k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
118k
    _common_profile->add_info_string("IsColocate",
716
118k
                                     std::to_string(_parent->is_colocated_operator()));
717
118k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
118k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
118k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
118k
    return Status::OK();
721
118k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
5
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
5
    _operator_profile =
664
5
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
5
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
5
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
5
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
5
    _operator_profile->add_child(_common_profile, true);
673
5
    _operator_profile->add_child(_custom_profile, true);
674
675
5
    _operator_profile->set_metadata(_parent->node_id());
676
5
    _wait_for_finish_dependency_timer =
677
5
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
5
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
5
    if constexpr (!is_fake_shared) {
680
5
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
5
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
5
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
5
            _shared_state = info.shared_state->template cast<SharedState>();
696
5
            _dependency = _shared_state->create_sink_dependency(
697
5
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
5
        }
699
5
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
5
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
5
    }
702
703
5
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
5
    _rows_input_counter =
708
5
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
5
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
5
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
5
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
5
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
5
    _memory_used_counter =
714
5
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
5
    _common_profile->add_info_string("IsColocate",
716
5
                                     std::to_string(_parent->is_colocated_operator()));
717
5
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
5
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
5
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
5
    return Status::OK();
721
5
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
240k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
240k
    _operator_profile =
664
240k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
240k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
240k
    _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
240k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
240k
    _operator_profile->add_child(_common_profile, true);
673
240k
    _operator_profile->add_child(_custom_profile, true);
674
675
240k
    _operator_profile->set_metadata(_parent->node_id());
676
240k
    _wait_for_finish_dependency_timer =
677
240k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
240k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
240k
    if constexpr (!is_fake_shared) {
680
240k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
240k
            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
240k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
240k
            _shared_state = info.shared_state->template cast<SharedState>();
696
240k
            _dependency = _shared_state->create_sink_dependency(
697
240k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
240k
        }
699
240k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
240k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
240k
    }
702
703
240k
    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
240k
    _rows_input_counter =
708
240k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
240k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
240k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
240k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
240k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
240k
    _memory_used_counter =
714
240k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
240k
    _common_profile->add_info_string("IsColocate",
716
240k
                                     std::to_string(_parent->is_colocated_operator()));
717
240k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
240k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
240k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
240k
    return Status::OK();
721
240k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
164
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
164
    _operator_profile =
664
164
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
164
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
164
    _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
164
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
164
    _operator_profile->add_child(_common_profile, true);
673
164
    _operator_profile->add_child(_custom_profile, true);
674
675
164
    _operator_profile->set_metadata(_parent->node_id());
676
164
    _wait_for_finish_dependency_timer =
677
164
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
164
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
164
    if constexpr (!is_fake_shared) {
680
164
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
164
            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
164
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
164
            _shared_state = info.shared_state->template cast<SharedState>();
696
164
            _dependency = _shared_state->create_sink_dependency(
697
164
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
164
        }
699
164
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
164
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
164
    }
702
703
164
    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
164
    _rows_input_counter =
708
164
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
164
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
164
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
164
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
164
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
164
    _memory_used_counter =
714
164
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
164
    _common_profile->add_info_string("IsColocate",
716
164
                                     std::to_string(_parent->is_colocated_operator()));
717
164
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
164
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
164
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
164
    return Status::OK();
721
164
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
5.55k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
5.55k
    _operator_profile =
664
5.55k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
5.55k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
5.55k
    _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.55k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
5.55k
    _operator_profile->add_child(_common_profile, true);
673
5.55k
    _operator_profile->add_child(_custom_profile, true);
674
675
5.55k
    _operator_profile->set_metadata(_parent->node_id());
676
5.55k
    _wait_for_finish_dependency_timer =
677
5.55k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
5.55k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
5.55k
    if constexpr (!is_fake_shared) {
680
5.55k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
5.55k
            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.55k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
5.55k
            _shared_state = info.shared_state->template cast<SharedState>();
696
5.55k
            _dependency = _shared_state->create_sink_dependency(
697
5.55k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
5.55k
        }
699
5.55k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
5.55k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
5.55k
    }
702
703
5.55k
    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.55k
    _rows_input_counter =
708
5.55k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
5.55k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
5.55k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
5.55k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
5.55k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
5.55k
    _memory_used_counter =
714
5.55k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
5.55k
    _common_profile->add_info_string("IsColocate",
716
5.55k
                                     std::to_string(_parent->is_colocated_operator()));
717
5.55k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
5.55k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
5.55k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
5.55k
    return Status::OK();
721
5.55k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
11.3k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
11.3k
    _operator_profile =
664
11.3k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
11.3k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
11.3k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
11.3k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
11.3k
    _operator_profile->add_child(_common_profile, true);
673
11.3k
    _operator_profile->add_child(_custom_profile, true);
674
675
11.3k
    _operator_profile->set_metadata(_parent->node_id());
676
11.3k
    _wait_for_finish_dependency_timer =
677
11.3k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
11.3k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
11.3k
    if constexpr (!is_fake_shared) {
680
11.3k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
11.3k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
11.3k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
11.3k
            _shared_state = info.shared_state->template cast<SharedState>();
696
11.3k
            _dependency = _shared_state->create_sink_dependency(
697
11.3k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
11.3k
        }
699
11.3k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
11.3k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
11.3k
    }
702
703
11.3k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
11.3k
    _rows_input_counter =
708
11.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
11.3k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
11.3k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
11.3k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
11.3k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
11.3k
    _memory_used_counter =
714
11.3k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
11.3k
    _common_profile->add_info_string("IsColocate",
716
11.3k
                                     std::to_string(_parent->is_colocated_operator()));
717
11.3k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
11.3k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
11.3k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
11.3k
    return Status::OK();
721
11.3k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
107k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
107k
    _operator_profile =
664
107k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
107k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
107k
    _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
107k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
107k
    _operator_profile->add_child(_common_profile, true);
673
107k
    _operator_profile->add_child(_custom_profile, true);
674
675
107k
    _operator_profile->set_metadata(_parent->node_id());
676
107k
    _wait_for_finish_dependency_timer =
677
107k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
107k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
107k
    if constexpr (!is_fake_shared) {
680
107k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
107k
            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
107k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
107k
            _shared_state = info.shared_state->template cast<SharedState>();
696
107k
            _dependency = _shared_state->create_sink_dependency(
697
107k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
107k
        }
699
107k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
107k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
107k
    }
702
703
107k
    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
107k
    _rows_input_counter =
708
107k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
107k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
107k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
107k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
107k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
107k
    _memory_used_counter =
714
107k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
107k
    _common_profile->add_info_string("IsColocate",
716
107k
                                     std::to_string(_parent->is_colocated_operator()));
717
107k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
107k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
107k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
107k
    return Status::OK();
721
107k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
98.1k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
98.1k
    _operator_profile =
664
98.1k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
98.1k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
98.1k
    _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
98.1k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
98.1k
    _operator_profile->add_child(_common_profile, true);
673
98.1k
    _operator_profile->add_child(_custom_profile, true);
674
675
98.1k
    _operator_profile->set_metadata(_parent->node_id());
676
98.1k
    _wait_for_finish_dependency_timer =
677
98.1k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
98.1k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
98.1k
    if constexpr (!is_fake_shared) {
680
98.1k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
98.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
98.2k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
98.2k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
98.2k
                                                  ? 0
688
98.2k
                                                  : info.task_idx]
689
98.2k
                                  .get();
690
98.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
98.1k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
98.1k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
98.1k
    }
702
703
98.1k
    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
98.1k
    _rows_input_counter =
708
98.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
98.1k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
98.1k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
98.1k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
98.1k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
98.1k
    _memory_used_counter =
714
98.1k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
98.1k
    _common_profile->add_info_string("IsColocate",
716
98.1k
                                     std::to_string(_parent->is_colocated_operator()));
717
98.1k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
98.1k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
98.1k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
98.1k
    return Status::OK();
721
98.1k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
131
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
131
    _operator_profile =
664
131
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
131
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
131
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
131
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
131
    _operator_profile->add_child(_common_profile, true);
673
131
    _operator_profile->add_child(_custom_profile, true);
674
675
131
    _operator_profile->set_metadata(_parent->node_id());
676
131
    _wait_for_finish_dependency_timer =
677
131
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
131
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
131
    if constexpr (!is_fake_shared) {
680
131
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
131
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
131
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
131
            _shared_state = info.shared_state->template cast<SharedState>();
696
131
            _dependency = _shared_state->create_sink_dependency(
697
131
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
131
        }
699
131
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
131
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
131
    }
702
703
131
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
131
    _rows_input_counter =
708
131
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
131
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
131
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
131
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
131
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
131
    _memory_used_counter =
714
131
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
131
    _common_profile->add_info_string("IsColocate",
716
131
                                     std::to_string(_parent->is_colocated_operator()));
717
131
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
131
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
131
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
131
    return Status::OK();
721
131
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
530k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
530k
    _operator_profile =
664
530k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
530k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
530k
    _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
530k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
530k
    _operator_profile->add_child(_common_profile, true);
673
530k
    _operator_profile->add_child(_custom_profile, true);
674
675
530k
    _operator_profile->set_metadata(_parent->node_id());
676
530k
    _wait_for_finish_dependency_timer =
677
530k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
530k
    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
530k
    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
530k
    _rows_input_counter =
708
530k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
530k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
530k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
530k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
530k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
530k
    _memory_used_counter =
714
530k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
530k
    _common_profile->add_info_string("IsColocate",
716
530k
                                     std::to_string(_parent->is_colocated_operator()));
717
530k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
530k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
530k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
530k
    return Status::OK();
721
530k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
10.1k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
10.1k
    _operator_profile =
664
10.1k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
10.1k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
10.1k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
10.1k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
10.1k
    _operator_profile->add_child(_common_profile, true);
673
10.1k
    _operator_profile->add_child(_custom_profile, true);
674
675
10.1k
    _operator_profile->set_metadata(_parent->node_id());
676
10.1k
    _wait_for_finish_dependency_timer =
677
10.1k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
10.1k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
10.1k
    if constexpr (!is_fake_shared) {
680
10.1k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
10.1k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
10.1k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
10.1k
            _shared_state = info.shared_state->template cast<SharedState>();
696
10.1k
            _dependency = _shared_state->create_sink_dependency(
697
10.1k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
10.1k
        }
699
10.1k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
10.1k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
10.1k
    }
702
703
10.1k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
10.1k
    _rows_input_counter =
708
10.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
10.1k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
10.1k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
10.1k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
10.1k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
10.1k
    _memory_used_counter =
714
10.1k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
10.1k
    _common_profile->add_info_string("IsColocate",
716
10.1k
                                     std::to_string(_parent->is_colocated_operator()));
717
10.1k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
10.1k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
10.1k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
10.1k
    return Status::OK();
721
10.1k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
790
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
790
    _operator_profile =
664
790
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
790
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
790
    _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
790
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
790
    _operator_profile->add_child(_common_profile, true);
673
790
    _operator_profile->add_child(_custom_profile, true);
674
675
790
    _operator_profile->set_metadata(_parent->node_id());
676
790
    _wait_for_finish_dependency_timer =
677
790
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
790
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
790
    if constexpr (!is_fake_shared) {
680
790
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
790
            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
790
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
790
            _shared_state = info.shared_state->template cast<SharedState>();
696
790
            _dependency = _shared_state->create_sink_dependency(
697
790
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
790
        }
699
790
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
790
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
790
    }
702
703
790
    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
790
    _rows_input_counter =
708
790
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
790
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
790
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
790
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
790
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
790
    _memory_used_counter =
714
790
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
790
    _common_profile->add_info_string("IsColocate",
716
790
                                     std::to_string(_parent->is_colocated_operator()));
717
790
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
790
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
790
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
790
    return Status::OK();
721
790
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
1.98k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
1.98k
    _operator_profile =
664
1.98k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
1.98k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
1.98k
    _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.98k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
1.98k
    _operator_profile->add_child(_common_profile, true);
673
1.98k
    _operator_profile->add_child(_custom_profile, true);
674
675
1.98k
    _operator_profile->set_metadata(_parent->node_id());
676
1.98k
    _wait_for_finish_dependency_timer =
677
1.98k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
1.98k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
1.98k
    if constexpr (!is_fake_shared) {
680
1.98k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
1.98k
            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.98k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
1.98k
            _shared_state = info.shared_state->template cast<SharedState>();
696
1.98k
            _dependency = _shared_state->create_sink_dependency(
697
1.98k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
1.98k
        }
699
1.98k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
1.98k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
1.98k
    }
702
703
1.98k
    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.98k
    _rows_input_counter =
708
1.98k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
1.98k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
1.98k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
1.98k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
1.98k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
1.98k
    _memory_used_counter =
714
1.98k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
1.98k
    _common_profile->add_info_string("IsColocate",
716
1.98k
                                     std::to_string(_parent->is_colocated_operator()));
717
1.98k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
1.98k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
1.98k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
1.98k
    return Status::OK();
721
1.98k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
13.0k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
13.0k
    _operator_profile =
664
13.0k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
13.0k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
13.0k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
13.0k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
13.0k
    _operator_profile->add_child(_common_profile, true);
673
13.0k
    _operator_profile->add_child(_custom_profile, true);
674
675
13.0k
    _operator_profile->set_metadata(_parent->node_id());
676
13.0k
    _wait_for_finish_dependency_timer =
677
13.0k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
13.0k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
13.0k
    if constexpr (!is_fake_shared) {
680
13.0k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
13.0k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
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.0k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
13.0k
            _shared_state = info.shared_state->template cast<SharedState>();
696
13.0k
            _dependency = _shared_state->create_sink_dependency(
697
13.0k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
13.0k
        }
699
13.0k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
13.0k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
13.0k
    }
702
703
13.0k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
13.0k
    _rows_input_counter =
708
13.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
13.0k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
13.0k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
13.0k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
13.0k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
13.0k
    _memory_used_counter =
714
13.0k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
13.0k
    _common_profile->add_info_string("IsColocate",
716
13.0k
                                     std::to_string(_parent->is_colocated_operator()));
717
13.0k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
13.0k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
13.0k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
13.0k
    return Status::OK();
721
13.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
285k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
285k
    _operator_profile =
664
285k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
285k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
285k
    _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
285k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
285k
    _operator_profile->add_child(_common_profile, true);
673
285k
    _operator_profile->add_child(_custom_profile, true);
674
675
285k
    _operator_profile->set_metadata(_parent->node_id());
676
285k
    _wait_for_finish_dependency_timer =
677
285k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
285k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
285k
    if constexpr (!is_fake_shared) {
680
285k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
285k
            info.shared_state_map.end()) {
682
285k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
285k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
285k
            }
685
285k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
285k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
285k
                                                  ? 0
688
285k
                                                  : info.task_idx]
689
285k
                                  .get();
690
285k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
18.4E
        } else {
692
18.4E
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
18.4E
                DCHECK(false);
694
18.4E
            }
695
18.4E
            _shared_state = info.shared_state->template cast<SharedState>();
696
18.4E
            _dependency = _shared_state->create_sink_dependency(
697
18.4E
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
18.4E
        }
699
285k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
285k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
285k
    }
702
703
285k
    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
285k
    _rows_input_counter =
708
285k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
285k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
285k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
285k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
285k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
285k
    _memory_used_counter =
714
285k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
285k
    _common_profile->add_info_string("IsColocate",
716
285k
                                     std::to_string(_parent->is_colocated_operator()));
717
285k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
285k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
285k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
285k
    return Status::OK();
721
285k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
452k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
452k
    _operator_profile =
664
452k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
452k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
452k
    _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
452k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
452k
    _operator_profile->add_child(_common_profile, true);
673
452k
    _operator_profile->add_child(_custom_profile, true);
674
675
452k
    _operator_profile->set_metadata(_parent->node_id());
676
452k
    _wait_for_finish_dependency_timer =
677
452k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
452k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
452k
    if constexpr (!is_fake_shared) {
680
452k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
452k
            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
452k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
452k
            _shared_state = info.shared_state->template cast<SharedState>();
696
452k
            _dependency = _shared_state->create_sink_dependency(
697
452k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
452k
        }
699
452k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
452k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
452k
    }
702
703
452k
    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
452k
    _rows_input_counter =
708
452k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
452k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
452k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
452k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
452k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
452k
    _memory_used_counter =
714
452k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
452k
    _common_profile->add_info_string("IsColocate",
716
452k
                                     std::to_string(_parent->is_colocated_operator()));
717
452k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
452k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
452k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
452k
    return Status::OK();
721
452k
}
_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.87M
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
1.87M
    if (_closed) {
726
2
        return Status::OK();
727
2
    }
728
1.87M
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
1.34M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
1.34M
    }
731
1.87M
    _closed = true;
732
1.87M
    return Status::OK();
733
1.87M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
118k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
118k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
118k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
118k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
118k
    }
731
118k
    _closed = true;
732
118k
    return Status::OK();
733
118k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
4
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
4
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
4
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
4
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
4
    }
731
4
    _closed = true;
732
4
    return Status::OK();
733
4
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
239k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
239k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
239k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
239k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
239k
    }
731
239k
    _closed = true;
732
239k
    return Status::OK();
733
239k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
155
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
155
    if (_closed) {
726
2
        return Status::OK();
727
2
    }
728
153
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
153
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
153
    }
731
153
    _closed = true;
732
153
    return Status::OK();
733
155
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
5.53k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
5.53k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
5.53k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
5.53k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
5.53k
    }
731
5.53k
    _closed = true;
732
5.53k
    return Status::OK();
733
5.53k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
11.2k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
11.2k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
11.2k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
11.2k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
11.2k
    }
731
11.2k
    _closed = true;
732
11.2k
    return Status::OK();
733
11.2k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
107k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
107k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
107k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
107k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
107k
    }
731
107k
    _closed = true;
732
107k
    return Status::OK();
733
107k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
97.8k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
97.8k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
97.8k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
97.8k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
97.8k
    }
731
97.8k
    _closed = true;
732
97.8k
    return Status::OK();
733
97.8k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
119
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
119
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
119
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
119
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
119
    }
731
119
    _closed = true;
732
119
    return Status::OK();
733
119
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
532k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
532k
    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
532k
    _closed = true;
732
532k
    return Status::OK();
733
532k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
10.2k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
10.2k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
10.2k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
10.2k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
10.2k
    }
731
10.2k
    _closed = true;
732
10.2k
    return Status::OK();
733
10.2k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
685
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
685
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
685
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
685
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
685
    }
731
685
    _closed = true;
732
685
    return Status::OK();
733
685
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
1.99k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
1.99k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
1.99k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
1.99k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
1.99k
    }
731
1.99k
    _closed = true;
732
1.99k
    return Status::OK();
733
1.99k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
12.9k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
12.9k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
12.9k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
12.9k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
12.9k
    }
731
12.9k
    _closed = true;
732
12.9k
    return Status::OK();
733
12.9k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
286k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
286k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
286k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
286k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
286k
    }
731
286k
    _closed = true;
732
286k
    return Status::OK();
733
286k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
453k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
453k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
453k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
453k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
453k
    }
731
453k
    _closed = true;
732
453k
    return Status::OK();
733
453k
}
_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.26k
                                                          bool* eos) {
738
1.26k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
1.26k
    return pull(state, block, eos);
740
1.26k
}
_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.22k
                                                          bool* eos) {
738
1.22k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
1.22k
    return pull(state, block, eos);
740
1.22k
}
741
742
template <typename LocalStateType>
743
Status StatefulOperatorX<LocalStateType>::get_block_impl(RuntimeState* state, Block* block,
744
486k
                                                         bool* eos) {
745
486k
    auto& local_state = get_local_state(state);
746
486k
    if (need_more_input_data(state)) {
747
453k
        local_state._child_block->clear_column_data(
748
453k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
453k
                        .num_slots());
750
453k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
453k
                state, local_state._child_block.get(), &local_state._child_eos));
752
453k
        *eos = local_state._child_eos;
753
453k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
46.1k
            return Status::OK();
755
46.1k
        }
756
407k
        {
757
407k
            SCOPED_TIMER(local_state.exec_time_counter());
758
407k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
407k
        }
760
407k
    }
761
762
440k
    if (!need_more_input_data(state)) {
763
415k
        SCOPED_TIMER(local_state.exec_time_counter());
764
415k
        bool new_eos = false;
765
415k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
415k
        if (new_eos) {
767
339k
            *eos = true;
768
339k
        } else if (!need_more_input_data(state)) {
769
25.9k
            *eos = false;
770
25.9k
        }
771
415k
    }
772
440k
    return Status::OK();
773
440k
}
_ZN5doris17StatefulOperatorXINS_23HashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
128k
                                                         bool* eos) {
745
128k
    auto& local_state = get_local_state(state);
746
128k
    if (need_more_input_data(state)) {
747
109k
        local_state._child_block->clear_column_data(
748
109k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
109k
                        .num_slots());
750
109k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
109k
                state, local_state._child_block.get(), &local_state._child_eos));
752
109k
        *eos = local_state._child_eos;
753
109k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
26.9k
            return Status::OK();
755
26.9k
        }
756
82.5k
        {
757
82.5k
            SCOPED_TIMER(local_state.exec_time_counter());
758
82.5k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
82.5k
        }
760
82.5k
    }
761
762
102k
    if (!need_more_input_data(state)) {
763
102k
        SCOPED_TIMER(local_state.exec_time_counter());
764
102k
        bool new_eos = false;
765
102k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
102k
        if (new_eos) {
767
46.3k
            *eos = true;
768
55.6k
        } else if (!need_more_input_data(state)) {
769
11.6k
            *eos = false;
770
11.6k
        }
771
102k
    }
772
102k
    return Status::OK();
773
102k
}
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_34PartitionedHashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
_ZN5doris17StatefulOperatorXINS_16RepeatLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
4.48k
                                                         bool* eos) {
745
4.48k
    auto& local_state = get_local_state(state);
746
4.48k
    if (need_more_input_data(state)) {
747
2.63k
        local_state._child_block->clear_column_data(
748
2.63k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
2.63k
                        .num_slots());
750
2.63k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
2.63k
                state, local_state._child_block.get(), &local_state._child_eos));
752
2.63k
        *eos = local_state._child_eos;
753
2.63k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
597
            return Status::OK();
755
597
        }
756
2.04k
        {
757
2.04k
            SCOPED_TIMER(local_state.exec_time_counter());
758
2.04k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
2.04k
        }
760
2.04k
    }
761
762
3.91k
    if (!need_more_input_data(state)) {
763
3.91k
        SCOPED_TIMER(local_state.exec_time_counter());
764
3.91k
        bool new_eos = false;
765
3.91k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
3.91k
        if (new_eos) {
767
1.52k
            *eos = true;
768
2.38k
        } else if (!need_more_input_data(state)) {
769
1.85k
            *eos = false;
770
1.85k
        }
771
3.91k
    }
772
3.89k
    return Status::OK();
773
3.89k
}
_ZN5doris17StatefulOperatorXINS_25MaterializationLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
1.84k
                                                         bool* eos) {
745
1.84k
    auto& local_state = get_local_state(state);
746
1.84k
    if (need_more_input_data(state)) {
747
1.84k
        local_state._child_block->clear_column_data(
748
1.84k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
1.84k
                        .num_slots());
750
1.84k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
1.84k
                state, local_state._child_block.get(), &local_state._child_eos));
752
1.84k
        *eos = local_state._child_eos;
753
1.84k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
793
            return Status::OK();
755
793
        }
756
1.05k
        {
757
1.05k
            SCOPED_TIMER(local_state.exec_time_counter());
758
1.05k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
1.05k
        }
760
1.05k
    }
761
762
1.05k
    if (!need_more_input_data(state)) {
763
1.05k
        SCOPED_TIMER(local_state.exec_time_counter());
764
1.05k
        bool new_eos = false;
765
1.05k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
1.05k
        if (new_eos) {
767
802
            *eos = true;
768
802
        } else if (!need_more_input_data(state)) {
769
0
            *eos = false;
770
0
        }
771
1.05k
    }
772
1.05k
    return Status::OK();
773
1.05k
}
_ZN5doris17StatefulOperatorXINS_22StreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
18.7k
                                                         bool* eos) {
745
18.7k
    auto& local_state = get_local_state(state);
746
18.7k
    if (need_more_input_data(state)) {
747
18.7k
        local_state._child_block->clear_column_data(
748
18.7k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
18.7k
                        .num_slots());
750
18.7k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
18.7k
                state, local_state._child_block.get(), &local_state._child_eos));
752
18.7k
        *eos = local_state._child_eos;
753
18.7k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
3.78k
            return Status::OK();
755
3.78k
        }
756
14.9k
        {
757
14.9k
            SCOPED_TIMER(local_state.exec_time_counter());
758
14.9k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
14.9k
        }
760
14.9k
    }
761
762
14.9k
    if (!need_more_input_data(state)) {
763
8.01k
        SCOPED_TIMER(local_state.exec_time_counter());
764
8.01k
        bool new_eos = false;
765
8.01k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
8.01k
        if (new_eos) {
767
7.83k
            *eos = true;
768
7.83k
        } else if (!need_more_input_data(state)) {
769
9
            *eos = false;
770
9
        }
771
8.01k
    }
772
14.9k
    return Status::OK();
773
14.9k
}
_ZN5doris17StatefulOperatorXINS_30DistinctStreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
302k
                                                         bool* eos) {
745
302k
    auto& local_state = get_local_state(state);
746
302k
    if (need_more_input_data(state)) {
747
302k
        local_state._child_block->clear_column_data(
748
302k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
302k
                        .num_slots());
750
302k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
302k
                state, local_state._child_block.get(), &local_state._child_eos));
752
302k
        *eos = local_state._child_eos;
753
302k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
12.4k
            return Status::OK();
755
12.4k
        }
756
290k
        {
757
290k
            SCOPED_TIMER(local_state.exec_time_counter());
758
290k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
290k
        }
760
290k
    }
761
762
289k
    if (!need_more_input_data(state)) {
763
272k
        SCOPED_TIMER(local_state.exec_time_counter());
764
272k
        bool new_eos = false;
765
272k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
272k
        if (new_eos) {
767
271k
            *eos = true;
768
271k
        } else if (!need_more_input_data(state)) {
769
6
            *eos = false;
770
6
        }
771
272k
    }
772
289k
    return Status::OK();
773
289k
}
_ZN5doris17StatefulOperatorXINS_29NestedLoopJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
21.6k
                                                         bool* eos) {
745
21.6k
    auto& local_state = get_local_state(state);
746
21.6k
    if (need_more_input_data(state)) {
747
9.61k
        local_state._child_block->clear_column_data(
748
9.61k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
9.61k
                        .num_slots());
750
9.61k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
9.61k
                state, local_state._child_block.get(), &local_state._child_eos));
752
9.61k
        *eos = local_state._child_eos;
753
9.61k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
612
            return Status::OK();
755
612
        }
756
9.00k
        {
757
9.00k
            SCOPED_TIMER(local_state.exec_time_counter());
758
9.00k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
9.00k
        }
760
9.00k
    }
761
762
21.0k
    if (!need_more_input_data(state)) {
763
20.4k
        SCOPED_TIMER(local_state.exec_time_counter());
764
20.4k
        bool new_eos = false;
765
20.4k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
20.4k
        if (new_eos) {
767
5.51k
            *eos = true;
768
14.9k
        } else if (!need_more_input_data(state)) {
769
12.0k
            *eos = false;
770
12.0k
        }
771
20.4k
    }
772
21.0k
    return Status::OK();
773
21.0k
}
_ZN5doris17StatefulOperatorXINS_23TableFunctionLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
8.56k
                                                         bool* eos) {
745
8.56k
    auto& local_state = get_local_state(state);
746
8.56k
    if (need_more_input_data(state)) {
747
8.19k
        local_state._child_block->clear_column_data(
748
8.19k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
8.19k
                        .num_slots());
750
8.19k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
8.19k
                state, local_state._child_block.get(), &local_state._child_eos));
752
8.19k
        *eos = local_state._child_eos;
753
8.19k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
963
            return Status::OK();
755
963
        }
756
7.23k
        {
757
7.23k
            SCOPED_TIMER(local_state.exec_time_counter());
758
7.23k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
7.23k
        }
760
7.23k
    }
761
762
7.60k
    if (!need_more_input_data(state)) {
763
7.60k
        SCOPED_TIMER(local_state.exec_time_counter());
764
7.60k
        bool new_eos = false;
765
7.60k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
7.60k
        if (new_eos) {
767
5.34k
            *eos = true;
768
5.34k
        } else if (!need_more_input_data(state)) {
769
366
            *eos = false;
770
366
        }
771
7.60k
    }
772
7.59k
    return Status::OK();
773
7.59k
}
774
775
template <typename Writer, typename Parent>
776
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
777
50.0k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
50.0k
    RETURN_IF_ERROR(Base::init(state, info));
779
50.0k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
50.0k
                                                         "AsyncWriterDependency", true);
781
50.0k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
50.0k
                             _finish_dependency));
783
784
50.0k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
50.0k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
50.0k
    return Status::OK();
787
50.0k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
366
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
366
    RETURN_IF_ERROR(Base::init(state, info));
779
366
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
366
                                                         "AsyncWriterDependency", true);
781
366
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
366
                             _finish_dependency));
783
784
366
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
366
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
366
    return Status::OK();
787
366
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
49.6k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
49.6k
    RETURN_IF_ERROR(Base::init(state, info));
779
49.6k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
49.6k
                                                         "AsyncWriterDependency", true);
781
49.6k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
49.6k
                             _finish_dependency));
783
784
49.6k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
49.6k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
49.6k
    return Status::OK();
787
49.6k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
34
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
34
    RETURN_IF_ERROR(Base::init(state, info));
779
34
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
34
                                                         "AsyncWriterDependency", true);
781
34
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
34
                             _finish_dependency));
783
784
34
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
34
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
34
    return Status::OK();
787
34
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
16
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
16
    RETURN_IF_ERROR(Base::init(state, info));
779
16
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
16
                                                         "AsyncWriterDependency", true);
781
16
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
16
                             _finish_dependency));
783
784
16
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
16
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
16
    return Status::OK();
787
16
}
788
789
template <typename Writer, typename Parent>
790
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
791
50.5k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
50.5k
    RETURN_IF_ERROR(Base::open(state));
793
50.5k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
386k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
336k
        RETURN_IF_ERROR(
796
336k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
336k
    }
798
50.5k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
50.5k
    return Status::OK();
800
50.5k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
366
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
366
    RETURN_IF_ERROR(Base::open(state));
793
366
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
1.85k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
1.48k
        RETURN_IF_ERROR(
796
1.48k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
1.48k
    }
798
366
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
366
    return Status::OK();
800
366
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
50.1k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
50.1k
    RETURN_IF_ERROR(Base::open(state));
793
50.1k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
384k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
334k
        RETURN_IF_ERROR(
796
334k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
334k
    }
798
50.1k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
50.1k
    return Status::OK();
800
50.1k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
34
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
34
    RETURN_IF_ERROR(Base::open(state));
793
34
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
612
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
578
        RETURN_IF_ERROR(
796
578
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
578
    }
798
34
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
34
    return Status::OK();
800
34
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
16
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
16
    RETURN_IF_ERROR(Base::open(state));
793
16
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
33
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
17
        RETURN_IF_ERROR(
796
17
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
17
    }
798
16
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
16
    return Status::OK();
800
16
}
801
802
template <typename Writer, typename Parent>
803
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
804
66.2k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
66.2k
    return _writer->sink(block, eos);
806
66.2k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
1.45k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
1.45k
    return _writer->sink(block, eos);
806
1.45k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
64.6k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
64.6k
    return _writer->sink(block, eos);
806
64.6k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
34
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
34
    return _writer->sink(block, eos);
806
34
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
52
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
52
    return _writer->sink(block, eos);
806
52
}
807
808
template <typename Writer, typename Parent>
809
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
810
50.6k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
50.6k
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
50.6k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
50.6k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
816
    // if the init failed, the _writer may be nullptr. so here need check
817
50.7k
    if (_writer) {
818
50.7k
        Status st = _writer->get_writer_status();
819
50.7k
        if (exec_status.ok()) {
820
50.5k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
50.5k
                                                       : Status::Cancelled("force close"));
822
50.5k
        } else {
823
148
            _writer->force_close(exec_status);
824
148
        }
825
        // If there is an error in process_block thread, then we should get the writer
826
        // status before call force_close. For example, the thread may failed in commit
827
        // transaction.
828
50.7k
        RETURN_IF_ERROR(st);
829
50.7k
    }
830
50.6k
    return Base::close(state, exec_status);
831
50.6k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
355
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
355
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
355
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
355
    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
355
    if (_writer) {
818
355
        Status st = _writer->get_writer_status();
819
355
        if (exec_status.ok()) {
820
355
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
355
                                                       : Status::Cancelled("force close"));
822
355
        } 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
355
        RETURN_IF_ERROR(st);
829
355
    }
830
355
    return Base::close(state, exec_status);
831
355
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
50.2k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
50.2k
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
50.2k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
50.2k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
816
    // if the init failed, the _writer may be nullptr. so here need check
817
50.3k
    if (_writer) {
818
50.3k
        Status st = _writer->get_writer_status();
819
50.3k
        if (exec_status.ok()) {
820
50.1k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
50.1k
                                                       : Status::Cancelled("force close"));
822
50.1k
        } else {
823
148
            _writer->force_close(exec_status);
824
148
        }
825
        // If there is an error in process_block thread, then we should get the writer
826
        // status before call force_close. For example, the thread may failed in commit
827
        // transaction.
828
50.3k
        RETURN_IF_ERROR(st);
829
50.3k
    }
830
50.2k
    return Base::close(state, exec_status);
831
50.2k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
34
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
34
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
34
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
34
    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
34
    if (_writer) {
818
34
        Status st = _writer->get_writer_status();
819
34
        if (exec_status.ok()) {
820
34
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
34
                                                       : Status::Cancelled("force close"));
822
34
        } 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
34
        RETURN_IF_ERROR(st);
829
34
    }
830
34
    return Base::close(state, exec_status);
831
34
}
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