Coverage Report

Created: 2026-10-30 14:57

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.80M
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
1.80M
    if (_parent->nereids_id() == -1) {
123
949k
        return fmt::format("(id={})", _parent->node_id());
124
949k
    } else {
125
859k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
859k
    }
127
1.80M
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
67.2k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
67.2k
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
67.2k
    } else {
125
67.2k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
67.2k
    }
127
67.2k
}
_ZNK5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
4
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
4
    if (_parent->nereids_id() == -1) {
123
1
        return fmt::format("(id={})", _parent->node_id());
124
3
    } else {
125
3
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
3
    }
127
4
}
_ZNK5doris19PipelineXLocalStateINS_15SortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
231k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
231k
    if (_parent->nereids_id() == -1) {
123
12
        return fmt::format("(id={})", _parent->node_id());
124
231k
    } else {
125
231k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
231k
    }
127
231k
}
_ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
159
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
159
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
159
    } else {
125
159
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
159
    }
127
159
}
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
5.94k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
5.94k
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
5.94k
    } else {
125
5.94k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
5.94k
    }
127
5.94k
}
_ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
9.45k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
9.45k
    if (_parent->nereids_id() == -1) {
123
60
        return fmt::format("(id={})", _parent->node_id());
124
9.39k
    } else {
125
9.39k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
9.39k
    }
127
9.45k
}
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
100k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
100k
    if (_parent->nereids_id() == -1) {
123
29
        return fmt::format("(id={})", _parent->node_id());
124
100k
    } else {
125
100k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
100k
    }
127
100k
}
_ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
78.4k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
78.4k
    if (_parent->nereids_id() == -1) {
123
2
        return fmt::format("(id={})", _parent->node_id());
124
78.4k
    } else {
125
78.4k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
78.4k
    }
127
78.4k
}
_ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
129
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
129
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
129
    } else {
125
129
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
129
    }
127
129
}
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
582k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
582k
    if (_parent->nereids_id() == -1) {
123
277k
        return fmt::format("(id={})", _parent->node_id());
124
305k
    } else {
125
305k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
305k
    }
127
582k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
56.2k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
56.2k
    if (_parent->nereids_id() == -1) {
123
2
        return fmt::format("(id={})", _parent->node_id());
124
56.2k
    } else {
125
56.2k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
56.2k
    }
127
56.2k
}
_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.79k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
4.79k
    if (_parent->nereids_id() == -1) {
123
4.79k
        return fmt::format("(id={})", _parent->node_id());
124
4.79k
    } else {
125
1
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
1
    }
127
4.79k
}
_ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
463
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
463
    if (_parent->nereids_id() == -1) {
123
102
        return fmt::format("(id={})", _parent->node_id());
124
361
    } else {
125
361
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
361
    }
127
463
}
_ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
5.15k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
5.15k
    if (_parent->nereids_id() == -1) {
123
13
        return fmt::format("(id={})", _parent->node_id());
124
5.14k
    } else {
125
5.14k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
5.14k
    }
127
5.15k
}
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
666k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
667k
    if (_parent->nereids_id() == -1) {
123
667k
        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
666k
}
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.25M
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
1.25M
    if (_parent->nereids_id() == -1) {
132
699k
        return fmt::format("(id={})", _parent->node_id());
133
699k
    } else {
134
554k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
554k
    }
136
1.25M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
115k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
115k
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
115k
    } else {
134
115k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
115k
    }
136
115k
}
_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
234k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
234k
    if (_parent->nereids_id() == -1) {
132
9
        return fmt::format("(id={})", _parent->node_id());
133
234k
    } else {
134
234k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
234k
    }
136
234k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
166
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
166
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
166
    } else {
134
166
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
166
    }
136
166
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
5.93k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
5.93k
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
5.93k
    } else {
134
5.93k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
5.93k
    }
136
5.93k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
9.52k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
9.52k
    if (_parent->nereids_id() == -1) {
132
60
        return fmt::format("(id={})", _parent->node_id());
133
9.46k
    } else {
134
9.46k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
9.46k
    }
136
9.52k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
100k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
100k
    if (_parent->nereids_id() == -1) {
132
29
        return fmt::format("(id={})", _parent->node_id());
133
100k
    } else {
134
100k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
100k
    }
136
100k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
78.0k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
78.0k
    if (_parent->nereids_id() == -1) {
132
4
        return fmt::format("(id={})", _parent->node_id());
133
78.0k
    } else {
134
78.0k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
78.0k
    }
136
78.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
139
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
139
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
139
    } else {
134
139
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
139
    }
136
139
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
31
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
31
    if (_parent->nereids_id() == -1) {
132
31
        return fmt::format("(id={})", _parent->node_id());
133
31
    } else {
134
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
0
    }
136
31
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
10.0k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
10.0k
    if (_parent->nereids_id() == -1) {
132
3
        return fmt::format("(id={})", _parent->node_id());
133
10.0k
    } else {
134
10.0k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
10.0k
    }
136
10.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
462
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
462
    if (_parent->nereids_id() == -1) {
132
102
        return fmt::format("(id={})", _parent->node_id());
133
360
    } else {
134
360
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
360
    }
136
462
}
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
259k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
259k
    if (_parent->nereids_id() == -1) {
132
259k
        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
259k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
426k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
426k
    if (_parent->nereids_id() == -1) {
132
426k
        return fmt::format("(id={})", _parent->node_id());
133
426k
    } else {
134
14
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
14
    }
136
426k
}
_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.2k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
32.2k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
32.2k
    _terminated = true;
144
32.2k
    return Status::OK();
145
32.2k
}
_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.89k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
3.89k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
3.89k
    _terminated = true;
144
3.89k
    return Status::OK();
145
3.89k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
4
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
4
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
4
    _terminated = true;
144
4
    return Status::OK();
145
4
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
1.69k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
1.69k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
1.69k
    _terminated = true;
144
1.69k
    return Status::OK();
145
1.69k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
793
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
793
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
793
    _terminated = true;
144
793
    return Status::OK();
145
793
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
718
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
718
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
718
    _terminated = true;
144
718
    return Status::OK();
145
718
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
396
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
396
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
396
    _terminated = true;
144
396
    return Status::OK();
145
396
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
4
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
4
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
4
    _terminated = true;
144
4
    return Status::OK();
145
4
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
79
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
79
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
79
    _terminated = true;
144
79
    return Status::OK();
145
79
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
11
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
11
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
11
    _terminated = true;
144
11
    return Status::OK();
145
11
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
468
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
468
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
468
    _terminated = true;
144
468
    return Status::OK();
145
468
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
131
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
131
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
131
    _terminated = true;
144
131
    return Status::OK();
145
131
}
146
147
322k
DataDistribution OperatorBase::required_data_distribution(RuntimeState* /*state*/) const {
148
322k
    return _child && _child->is_serial_operator() && !is_source()
149
322k
                   ? DataDistribution(TLocalPartitionType::PASSTHROUGH)
150
322k
                   : DataDistribution(TLocalPartitionType::NOOP);
151
322k
}
152
153
27.9k
bool OperatorBase::child_breaks_local_key_distribution(RuntimeState* state) const {
154
27.9k
    if (!_child) {
155
27.2k
        return false;
156
27.2k
    }
157
657
    if (_child->is_serial_operator()) {
158
56
        return true;
159
56
    }
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
657
}
164
165
template <typename SharedStateArg>
166
13.5k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
13.5k
    fmt::memory_buffer debug_string_buffer;
168
13.5k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
13.5k
    return fmt::to_string(debug_string_buffer);
170
13.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
2
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
2
    fmt::memory_buffer debug_string_buffer;
168
2
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
2
    return fmt::to_string(debug_string_buffer);
170
2
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
2
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
2
    fmt::memory_buffer debug_string_buffer;
168
2
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
2
    return fmt::to_string(debug_string_buffer);
170
2
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
46
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
46
    fmt::memory_buffer debug_string_buffer;
168
46
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
46
    return fmt::to_string(debug_string_buffer);
170
46
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
13.4k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
13.4k
    fmt::memory_buffer debug_string_buffer;
168
13.4k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
13.4k
    return fmt::to_string(debug_string_buffer);
170
13.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
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
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
171
172
template <typename SharedStateArg>
173
13.5k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
13.5k
    fmt::memory_buffer debug_string_buffer;
175
13.5k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
13.5k
    return fmt::to_string(debug_string_buffer);
177
13.5k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
2
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
2
    fmt::memory_buffer debug_string_buffer;
175
2
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
2
    return fmt::to_string(debug_string_buffer);
177
2
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
46
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
46
    fmt::memory_buffer debug_string_buffer;
175
46
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
46
    return fmt::to_string(debug_string_buffer);
177
46
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
32
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
32
    fmt::memory_buffer debug_string_buffer;
175
32
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
32
    return fmt::to_string(debug_string_buffer);
177
32
}
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
4
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
4
    fmt::memory_buffer debug_string_buffer;
175
4
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
4
    return fmt::to_string(debug_string_buffer);
177
4
}
_ZNK5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
13.4k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
13.4k
    fmt::memory_buffer debug_string_buffer;
175
13.4k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
13.4k
    return fmt::to_string(debug_string_buffer);
177
13.4k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
178
179
13.5k
std::string OperatorXBase::debug_string(int indentation_level) const {
180
13.5k
    fmt::memory_buffer debug_string_buffer;
181
13.5k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, parallel_tasks={}, _is_serial_operator={}",
182
13.5k
                   std::string(indentation_level * 2, ' '), _op_name, node_id(), _parallel_tasks,
183
13.5k
                   _is_serial_operator);
184
13.5k
    return fmt::to_string(debug_string_buffer);
185
13.5k
}
186
187
13.5k
std::string OperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
188
13.5k
    return state->get_local_state(operator_id())->debug_string(indentation_level);
189
13.5k
}
190
191
707k
Status OperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
192
707k
    std::string node_name = print_plan_node_type(tnode.node_type);
193
707k
    _nereids_id = tnode.nereids_id;
194
707k
    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
707k
    auto substr = node_name.substr(0, node_name.find("_NODE"));
208
707k
    _op_name = substr + "_OPERATOR";
209
210
707k
    if (tnode.__isset.vconjunct) {
211
0
        return Status::InternalError("vconjunct is not supported yet");
212
707k
    } 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
707k
    if (tnode.__isset.projections) {
222
276k
        RETURN_IF_ERROR(VExpr::create_expr_trees(tnode.projections, _projection->projections));
223
276k
    }
224
707k
    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
707k
    return Status::OK();
234
707k
}
235
236
733k
Status OperatorXBase::prepare(RuntimeState* state) {
237
733k
    for (auto& conjunct : _conjuncts) {
238
284k
        RETURN_IF_ERROR(conjunct->prepare(state, operator_row_desc_before_projection()));
239
284k
    }
240
733k
    if (state->enable_adjust_conjunct_order_by_cost()) {
241
683k
        std::ranges::stable_sort(_conjuncts, [](const auto& a, const auto& b) {
242
348k
            return a->execute_cost() < b->execute_cost();
243
348k
        });
244
683k
    };
245
246
733k
    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
733k
    for (auto& conjunct : _conjuncts) {
266
284k
        RETURN_IF_ERROR(conjunct->open(state));
267
284k
    }
268
733k
    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
733k
    if (_child && !is_source()) {
275
99.6k
        RETURN_IF_ERROR(_child->prepare(state));
276
99.6k
    }
277
278
733k
    if (VExpr::contains_blockable_function(_conjuncts) ||
279
733k
        (has_projection() && VExpr::contains_blockable_function(_projection->projections))) {
280
0
        _blockable = true;
281
0
    }
282
283
733k
    return Status::OK();
284
733k
}
285
286
8.95k
Status OperatorXBase::terminate(RuntimeState* state) {
287
8.95k
    if (_child && !is_source()) {
288
715
        RETURN_IF_ERROR(_child->terminate(state));
289
715
    }
290
8.95k
    auto result = state->get_local_state_result(operator_id());
291
8.95k
    if (!result) {
292
0
        return result.error();
293
0
    }
294
8.95k
    return result.value()->terminate(state);
295
8.95k
}
296
297
4.81M
Status OperatorXBase::close(RuntimeState* state) {
298
4.81M
    if (_child && !is_source()) {
299
729k
        RETURN_IF_ERROR(_child->close(state));
300
729k
    }
301
4.81M
    auto result = state->get_local_state_result(operator_id());
302
4.81M
    if (!result) {
303
0
        return result.error();
304
0
    }
305
4.81M
    return result.value()->close(state);
306
4.81M
}
307
308
298k
void PipelineXLocalStateBase::clear_origin_block() {
309
298k
    _origin_block.clear_column_data(_parent->operator_row_desc_before_projection().num_slots());
310
298k
}
311
312
803k
Status PipelineXLocalStateBase::filter_block(const VExprContextSPtrs& expr_contexts, Block* block) {
313
803k
    RETURN_IF_ERROR(VExprContext::filter_block(expr_contexts, block, block->columns()));
314
315
803k
    _estimate_memory_usage += VExprContext::get_memory_usage(expr_contexts);
316
803k
    return Status::OK();
317
803k
}
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
298k
                                     Block* output_block) const {
326
298k
    auto* local_state = state->get_local_state(operator_id());
327
298k
    SCOPED_TIMER(local_state->exec_time_counter());
328
298k
    SCOPED_TIMER(local_state->_projection_timer);
329
298k
    const size_t rows = origin_block->rows();
330
298k
    if (rows == 0) {
331
153k
        return Status::OK();
332
153k
    }
333
145k
    SCOPED_PEAK_MEM(&local_state->_estimate_memory_usage);
334
335
145k
    {
336
145k
        Block input_block = *origin_block;
337
338
145k
        ColumnsWithTypeAndName new_columns;
339
145k
        for (const auto& projections : local_state->_intermediate_projections) {
340
5.41k
            if (projections.empty()) {
341
0
                return Status::InternalError("meet empty intermediate projection, node id: {}",
342
0
                                             node_id());
343
0
            }
344
5.41k
            new_columns.resize(projections.size());
345
125k
            for (int i = 0; i < projections.size(); i++) {
346
119k
                RETURN_IF_ERROR(projections[i]->execute(&input_block, new_columns[i]));
347
119k
                if (new_columns[i].column->size() != rows) {
348
0
                    return Status::InternalError(
349
0
                            "intermediate projection result column size {} not equal input rows "
350
0
                            "{}, expr: {}",
351
0
                            new_columns[i].column->size(), rows,
352
0
                            projections[i]->root()->debug_string());
353
0
                }
354
119k
            }
355
5.39k
            Block tmp_block {new_columns};
356
5.39k
            input_block.swap(tmp_block);
357
5.39k
        }
358
359
145k
        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
145k
        auto scoped_mutable_block = VectorizedUtils::build_scoped_mutable_mem_reuse_block(
367
145k
                output_block, _projection->output_row_descriptor);
368
145k
        auto& mutable_columns = scoped_mutable_block.mutable_columns();
369
145k
        DCHECK_EQ(mutable_columns.size(), local_state->_projections.size()) << debug_string();
370
145k
        Columns shared_columns(mutable_columns.size());
371
372
826k
        for (int i = 0; i < mutable_columns.size(); ++i) {
373
681k
            ColumnPtr column_ptr;
374
681k
            RETURN_IF_ERROR(local_state->_projections[i]->execute(&input_block, column_ptr));
375
681k
            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
681k
            column_ptr = column_ptr->convert_to_full_column_if_const();
382
681k
            if (is_column_nullable(*mutable_columns[i]) && !is_column_nullable(*column_ptr)) {
383
0
                column_ptr = make_nullable(column_ptr, false);
384
0
            }
385
681k
            if (column_ptr->is_exclusive()) {
386
240k
                mutable_columns[i] = IColumn::mutate(std::move(column_ptr));
387
441k
            } else {
388
441k
                shared_columns[i] = std::move(column_ptr);
389
441k
            }
390
681k
        }
391
392
145k
        scoped_mutable_block.restore();
393
826k
        for (int i = 0; i < shared_columns.size(); ++i) {
394
681k
            if (shared_columns[i]) {
395
441k
                output_block->replace_by_position(i, std::move(shared_columns[i]));
396
441k
            }
397
681k
        }
398
145k
    }
399
400
0
    origin_block->clear_column_data(
401
145k
            local_state->_parent->operator_row_desc_before_projection().num_slots());
402
145k
    DCHECK_EQ(output_block->rows(), rows);
403
404
145k
    return Status::OK();
405
145k
}
406
407
4.23M
Status OperatorXBase::get_block_after_projects(RuntimeState* state, Block* block, bool* eos) {
408
4.23M
    DBUG_EXECUTE_IF("Pipeline::return_empty_block", {
409
4.23M
        if (this->_op_name == "AGGREGATION_OPERATOR" || this->_op_name == "HASH_JOIN_OPERATOR" ||
410
4.23M
            this->_op_name == "PARTITIONED_AGGREGATION_OPERATOR" ||
411
4.23M
            this->_op_name == "PARTITIONED_HASH_JOIN_OPERATOR" ||
412
4.23M
            this->_op_name == "CROSS_JOIN_OPERATOR" || this->_op_name == "SORT_OPERATOR") {
413
4.23M
            if (_debug_point_count++ % 2 == 0) {
414
4.23M
                return Status::OK();
415
4.23M
            }
416
4.23M
        }
417
4.23M
    });
418
419
4.23M
    Status status;
420
4.23M
    auto* local_state = state->get_local_state(operator_id());
421
4.23M
    Defer defer([&]() {
422
4.23M
        if (status.ok()) {
423
4.23M
            local_state->update_output_block_counters(*block);
424
4.23M
        }
425
4.23M
    });
426
4.23M
    if (has_projection()) {
427
298k
        local_state->clear_origin_block();
428
298k
        status = get_block(state, &local_state->_origin_block, eos);
429
298k
        if (UNLIKELY(!status.ok())) {
430
44
            return status;
431
44
        }
432
298k
        status = do_projections(state, &local_state->_origin_block, block);
433
298k
        return status;
434
298k
    }
435
3.93M
    status = get_block(state, block, eos);
436
3.93M
    RETURN_IF_ERROR(block->check_type_and_column());
437
3.93M
    return status;
438
3.93M
}
439
440
2.88M
void PipelineXLocalStateBase::reached_limit(Block* block, bool* eos) {
441
2.88M
    if (_parent->_limit != -1 and _num_rows_returned + block->rows() >= _parent->_limit) {
442
10.0k
        block->set_num_rows(_parent->_limit - _num_rows_returned);
443
10.0k
        *eos = true;
444
10.0k
    }
445
446
2.88M
    DBUG_EXECUTE_IF("Pipeline::reached_limit_early", {
447
2.88M
        auto op_name = to_lower(_parent->_op_name);
448
2.88M
        auto arg_op_name = dp->param<std::string>("op_name");
449
2.88M
        arg_op_name = to_lower(arg_op_name);
450
451
2.88M
        if (op_name == arg_op_name) {
452
2.88M
            *eos = true;
453
2.88M
        }
454
2.88M
    });
455
456
2.88M
    if (auto rows = block->rows()) {
457
809k
        _num_rows_returned += rows;
458
809k
        _state->get_query_ctx()->resource_ctx()->io_context()->update_process_rows(rows);
459
809k
    }
460
2.88M
}
461
462
32.2k
Status DataSinkOperatorXBase::terminate(RuntimeState* state) {
463
32.2k
    auto result = state->get_sink_local_state_result();
464
32.2k
    if (!result) {
465
0
        return result.error();
466
0
    }
467
32.2k
    return result.value()->terminate(state);
468
32.2k
}
469
470
13.5k
std::string DataSinkOperatorXBase::debug_string(int indentation_level) const {
471
13.5k
    fmt::memory_buffer debug_string_buffer;
472
473
13.5k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, _is_serial_operator={}",
474
13.5k
                   std::string(indentation_level * 2, ' '), _name, node_id(), _is_serial_operator);
475
13.5k
    return fmt::to_string(debug_string_buffer);
476
13.5k
}
477
478
13.5k
std::string DataSinkOperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
479
13.5k
    return state->get_sink_local_state()->debug_string(indentation_level);
480
13.5k
}
481
482
365k
Status DataSinkOperatorXBase::init(const TDataSink& tsink) {
483
365k
    std::string op_name = "UNKNOWN_SINK";
484
365k
    auto it = _TDataSinkType_VALUES_TO_NAMES.find(tsink.type);
485
486
366k
    if (it != _TDataSinkType_VALUES_TO_NAMES.end()) {
487
366k
        op_name = it->second;
488
366k
    }
489
365k
    _name = op_name + "_OPERATOR";
490
365k
    return Status::OK();
491
365k
}
492
493
314k
Status DataSinkOperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
494
314k
    std::string op_name = print_plan_node_type(tnode.node_type);
495
314k
    _nereids_id = tnode.nereids_id;
496
314k
    auto substr = op_name.substr(0, op_name.find("_NODE"));
497
314k
    _name = substr + "_SINK_OPERATOR";
498
314k
    return Status::OK();
499
314k
}
500
501
template <typename LocalStateType>
502
Status DataSinkOperatorX<LocalStateType>::setup_local_state(RuntimeState* state,
503
1.77M
                                                            LocalSinkStateInfo& info) {
504
1.77M
    auto local_state = LocalStateType::create_unique(this, state);
505
1.77M
    RETURN_IF_ERROR(local_state->init(state, info));
506
1.77M
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
1.77M
    return Status::OK();
508
1.77M
}
_ZN5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
115k
                                                            LocalSinkStateInfo& info) {
504
115k
    auto local_state = LocalStateType::create_unique(this, state);
505
115k
    RETURN_IF_ERROR(local_state->init(state, info));
506
115k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
115k
    return Status::OK();
508
115k
}
_ZN5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
377k
                                                            LocalSinkStateInfo& info) {
504
377k
    auto local_state = LocalStateType::create_unique(this, state);
505
377k
    RETURN_IF_ERROR(local_state->init(state, info));
506
377k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
377k
    return Status::OK();
508
377k
}
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
364
                                                            LocalSinkStateInfo& info) {
504
364
    auto local_state = LocalStateType::create_unique(this, state);
505
364
    RETURN_IF_ERROR(local_state->init(state, info));
506
364
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
364
    return Status::OK();
508
364
}
_ZN5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
49.3k
                                                            LocalSinkStateInfo& info) {
504
49.3k
    auto local_state = LocalStateType::create_unique(this, state);
505
49.3k
    RETURN_IF_ERROR(local_state->init(state, info));
506
49.3k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
49.3k
    return Status::OK();
508
49.3k
}
_ZN5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE17setup_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
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
16
                                                            LocalSinkStateInfo& info) {
504
16
    auto local_state = LocalStateType::create_unique(this, state);
505
16
    RETURN_IF_ERROR(local_state->init(state, info));
506
16
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
16
    return Status::OK();
508
16
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_25PaimonTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_27IcebergDeleteSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_26IcebergMergeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_21MCTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
9.44k
                                                            LocalSinkStateInfo& info) {
504
9.44k
    auto local_state = LocalStateType::create_unique(this, state);
505
9.44k
    RETURN_IF_ERROR(local_state->init(state, info));
506
9.44k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
9.44k
    return Status::OK();
508
9.44k
}
_ZN5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
9
                                                            LocalSinkStateInfo& info) {
504
9
    auto local_state = LocalStateType::create_unique(this, state);
505
9
    RETURN_IF_ERROR(local_state->init(state, info));
506
9
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
9
    return Status::OK();
508
9
}
_ZN5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
234k
                                                            LocalSinkStateInfo& info) {
504
234k
    auto local_state = LocalStateType::create_unique(this, state);
505
234k
    RETURN_IF_ERROR(local_state->init(state, info));
506
234k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
234k
    return Status::OK();
508
234k
}
_ZN5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
166
                                                            LocalSinkStateInfo& info) {
504
166
    auto local_state = LocalStateType::create_unique(this, state);
505
166
    RETURN_IF_ERROR(local_state->init(state, info));
506
166
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
166
    return Status::OK();
508
166
}
_ZN5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
259k
                                                            LocalSinkStateInfo& info) {
504
259k
    auto local_state = LocalStateType::create_unique(this, state);
505
259k
    RETURN_IF_ERROR(local_state->init(state, info));
506
259k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
259k
    return Status::OK();
508
259k
}
_ZN5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
100k
                                                            LocalSinkStateInfo& info) {
504
100k
    auto local_state = LocalStateType::create_unique(this, state);
505
100k
    RETURN_IF_ERROR(local_state->init(state, info));
506
100k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
100k
    return Status::OK();
508
100k
}
_ZN5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
78.1k
                                                            LocalSinkStateInfo& info) {
504
78.1k
    auto local_state = LocalStateType::create_unique(this, state);
505
78.1k
    RETURN_IF_ERROR(local_state->init(state, info));
506
78.1k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
78.1k
    return Status::OK();
508
78.1k
}
_ZN5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
139
                                                            LocalSinkStateInfo& info) {
504
139
    auto local_state = LocalStateType::create_unique(this, state);
505
139
    RETURN_IF_ERROR(local_state->init(state, info));
506
139
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
139
    return Status::OK();
508
139
}
_ZN5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
518k
                                                            LocalSinkStateInfo& info) {
504
518k
    auto local_state = LocalStateType::create_unique(this, state);
505
518k
    RETURN_IF_ERROR(local_state->init(state, info));
506
518k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
518k
    return Status::OK();
508
518k
}
_ZN5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
5.94k
                                                            LocalSinkStateInfo& info) {
504
5.94k
    auto local_state = LocalStateType::create_unique(this, state);
505
5.94k
    RETURN_IF_ERROR(local_state->init(state, info));
506
5.94k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
5.94k
    return Status::OK();
508
5.94k
}
_ZN5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
10.0k
                                                            LocalSinkStateInfo& info) {
504
10.0k
    auto local_state = LocalStateType::create_unique(this, state);
505
10.0k
    RETURN_IF_ERROR(local_state->init(state, info));
506
10.0k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
10.0k
    return Status::OK();
508
10.0k
}
_ZN5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
1.95k
                                                            LocalSinkStateInfo& info) {
504
1.95k
    auto local_state = LocalStateType::create_unique(this, state);
505
1.95k
    RETURN_IF_ERROR(local_state->init(state, info));
506
1.95k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
1.95k
    return Status::OK();
508
1.95k
}
_ZN5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
361
                                                            LocalSinkStateInfo& info) {
504
361
    auto local_state = LocalStateType::create_unique(this, state);
505
361
    RETURN_IF_ERROR(local_state->init(state, info));
506
361
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
361
    return Status::OK();
508
361
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
4.94k
                                                            LocalSinkStateInfo& info) {
504
4.94k
    auto local_state = LocalStateType::create_unique(this, state);
505
4.94k
    RETURN_IF_ERROR(local_state->init(state, info));
506
4.94k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
4.94k
    return Status::OK();
508
4.94k
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.72k
                                                            LocalSinkStateInfo& info) {
504
2.72k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.72k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.72k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.72k
    return Status::OK();
508
2.72k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.65k
                                                            LocalSinkStateInfo& info) {
504
2.65k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.65k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.65k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.65k
    return Status::OK();
508
2.65k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.53k
                                                            LocalSinkStateInfo& info) {
504
2.53k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.53k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.53k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.53k
    return Status::OK();
508
2.53k
}
_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.40M
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.40M
    } else {
519
1.40M
        auto ss = LocalStateType::SharedStateType::create_shared();
520
1.40M
        ss->id = operator_id();
521
1.40M
        for (auto& dest : dests_id()) {
522
1.40M
            ss->related_op_ids.insert(dest);
523
1.40M
        }
524
1.40M
        return ss;
525
1.40M
    }
526
1.40M
}
_ZNK5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
98.9k
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
98.9k
    } else {
519
98.9k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
98.9k
        ss->id = operator_id();
521
98.9k
        for (auto& dest : dests_id()) {
522
98.8k
            ss->related_op_ids.insert(dest);
523
98.8k
        }
524
98.9k
        return ss;
525
98.9k
    }
526
98.9k
}
_ZNK5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
378k
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
378k
    } else {
519
378k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
378k
        ss->id = operator_id();
521
378k
        for (auto& dest : dests_id()) {
522
376k
            ss->related_op_ids.insert(dest);
523
376k
        }
524
378k
        return ss;
525
378k
    }
526
378k
}
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
364
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
364
    } else {
519
364
        auto ss = LocalStateType::SharedStateType::create_shared();
520
364
        ss->id = operator_id();
521
364
        for (auto& dest : dests_id()) {
522
364
            ss->related_op_ids.insert(dest);
523
364
        }
524
364
        return ss;
525
364
    }
526
364
}
_ZNK5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
49.5k
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
49.5k
    } else {
519
49.5k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
49.5k
        ss->id = operator_id();
521
49.5k
        for (auto& dest : dests_id()) {
522
49.1k
            ss->related_op_ids.insert(dest);
523
49.1k
        }
524
49.5k
        return ss;
525
49.5k
    }
526
49.5k
}
_ZNK5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE19create_shared_stateEv
Line
Count
Source
511
4
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
4
    } else {
519
4
        auto ss = LocalStateType::SharedStateType::create_shared();
520
4
        ss->id = operator_id();
521
4
        for (auto& dest : dests_id()) {
522
4
            ss->related_op_ids.insert(dest);
523
4
        }
524
4
        return ss;
525
4
    }
526
4
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
16
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
16
    } else {
519
16
        auto ss = LocalStateType::SharedStateType::create_shared();
520
16
        ss->id = operator_id();
521
16
        for (auto& dest : dests_id()) {
522
16
            ss->related_op_ids.insert(dest);
523
16
        }
524
16
        return ss;
525
16
    }
526
16
}
_ZNK5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
8
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
8
    } else {
519
8
        auto ss = LocalStateType::SharedStateType::create_shared();
520
8
        ss->id = operator_id();
521
8
        for (auto& dest : dests_id()) {
522
8
            ss->related_op_ids.insert(dest);
523
8
        }
524
8
        return ss;
525
8
    }
526
8
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_25PaimonTableSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
8
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
8
    } else {
519
8
        auto ss = LocalStateType::SharedStateType::create_shared();
520
8
        ss->id = operator_id();
521
8
        for (auto& dest : dests_id()) {
522
8
            ss->related_op_ids.insert(dest);
523
8
        }
524
8
        return ss;
525
8
    }
526
8
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27IcebergDeleteSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26IcebergMergeSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_21MCTableSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
9.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
9.55k
    } else {
519
9.55k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
9.55k
        ss->id = operator_id();
521
9.55k
        for (auto& dest : dests_id()) {
522
9.55k
            ss->related_op_ids.insert(dest);
523
9.55k
        }
524
9.55k
        return ss;
525
9.55k
    }
526
9.55k
}
_ZNK5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
9
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
9
    } else {
519
9
        auto ss = LocalStateType::SharedStateType::create_shared();
520
9
        ss->id = operator_id();
521
9
        for (auto& dest : dests_id()) {
522
9
            ss->related_op_ids.insert(dest);
523
9
        }
524
9
        return ss;
525
9
    }
526
9
}
_ZNK5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
235k
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
235k
    } else {
519
235k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
235k
        ss->id = operator_id();
521
235k
        for (auto& dest : dests_id()) {
522
235k
            ss->related_op_ids.insert(dest);
523
235k
        }
524
235k
        return ss;
525
235k
    }
526
235k
}
_ZNK5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
168
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
168
    } else {
519
168
        auto ss = LocalStateType::SharedStateType::create_shared();
520
168
        ss->id = operator_id();
521
168
        for (auto& dest : dests_id()) {
522
168
            ss->related_op_ids.insert(dest);
523
168
        }
524
168
        return ss;
525
168
    }
526
168
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
100k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
100k
    } else {
519
100k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
100k
        ss->id = operator_id();
521
100k
        for (auto& dest : dests_id()) {
522
100k
            ss->related_op_ids.insert(dest);
523
100k
        }
524
100k
        return ss;
525
100k
    }
526
100k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
138
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
138
    } else {
519
138
        auto ss = LocalStateType::SharedStateType::create_shared();
520
138
        ss->id = operator_id();
521
138
        for (auto& dest : dests_id()) {
522
138
            ss->related_op_ids.insert(dest);
523
138
        }
524
138
        return ss;
525
138
    }
526
138
}
_ZNK5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
520k
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
520k
    } else {
519
520k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
520k
        ss->id = operator_id();
521
520k
        for (auto& dest : dests_id()) {
522
517k
            ss->related_op_ids.insert(dest);
523
517k
        }
524
520k
        return ss;
525
520k
    }
526
520k
}
_ZNK5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
5.95k
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.95k
    } else {
519
5.95k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
5.95k
        ss->id = operator_id();
521
5.95k
        for (auto& dest : dests_id()) {
522
5.94k
            ss->related_op_ids.insert(dest);
523
5.94k
        }
524
5.95k
        return ss;
525
5.95k
    }
526
5.95k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
463
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
463
    } else {
519
463
        auto ss = LocalStateType::SharedStateType::create_shared();
520
463
        ss->id = operator_id();
521
463
        for (auto& dest : dests_id()) {
522
463
            ss->related_op_ids.insert(dest);
523
463
        }
524
463
        return ss;
525
463
    }
526
463
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE19create_shared_stateEv
Line
Count
Source
511
2.66k
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.66k
    } else {
519
2.66k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
2.66k
        ss->id = operator_id();
521
2.67k
        for (auto& dest : dests_id()) {
522
2.67k
            ss->related_op_ids.insert(dest);
523
2.67k
        }
524
2.66k
        return ss;
525
2.66k
    }
526
2.66k
}
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE19create_shared_stateEv
Line
Count
Source
511
2.54k
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.54k
    } else {
519
2.54k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
2.54k
        ss->id = operator_id();
521
2.54k
        for (auto& dest : dests_id()) {
522
2.54k
            ss->related_op_ids.insert(dest);
523
2.54k
        }
524
2.54k
        return ss;
525
2.54k
    }
526
2.54k
}
_ZNK5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
3
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
3
    } else {
519
3
        auto ss = LocalStateType::SharedStateType::create_shared();
520
3
        ss->id = operator_id();
521
3
        for (auto& dest : dests_id()) {
522
3
            ss->related_op_ids.insert(dest);
523
3
        }
524
3
        return ss;
525
3
    }
526
3
}
_ZNK5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
567
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
567
    } else {
519
567
        auto ss = LocalStateType::SharedStateType::create_shared();
520
567
        ss->id = operator_id();
521
567
        for (auto& dest : dests_id()) {
522
557
            ss->related_op_ids.insert(dest);
523
557
        }
524
567
        return ss;
525
567
    }
526
567
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
106
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
106
    } else {
519
106
        auto ss = LocalStateType::SharedStateType::create_shared();
520
106
        ss->id = operator_id();
521
106
        for (auto& dest : dests_id()) {
522
106
            ss->related_op_ids.insert(dest);
523
106
        }
524
106
        return ss;
525
106
    }
526
106
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE19create_shared_stateEv
527
528
template <typename LocalStateType>
529
2.06M
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.06M
    auto local_state = LocalStateType::create_unique(state, this);
531
2.06M
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.06M
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.06M
    return Status::OK();
534
2.06M
}
_ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
67.4k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
67.4k
    auto local_state = LocalStateType::create_unique(state, this);
531
67.4k
    RETURN_IF_ERROR(local_state->init(state, info));
532
67.4k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
67.4k
    return Status::OK();
534
67.4k
}
_ZN5doris9OperatorXINS_18OlapScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
249k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
249k
    auto local_state = LocalStateType::create_unique(state, this);
531
249k
    RETURN_IF_ERROR(local_state->init(state, info));
532
249k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
249k
    return Status::OK();
534
249k
}
_ZN5doris9OperatorXINS_21GroupCommitLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
115
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
115
    auto local_state = LocalStateType::create_unique(state, this);
531
115
    RETURN_IF_ERROR(local_state->init(state, info));
532
115
    state->emplace_local_state(operator_id(), std::move(local_state));
533
115
    return Status::OK();
534
115
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_18JDBCScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_18FileScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
3.26k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
3.26k
    auto local_state = LocalStateType::create_unique(state, this);
531
3.26k
    RETURN_IF_ERROR(local_state->init(state, info));
532
3.26k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
3.26k
    return Status::OK();
534
3.26k
}
_ZN5doris9OperatorXINS_18AnalyticLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
9.43k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
9.43k
    auto local_state = LocalStateType::create_unique(state, this);
531
9.43k
    RETURN_IF_ERROR(local_state->init(state, info));
532
9.43k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
9.43k
    return Status::OK();
534
9.43k
}
_ZN5doris9OperatorXINS_14SortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
8.64k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
8.64k
    auto local_state = LocalStateType::create_unique(state, this);
531
8.64k
    RETURN_IF_ERROR(local_state->init(state, info));
532
8.64k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
8.64k
    return Status::OK();
534
8.64k
}
_ZN5doris9OperatorXINS_19SpillSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
159
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
159
    auto local_state = LocalStateType::create_unique(state, this);
531
159
    RETURN_IF_ERROR(local_state->init(state, info));
532
159
    state->emplace_local_state(operator_id(), std::move(local_state));
533
159
    return Status::OK();
534
159
}
_ZN5doris9OperatorXINS_24LocalMergeSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
225k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
225k
    auto local_state = LocalStateType::create_unique(state, this);
531
225k
    RETURN_IF_ERROR(local_state->init(state, info));
532
225k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
225k
    return Status::OK();
534
225k
}
_ZN5doris9OperatorXINS_13AggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
100k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
100k
    auto local_state = LocalStateType::create_unique(state, this);
531
100k
    RETURN_IF_ERROR(local_state->init(state, info));
532
100k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
100k
    return Status::OK();
534
100k
}
_ZN5doris9OperatorXINS_21BucketedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
78.5k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
78.5k
    auto local_state = LocalStateType::create_unique(state, this);
531
78.5k
    RETURN_IF_ERROR(local_state->init(state, info));
532
78.5k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
78.5k
    return Status::OK();
534
78.5k
}
_ZN5doris9OperatorXINS_24PartitionedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
129
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
129
    auto local_state = LocalStateType::create_unique(state, this);
531
129
    RETURN_IF_ERROR(local_state->init(state, info));
532
129
    state->emplace_local_state(operator_id(), std::move(local_state));
533
129
    return Status::OK();
534
129
}
_ZN5doris9OperatorXINS_23TableFunctionLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
6.25k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
6.25k
    auto local_state = LocalStateType::create_unique(state, this);
531
6.25k
    RETURN_IF_ERROR(local_state->init(state, info));
532
6.25k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
6.25k
    return Status::OK();
534
6.25k
}
_ZN5doris9OperatorXINS_18ExchangeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
277k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
277k
    auto local_state = LocalStateType::create_unique(state, this);
531
277k
    RETURN_IF_ERROR(local_state->init(state, info));
532
277k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
277k
    return Status::OK();
534
277k
}
_ZN5doris9OperatorXINS_16RepeatLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.39k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.39k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.39k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.39k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.39k
    return Status::OK();
534
1.39k
}
_ZN5doris9OperatorXINS_29NestedLoopJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
5.94k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
5.94k
    auto local_state = LocalStateType::create_unique(state, this);
531
5.94k
    RETURN_IF_ERROR(local_state->init(state, info));
532
5.94k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
5.94k
    return Status::OK();
534
5.94k
}
_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.56k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.56k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.56k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.56k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.56k
    return Status::OK();
534
1.56k
}
_ZN5doris9OperatorXINS_21UnionSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
56.3k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
56.3k
    auto local_state = LocalStateType::create_unique(state, this);
531
56.3k
    RETURN_IF_ERROR(local_state->init(state, info));
532
56.3k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
56.3k
    return Status::OK();
534
56.3k
}
_ZN5doris9OperatorXINS_35MultiCastDataStreamSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
4.80k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
4.80k
    auto local_state = LocalStateType::create_unique(state, this);
531
4.80k
    RETURN_IF_ERROR(local_state->init(state, info));
532
4.80k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
4.80k
    return Status::OK();
534
4.80k
}
_ZN5doris9OperatorXINS_29PartitionSortSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
360
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
360
    auto local_state = LocalStateType::create_unique(state, this);
531
360
    RETURN_IF_ERROR(local_state->init(state, info));
532
360
    state->emplace_local_state(operator_id(), std::move(local_state));
533
360
    return Status::OK();
534
360
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.65k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.65k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.65k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.65k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.65k
    return Status::OK();
534
2.65k
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.53k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.53k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.53k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.53k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.53k
    return Status::OK();
534
2.53k
}
_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.73k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.73k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.73k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.73k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.73k
    return Status::OK();
534
1.73k
}
_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
668k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
668k
    auto local_state = LocalStateType::create_unique(state, this);
531
668k
    RETURN_IF_ERROR(local_state->init(state, info));
532
668k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
668k
    return Status::OK();
534
668k
}
_ZN5doris9OperatorXINS_34PartitionedHashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
3
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
3
    auto local_state = LocalStateType::create_unique(state, this);
531
3
    RETURN_IF_ERROR(local_state->init(state, info));
532
3
    state->emplace_local_state(operator_id(), std::move(local_state));
533
3
    return Status::OK();
534
3
}
_ZN5doris9OperatorXINS_21CacheSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
14
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
14
    auto local_state = LocalStateType::create_unique(state, this);
531
14
    RETURN_IF_ERROR(local_state->init(state, info));
532
14
    state->emplace_local_state(operator_id(), std::move(local_state));
533
14
    return Status::OK();
534
14
}
_ZN5doris9OperatorXINS_22RecCTESourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
169
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
169
    auto local_state = LocalStateType::create_unique(state, this);
531
169
    RETURN_IF_ERROR(local_state->init(state, info));
532
169
    state->emplace_local_state(operator_id(), std::move(local_state));
533
169
    return Status::OK();
534
169
}
_ZN5doris9OperatorXINS_20RecCTEScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.20k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.20k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.20k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.20k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.20k
    return Status::OK();
534
2.20k
}
_ZN5doris9OperatorXINS_25MaterializationLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
799
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
799
    auto local_state = LocalStateType::create_unique(state, this);
531
799
    RETURN_IF_ERROR(local_state->init(state, info));
532
799
    state->emplace_local_state(operator_id(), std::move(local_state));
533
799
    return Status::OK();
534
799
}
_ZN5doris9OperatorXINS_16SelectLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
830
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
830
    auto local_state = LocalStateType::create_unique(state, this);
531
830
    RETURN_IF_ERROR(local_state->init(state, info));
532
830
    state->emplace_local_state(operator_id(), std::move(local_state));
533
830
    return Status::OK();
534
830
}
_ZN5doris9OperatorXINS_22StreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
7.95k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
7.95k
    auto local_state = LocalStateType::create_unique(state, this);
531
7.95k
    RETURN_IF_ERROR(local_state->init(state, info));
532
7.95k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
7.95k
    return Status::OK();
534
7.95k
}
_ZN5doris9OperatorXINS_30DistinctStreamingAggLocalStateEE17setup_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
}
535
536
PipelineXSinkLocalStateBase::PipelineXSinkLocalStateBase(DataSinkOperatorXBase* parent,
537
                                                         RuntimeState* state)
538
1.77M
        : _parent(parent), _state(state) {}
539
540
PipelineXLocalStateBase::PipelineXLocalStateBase(RuntimeState* state, OperatorXBase* parent)
541
2.05M
        : _num_rows_returned(0),
542
2.05M
          _rows_returned_counter(nullptr),
543
2.05M
          _parent(parent),
544
2.05M
          _state(state),
545
2.05M
          _budget(state->batch_size(), state->preferred_block_size_bytes()) {}
546
547
template <typename SharedStateArg>
548
2.07M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
2.07M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
2.07M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
2.07M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
2.07M
    _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.07M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
2.07M
    _operator_profile->add_child(_common_profile.get(), true);
557
2.07M
    _operator_profile->add_child(_custom_profile.get(), true);
558
2.07M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
2.07M
    if constexpr (!is_fake_shared) {
560
1.23M
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
760k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
760k
                                    .first.get()
563
760k
                                    ->template cast<SharedStateArg>();
564
565
760k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
760k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
760k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
760k
        } else if (info.shared_state) {
569
407k
            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
407k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
407k
            _dependency = _shared_state->create_source_dependency(
576
407k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
407k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
407k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
407k
        } else {
580
69.5k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
6.54k
                DCHECK(false);
582
6.54k
            }
583
69.5k
        }
584
1.23M
    }
585
586
2.07M
    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.07M
    _rows_returned_counter =
591
2.07M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
2.07M
    _blocks_returned_counter =
593
2.07M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
2.07M
    _output_block_bytes_counter =
595
2.07M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
2.07M
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
2.07M
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
2.07M
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
2.07M
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
2.07M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
2.07M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
2.07M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
2.07M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
2.07M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
2.07M
    _memory_used_counter =
606
2.07M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
2.07M
    _common_profile->add_info_string("IsColocate",
608
2.07M
                                     std::to_string(_parent->is_colocated_operator()));
609
2.07M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
2.07M
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
2.07M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
2.07M
    return Status::OK();
613
2.07M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
67.5k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
67.5k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
67.5k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
67.5k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
67.5k
    _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
67.5k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
67.5k
    _operator_profile->add_child(_common_profile.get(), true);
557
67.5k
    _operator_profile->add_child(_custom_profile.get(), true);
558
67.5k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
67.5k
    if constexpr (!is_fake_shared) {
560
67.5k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
16.4k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
16.4k
                                    .first.get()
563
16.4k
                                    ->template cast<SharedStateArg>();
564
565
16.4k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
16.4k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
16.4k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
51.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
50.4k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
50.4k
            _dependency = _shared_state->create_source_dependency(
576
50.4k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
50.4k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
50.4k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
50.4k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
551
        }
584
67.5k
    }
585
586
67.5k
    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
67.5k
    _rows_returned_counter =
591
67.5k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
67.5k
    _blocks_returned_counter =
593
67.5k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
67.5k
    _output_block_bytes_counter =
595
67.5k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
67.5k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
67.5k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
67.5k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
67.5k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
67.5k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
67.5k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
67.5k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
67.5k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
67.5k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
67.5k
    _memory_used_counter =
606
67.5k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
67.5k
    _common_profile->add_info_string("IsColocate",
608
67.5k
                                     std::to_string(_parent->is_colocated_operator()));
609
67.5k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
67.5k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
67.5k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
67.5k
    return Status::OK();
613
67.5k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
4
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
4
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
4
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
4
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
4
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
4
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
4
    _operator_profile->add_child(_common_profile.get(), true);
557
4
    _operator_profile->add_child(_custom_profile.get(), true);
558
4
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
4
    if constexpr (!is_fake_shared) {
560
4
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
4
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
4
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
4
            _dependency = _shared_state->create_source_dependency(
576
4
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
4
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
4
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
4
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
4
    }
585
586
4
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
4
    _rows_returned_counter =
591
4
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
4
    _blocks_returned_counter =
593
4
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
4
    _output_block_bytes_counter =
595
4
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
4
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
4
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
4
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
4
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
4
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
4
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
4
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
4
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
4
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
4
    _memory_used_counter =
606
4
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
4
    _common_profile->add_info_string("IsColocate",
608
4
                                     std::to_string(_parent->is_colocated_operator()));
609
4
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
4
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
4
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
4
    return Status::OK();
613
4
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
235k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
235k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
235k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
235k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
235k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
235k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
235k
    _operator_profile->add_child(_common_profile.get(), true);
557
235k
    _operator_profile->add_child(_custom_profile.get(), true);
558
235k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
235k
    if constexpr (!is_fake_shared) {
560
235k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
235k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
226k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
226k
            _dependency = _shared_state->create_source_dependency(
576
226k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
226k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
226k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
226k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
8.75k
        }
584
235k
    }
585
586
235k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
235k
    _rows_returned_counter =
591
235k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
235k
    _blocks_returned_counter =
593
235k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
235k
    _output_block_bytes_counter =
595
235k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
235k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
235k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
235k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
235k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
235k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
235k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
235k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
235k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
235k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
235k
    _memory_used_counter =
606
235k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
235k
    _common_profile->add_info_string("IsColocate",
608
235k
                                     std::to_string(_parent->is_colocated_operator()));
609
235k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
235k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
235k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
235k
    return Status::OK();
613
235k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
159
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
159
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
159
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
159
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
159
    _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
159
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
159
    _operator_profile->add_child(_common_profile.get(), true);
557
159
    _operator_profile->add_child(_custom_profile.get(), true);
558
159
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
159
    if constexpr (!is_fake_shared) {
560
159
        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
159
        } 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
159
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
159
            _dependency = _shared_state->create_source_dependency(
576
159
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
159
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
159
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
159
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
159
    }
585
586
159
    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
159
    _rows_returned_counter =
591
159
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
159
    _blocks_returned_counter =
593
159
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
159
    _output_block_bytes_counter =
595
159
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
159
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
159
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
159
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
159
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
159
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
159
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
159
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
159
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
159
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
159
    _memory_used_counter =
606
159
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
159
    _common_profile->add_info_string("IsColocate",
608
159
                                     std::to_string(_parent->is_colocated_operator()));
609
159
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
159
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
159
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
159
    return Status::OK();
613
159
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
5.95k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
5.95k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
5.95k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
5.95k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
5.95k
    _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.95k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
5.95k
    _operator_profile->add_child(_common_profile.get(), true);
557
5.95k
    _operator_profile->add_child(_custom_profile.get(), true);
558
5.95k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
5.95k
    if constexpr (!is_fake_shared) {
560
5.95k
        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.95k
        } 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.90k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
5.90k
            _dependency = _shared_state->create_source_dependency(
576
5.90k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
5.90k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
5.90k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
5.90k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
41
        }
584
5.95k
    }
585
586
5.95k
    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.95k
    _rows_returned_counter =
591
5.95k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
5.95k
    _blocks_returned_counter =
593
5.95k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
5.95k
    _output_block_bytes_counter =
595
5.95k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
5.95k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
5.95k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
5.95k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
5.95k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
5.95k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
5.95k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
5.95k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
5.95k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
5.95k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
5.95k
    _memory_used_counter =
606
5.95k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
5.95k
    _common_profile->add_info_string("IsColocate",
608
5.95k
                                     std::to_string(_parent->is_colocated_operator()));
609
5.95k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
5.95k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
5.95k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
5.95k
    return Status::OK();
613
5.95k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
9.54k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
9.54k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
9.54k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
9.54k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
9.54k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
9.54k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
9.54k
    _operator_profile->add_child(_common_profile.get(), true);
557
9.54k
    _operator_profile->add_child(_custom_profile.get(), true);
558
9.54k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
9.54k
    if constexpr (!is_fake_shared) {
560
9.54k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
9.54k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
9.33k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
9.33k
            _dependency = _shared_state->create_source_dependency(
576
9.33k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
9.33k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
9.33k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
9.33k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
213
        }
584
9.54k
    }
585
586
9.54k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
9.54k
    _rows_returned_counter =
591
9.54k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
9.54k
    _blocks_returned_counter =
593
9.54k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
9.54k
    _output_block_bytes_counter =
595
9.54k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
9.54k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
9.54k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
9.54k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
9.54k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
9.54k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
9.54k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
9.54k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
9.54k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
9.54k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
9.54k
    _memory_used_counter =
606
9.54k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
9.54k
    _common_profile->add_info_string("IsColocate",
608
9.54k
                                     std::to_string(_parent->is_colocated_operator()));
609
9.54k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
9.54k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
9.54k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
9.54k
    return Status::OK();
613
9.54k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
100k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
100k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
100k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
100k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
100k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
100k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
100k
    _operator_profile->add_child(_common_profile.get(), true);
557
100k
    _operator_profile->add_child(_custom_profile.get(), true);
558
100k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
100k
    if constexpr (!is_fake_shared) {
560
100k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
100k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
99.5k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
99.5k
            _dependency = _shared_state->create_source_dependency(
576
99.5k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
99.5k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
99.5k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
99.5k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
1.22k
        }
584
100k
    }
585
586
100k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
100k
    _rows_returned_counter =
591
100k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
100k
    _blocks_returned_counter =
593
100k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
100k
    _output_block_bytes_counter =
595
100k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
100k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
100k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
100k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
100k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
100k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
100k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
100k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
100k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
100k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
100k
    _memory_used_counter =
606
100k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
100k
    _common_profile->add_info_string("IsColocate",
608
100k
                                     std::to_string(_parent->is_colocated_operator()));
609
100k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
100k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
100k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
100k
    return Status::OK();
613
100k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
78.5k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
78.5k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
78.5k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
78.5k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
78.5k
    _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
78.5k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
78.5k
    _operator_profile->add_child(_common_profile.get(), true);
557
78.5k
    _operator_profile->add_child(_custom_profile.get(), true);
558
78.5k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
78.5k
    if constexpr (!is_fake_shared) {
560
78.5k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
78.4k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
78.4k
                                    .first.get()
563
78.4k
                                    ->template cast<SharedStateArg>();
564
565
78.4k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
78.4k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
78.4k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
78.4k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
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
115
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
115
        }
584
78.5k
    }
585
586
78.5k
    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
78.5k
    _rows_returned_counter =
591
78.5k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
78.5k
    _blocks_returned_counter =
593
78.5k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
78.5k
    _output_block_bytes_counter =
595
78.5k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
78.5k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
78.5k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
78.5k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
78.5k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
78.5k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
78.5k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
78.5k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
78.5k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
78.5k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
78.5k
    _memory_used_counter =
606
78.5k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
78.5k
    _common_profile->add_info_string("IsColocate",
608
78.5k
                                     std::to_string(_parent->is_colocated_operator()));
609
78.5k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
78.5k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
78.5k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
78.5k
    return Status::OK();
613
78.5k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
129
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
129
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
129
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
129
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
129
    _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
129
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
129
    _operator_profile->add_child(_common_profile.get(), true);
557
129
    _operator_profile->add_child(_custom_profile.get(), true);
558
129
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
129
    if constexpr (!is_fake_shared) {
560
129
        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
129
        } 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
129
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
129
            _dependency = _shared_state->create_source_dependency(
576
129
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
129
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
129
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
129
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
129
    }
585
586
129
    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
129
    _rows_returned_counter =
591
129
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
129
    _blocks_returned_counter =
593
129
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
129
    _output_block_bytes_counter =
595
129
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
129
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
129
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
129
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
129
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
129
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
129
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
129
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
129
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
129
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
129
    _memory_used_counter =
606
129
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
129
    _common_profile->add_info_string("IsColocate",
608
129
                                     std::to_string(_parent->is_colocated_operator()));
609
129
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
129
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
129
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
129
    return Status::OK();
613
129
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
836k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
836k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
836k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
836k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
836k
    _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
836k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
836k
    _operator_profile->add_child(_common_profile.get(), true);
557
836k
    _operator_profile->add_child(_custom_profile.get(), true);
558
836k
    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
836k
    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
836k
    _rows_returned_counter =
591
836k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
836k
    _blocks_returned_counter =
593
836k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
836k
    _output_block_bytes_counter =
595
836k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
836k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
836k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
836k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
836k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
836k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
836k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
836k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
836k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
836k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
836k
    _memory_used_counter =
606
836k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
836k
    _common_profile->add_info_string("IsColocate",
608
836k
                                     std::to_string(_parent->is_colocated_operator()));
609
836k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
836k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
836k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
836k
    return Status::OK();
613
836k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
56.3k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
56.3k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
56.3k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
56.3k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
56.3k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
56.3k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
56.3k
    _operator_profile->add_child(_common_profile.get(), true);
557
56.3k
    _operator_profile->add_child(_custom_profile.get(), true);
558
56.3k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
56.3k
    if constexpr (!is_fake_shared) {
560
56.3k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
56.3k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
4.45k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
4.45k
            _dependency = _shared_state->create_source_dependency(
576
4.45k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
4.45k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
4.45k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
51.9k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
51.9k
        }
584
56.3k
    }
585
586
56.3k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
56.3k
    _rows_returned_counter =
591
56.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
56.3k
    _blocks_returned_counter =
593
56.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
56.3k
    _output_block_bytes_counter =
595
56.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
56.3k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
56.3k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
56.3k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
56.3k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
56.3k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
56.3k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
56.3k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
56.3k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
56.3k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
56.3k
    _memory_used_counter =
606
56.3k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
56.3k
    _common_profile->add_info_string("IsColocate",
608
56.3k
                                     std::to_string(_parent->is_colocated_operator()));
609
56.3k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
56.3k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
56.3k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
56.3k
    return Status::OK();
613
56.3k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
26
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
26
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
26
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
26
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
26
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
26
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
26
    _operator_profile->add_child(_common_profile.get(), true);
557
26
    _operator_profile->add_child(_custom_profile.get(), true);
558
26
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
26
    if constexpr (!is_fake_shared) {
560
26
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
26
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
26
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
26
            _dependency = _shared_state->create_source_dependency(
576
26
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
26
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
26
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
26
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
26
    }
585
586
26
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
26
    _rows_returned_counter =
591
26
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
26
    _blocks_returned_counter =
593
26
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
26
    _output_block_bytes_counter =
595
26
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
26
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
26
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
26
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
26
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
26
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
26
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
26
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
26
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
26
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
26
    _memory_used_counter =
606
26
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
26
    _common_profile->add_info_string("IsColocate",
608
26
                                     std::to_string(_parent->is_colocated_operator()));
609
26
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
26
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
26
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
26
    return Status::OK();
613
26
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
4.81k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
4.81k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
4.81k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
4.81k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
4.81k
    _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.81k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
4.81k
    _operator_profile->add_child(_common_profile.get(), true);
557
4.81k
    _operator_profile->add_child(_custom_profile.get(), true);
558
4.81k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
4.81k
    if constexpr (!is_fake_shared) {
560
4.81k
        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.81k
        } 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.78k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
4.78k
            _dependency = _shared_state->create_source_dependency(
576
4.78k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
4.78k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
4.78k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
4.78k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
28
        }
584
4.81k
    }
585
586
4.81k
    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.81k
    _rows_returned_counter =
591
4.81k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
4.81k
    _blocks_returned_counter =
593
4.81k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
4.81k
    _output_block_bytes_counter =
595
4.81k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
4.81k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
4.81k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
4.81k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
4.81k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
4.81k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
4.81k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
4.81k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
4.81k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
4.81k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
4.81k
    _memory_used_counter =
606
4.81k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
4.81k
    _common_profile->add_info_string("IsColocate",
608
4.81k
                                     std::to_string(_parent->is_colocated_operator()));
609
4.81k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
4.81k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
4.81k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
4.81k
    return Status::OK();
613
4.81k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
464
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
464
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
464
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
464
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
464
    _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
464
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
464
    _operator_profile->add_child(_common_profile.get(), true);
557
464
    _operator_profile->add_child(_custom_profile.get(), true);
558
464
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
464
    if constexpr (!is_fake_shared) {
560
464
        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
464
        } 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
457
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
457
            _dependency = _shared_state->create_source_dependency(
576
457
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
457
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
457
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
457
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
7
        }
584
464
    }
585
586
464
    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
464
    _rows_returned_counter =
591
464
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
464
    _blocks_returned_counter =
593
464
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
464
    _output_block_bytes_counter =
595
464
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
464
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
464
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
464
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
464
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
464
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
464
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
464
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
464
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
464
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
464
    _memory_used_counter =
606
464
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
464
    _common_profile->add_info_string("IsColocate",
608
464
                                     std::to_string(_parent->is_colocated_operator()));
609
464
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
464
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
464
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
464
    return Status::OK();
613
464
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
5.20k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
5.20k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
5.20k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
5.20k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
5.20k
    _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.20k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
5.20k
    _operator_profile->add_child(_common_profile.get(), true);
557
5.20k
    _operator_profile->add_child(_custom_profile.get(), true);
558
5.20k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
5.20k
    if constexpr (!is_fake_shared) {
560
5.20k
        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.20k
        } 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.03k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
5.03k
            _dependency = _shared_state->create_source_dependency(
576
5.03k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
5.03k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
5.03k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
5.03k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
174
        }
584
5.20k
    }
585
586
5.20k
    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.20k
    _rows_returned_counter =
591
5.20k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
5.20k
    _blocks_returned_counter =
593
5.20k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
5.20k
    _output_block_bytes_counter =
595
5.20k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
5.20k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
5.20k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
5.20k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
5.20k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
5.20k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
5.20k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
5.20k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
5.20k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
5.20k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
5.20k
    _memory_used_counter =
606
5.20k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
5.20k
    _common_profile->add_info_string("IsColocate",
608
5.20k
                                     std::to_string(_parent->is_colocated_operator()));
609
5.20k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
5.20k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
5.20k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
5.20k
    return Status::OK();
613
5.20k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
671k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
671k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
671k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
671k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
671k
    _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
671k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
671k
    _operator_profile->add_child(_common_profile.get(), true);
557
671k
    _operator_profile->add_child(_custom_profile.get(), true);
558
671k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
671k
    if constexpr (!is_fake_shared) {
560
671k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
665k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
665k
                                    .first.get()
563
665k
                                    ->template cast<SharedStateArg>();
564
565
665k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
665k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
665k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
665k
        } 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
6.54k
        } else {
580
6.54k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
6.54k
                DCHECK(false);
582
6.54k
            }
583
6.54k
        }
584
671k
    }
585
586
671k
    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
671k
    _rows_returned_counter =
591
671k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
671k
    _blocks_returned_counter =
593
671k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
671k
    _output_block_bytes_counter =
595
671k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
671k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
671k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
671k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
671k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
671k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
671k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
671k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
671k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
671k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
671k
    _memory_used_counter =
606
671k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
671k
    _common_profile->add_info_string("IsColocate",
608
671k
                                     std::to_string(_parent->is_colocated_operator()));
609
671k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
671k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
671k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
671k
    return Status::OK();
613
671k
}
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.08M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
2.08M
    _conjuncts.resize(_parent->_conjuncts.size());
618
2.39M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
313k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
313k
    }
621
2.08M
    if (_parent->has_projection()) {
622
390k
        const auto& projection = *_parent->_projection;
623
390k
        _projections.resize(projection.projections.size());
624
2.43M
        for (size_t i = 0; i < _projections.size(); i++) {
625
2.04M
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
2.04M
        }
627
390k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
414k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
23.9k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
415k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
391k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
391k
                        state, _intermediate_projections[i][j]));
633
391k
            }
634
23.9k
        }
635
390k
    }
636
2.08M
    return Status::OK();
637
2.08M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
67.6k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
67.6k
    _conjuncts.resize(_parent->_conjuncts.size());
618
69.4k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
1.78k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1.78k
    }
621
67.7k
    if (_parent->has_projection()) {
622
67.7k
        const auto& projection = *_parent->_projection;
623
67.7k
        _projections.resize(projection.projections.size());
624
378k
        for (size_t i = 0; i < _projections.size(); i++) {
625
311k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
311k
        }
627
67.7k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
79.0k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
11.3k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
341k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
330k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
330k
                        state, _intermediate_projections[i][j]));
633
330k
            }
634
11.3k
        }
635
67.7k
    }
636
67.6k
    return Status::OK();
637
67.6k
}
_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
236k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
236k
    _conjuncts.resize(_parent->_conjuncts.size());
618
236k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
236k
    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
236k
    return Status::OK();
637
236k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
152
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
152
    _conjuncts.resize(_parent->_conjuncts.size());
618
152
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
152
    if (_parent->has_projection()) {
622
0
        const auto& projection = *_parent->_projection;
623
0
        _projections.resize(projection.projections.size());
624
0
        for (size_t i = 0; i < _projections.size(); i++) {
625
0
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
0
        }
627
0
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
0
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
0
    }
636
152
    return Status::OK();
637
152
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
5.96k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
5.96k
    _conjuncts.resize(_parent->_conjuncts.size());
618
6.00k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
39
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
39
    }
621
5.96k
    if (_parent->has_projection()) {
622
5.96k
        const auto& projection = *_parent->_projection;
623
5.96k
        _projections.resize(projection.projections.size());
624
25.5k
        for (size_t i = 0; i < _projections.size(); i++) {
625
19.6k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
19.6k
        }
627
5.96k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
5.99k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
31
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
226
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
195
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
195
                        state, _intermediate_projections[i][j]));
633
195
            }
634
31
        }
635
5.96k
    }
636
5.96k
    return Status::OK();
637
5.96k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
9.58k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
9.58k
    _conjuncts.resize(_parent->_conjuncts.size());
618
10.4k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
826
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
826
    }
621
9.58k
    if (_parent->has_projection()) {
622
4.90k
        const auto& projection = *_parent->_projection;
623
4.90k
        _projections.resize(projection.projections.size());
624
20.8k
        for (size_t i = 0; i < _projections.size(); i++) {
625
15.9k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
15.9k
        }
627
4.90k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
4.99k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
91
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
688
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
597
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
597
                        state, _intermediate_projections[i][j]));
633
597
            }
634
91
        }
635
4.90k
    }
636
9.58k
    return Status::OK();
637
9.58k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
100k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
100k
    _conjuncts.resize(_parent->_conjuncts.size());
618
102k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
1.51k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1.51k
    }
621
100k
    if (_parent->has_projection()) {
622
32.1k
        const auto& projection = *_parent->_projection;
623
32.1k
        _projections.resize(projection.projections.size());
624
295k
        for (size_t i = 0; i < _projections.size(); i++) {
625
263k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
263k
        }
627
32.1k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
32.9k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
759
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
4.75k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
3.99k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
3.99k
                        state, _intermediate_projections[i][j]));
633
3.99k
            }
634
759
        }
635
32.1k
    }
636
100k
    return Status::OK();
637
100k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
78.6k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
78.6k
    _conjuncts.resize(_parent->_conjuncts.size());
618
78.6k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
39
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
39
    }
621
78.6k
    if (_parent->has_projection()) {
622
326
        const auto& projection = *_parent->_projection;
623
326
        _projections.resize(projection.projections.size());
624
1.25k
        for (size_t i = 0; i < _projections.size(); i++) {
625
928
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
928
        }
627
326
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
326
        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
326
    }
636
78.6k
    return Status::OK();
637
78.6k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
132
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
132
    _conjuncts.resize(_parent->_conjuncts.size());
618
132
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
132
    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
132
    return Status::OK();
637
132
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
839k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
839k
    _conjuncts.resize(_parent->_conjuncts.size());
618
1.14M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
309k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
309k
    }
621
839k
    if (_parent->has_projection()) {
622
266k
        const auto& projection = *_parent->_projection;
623
266k
        _projections.resize(projection.projections.size());
624
1.59M
        for (size_t i = 0; i < _projections.size(); i++) {
625
1.33M
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
1.33M
        }
627
266k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
278k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
11.5k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
66.2k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
54.6k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
54.6k
                        state, _intermediate_projections[i][j]));
633
54.6k
            }
634
11.5k
        }
635
266k
    }
636
839k
    return Status::OK();
637
839k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
56.5k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
56.5k
    _conjuncts.resize(_parent->_conjuncts.size());
618
56.5k
    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.5k
    if (_parent->has_projection()) {
622
12.0k
        const auto& projection = *_parent->_projection;
623
12.0k
        _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
12.0k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
12.1k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
121
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
2.04k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
1.92k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
1.92k
                        state, _intermediate_projections[i][j]));
633
1.92k
            }
634
121
        }
635
12.0k
    }
636
56.5k
    return Status::OK();
637
56.5k
}
_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.80k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
4.80k
    _conjuncts.resize(_parent->_conjuncts.size());
618
5.00k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
194
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
194
    }
621
4.80k
    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.80k
    return Status::OK();
637
4.80k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
465
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
465
    _conjuncts.resize(_parent->_conjuncts.size());
618
465
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
465
    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
465
    return Status::OK();
637
465
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
5.26k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
5.26k
    _conjuncts.resize(_parent->_conjuncts.size());
618
5.26k
    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.26k
    if (_parent->has_projection()) {
622
77
        const auto& projection = *_parent->_projection;
623
77
        _projections.resize(projection.projections.size());
624
262
        for (size_t i = 0; i < _projections.size(); i++) {
625
185
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
185
        }
627
77
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
77
        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
77
    }
636
5.26k
    return Status::OK();
637
5.26k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
675k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
675k
    _conjuncts.resize(_parent->_conjuncts.size());
618
675k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
675k
    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
675k
    return Status::OK();
637
675k
}
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
8.96k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
8.96k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
8.96k
    _terminated = true;
645
8.96k
    return Status::OK();
646
8.96k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
497
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
497
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
497
    _terminated = true;
645
497
    return Status::OK();
646
497
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
21
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
21
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
21
    _terminated = true;
645
21
    return Status::OK();
646
21
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_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
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
2
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
2
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
2
    _terminated = true;
645
2
    return Status::OK();
646
2
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
63
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
63
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
63
    _terminated = true;
645
63
    return Status::OK();
646
63
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
6.67k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
6.67k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
6.67k
    _terminated = true;
645
6.67k
    return Status::OK();
646
6.67k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
44
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
44
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
44
    _terminated = true;
645
44
    return Status::OK();
646
44
}
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
378
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
378
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
378
    _terminated = true;
645
378
    return Status::OK();
646
378
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
1.20k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
1.20k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
1.20k
    _terminated = true;
645
1.20k
    return Status::OK();
646
1.20k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
36
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
36
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
36
    _terminated = true;
645
36
    return Status::OK();
646
36
}
647
648
template <typename SharedStateArg>
649
2.33M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
2.33M
    if (_closed) {
651
258k
        return Status::OK();
652
258k
    }
653
2.07M
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
1.23M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
1.23M
    }
656
2.07M
    _closed = true;
657
2.07M
    return Status::OK();
658
2.33M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
67.6k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
67.6k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
67.6k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
67.6k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
67.6k
    }
656
67.6k
    _closed = true;
657
67.6k
    return Status::OK();
658
67.6k
}
_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
467k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
467k
    if (_closed) {
651
234k
        return Status::OK();
652
234k
    }
653
233k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
233k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
233k
    }
656
233k
    _closed = true;
657
233k
    return Status::OK();
658
467k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
159
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
159
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
159
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
159
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
159
    }
656
159
    _closed = true;
657
159
    return Status::OK();
658
159
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
5.94k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
5.94k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
5.94k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
5.94k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
5.94k
    }
656
5.94k
    _closed = true;
657
5.94k
    return Status::OK();
658
5.94k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
9.51k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
9.51k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
9.51k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
9.51k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
9.51k
    }
656
9.51k
    _closed = true;
657
9.51k
    return Status::OK();
658
9.51k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
100k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
100k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
100k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
100k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
100k
    }
656
100k
    _closed = true;
657
100k
    return Status::OK();
658
100k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
78.1k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
78.1k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
78.1k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
78.1k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
78.1k
    }
656
78.1k
    _closed = true;
657
78.1k
    return Status::OK();
658
78.1k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
128
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
128
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
128
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
128
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
128
    }
656
128
    _closed = true;
657
128
    return Status::OK();
658
128
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
857k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
857k
    if (_closed) {
651
17.5k
        return Status::OK();
652
17.5k
    }
653
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
    }
656
840k
    _closed = true;
657
840k
    return Status::OK();
658
857k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
56.5k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
56.5k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
56.5k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
56.5k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
56.5k
    }
656
56.5k
    _closed = true;
657
56.5k
    return Status::OK();
658
56.5k
}
_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.79k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
4.79k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
4.79k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
4.79k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
4.79k
    }
656
4.79k
    _closed = true;
657
4.79k
    return Status::OK();
658
4.79k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
722
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
722
    if (_closed) {
651
361
        return Status::OK();
652
361
    }
653
361
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
361
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
361
    }
656
361
    _closed = true;
657
361
    return Status::OK();
658
722
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
10.8k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
10.8k
    if (_closed) {
651
5.58k
        return Status::OK();
652
5.58k
    }
653
5.24k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
5.24k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
5.24k
    }
656
5.24k
    _closed = true;
657
5.24k
    return Status::OK();
658
10.8k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
676k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
676k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
676k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
676k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
676k
    }
656
676k
    _closed = true;
657
676k
    return Status::OK();
658
676k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
337
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
337
    if (_closed) {
651
177
        return Status::OK();
652
177
    }
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
337
}
659
660
template <typename SharedState>
661
1.78M
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
1.78M
    _operator_profile =
664
1.78M
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
1.78M
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
1.78M
    _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.78M
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
1.78M
    _operator_profile->add_child(_common_profile, true);
673
1.78M
    _operator_profile->add_child(_custom_profile, true);
674
675
1.78M
    _operator_profile->set_metadata(_parent->node_id());
676
1.78M
    _wait_for_finish_dependency_timer =
677
1.78M
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
1.78M
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
1.78M
    if constexpr (!is_fake_shared) {
680
1.26M
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
1.26M
            info.shared_state_map.end()) {
682
355k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
260k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
260k
            }
685
355k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
355k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
355k
                                                  ? 0
688
355k
                                                  : info.task_idx]
689
355k
                                  .get();
690
355k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
905k
        } else {
692
18.4E
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
18.4E
                DCHECK(false);
694
18.4E
            }
695
905k
            _shared_state = info.shared_state->template cast<SharedState>();
696
905k
            _dependency = _shared_state->create_sink_dependency(
697
905k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
905k
        }
699
1.26M
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
1.26M
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
1.26M
    }
702
703
1.78M
    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.78M
    _rows_input_counter =
708
1.78M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
1.78M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
1.78M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
1.78M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
1.78M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
1.78M
    _memory_used_counter =
714
1.78M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
1.78M
    _common_profile->add_info_string("IsColocate",
716
1.78M
                                     std::to_string(_parent->is_colocated_operator()));
717
1.78M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
1.78M
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
1.78M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
1.78M
    return Status::OK();
721
1.78M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
115k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
115k
    _operator_profile =
664
115k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
115k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
115k
    _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
115k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
115k
    _operator_profile->add_child(_common_profile, true);
673
115k
    _operator_profile->add_child(_custom_profile, true);
674
675
115k
    _operator_profile->set_metadata(_parent->node_id());
676
115k
    _wait_for_finish_dependency_timer =
677
115k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
115k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
115k
    if constexpr (!is_fake_shared) {
680
115k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
115k
            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
16.6k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
16.6k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
16.6k
                                                  ? 0
688
16.6k
                                                  : info.task_idx]
689
16.6k
                                  .get();
690
16.6k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
98.9k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
98.9k
            _shared_state = info.shared_state->template cast<SharedState>();
696
98.9k
            _dependency = _shared_state->create_sink_dependency(
697
98.9k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
98.9k
        }
699
115k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
115k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
115k
    }
702
703
115k
    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
115k
    _rows_input_counter =
708
115k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
115k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
115k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
115k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
115k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
115k
    _memory_used_counter =
714
115k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
115k
    _common_profile->add_info_string("IsColocate",
716
115k
                                     std::to_string(_parent->is_colocated_operator()));
717
115k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
115k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
115k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
115k
    return Status::OK();
721
115k
}
_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
235k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
235k
    _operator_profile =
664
235k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
235k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
235k
    _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
235k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
235k
    _operator_profile->add_child(_common_profile, true);
673
235k
    _operator_profile->add_child(_custom_profile, true);
674
675
235k
    _operator_profile->set_metadata(_parent->node_id());
676
235k
    _wait_for_finish_dependency_timer =
677
235k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
235k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
235k
    if constexpr (!is_fake_shared) {
680
235k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
235k
            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
235k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
235k
            _shared_state = info.shared_state->template cast<SharedState>();
696
235k
            _dependency = _shared_state->create_sink_dependency(
697
235k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
235k
        }
699
235k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
235k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
235k
    }
702
703
235k
    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
235k
    _rows_input_counter =
708
235k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
235k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
235k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
235k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
235k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
235k
    _memory_used_counter =
714
235k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
235k
    _common_profile->add_info_string("IsColocate",
716
235k
                                     std::to_string(_parent->is_colocated_operator()));
717
235k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
235k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
235k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
235k
    return Status::OK();
721
235k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
166
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
166
    _operator_profile =
664
166
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
166
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
166
    _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
166
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
166
    _operator_profile->add_child(_common_profile, true);
673
166
    _operator_profile->add_child(_custom_profile, true);
674
675
166
    _operator_profile->set_metadata(_parent->node_id());
676
166
    _wait_for_finish_dependency_timer =
677
166
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
166
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
166
    if constexpr (!is_fake_shared) {
680
166
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
166
            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
166
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
166
            _shared_state = info.shared_state->template cast<SharedState>();
696
166
            _dependency = _shared_state->create_sink_dependency(
697
166
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
166
        }
699
166
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
166
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
166
    }
702
703
166
    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
166
    _rows_input_counter =
708
166
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
166
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
166
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
166
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
166
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
166
    _memory_used_counter =
714
166
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
166
    _common_profile->add_info_string("IsColocate",
716
166
                                     std::to_string(_parent->is_colocated_operator()));
717
166
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
166
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
166
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
166
    return Status::OK();
721
166
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
5.94k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
5.94k
    _operator_profile =
664
5.94k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
5.94k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
5.94k
    _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.94k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
5.94k
    _operator_profile->add_child(_common_profile, true);
673
5.94k
    _operator_profile->add_child(_custom_profile, true);
674
675
5.94k
    _operator_profile->set_metadata(_parent->node_id());
676
5.94k
    _wait_for_finish_dependency_timer =
677
5.94k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
5.94k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
5.94k
    if constexpr (!is_fake_shared) {
680
5.94k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
5.94k
            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.94k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
5.94k
            _shared_state = info.shared_state->template cast<SharedState>();
696
5.94k
            _dependency = _shared_state->create_sink_dependency(
697
5.94k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
5.94k
        }
699
5.94k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
5.94k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
5.94k
    }
702
703
5.94k
    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.94k
    _rows_input_counter =
708
5.94k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
5.94k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
5.94k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
5.94k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
5.94k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
5.94k
    _memory_used_counter =
714
5.94k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
5.94k
    _common_profile->add_info_string("IsColocate",
716
5.94k
                                     std::to_string(_parent->is_colocated_operator()));
717
5.94k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
5.94k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
5.94k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
5.94k
    return Status::OK();
721
5.94k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
9.57k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
9.57k
    _operator_profile =
664
9.57k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
9.57k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
9.57k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
9.57k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
9.57k
    _operator_profile->add_child(_common_profile, true);
673
9.57k
    _operator_profile->add_child(_custom_profile, true);
674
675
9.57k
    _operator_profile->set_metadata(_parent->node_id());
676
9.57k
    _wait_for_finish_dependency_timer =
677
9.57k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
9.57k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
9.57k
    if constexpr (!is_fake_shared) {
680
9.57k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
9.57k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
9.57k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
9.57k
            _shared_state = info.shared_state->template cast<SharedState>();
696
9.57k
            _dependency = _shared_state->create_sink_dependency(
697
9.57k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
9.57k
        }
699
9.57k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
9.57k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
9.57k
    }
702
703
9.57k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
9.57k
    _rows_input_counter =
708
9.57k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
9.57k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
9.57k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
9.57k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
9.57k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
9.57k
    _memory_used_counter =
714
9.57k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
9.57k
    _common_profile->add_info_string("IsColocate",
716
9.57k
                                     std::to_string(_parent->is_colocated_operator()));
717
9.57k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
9.57k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
9.57k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
9.57k
    return Status::OK();
721
9.57k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
100k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
100k
    _operator_profile =
664
100k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
100k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
100k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
100k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
100k
    _operator_profile->add_child(_common_profile, true);
673
100k
    _operator_profile->add_child(_custom_profile, true);
674
675
100k
    _operator_profile->set_metadata(_parent->node_id());
676
100k
    _wait_for_finish_dependency_timer =
677
100k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
100k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
100k
    if constexpr (!is_fake_shared) {
680
100k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
100k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
100k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
100k
            _shared_state = info.shared_state->template cast<SharedState>();
696
100k
            _dependency = _shared_state->create_sink_dependency(
697
100k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
100k
        }
699
100k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
100k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
100k
    }
702
703
100k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
100k
    _rows_input_counter =
708
100k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
100k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
100k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
100k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
100k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
100k
    _memory_used_counter =
714
100k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
100k
    _common_profile->add_info_string("IsColocate",
716
100k
                                     std::to_string(_parent->is_colocated_operator()));
717
100k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
100k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
100k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
100k
    return Status::OK();
721
100k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
78.4k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
78.4k
    _operator_profile =
664
78.4k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
78.4k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
78.4k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
78.4k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
78.4k
    _operator_profile->add_child(_common_profile, true);
673
78.4k
    _operator_profile->add_child(_custom_profile, true);
674
675
78.4k
    _operator_profile->set_metadata(_parent->node_id());
676
78.4k
    _wait_for_finish_dependency_timer =
677
78.4k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
78.4k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
78.4k
    if constexpr (!is_fake_shared) {
680
78.4k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
78.4k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
78.3k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
78.3k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
78.3k
                                                  ? 0
688
78.3k
                                                  : info.task_idx]
689
78.3k
                                  .get();
690
78.3k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
78.3k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
123
            _shared_state = info.shared_state->template cast<SharedState>();
696
123
            _dependency = _shared_state->create_sink_dependency(
697
123
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
123
        }
699
78.4k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
78.4k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
78.4k
    }
702
703
78.4k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
78.4k
    _rows_input_counter =
708
78.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
78.4k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
78.4k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
78.4k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
78.4k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
78.4k
    _memory_used_counter =
714
78.4k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
78.4k
    _common_profile->add_info_string("IsColocate",
716
78.4k
                                     std::to_string(_parent->is_colocated_operator()));
717
78.4k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
78.4k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
78.4k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
78.4k
    return Status::OK();
721
78.4k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
139
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
139
    _operator_profile =
664
139
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
139
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
139
    _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
139
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
139
    _operator_profile->add_child(_common_profile, true);
673
139
    _operator_profile->add_child(_custom_profile, true);
674
675
139
    _operator_profile->set_metadata(_parent->node_id());
676
139
    _wait_for_finish_dependency_timer =
677
139
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
139
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
139
    if constexpr (!is_fake_shared) {
680
139
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
139
            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
139
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
139
            _shared_state = info.shared_state->template cast<SharedState>();
696
139
            _dependency = _shared_state->create_sink_dependency(
697
139
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
139
        }
699
139
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
139
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
139
    }
702
703
139
    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
139
    _rows_input_counter =
708
139
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
139
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
139
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
139
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
139
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
139
    _memory_used_counter =
714
139
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
139
    _common_profile->add_info_string("IsColocate",
716
139
                                     std::to_string(_parent->is_colocated_operator()));
717
139
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
139
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
139
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
139
    return Status::OK();
721
139
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
520k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
520k
    _operator_profile =
664
520k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
520k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
520k
    _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
520k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
520k
    _operator_profile->add_child(_common_profile, true);
673
520k
    _operator_profile->add_child(_custom_profile, true);
674
675
520k
    _operator_profile->set_metadata(_parent->node_id());
676
520k
    _wait_for_finish_dependency_timer =
677
520k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
520k
    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
520k
    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
520k
    _rows_input_counter =
708
520k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
520k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
520k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
520k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
520k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
520k
    _memory_used_counter =
714
520k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
520k
    _common_profile->add_info_string("IsColocate",
716
520k
                                     std::to_string(_parent->is_colocated_operator()));
717
520k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
520k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
520k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
520k
    return Status::OK();
721
520k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
10.0k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
10.0k
    _operator_profile =
664
10.0k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
10.0k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
10.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
10.0k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
10.0k
    _operator_profile->add_child(_common_profile, true);
673
10.0k
    _operator_profile->add_child(_custom_profile, true);
674
675
10.0k
    _operator_profile->set_metadata(_parent->node_id());
676
10.0k
    _wait_for_finish_dependency_timer =
677
10.0k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
10.0k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
10.0k
    if constexpr (!is_fake_shared) {
680
10.0k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
10.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
10.0k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
10.0k
            _shared_state = info.shared_state->template cast<SharedState>();
696
10.0k
            _dependency = _shared_state->create_sink_dependency(
697
10.0k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
10.0k
        }
699
10.0k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
10.0k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
10.0k
    }
702
703
10.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
10.0k
    _rows_input_counter =
708
10.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
10.0k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
10.0k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
10.0k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
10.0k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
10.0k
    _memory_used_counter =
714
10.0k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
10.0k
    _common_profile->add_info_string("IsColocate",
716
10.0k
                                     std::to_string(_parent->is_colocated_operator()));
717
10.0k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
10.0k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
10.0k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
10.0k
    return Status::OK();
721
10.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
463
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
463
    _operator_profile =
664
463
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
463
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
463
    _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
463
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
463
    _operator_profile->add_child(_common_profile, true);
673
463
    _operator_profile->add_child(_custom_profile, true);
674
675
463
    _operator_profile->set_metadata(_parent->node_id());
676
463
    _wait_for_finish_dependency_timer =
677
463
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
463
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
463
    if constexpr (!is_fake_shared) {
680
463
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
463
            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
463
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
463
            _shared_state = info.shared_state->template cast<SharedState>();
696
463
            _dependency = _shared_state->create_sink_dependency(
697
463
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
463
        }
699
463
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
463
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
463
    }
702
703
464
    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
463
    _rows_input_counter =
708
463
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
463
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
463
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
463
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
463
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
463
    _memory_used_counter =
714
463
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
463
    _common_profile->add_info_string("IsColocate",
716
463
                                     std::to_string(_parent->is_colocated_operator()));
717
463
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
463
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
463
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
463
    return Status::OK();
721
463
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
1.96k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
1.96k
    _operator_profile =
664
1.96k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
1.96k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
1.96k
    _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.96k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
1.96k
    _operator_profile->add_child(_common_profile, true);
673
1.96k
    _operator_profile->add_child(_custom_profile, true);
674
675
1.96k
    _operator_profile->set_metadata(_parent->node_id());
676
1.96k
    _wait_for_finish_dependency_timer =
677
1.96k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
1.96k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
1.96k
    if constexpr (!is_fake_shared) {
680
1.96k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
1.96k
            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.96k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
1.96k
            _shared_state = info.shared_state->template cast<SharedState>();
696
1.96k
            _dependency = _shared_state->create_sink_dependency(
697
1.96k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
1.96k
        }
699
1.96k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
1.96k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
1.96k
    }
702
703
1.96k
    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.96k
    _rows_input_counter =
708
1.96k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
1.96k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
1.96k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
1.96k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
1.96k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
1.96k
    _memory_used_counter =
714
1.96k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
1.96k
    _common_profile->add_info_string("IsColocate",
716
1.96k
                                     std::to_string(_parent->is_colocated_operator()));
717
1.96k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
1.96k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
1.96k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
1.96k
    return Status::OK();
721
1.96k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
12.9k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
12.9k
    _operator_profile =
664
12.9k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
12.9k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
12.9k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
12.9k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
12.9k
    _operator_profile->add_child(_common_profile, true);
673
12.9k
    _operator_profile->add_child(_custom_profile, true);
674
675
12.9k
    _operator_profile->set_metadata(_parent->node_id());
676
12.9k
    _wait_for_finish_dependency_timer =
677
12.9k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
12.9k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
12.9k
    if constexpr (!is_fake_shared) {
680
12.9k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
12.9k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
12.9k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
12.9k
            _shared_state = info.shared_state->template cast<SharedState>();
696
12.9k
            _dependency = _shared_state->create_sink_dependency(
697
12.9k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
12.9k
        }
699
12.9k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
12.9k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
12.9k
    }
702
703
12.9k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
12.9k
    _rows_input_counter =
708
12.9k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
12.9k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
12.9k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
12.9k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
12.9k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
12.9k
    _memory_used_counter =
714
12.9k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
12.9k
    _common_profile->add_info_string("IsColocate",
716
12.9k
                                     std::to_string(_parent->is_colocated_operator()));
717
12.9k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
12.9k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
12.9k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
12.9k
    return Status::OK();
721
12.9k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
260k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
260k
    _operator_profile =
664
260k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
260k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
260k
    _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
260k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
260k
    _operator_profile->add_child(_common_profile, true);
673
260k
    _operator_profile->add_child(_custom_profile, true);
674
675
260k
    _operator_profile->set_metadata(_parent->node_id());
676
260k
    _wait_for_finish_dependency_timer =
677
260k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
260k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
260k
    if constexpr (!is_fake_shared) {
680
260k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
260k
            info.shared_state_map.end()) {
682
260k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
260k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
260k
            }
685
260k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
260k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
260k
                                                  ? 0
688
260k
                                                  : info.task_idx]
689
260k
                                  .get();
690
260k
            _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
260k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
260k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
260k
    }
702
703
260k
    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
260k
    _rows_input_counter =
708
260k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
260k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
260k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
260k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
260k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
260k
    _memory_used_counter =
714
260k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
260k
    _common_profile->add_info_string("IsColocate",
716
260k
                                     std::to_string(_parent->is_colocated_operator()));
717
260k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
260k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
260k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
260k
    return Status::OK();
721
260k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
428k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
428k
    _operator_profile =
664
428k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
428k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
428k
    _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
428k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
428k
    _operator_profile->add_child(_common_profile, true);
673
428k
    _operator_profile->add_child(_custom_profile, true);
674
675
428k
    _operator_profile->set_metadata(_parent->node_id());
676
428k
    _wait_for_finish_dependency_timer =
677
428k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
428k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
428k
    if constexpr (!is_fake_shared) {
680
428k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
428k
            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
428k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
428k
            _shared_state = info.shared_state->template cast<SharedState>();
696
428k
            _dependency = _shared_state->create_sink_dependency(
697
428k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
428k
        }
699
428k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
428k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
428k
    }
702
703
428k
    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
428k
    _rows_input_counter =
708
428k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
428k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
428k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
428k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
428k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
428k
    _memory_used_counter =
714
428k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
428k
    _common_profile->add_info_string("IsColocate",
716
428k
                                     std::to_string(_parent->is_colocated_operator()));
717
428k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
428k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
428k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
428k
    return Status::OK();
721
428k
}
_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.78M
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
1.78M
    if (_closed) {
726
2
        return Status::OK();
727
2
    }
728
1.78M
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
1.26M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
1.26M
    }
731
1.78M
    _closed = true;
732
1.78M
    return Status::OK();
733
1.78M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
115k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
115k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
115k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
115k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
115k
    }
731
115k
    _closed = true;
732
115k
    return Status::OK();
733
115k
}
_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
234k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
234k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
234k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
234k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
234k
    }
731
234k
    _closed = true;
732
234k
    return Status::OK();
733
234k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
157
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
157
    if (_closed) {
726
2
        return Status::OK();
727
2
    }
728
155
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
155
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
155
    }
731
155
    _closed = true;
732
155
    return Status::OK();
733
157
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
5.89k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
5.89k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
5.89k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
5.89k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
5.89k
    }
731
5.89k
    _closed = true;
732
5.89k
    return Status::OK();
733
5.89k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
9.51k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
9.51k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
9.51k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
9.51k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
9.51k
    }
731
9.51k
    _closed = true;
732
9.51k
    return Status::OK();
733
9.51k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
100k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
100k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
100k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
100k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
100k
    }
731
100k
    _closed = true;
732
100k
    return Status::OK();
733
100k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
78.1k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
78.1k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
78.1k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
78.1k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
78.1k
    }
731
78.1k
    _closed = true;
732
78.1k
    return Status::OK();
733
78.1k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
128
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
128
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
128
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
128
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
128
    }
731
128
    _closed = true;
732
128
    return Status::OK();
733
128
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
522k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
522k
    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
522k
    _closed = true;
732
522k
    return Status::OK();
733
522k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
10.0k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
10.0k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
10.0k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
10.0k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
10.0k
    }
731
10.0k
    _closed = true;
732
10.0k
    return Status::OK();
733
10.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
362
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
362
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
362
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
362
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
362
    }
731
362
    _closed = true;
732
362
    return Status::OK();
733
362
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
1.96k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
1.96k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
1.96k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
1.96k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
1.96k
    }
731
1.96k
    _closed = true;
732
1.96k
    return Status::OK();
733
1.96k
}
_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
260k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
260k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
260k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
260k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
260k
    }
731
260k
    _closed = true;
732
260k
    return Status::OK();
733
260k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
429k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
429k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
429k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
429k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
429k
    }
731
429k
    _closed = true;
732
429k
    return Status::OK();
733
429k
}
_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.19k
                                                          bool* eos) {
738
1.19k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
1.19k
    return pull(state, block, eos);
740
1.19k
}
_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.15k
                                                          bool* eos) {
738
1.15k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
1.15k
    return pull(state, block, eos);
740
1.15k
}
741
742
template <typename LocalStateType>
743
Status StatefulOperatorX<LocalStateType>::get_block_impl(RuntimeState* state, Block* block,
744
525k
                                                         bool* eos) {
745
525k
    auto& local_state = get_local_state(state);
746
525k
    if (need_more_input_data(state)) {
747
494k
        local_state._child_block->clear_column_data(
748
494k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
494k
                        .num_slots());
750
494k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
494k
                state, local_state._child_block.get(), &local_state._child_eos));
752
494k
        *eos = local_state._child_eos;
753
494k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
80.2k
            return Status::OK();
755
80.2k
        }
756
413k
        {
757
413k
            SCOPED_TIMER(local_state.exec_time_counter());
758
413k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
413k
        }
760
413k
    }
761
762
444k
    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
338k
            *eos = true;
768
338k
        } else if (!need_more_input_data(state)) {
769
23.6k
            *eos = false;
770
23.6k
        }
771
415k
    }
772
444k
    return Status::OK();
773
444k
}
_ZN5doris17StatefulOperatorXINS_23HashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
137k
                                                         bool* eos) {
745
137k
    auto& local_state = get_local_state(state);
746
137k
    if (need_more_input_data(state)) {
747
120k
        local_state._child_block->clear_column_data(
748
120k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
120k
                        .num_slots());
750
120k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
120k
                state, local_state._child_block.get(), &local_state._child_eos));
752
120k
        *eos = local_state._child_eos;
753
120k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
38.7k
            return Status::OK();
755
38.7k
        }
756
81.3k
        {
757
81.3k
            SCOPED_TIMER(local_state.exec_time_counter());
758
81.3k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
81.3k
        }
760
81.3k
    }
761
762
98.8k
    if (!need_more_input_data(state)) {
763
98.8k
        SCOPED_TIMER(local_state.exec_time_counter());
764
98.8k
        bool new_eos = false;
765
98.8k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
98.8k
        if (new_eos) {
767
43.1k
            *eos = true;
768
55.6k
        } else if (!need_more_input_data(state)) {
769
9.67k
            *eos = false;
770
9.67k
        }
771
98.8k
    }
772
98.7k
    return Status::OK();
773
98.7k
}
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_34PartitionedHashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
_ZN5doris17StatefulOperatorXINS_16RepeatLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
4.13k
                                                         bool* eos) {
745
4.13k
    auto& local_state = get_local_state(state);
746
4.13k
    if (need_more_input_data(state)) {
747
2.22k
        local_state._child_block->clear_column_data(
748
2.22k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
2.22k
                        .num_slots());
750
2.22k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
2.22k
                state, local_state._child_block.get(), &local_state._child_eos));
752
2.22k
        *eos = local_state._child_eos;
753
2.22k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
325
            return Status::OK();
755
325
        }
756
1.90k
        {
757
1.90k
            SCOPED_TIMER(local_state.exec_time_counter());
758
1.90k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
1.90k
        }
760
1.90k
    }
761
762
3.83k
    if (!need_more_input_data(state)) {
763
3.83k
        SCOPED_TIMER(local_state.exec_time_counter());
764
3.83k
        bool new_eos = false;
765
3.83k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
3.83k
        if (new_eos) {
767
1.39k
            *eos = true;
768
2.44k
        } else if (!need_more_input_data(state)) {
769
1.91k
            *eos = false;
770
1.91k
        }
771
3.83k
    }
772
3.81k
    return Status::OK();
773
3.81k
}
_ZN5doris17StatefulOperatorXINS_25MaterializationLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
1.93k
                                                         bool* eos) {
745
1.93k
    auto& local_state = get_local_state(state);
746
1.93k
    if (need_more_input_data(state)) {
747
1.93k
        local_state._child_block->clear_column_data(
748
1.93k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
1.93k
                        .num_slots());
750
1.93k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
1.93k
                state, local_state._child_block.get(), &local_state._child_eos));
752
1.93k
        *eos = local_state._child_eos;
753
1.93k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
781
            return Status::OK();
755
781
        }
756
1.15k
        {
757
1.15k
            SCOPED_TIMER(local_state.exec_time_counter());
758
1.15k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
1.15k
        }
760
1.15k
    }
761
762
1.15k
    if (!need_more_input_data(state)) {
763
1.15k
        SCOPED_TIMER(local_state.exec_time_counter());
764
1.15k
        bool new_eos = false;
765
1.15k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
1.15k
        if (new_eos) {
767
799
            *eos = true;
768
799
        } else if (!need_more_input_data(state)) {
769
0
            *eos = false;
770
0
        }
771
1.15k
    }
772
1.15k
    return Status::OK();
773
1.15k
}
_ZN5doris17StatefulOperatorXINS_22StreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
17.2k
                                                         bool* eos) {
745
17.2k
    auto& local_state = get_local_state(state);
746
17.2k
    if (need_more_input_data(state)) {
747
17.2k
        local_state._child_block->clear_column_data(
748
17.2k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
17.2k
                        .num_slots());
750
17.2k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
17.2k
                state, local_state._child_block.get(), &local_state._child_eos));
752
17.2k
        *eos = local_state._child_eos;
753
17.2k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
3.02k
            return Status::OK();
755
3.02k
        }
756
14.2k
        {
757
14.2k
            SCOPED_TIMER(local_state.exec_time_counter());
758
14.2k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
14.2k
        }
760
14.2k
    }
761
762
14.2k
    if (!need_more_input_data(state)) {
763
8.03k
        SCOPED_TIMER(local_state.exec_time_counter());
764
8.03k
        bool new_eos = false;
765
8.03k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
8.03k
        if (new_eos) {
767
7.88k
            *eos = true;
768
7.88k
        } else if (!need_more_input_data(state)) {
769
5
            *eos = false;
770
5
        }
771
8.03k
    }
772
14.2k
    return Status::OK();
773
14.2k
}
_ZN5doris17StatefulOperatorXINS_30DistinctStreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
333k
                                                         bool* eos) {
745
333k
    auto& local_state = get_local_state(state);
746
333k
    if (need_more_input_data(state)) {
747
333k
        local_state._child_block->clear_column_data(
748
333k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
333k
                        .num_slots());
750
333k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
333k
                state, local_state._child_block.get(), &local_state._child_eos));
752
333k
        *eos = local_state._child_eos;
753
333k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
36.5k
            return Status::OK();
755
36.5k
        }
756
297k
        {
757
297k
            SCOPED_TIMER(local_state.exec_time_counter());
758
297k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
297k
        }
760
297k
    }
761
762
296k
    if (!need_more_input_data(state)) {
763
274k
        SCOPED_TIMER(local_state.exec_time_counter());
764
274k
        bool new_eos = false;
765
274k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
274k
        if (new_eos) {
767
273k
            *eos = true;
768
273k
        } else if (!need_more_input_data(state)) {
769
6
            *eos = false;
770
6
        }
771
274k
    }
772
296k
    return Status::OK();
773
296k
}
_ZN5doris17StatefulOperatorXINS_29NestedLoopJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
21.7k
                                                         bool* eos) {
745
21.7k
    auto& local_state = get_local_state(state);
746
21.7k
    if (need_more_input_data(state)) {
747
10.0k
        local_state._child_block->clear_column_data(
748
10.0k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
10.0k
                        .num_slots());
750
10.0k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
10.0k
                state, local_state._child_block.get(), &local_state._child_eos));
752
10.0k
        *eos = local_state._child_eos;
753
10.0k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
308
            return Status::OK();
755
308
        }
756
9.73k
        {
757
9.73k
            SCOPED_TIMER(local_state.exec_time_counter());
758
9.73k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
9.73k
        }
760
9.73k
    }
761
762
21.4k
    if (!need_more_input_data(state)) {
763
20.8k
        SCOPED_TIMER(local_state.exec_time_counter());
764
20.8k
        bool new_eos = false;
765
20.8k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
20.8k
        if (new_eos) {
767
5.92k
            *eos = true;
768
14.9k
        } else if (!need_more_input_data(state)) {
769
11.7k
            *eos = false;
770
11.7k
        }
771
20.8k
    }
772
21.4k
    return Status::OK();
773
21.4k
}
_ZN5doris17StatefulOperatorXINS_23TableFunctionLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
9.18k
                                                         bool* eos) {
745
9.18k
    auto& local_state = get_local_state(state);
746
9.18k
    if (need_more_input_data(state)) {
747
8.83k
        local_state._child_block->clear_column_data(
748
8.83k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
8.83k
                        .num_slots());
750
8.83k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
8.83k
                state, local_state._child_block.get(), &local_state._child_eos));
752
8.83k
        *eos = local_state._child_eos;
753
8.83k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
518
            return Status::OK();
755
518
        }
756
8.31k
        {
757
8.31k
            SCOPED_TIMER(local_state.exec_time_counter());
758
8.31k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
8.31k
        }
760
8.31k
    }
761
762
8.67k
    if (!need_more_input_data(state)) {
763
8.67k
        SCOPED_TIMER(local_state.exec_time_counter());
764
8.67k
        bool new_eos = false;
765
8.67k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
8.67k
        if (new_eos) {
767
6.16k
            *eos = true;
768
6.16k
        } else if (!need_more_input_data(state)) {
769
366
            *eos = false;
770
366
        }
771
8.67k
    }
772
8.66k
    return Status::OK();
773
8.66k
}
774
775
template <typename Writer, typename Parent>
776
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
777
49.5k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
49.5k
    RETURN_IF_ERROR(Base::init(state, info));
779
49.5k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
49.5k
                                                         "AsyncWriterDependency", true);
781
49.5k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
49.5k
                             _finish_dependency));
783
784
49.5k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
49.5k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
49.5k
    return Status::OK();
787
49.5k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
364
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
364
    RETURN_IF_ERROR(Base::init(state, info));
779
364
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
364
                                                         "AsyncWriterDependency", true);
781
364
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
364
                             _finish_dependency));
783
784
364
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
364
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
364
    return Status::OK();
787
364
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
49.1k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
49.1k
    RETURN_IF_ERROR(Base::init(state, info));
779
49.1k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
49.1k
                                                         "AsyncWriterDependency", true);
781
49.1k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
49.1k
                             _finish_dependency));
783
784
49.1k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
49.1k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
49.1k
    return Status::OK();
787
49.1k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
4
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
4
    RETURN_IF_ERROR(Base::init(state, info));
779
4
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
4
                                                         "AsyncWriterDependency", true);
781
4
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
4
                             _finish_dependency));
783
784
4
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
4
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
4
    return Status::OK();
787
4
}
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.0k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
50.0k
    RETURN_IF_ERROR(Base::open(state));
793
50.0k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
389k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
339k
        RETURN_IF_ERROR(
796
339k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
339k
    }
798
50.0k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
50.0k
    return Status::OK();
800
50.0k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
364
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
364
    RETURN_IF_ERROR(Base::open(state));
793
364
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
1.84k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
1.47k
        RETURN_IF_ERROR(
796
1.47k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
1.47k
    }
798
364
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
364
    return Status::OK();
800
364
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
49.6k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
49.6k
    RETURN_IF_ERROR(Base::open(state));
793
49.6k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
387k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
338k
        RETURN_IF_ERROR(
796
338k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
338k
    }
798
49.6k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
49.6k
    return Status::OK();
800
49.6k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
4
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
4
    RETURN_IF_ERROR(Base::open(state));
793
4
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
72
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
68
        RETURN_IF_ERROR(
796
68
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
68
    }
798
4
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
4
    return Status::OK();
800
4
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
16
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
16
    RETURN_IF_ERROR(Base::open(state));
793
16
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
33
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
17
        RETURN_IF_ERROR(
796
17
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
17
    }
798
16
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
16
    return Status::OK();
800
16
}
801
802
template <typename Writer, typename Parent>
803
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
804
65.4k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
65.4k
    return _writer->sink(block, eos);
806
65.4k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
1.43k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
1.43k
    return _writer->sink(block, eos);
806
1.43k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
63.9k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
63.9k
    return _writer->sink(block, eos);
806
63.9k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
4
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
4
    return _writer->sink(block, eos);
806
4
}
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.0k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
50.0k
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
50.0k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
50.0k
    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.1k
    if (_writer) {
818
50.1k
        Status st = _writer->get_writer_status();
819
50.1k
        if (exec_status.ok()) {
820
50.0k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
50.0k
                                                       : Status::Cancelled("force close"));
822
50.0k
        } else {
823
75
            _writer->force_close(exec_status);
824
75
        }
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.1k
        RETURN_IF_ERROR(st);
829
50.1k
    }
830
50.0k
    return Base::close(state, exec_status);
831
50.0k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
353
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
353
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
353
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
353
    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
353
    if (_writer) {
818
353
        Status st = _writer->get_writer_status();
819
353
        if (exec_status.ok()) {
820
353
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
353
                                                       : Status::Cancelled("force close"));
822
353
        } 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
353
        RETURN_IF_ERROR(st);
829
353
    }
830
353
    return Base::close(state, exec_status);
831
353
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
49.7k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
49.7k
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
49.7k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
49.7k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
816
    // if the init failed, the _writer may be nullptr. so here need check
817
49.7k
    if (_writer) {
818
49.7k
        Status st = _writer->get_writer_status();
819
49.7k
        if (exec_status.ok()) {
820
49.6k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
49.6k
                                                       : Status::Cancelled("force close"));
822
49.6k
        } else {
823
75
            _writer->force_close(exec_status);
824
75
        }
825
        // If there is an error in process_block thread, then we should get the writer
826
        // status before call force_close. For example, the thread may failed in commit
827
        // transaction.
828
49.7k
        RETURN_IF_ERROR(st);
829
49.7k
    }
830
49.6k
    return Base::close(state, exec_status);
831
49.7k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
4
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
4
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
4
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
4
    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
4
    if (_writer) {
818
4
        Status st = _writer->get_writer_status();
819
4
        if (exec_status.ok()) {
820
4
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
4
                                                       : Status::Cancelled("force close"));
822
4
        } 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
4
        RETURN_IF_ERROR(st);
829
4
    }
830
4
    return Base::close(state, exec_status);
831
4
}
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