Coverage Report

Created: 2026-10-30 09:21

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.83M
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
1.83M
    if (_parent->nereids_id() == -1) {
123
967k
        return fmt::format("(id={})", _parent->node_id());
124
967k
    } else {
125
869k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
869k
    }
127
1.83M
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
72.9k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
72.9k
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
72.9k
    } else {
125
72.9k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
72.9k
    }
127
72.9k
}
_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
235k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
235k
    if (_parent->nereids_id() == -1) {
123
12
        return fmt::format("(id={})", _parent->node_id());
124
235k
    } else {
125
235k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
235k
    }
127
235k
}
_ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
155
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
155
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
155
    } else {
125
155
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
155
    }
127
155
}
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
6.91k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
6.91k
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
6.91k
    } else {
125
6.91k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
6.91k
    }
127
6.91k
}
_ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
11.3k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
11.3k
    if (_parent->nereids_id() == -1) {
123
60
        return fmt::format("(id={})", _parent->node_id());
124
11.2k
    } else {
125
11.2k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
11.2k
    }
127
11.3k
}
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
101k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
101k
    if (_parent->nereids_id() == -1) {
123
29
        return fmt::format("(id={})", _parent->node_id());
124
101k
    } else {
125
101k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
101k
    }
127
101k
}
_ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
76.0k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
76.0k
    if (_parent->nereids_id() == -1) {
123
2
        return fmt::format("(id={})", _parent->node_id());
124
76.0k
    } else {
125
76.0k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
76.0k
    }
127
76.0k
}
_ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
119
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
119
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
119
    } else {
125
119
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
119
    }
127
119
}
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
584k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
584k
    if (_parent->nereids_id() == -1) {
123
280k
        return fmt::format("(id={})", _parent->node_id());
124
304k
    } else {
125
304k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
304k
    }
127
584k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
56.0k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
56.0k
    if (_parent->nereids_id() == -1) {
123
2
        return fmt::format("(id={})", _parent->node_id());
124
56.0k
    } else {
125
56.0k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
56.0k
    }
127
56.0k
}
_ZNK5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
26
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
26
    if (_parent->nereids_id() == -1) {
123
26
        return fmt::format("(id={})", _parent->node_id());
124
26
    } else {
125
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
0
    }
127
26
}
_ZNK5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
5.91k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
5.93k
    if (_parent->nereids_id() == -1) {
123
5.93k
        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
5.91k
}
_ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
495
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
495
    if (_parent->nereids_id() == -1) {
123
102
        return fmt::format("(id={})", _parent->node_id());
124
393
    } else {
125
393
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
393
    }
127
495
}
_ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
5.08k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
5.08k
    if (_parent->nereids_id() == -1) {
123
13
        return fmt::format("(id={})", _parent->node_id());
124
5.06k
    } else {
125
5.06k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
5.06k
    }
127
5.08k
}
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
680k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
680k
    if (_parent->nereids_id() == -1) {
123
680k
        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
680k
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
_ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
168
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
168
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
168
    } else {
125
168
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
168
    }
127
168
}
128
129
template <typename SharedStateArg>
130
1.27M
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
1.27M
    if (_parent->nereids_id() == -1) {
132
704k
        return fmt::format("(id={})", _parent->node_id());
133
704k
    } else {
134
569k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
569k
    }
136
1.27M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
122k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
122k
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
122k
    } else {
134
122k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
122k
    }
136
122k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
5
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
5
    if (_parent->nereids_id() == -1) {
132
1
        return fmt::format("(id={})", _parent->node_id());
133
4
    } else {
134
4
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
4
    }
136
5
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
240k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
240k
    if (_parent->nereids_id() == -1) {
132
9
        return fmt::format("(id={})", _parent->node_id());
133
240k
    } else {
134
240k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
240k
    }
136
240k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
162
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
162
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
162
    } else {
134
162
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
162
    }
136
162
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
7.20k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
7.20k
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
7.20k
    } else {
134
7.20k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
7.20k
    }
136
7.20k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
11.6k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
11.6k
    if (_parent->nereids_id() == -1) {
132
60
        return fmt::format("(id={})", _parent->node_id());
133
11.6k
    } else {
134
11.6k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
11.6k
    }
136
11.6k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
101k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
101k
    if (_parent->nereids_id() == -1) {
132
29
        return fmt::format("(id={})", _parent->node_id());
133
101k
    } else {
134
101k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
101k
    }
136
101k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
75.8k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
75.8k
    if (_parent->nereids_id() == -1) {
132
4
        return fmt::format("(id={})", _parent->node_id());
133
75.8k
    } else {
134
75.8k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
75.8k
    }
136
75.8k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
129
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
129
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
129
    } else {
134
129
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
129
    }
136
129
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
28
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
28
    if (_parent->nereids_id() == -1) {
132
28
        return fmt::format("(id={})", _parent->node_id());
133
28
    } else {
134
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
0
    }
136
28
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
9.96k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
9.96k
    if (_parent->nereids_id() == -1) {
132
3
        return fmt::format("(id={})", _parent->node_id());
133
9.96k
    } else {
134
9.96k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
9.96k
    }
136
9.96k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
495
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
495
    if (_parent->nereids_id() == -1) {
132
102
        return fmt::format("(id={})", _parent->node_id());
133
393
    } else {
134
393
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
393
    }
136
495
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
12.3k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
12.3k
    if (_parent->nereids_id() == -1) {
132
12.3k
        return fmt::format("(id={})", _parent->node_id());
133
18.4E
    } else {
134
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
18.4E
    }
136
12.3k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
263k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
264k
    if (_parent->nereids_id() == -1) {
132
264k
        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
263k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
427k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
427k
    if (_parent->nereids_id() == -1) {
132
427k
        return fmt::format("(id={})", _parent->node_id());
133
427k
    } else {
134
96
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
96
    }
136
427k
}
_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
337
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
337
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
337
    } else {
134
337
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
337
    }
136
337
}
137
138
template <typename SharedStateArg>
139
32.4k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
32.4k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
32.4k
    _terminated = true;
144
32.4k
    return Status::OK();
145
32.4k
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
24.0k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
24.0k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
24.0k
    _terminated = true;
144
24.0k
    return Status::OK();
145
24.0k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
2.08k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
2.08k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
2.08k
    _terminated = true;
144
2.08k
    return Status::OK();
145
2.08k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_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_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
4
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
4
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
4
    _terminated = true;
144
4
    return Status::OK();
145
4
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
2.08k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
2.08k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
2.08k
    _terminated = true;
144
2.08k
    return Status::OK();
145
2.08k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
2.57k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
2.57k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
2.57k
    _terminated = true;
144
2.57k
    return Status::OK();
145
2.57k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
617
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
617
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
617
    _terminated = true;
144
617
    return Status::OK();
145
617
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
376
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
376
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
376
    _terminated = true;
144
376
    return Status::OK();
145
376
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
5
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
5
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
5
    _terminated = true;
144
5
    return Status::OK();
145
5
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
78
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
78
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
78
    _terminated = true;
144
78
    return Status::OK();
145
78
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
12
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
12
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
12
    _terminated = true;
144
12
    return Status::OK();
145
12
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
415
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
415
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
415
    _terminated = true;
144
415
    return Status::OK();
145
415
}
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
311k
DataDistribution OperatorBase::required_data_distribution(RuntimeState* /*state*/) const {
148
311k
    return _child && _child->is_serial_operator() && !is_source()
149
311k
                   ? DataDistribution(TLocalPartitionType::PASSTHROUGH)
150
311k
                   : DataDistribution(TLocalPartitionType::NOOP);
151
311k
}
152
153
23.0k
bool OperatorBase::child_breaks_local_key_distribution(RuntimeState* state) const {
154
23.0k
    if (!_child) {
155
22.2k
        return false;
156
22.2k
    }
157
792
    if (_child->is_serial_operator()) {
158
42
        return true;
159
42
    }
160
750
    const auto child_distribution = _child->required_data_distribution(state);
161
750
    return child_distribution.need_local_exchange() &&
162
750
           !is_shuffled_exchange(child_distribution.distribution_type);
163
792
}
164
165
template <typename SharedStateArg>
166
15.5k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
15.5k
    fmt::memory_buffer debug_string_buffer;
168
15.5k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
15.5k
    return fmt::to_string(debug_string_buffer);
170
15.5k
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
48
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
48
    fmt::memory_buffer debug_string_buffer;
168
48
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
48
    return fmt::to_string(debug_string_buffer);
170
48
}
_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
48
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
48
    fmt::memory_buffer debug_string_buffer;
168
48
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
48
    return fmt::to_string(debug_string_buffer);
170
48
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
248
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
248
    fmt::memory_buffer debug_string_buffer;
168
248
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
248
    return fmt::to_string(debug_string_buffer);
170
248
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
14.9k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
14.9k
    fmt::memory_buffer debug_string_buffer;
168
14.9k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
14.9k
    return fmt::to_string(debug_string_buffer);
170
14.9k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
1
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
1
    fmt::memory_buffer debug_string_buffer;
168
1
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
1
    return fmt::to_string(debug_string_buffer);
170
1
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
244
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
244
    fmt::memory_buffer debug_string_buffer;
168
244
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
244
    return fmt::to_string(debug_string_buffer);
170
244
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
171
172
template <typename SharedStateArg>
173
15.4k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
15.4k
    fmt::memory_buffer debug_string_buffer;
175
15.4k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
15.4k
    return fmt::to_string(debug_string_buffer);
177
15.4k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
48
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
48
    fmt::memory_buffer debug_string_buffer;
175
48
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
48
    return fmt::to_string(debug_string_buffer);
177
48
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
248
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
248
    fmt::memory_buffer debug_string_buffer;
175
248
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
248
    return fmt::to_string(debug_string_buffer);
177
248
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
196
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
196
    fmt::memory_buffer debug_string_buffer;
175
196
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
196
    return fmt::to_string(debug_string_buffer);
177
196
}
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
151
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
151
    fmt::memory_buffer debug_string_buffer;
175
151
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
151
    return fmt::to_string(debug_string_buffer);
177
151
}
_ZNK5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
14.8k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
14.8k
    fmt::memory_buffer debug_string_buffer;
175
14.8k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
14.8k
    return fmt::to_string(debug_string_buffer);
177
14.8k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
178
179
15.5k
std::string OperatorXBase::debug_string(int indentation_level) const {
180
15.5k
    fmt::memory_buffer debug_string_buffer;
181
15.5k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, parallel_tasks={}, _is_serial_operator={}",
182
15.5k
                   std::string(indentation_level * 2, ' '), _op_name, node_id(), _parallel_tasks,
183
15.5k
                   _is_serial_operator);
184
15.5k
    return fmt::to_string(debug_string_buffer);
185
15.5k
}
186
187
15.5k
std::string OperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
188
15.5k
    return state->get_local_state(operator_id())->debug_string(indentation_level);
189
15.5k
}
190
191
694k
Status OperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
192
694k
    std::string node_name = print_plan_node_type(tnode.node_type);
193
694k
    _nereids_id = tnode.nereids_id;
194
694k
    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
694k
    auto substr = node_name.substr(0, node_name.find("_NODE"));
208
694k
    _op_name = substr + "_OPERATOR";
209
210
694k
    if (tnode.__isset.vconjunct) {
211
0
        return Status::InternalError("vconjunct is not supported yet");
212
694k
    } else if (tnode.__isset.conjuncts) {
213
283k
        for (const auto& conjunct : tnode.conjuncts) {
214
283k
            VExprContextSPtr context;
215
283k
            RETURN_IF_ERROR(VExpr::create_expr_tree(conjunct, context));
216
283k
            _conjuncts.emplace_back(context);
217
283k
        }
218
105k
    }
219
220
    // create the projections expr
221
694k
    if (tnode.__isset.projections) {
222
275k
        RETURN_IF_ERROR(VExpr::create_expr_trees(tnode.projections, _projection->projections));
223
275k
    }
224
694k
    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
694k
    return Status::OK();
234
694k
}
235
236
721k
Status OperatorXBase::prepare(RuntimeState* state) {
237
721k
    for (auto& conjunct : _conjuncts) {
238
283k
        RETURN_IF_ERROR(conjunct->prepare(state, operator_row_desc_before_projection()));
239
283k
    }
240
721k
    if (state->enable_adjust_conjunct_order_by_cost()) {
241
671k
        std::ranges::stable_sort(_conjuncts, [](const auto& a, const auto& b) {
242
345k
            return a->execute_cost() < b->execute_cost();
243
345k
        });
244
671k
    };
245
246
721k
    if (has_projection()) {
247
275k
        auto& projection = *_projection;
248
287k
        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
275k
        const auto& final_projection_input_row_desc =
256
275k
                projection.intermediate_output_row_descriptors.empty()
257
275k
                        ? operator_row_desc_before_projection()
258
275k
                        : projection.intermediate_output_row_descriptors.back();
259
275k
        RETURN_IF_ERROR(
260
275k
                VExpr::prepare(projection.projections, state, final_projection_input_row_desc));
261
275k
        RETURN_IF_ERROR(VExpr::check_expr_output_type(projection.projections,
262
275k
                                                      projection.output_row_descriptor));
263
275k
    }
264
265
721k
    for (auto& conjunct : _conjuncts) {
266
283k
        RETURN_IF_ERROR(conjunct->open(state));
267
283k
    }
268
721k
    if (has_projection()) {
269
275k
        RETURN_IF_ERROR(VExpr::open(_projection->projections, state));
270
275k
        for (auto& projections : _projection->intermediate_projections) {
271
12.2k
            RETURN_IF_ERROR(VExpr::open(projections, state));
272
12.2k
        }
273
275k
    }
274
721k
    if (_child && !is_source()) {
275
95.4k
        RETURN_IF_ERROR(_child->prepare(state));
276
95.4k
    }
277
278
721k
    if (VExpr::contains_blockable_function(_conjuncts) ||
279
721k
        (has_projection() && VExpr::contains_blockable_function(_projection->projections))) {
280
0
        _blockable = true;
281
0
    }
282
283
721k
    return Status::OK();
284
721k
}
285
286
9.06k
Status OperatorXBase::terminate(RuntimeState* state) {
287
9.06k
    if (_child && !is_source()) {
288
649
        RETURN_IF_ERROR(_child->terminate(state));
289
649
    }
290
9.06k
    auto result = state->get_local_state_result(operator_id());
291
9.06k
    if (!result) {
292
0
        return result.error();
293
0
    }
294
9.06k
    return result.value()->terminate(state);
295
9.06k
}
296
297
4.94M
Status OperatorXBase::close(RuntimeState* state) {
298
4.94M
    if (_child && !is_source()) {
299
748k
        RETURN_IF_ERROR(_child->close(state));
300
748k
    }
301
4.94M
    auto result = state->get_local_state_result(operator_id());
302
4.94M
    if (!result) {
303
0
        return result.error();
304
0
    }
305
4.94M
    return result.value()->close(state);
306
4.94M
}
307
308
305k
void PipelineXLocalStateBase::clear_origin_block() {
309
305k
    _origin_block.clear_column_data(_parent->operator_row_desc_before_projection().num_slots());
310
305k
}
311
312
863k
Status PipelineXLocalStateBase::filter_block(const VExprContextSPtrs& expr_contexts, Block* block) {
313
863k
    RETURN_IF_ERROR(VExprContext::filter_block(expr_contexts, block, block->columns()));
314
315
863k
    _estimate_memory_usage += VExprContext::get_memory_usage(expr_contexts);
316
863k
    return Status::OK();
317
863k
}
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
305k
                                     Block* output_block) const {
326
305k
    auto* local_state = state->get_local_state(operator_id());
327
305k
    SCOPED_TIMER(local_state->exec_time_counter());
328
305k
    SCOPED_TIMER(local_state->_projection_timer);
329
305k
    const size_t rows = origin_block->rows();
330
305k
    if (rows == 0) {
331
158k
        return Status::OK();
332
158k
    }
333
146k
    SCOPED_PEAK_MEM(&local_state->_estimate_memory_usage);
334
335
146k
    {
336
146k
        Block input_block = *origin_block;
337
338
146k
        ColumnsWithTypeAndName new_columns;
339
146k
        for (const auto& projections : local_state->_intermediate_projections) {
340
5.28k
            if (projections.empty()) {
341
0
                return Status::InternalError("meet empty intermediate projection, node id: {}",
342
0
                                             node_id());
343
0
            }
344
5.28k
            new_columns.resize(projections.size());
345
122k
            for (int i = 0; i < projections.size(); i++) {
346
117k
                RETURN_IF_ERROR(projections[i]->execute(&input_block, new_columns[i]));
347
117k
                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
117k
            }
355
5.27k
            Block tmp_block {new_columns};
356
5.27k
            input_block.swap(tmp_block);
357
5.27k
        }
358
359
146k
        if (input_block.rows() != rows) {
360
0
            return Status::InternalError(
361
0
                    "after intermediate projections input block rows {} not equal origin rows {}, "
362
0
                    "input_block: {}",
363
0
                    input_block.rows(), rows, input_block.dump_structure());
364
0
        }
365
366
146k
        auto scoped_mutable_block = VectorizedUtils::build_scoped_mutable_mem_reuse_block(
367
146k
                output_block, _projection->output_row_descriptor);
368
146k
        auto& mutable_columns = scoped_mutable_block.mutable_columns();
369
146k
        DCHECK_EQ(mutable_columns.size(), local_state->_projections.size()) << debug_string();
370
146k
        Columns shared_columns(mutable_columns.size());
371
372
835k
        for (int i = 0; i < mutable_columns.size(); ++i) {
373
688k
            ColumnPtr column_ptr;
374
688k
            RETURN_IF_ERROR(local_state->_projections[i]->execute(&input_block, column_ptr));
375
688k
            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
688k
            column_ptr = column_ptr->convert_to_full_column_if_const();
382
688k
            if (is_column_nullable(*mutable_columns[i]) && !is_column_nullable(*column_ptr)) {
383
0
                column_ptr = make_nullable(column_ptr, false);
384
0
            }
385
688k
            if (column_ptr->is_exclusive()) {
386
237k
                mutable_columns[i] = IColumn::mutate(std::move(column_ptr));
387
451k
            } else {
388
451k
                shared_columns[i] = std::move(column_ptr);
389
451k
            }
390
688k
        }
391
392
146k
        scoped_mutable_block.restore();
393
835k
        for (int i = 0; i < shared_columns.size(); ++i) {
394
688k
            if (shared_columns[i]) {
395
451k
                output_block->replace_by_position(i, std::move(shared_columns[i]));
396
451k
            }
397
688k
        }
398
146k
    }
399
400
0
    origin_block->clear_column_data(
401
146k
            local_state->_parent->operator_row_desc_before_projection().num_slots());
402
146k
    DCHECK_EQ(output_block->rows(), rows);
403
404
146k
    return Status::OK();
405
146k
}
406
407
4.37M
Status OperatorXBase::get_block_after_projects(RuntimeState* state, Block* block, bool* eos) {
408
4.37M
    DBUG_EXECUTE_IF("Pipeline::return_empty_block", {
409
4.37M
        if (this->_op_name == "AGGREGATION_OPERATOR" || this->_op_name == "HASH_JOIN_OPERATOR" ||
410
4.37M
            this->_op_name == "PARTITIONED_AGGREGATION_OPERATOR" ||
411
4.37M
            this->_op_name == "PARTITIONED_HASH_JOIN_OPERATOR" ||
412
4.37M
            this->_op_name == "CROSS_JOIN_OPERATOR" || this->_op_name == "SORT_OPERATOR") {
413
4.37M
            if (_debug_point_count++ % 2 == 0) {
414
4.37M
                return Status::OK();
415
4.37M
            }
416
4.37M
        }
417
4.37M
    });
418
419
4.37M
    Status status;
420
4.37M
    auto* local_state = state->get_local_state(operator_id());
421
4.38M
    Defer defer([&]() {
422
4.38M
        if (status.ok()) {
423
4.38M
            local_state->update_output_block_counters(*block);
424
4.38M
        }
425
4.38M
    });
426
4.37M
    if (has_projection()) {
427
305k
        local_state->clear_origin_block();
428
305k
        status = get_block(state, &local_state->_origin_block, eos);
429
305k
        if (UNLIKELY(!status.ok())) {
430
42
            return status;
431
42
        }
432
305k
        status = do_projections(state, &local_state->_origin_block, block);
433
305k
        return status;
434
305k
    }
435
4.07M
    status = get_block(state, block, eos);
436
4.07M
    RETURN_IF_ERROR(block->check_type_and_column());
437
4.07M
    return status;
438
4.07M
}
439
440
2.97M
void PipelineXLocalStateBase::reached_limit(Block* block, bool* eos) {
441
2.97M
    if (_parent->_limit != -1 and _num_rows_returned + block->rows() >= _parent->_limit) {
442
9.92k
        block->set_num_rows(_parent->_limit - _num_rows_returned);
443
9.92k
        *eos = true;
444
9.92k
    }
445
446
2.97M
    DBUG_EXECUTE_IF("Pipeline::reached_limit_early", {
447
2.97M
        auto op_name = to_lower(_parent->_op_name);
448
2.97M
        auto arg_op_name = dp->param<std::string>("op_name");
449
2.97M
        arg_op_name = to_lower(arg_op_name);
450
451
2.97M
        if (op_name == arg_op_name) {
452
2.97M
            *eos = true;
453
2.97M
        }
454
2.97M
    });
455
456
2.97M
    if (auto rows = block->rows()) {
457
837k
        _num_rows_returned += rows;
458
837k
        _state->get_query_ctx()->resource_ctx()->io_context()->update_process_rows(rows);
459
837k
    }
460
2.97M
}
461
462
32.4k
Status DataSinkOperatorXBase::terminate(RuntimeState* state) {
463
32.4k
    auto result = state->get_sink_local_state_result();
464
32.4k
    if (!result) {
465
0
        return result.error();
466
0
    }
467
32.4k
    return result.value()->terminate(state);
468
32.4k
}
469
470
15.4k
std::string DataSinkOperatorXBase::debug_string(int indentation_level) const {
471
15.4k
    fmt::memory_buffer debug_string_buffer;
472
473
15.4k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, _is_serial_operator={}",
474
15.4k
                   std::string(indentation_level * 2, ' '), _name, node_id(), _is_serial_operator);
475
15.4k
    return fmt::to_string(debug_string_buffer);
476
15.4k
}
477
478
15.4k
std::string DataSinkOperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
479
15.4k
    return state->get_sink_local_state()->debug_string(indentation_level);
480
15.4k
}
481
482
362k
Status DataSinkOperatorXBase::init(const TDataSink& tsink) {
483
362k
    std::string op_name = "UNKNOWN_SINK";
484
362k
    auto it = _TDataSinkType_VALUES_TO_NAMES.find(tsink.type);
485
486
363k
    if (it != _TDataSinkType_VALUES_TO_NAMES.end()) {
487
363k
        op_name = it->second;
488
363k
    }
489
362k
    _name = op_name + "_OPERATOR";
490
362k
    return Status::OK();
491
362k
}
492
493
309k
Status DataSinkOperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
494
309k
    std::string op_name = print_plan_node_type(tnode.node_type);
495
309k
    _nereids_id = tnode.nereids_id;
496
309k
    auto substr = op_name.substr(0, op_name.find("_NODE"));
497
309k
    _name = substr + "_SINK_OPERATOR";
498
309k
    return Status::OK();
499
309k
}
500
501
template <typename LocalStateType>
502
Status DataSinkOperatorX<LocalStateType>::setup_local_state(RuntimeState* state,
503
1.81M
                                                            LocalSinkStateInfo& info) {
504
1.81M
    auto local_state = LocalStateType::create_unique(this, state);
505
1.81M
    RETURN_IF_ERROR(local_state->init(state, info));
506
1.81M
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
1.81M
    return Status::OK();
508
1.81M
}
_ZN5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
122k
                                                            LocalSinkStateInfo& info) {
504
122k
    auto local_state = LocalStateType::create_unique(this, state);
505
122k
    RETURN_IF_ERROR(local_state->init(state, info));
506
122k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
122k
    return Status::OK();
508
122k
}
_ZN5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
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
360
                                                            LocalSinkStateInfo& info) {
504
360
    auto local_state = LocalStateType::create_unique(this, state);
505
360
    RETURN_IF_ERROR(local_state->init(state, info));
506
360
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
360
    return Status::OK();
508
360
}
_ZN5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
50.8k
                                                            LocalSinkStateInfo& info) {
504
50.8k
    auto local_state = LocalStateType::create_unique(this, state);
505
50.8k
    RETURN_IF_ERROR(local_state->init(state, info));
506
50.8k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
50.8k
    return Status::OK();
508
50.8k
}
_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
11.5k
                                                            LocalSinkStateInfo& info) {
504
11.5k
    auto local_state = LocalStateType::create_unique(this, state);
505
11.5k
    RETURN_IF_ERROR(local_state->init(state, info));
506
11.5k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
11.5k
    return Status::OK();
508
11.5k
}
_ZN5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
6
                                                            LocalSinkStateInfo& info) {
504
6
    auto local_state = LocalStateType::create_unique(this, state);
505
6
    RETURN_IF_ERROR(local_state->init(state, info));
506
6
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
6
    return Status::OK();
508
6
}
_ZN5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
241k
                                                            LocalSinkStateInfo& info) {
504
241k
    auto local_state = LocalStateType::create_unique(this, state);
505
241k
    RETURN_IF_ERROR(local_state->init(state, info));
506
241k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
241k
    return Status::OK();
508
241k
}
_ZN5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
162
                                                            LocalSinkStateInfo& info) {
504
162
    auto local_state = LocalStateType::create_unique(this, state);
505
162
    RETURN_IF_ERROR(local_state->init(state, info));
506
162
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
162
    return Status::OK();
508
162
}
_ZN5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
263k
                                                            LocalSinkStateInfo& info) {
504
263k
    auto local_state = LocalStateType::create_unique(this, state);
505
263k
    RETURN_IF_ERROR(local_state->init(state, info));
506
263k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
263k
    return Status::OK();
508
263k
}
_ZN5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
101k
                                                            LocalSinkStateInfo& info) {
504
101k
    auto local_state = LocalStateType::create_unique(this, state);
505
101k
    RETURN_IF_ERROR(local_state->init(state, info));
506
101k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
101k
    return Status::OK();
508
101k
}
_ZN5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
75.8k
                                                            LocalSinkStateInfo& info) {
504
75.8k
    auto local_state = LocalStateType::create_unique(this, state);
505
75.8k
    RETURN_IF_ERROR(local_state->init(state, info));
506
75.8k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
75.8k
    return Status::OK();
508
75.8k
}
_ZN5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
129
                                                            LocalSinkStateInfo& info) {
504
129
    auto local_state = LocalStateType::create_unique(this, state);
505
129
    RETURN_IF_ERROR(local_state->init(state, info));
506
129
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
129
    return Status::OK();
508
129
}
_ZN5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
532k
                                                            LocalSinkStateInfo& info) {
504
532k
    auto local_state = LocalStateType::create_unique(this, state);
505
532k
    RETURN_IF_ERROR(local_state->init(state, info));
506
532k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
532k
    return Status::OK();
508
532k
}
_ZN5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
7.20k
                                                            LocalSinkStateInfo& info) {
504
7.20k
    auto local_state = LocalStateType::create_unique(this, state);
505
7.20k
    RETURN_IF_ERROR(local_state->init(state, info));
506
7.20k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
7.20k
    return Status::OK();
508
7.20k
}
_ZN5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
9.96k
                                                            LocalSinkStateInfo& info) {
504
9.96k
    auto local_state = LocalStateType::create_unique(this, state);
505
9.96k
    RETURN_IF_ERROR(local_state->init(state, info));
506
9.96k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
9.96k
    return Status::OK();
508
9.96k
}
_ZN5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.43k
                                                            LocalSinkStateInfo& info) {
504
2.43k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.43k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.43k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.43k
    return Status::OK();
508
2.43k
}
_ZN5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
393
                                                            LocalSinkStateInfo& info) {
504
393
    auto local_state = LocalStateType::create_unique(this, state);
505
393
    RETURN_IF_ERROR(local_state->init(state, info));
506
393
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
393
    return Status::OK();
508
393
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
4.72k
                                                            LocalSinkStateInfo& info) {
504
4.72k
    auto local_state = LocalStateType::create_unique(this, state);
505
4.72k
    RETURN_IF_ERROR(local_state->init(state, info));
506
4.72k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
4.72k
    return Status::OK();
508
4.72k
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE17setup_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_17SetSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.56k
                                                            LocalSinkStateInfo& info) {
504
2.56k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.56k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.56k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.56k
    return Status::OK();
508
2.56k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.47k
                                                            LocalSinkStateInfo& info) {
504
2.47k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.47k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.47k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.47k
    return Status::OK();
508
2.47k
}
_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
563
                                                            LocalSinkStateInfo& info) {
504
563
    auto local_state = LocalStateType::create_unique(this, state);
505
563
    RETURN_IF_ERROR(local_state->init(state, info));
506
563
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
563
    return Status::OK();
508
563
}
_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
107
                                                            LocalSinkStateInfo& info) {
504
107
    auto local_state = LocalStateType::create_unique(this, state);
505
107
    RETURN_IF_ERROR(local_state->init(state, info));
506
107
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
107
    return Status::OK();
508
107
}
_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
168
                                                            LocalSinkStateInfo& info) {
504
168
    auto local_state = LocalStateType::create_unique(this, state);
505
168
    RETURN_IF_ERROR(local_state->init(state, info));
506
168
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
168
    return Status::OK();
508
168
}
509
510
template <typename LocalStateType>
511
1.44M
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.44M
    } else {
519
1.44M
        auto ss = LocalStateType::SharedStateType::create_shared();
520
1.44M
        ss->id = operator_id();
521
1.44M
        for (auto& dest : dests_id()) {
522
1.43M
            ss->related_op_ids.insert(dest);
523
1.43M
        }
524
1.44M
        return ss;
525
1.44M
    }
526
1.44M
}
_ZNK5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
109k
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
109k
    } else {
519
109k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
109k
        ss->id = operator_id();
521
109k
        for (auto& dest : dests_id()) {
522
109k
            ss->related_op_ids.insert(dest);
523
109k
        }
524
109k
        return ss;
525
109k
    }
526
109k
}
_ZNK5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
377k
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
377k
    } else {
519
377k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
377k
        ss->id = operator_id();
521
377k
        for (auto& dest : dests_id()) {
522
377k
            ss->related_op_ids.insert(dest);
523
377k
        }
524
377k
        return ss;
525
377k
    }
526
377k
}
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
360
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
360
    } else {
519
360
        auto ss = LocalStateType::SharedStateType::create_shared();
520
360
        ss->id = operator_id();
521
360
        for (auto& dest : dests_id()) {
522
360
            ss->related_op_ids.insert(dest);
523
360
        }
524
360
        return ss;
525
360
    }
526
360
}
_ZNK5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
51.0k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
51.0k
    } else {
519
51.0k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
51.0k
        ss->id = operator_id();
521
51.0k
        for (auto& dest : dests_id()) {
522
50.3k
            ss->related_op_ids.insert(dest);
523
50.3k
        }
524
51.0k
        return ss;
525
51.0k
    }
526
51.0k
}
_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
11.7k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
11.7k
    } else {
519
11.7k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
11.7k
        ss->id = operator_id();
521
11.7k
        for (auto& dest : dests_id()) {
522
11.6k
            ss->related_op_ids.insert(dest);
523
11.6k
        }
524
11.7k
        return ss;
525
11.7k
    }
526
11.7k
}
_ZNK5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
6
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
6
    } else {
519
6
        auto ss = LocalStateType::SharedStateType::create_shared();
520
6
        ss->id = operator_id();
521
6
        for (auto& dest : dests_id()) {
522
6
            ss->related_op_ids.insert(dest);
523
6
        }
524
6
        return ss;
525
6
    }
526
6
}
_ZNK5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
243k
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
243k
    } else {
519
243k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
243k
        ss->id = operator_id();
521
243k
        for (auto& dest : dests_id()) {
522
242k
            ss->related_op_ids.insert(dest);
523
242k
        }
524
243k
        return ss;
525
243k
    }
526
243k
}
_ZNK5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
164
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
164
    } else {
519
164
        auto ss = LocalStateType::SharedStateType::create_shared();
520
164
        ss->id = operator_id();
521
164
        for (auto& dest : dests_id()) {
522
164
            ss->related_op_ids.insert(dest);
523
164
        }
524
164
        return ss;
525
164
    }
526
164
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
102k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
102k
    } else {
519
102k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
102k
        ss->id = operator_id();
521
102k
        for (auto& dest : dests_id()) {
522
102k
            ss->related_op_ids.insert(dest);
523
102k
        }
524
102k
        return ss;
525
102k
    }
526
102k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
128
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
128
    } else {
519
128
        auto ss = LocalStateType::SharedStateType::create_shared();
520
128
        ss->id = operator_id();
521
128
        for (auto& dest : dests_id()) {
522
128
            ss->related_op_ids.insert(dest);
523
128
        }
524
128
        return ss;
525
128
    }
526
128
}
_ZNK5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
535k
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
535k
    } else {
519
535k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
535k
        ss->id = operator_id();
521
535k
        for (auto& dest : dests_id()) {
522
528k
            ss->related_op_ids.insert(dest);
523
528k
        }
524
535k
        return ss;
525
535k
    }
526
535k
}
_ZNK5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
7.30k
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
7.30k
    } else {
519
7.30k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
7.30k
        ss->id = operator_id();
521
7.30k
        for (auto& dest : dests_id()) {
522
7.29k
            ss->related_op_ids.insert(dest);
523
7.29k
        }
524
7.30k
        return ss;
525
7.30k
    }
526
7.30k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
494
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
494
    } else {
519
494
        auto ss = LocalStateType::SharedStateType::create_shared();
520
494
        ss->id = operator_id();
521
494
        for (auto& dest : dests_id()) {
522
494
            ss->related_op_ids.insert(dest);
523
494
        }
524
494
        return ss;
525
494
    }
526
494
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE19create_shared_stateEv
Line
Count
Source
511
2.56k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
2.56k
    } else {
519
2.56k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
2.56k
        ss->id = operator_id();
521
2.56k
        for (auto& dest : dests_id()) {
522
2.56k
            ss->related_op_ids.insert(dest);
523
2.56k
        }
524
2.56k
        return ss;
525
2.56k
    }
526
2.56k
}
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE19create_shared_stateEv
Line
Count
Source
511
2.45k
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.45k
    } else {
519
2.45k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
2.45k
        ss->id = operator_id();
521
2.45k
        for (auto& dest : dests_id()) {
522
2.45k
            ss->related_op_ids.insert(dest);
523
2.45k
        }
524
2.45k
        return ss;
525
2.45k
    }
526
2.45k
}
_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
568
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
568
    } else {
519
568
        auto ss = LocalStateType::SharedStateType::create_shared();
520
568
        ss->id = operator_id();
521
568
        for (auto& dest : dests_id()) {
522
551
            ss->related_op_ids.insert(dest);
523
551
        }
524
568
        return ss;
525
568
    }
526
568
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
107
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
107
    } else {
519
107
        auto ss = LocalStateType::SharedStateType::create_shared();
520
107
        ss->id = operator_id();
521
107
        for (auto& dest : dests_id()) {
522
107
            ss->related_op_ids.insert(dest);
523
107
        }
524
107
        return ss;
525
107
    }
526
107
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE19create_shared_stateEv
527
528
template <typename LocalStateType>
529
2.11M
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.11M
    auto local_state = LocalStateType::create_unique(state, this);
531
2.11M
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.11M
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.11M
    return Status::OK();
534
2.11M
}
_ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
73.5k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
73.5k
    auto local_state = LocalStateType::create_unique(state, this);
531
73.5k
    RETURN_IF_ERROR(local_state->init(state, info));
532
73.5k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
73.5k
    return Status::OK();
534
73.5k
}
_ZN5doris9OperatorXINS_18OlapScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
251k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
251k
    auto local_state = LocalStateType::create_unique(state, this);
531
251k
    RETURN_IF_ERROR(local_state->init(state, info));
532
251k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
251k
    return Status::OK();
534
251k
}
_ZN5doris9OperatorXINS_21GroupCommitLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
140
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
140
    auto local_state = LocalStateType::create_unique(state, this);
531
140
    RETURN_IF_ERROR(local_state->init(state, info));
532
140
    state->emplace_local_state(operator_id(), std::move(local_state));
533
140
    return Status::OK();
534
140
}
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
11.4k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
11.4k
    auto local_state = LocalStateType::create_unique(state, this);
531
11.4k
    RETURN_IF_ERROR(local_state->init(state, info));
532
11.4k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
11.4k
    return Status::OK();
534
11.4k
}
_ZN5doris9OperatorXINS_14SortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
10.7k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
10.7k
    auto local_state = LocalStateType::create_unique(state, this);
531
10.7k
    RETURN_IF_ERROR(local_state->init(state, info));
532
10.7k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
10.7k
    return Status::OK();
534
10.7k
}
_ZN5doris9OperatorXINS_19SpillSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
155
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
155
    auto local_state = LocalStateType::create_unique(state, this);
531
155
    RETURN_IF_ERROR(local_state->init(state, info));
532
155
    state->emplace_local_state(operator_id(), std::move(local_state));
533
155
    return Status::OK();
534
155
}
_ZN5doris9OperatorXINS_24LocalMergeSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
229k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
229k
    auto local_state = LocalStateType::create_unique(state, this);
531
229k
    RETURN_IF_ERROR(local_state->init(state, info));
532
229k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
229k
    return Status::OK();
534
229k
}
_ZN5doris9OperatorXINS_13AggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
101k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
101k
    auto local_state = LocalStateType::create_unique(state, this);
531
101k
    RETURN_IF_ERROR(local_state->init(state, info));
532
101k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
101k
    return Status::OK();
534
101k
}
_ZN5doris9OperatorXINS_21BucketedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
76.2k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
76.2k
    auto local_state = LocalStateType::create_unique(state, this);
531
76.2k
    RETURN_IF_ERROR(local_state->init(state, info));
532
76.2k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
76.2k
    return Status::OK();
534
76.2k
}
_ZN5doris9OperatorXINS_24PartitionedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
119
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
119
    auto local_state = LocalStateType::create_unique(state, this);
531
119
    RETURN_IF_ERROR(local_state->init(state, info));
532
119
    state->emplace_local_state(operator_id(), std::move(local_state));
533
119
    return Status::OK();
534
119
}
_ZN5doris9OperatorXINS_23TableFunctionLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
5.20k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
5.20k
    auto local_state = LocalStateType::create_unique(state, this);
531
5.20k
    RETURN_IF_ERROR(local_state->init(state, info));
532
5.20k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
5.20k
    return Status::OK();
534
5.20k
}
_ZN5doris9OperatorXINS_18ExchangeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
281k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
281k
    auto local_state = LocalStateType::create_unique(state, this);
531
281k
    RETURN_IF_ERROR(local_state->init(state, info));
532
281k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
281k
    return Status::OK();
534
281k
}
_ZN5doris9OperatorXINS_16RepeatLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.17k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.17k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.17k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.17k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.17k
    return Status::OK();
534
1.17k
}
_ZN5doris9OperatorXINS_29NestedLoopJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
6.96k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
6.96k
    auto local_state = LocalStateType::create_unique(state, this);
531
6.96k
    RETURN_IF_ERROR(local_state->init(state, info));
532
6.96k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
6.96k
    return Status::OK();
534
6.96k
}
_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.55k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.55k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.55k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.55k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.55k
    return Status::OK();
534
1.55k
}
_ZN5doris9OperatorXINS_21UnionSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
56.0k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
56.0k
    auto local_state = LocalStateType::create_unique(state, this);
531
56.0k
    RETURN_IF_ERROR(local_state->init(state, info));
532
56.0k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
56.0k
    return Status::OK();
534
56.0k
}
_ZN5doris9OperatorXINS_35MultiCastDataStreamSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
5.96k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
5.96k
    auto local_state = LocalStateType::create_unique(state, this);
531
5.96k
    RETURN_IF_ERROR(local_state->init(state, info));
532
5.96k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
5.96k
    return Status::OK();
534
5.96k
}
_ZN5doris9OperatorXINS_29PartitionSortSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
393
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
393
    auto local_state = LocalStateType::create_unique(state, this);
531
393
    RETURN_IF_ERROR(local_state->init(state, info));
532
393
    state->emplace_local_state(operator_id(), std::move(local_state));
533
393
    return Status::OK();
534
393
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.58k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.58k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.58k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.58k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.58k
    return Status::OK();
534
2.58k
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.49k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.49k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.49k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.49k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.49k
    return Status::OK();
534
2.49k
}
_ZN5doris9OperatorXINS_17DataGenLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
607
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
607
    auto local_state = LocalStateType::create_unique(state, this);
531
607
    RETURN_IF_ERROR(local_state->init(state, info));
532
607
    state->emplace_local_state(operator_id(), std::move(local_state));
533
607
    return Status::OK();
534
607
}
_ZN5doris9OperatorXINS_20SchemaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.72k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.72k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.72k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.72k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.72k
    return Status::OK();
534
1.72k
}
_ZN5doris9OperatorXINS_18MetaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
10.7k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
10.7k
    auto local_state = LocalStateType::create_unique(state, this);
531
10.7k
    RETURN_IF_ERROR(local_state->init(state, info));
532
10.7k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
10.7k
    return Status::OK();
534
10.7k
}
_ZN5doris9OperatorXINS_29LocalExchangeSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
688k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
688k
    auto local_state = LocalStateType::create_unique(state, this);
531
688k
    RETURN_IF_ERROR(local_state->init(state, info));
532
688k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
688k
    return Status::OK();
534
688k
}
_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
168
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
168
    auto local_state = LocalStateType::create_unique(state, this);
531
168
    RETURN_IF_ERROR(local_state->init(state, info));
532
168
    state->emplace_local_state(operator_id(), std::move(local_state));
533
168
    return Status::OK();
534
168
}
_ZN5doris9OperatorXINS_20RecCTEScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.20k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.20k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.20k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.20k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.20k
    return Status::OK();
534
2.20k
}
_ZN5doris9OperatorXINS_25MaterializationLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
801
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
801
    auto local_state = LocalStateType::create_unique(state, this);
531
801
    RETURN_IF_ERROR(local_state->init(state, info));
532
801
    state->emplace_local_state(operator_id(), std::move(local_state));
533
801
    return Status::OK();
534
801
}
_ZN5doris9OperatorXINS_16SelectLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
778
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
778
    auto local_state = LocalStateType::create_unique(state, this);
531
778
    RETURN_IF_ERROR(local_state->init(state, info));
532
778
    state->emplace_local_state(operator_id(), std::move(local_state));
533
778
    return Status::OK();
534
778
}
_ZN5doris9OperatorXINS_22StreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
5.69k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
5.69k
    auto local_state = LocalStateType::create_unique(state, this);
531
5.69k
    RETURN_IF_ERROR(local_state->init(state, info));
532
5.69k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
5.69k
    return Status::OK();
534
5.69k
}
_ZN5doris9OperatorXINS_30DistinctStreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
276k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
276k
    auto local_state = LocalStateType::create_unique(state, this);
531
276k
    RETURN_IF_ERROR(local_state->init(state, info));
532
276k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
276k
    return Status::OK();
534
276k
}
535
536
PipelineXSinkLocalStateBase::PipelineXSinkLocalStateBase(DataSinkOperatorXBase* parent,
537
                                                         RuntimeState* state)
538
1.80M
        : _parent(parent), _state(state) {}
539
540
PipelineXLocalStateBase::PipelineXLocalStateBase(RuntimeState* state, OperatorXBase* parent)
541
2.09M
        : _num_rows_returned(0),
542
2.09M
          _rows_returned_counter(nullptr),
543
2.09M
          _parent(parent),
544
2.09M
          _state(state),
545
2.09M
          _budget(state->batch_size(), state->preferred_block_size_bytes()) {}
546
547
template <typename SharedStateArg>
548
2.11M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
2.11M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
2.11M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
2.11M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
2.11M
    _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.11M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
2.11M
    _operator_profile->add_child(_common_profile.get(), true);
557
2.11M
    _operator_profile->add_child(_custom_profile.get(), true);
558
2.11M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
2.11M
    if constexpr (!is_fake_shared) {
560
1.27M
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
769k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
769k
                                    .first.get()
563
769k
                                    ->template cast<SharedStateArg>();
564
565
769k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
769k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
769k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
769k
        } else if (info.shared_state) {
569
422k
            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
422k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
422k
            _dependency = _shared_state->create_source_dependency(
576
422k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
422k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
422k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
422k
        } else {
580
85.2k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
14.2k
                DCHECK(false);
582
14.2k
            }
583
85.2k
        }
584
1.27M
    }
585
586
2.11M
    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.11M
    _rows_returned_counter =
591
2.11M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
2.11M
    _blocks_returned_counter =
593
2.11M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
2.11M
    _output_block_bytes_counter =
595
2.11M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
2.11M
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
2.11M
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
2.11M
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
2.11M
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
2.11M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
2.11M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
2.11M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
2.11M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
2.11M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
2.11M
    _memory_used_counter =
606
2.11M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
2.11M
    _common_profile->add_info_string("IsColocate",
608
2.11M
                                     std::to_string(_parent->is_colocated_operator()));
609
2.11M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
2.11M
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
2.11M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
2.11M
    return Status::OK();
613
2.11M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
74.0k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
74.0k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
74.0k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
74.0k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
74.0k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
74.0k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
74.0k
    _operator_profile->add_child(_common_profile.get(), true);
557
74.0k
    _operator_profile->add_child(_custom_profile.get(), true);
558
74.0k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
74.0k
    if constexpr (!is_fake_shared) {
560
74.0k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
12.5k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
12.5k
                                    .first.get()
563
12.5k
                                    ->template cast<SharedStateArg>();
564
565
12.5k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
12.5k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
12.5k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
61.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
59.4k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
59.4k
            _dependency = _shared_state->create_source_dependency(
576
59.4k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
59.4k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
59.4k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
59.4k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
2.04k
        }
584
74.0k
    }
585
586
74.0k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
74.0k
    _rows_returned_counter =
591
74.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
74.0k
    _blocks_returned_counter =
593
74.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
74.0k
    _output_block_bytes_counter =
595
74.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
74.0k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
74.0k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
74.0k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
74.0k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
74.0k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
74.0k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
74.0k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
74.0k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
74.0k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
74.0k
    _memory_used_counter =
606
74.0k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
74.0k
    _common_profile->add_info_string("IsColocate",
608
74.0k
                                     std::to_string(_parent->is_colocated_operator()));
609
74.0k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
74.0k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
74.0k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
74.0k
    return Status::OK();
613
74.0k
}
_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
242k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
242k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
242k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
242k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
242k
    _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
242k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
242k
    _operator_profile->add_child(_common_profile.get(), true);
557
242k
    _operator_profile->add_child(_custom_profile.get(), true);
558
242k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
242k
    if constexpr (!is_fake_shared) {
560
242k
        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
242k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
229k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
229k
            _dependency = _shared_state->create_source_dependency(
576
229k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
229k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
229k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
229k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
13.0k
        }
584
242k
    }
585
586
242k
    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
242k
    _rows_returned_counter =
591
242k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
242k
    _blocks_returned_counter =
593
242k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
242k
    _output_block_bytes_counter =
595
242k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
242k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
242k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
242k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
242k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
242k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
242k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
242k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
242k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
242k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
242k
    _memory_used_counter =
606
242k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
242k
    _common_profile->add_info_string("IsColocate",
608
242k
                                     std::to_string(_parent->is_colocated_operator()));
609
242k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
242k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
242k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
242k
    return Status::OK();
613
242k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
155
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
155
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
155
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
155
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
155
    _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
155
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
155
    _operator_profile->add_child(_common_profile.get(), true);
557
155
    _operator_profile->add_child(_custom_profile.get(), true);
558
155
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
155
    if constexpr (!is_fake_shared) {
560
155
        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
155
        } 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
155
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
155
            _dependency = _shared_state->create_source_dependency(
576
155
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
155
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
155
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
155
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
155
    }
585
586
155
    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
155
    _rows_returned_counter =
591
155
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
155
    _blocks_returned_counter =
593
155
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
155
    _output_block_bytes_counter =
595
155
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
155
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
155
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
155
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
155
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
155
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
155
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
155
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
155
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
155
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
155
    _memory_used_counter =
606
155
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
155
    _common_profile->add_info_string("IsColocate",
608
155
                                     std::to_string(_parent->is_colocated_operator()));
609
155
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
155
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
155
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
155
    return Status::OK();
613
155
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
7.09k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
7.09k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
7.09k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
7.09k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
7.09k
    _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
7.09k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
7.09k
    _operator_profile->add_child(_common_profile.get(), true);
557
7.09k
    _operator_profile->add_child(_custom_profile.get(), true);
558
7.09k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
7.09k
    if constexpr (!is_fake_shared) {
560
7.09k
        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
7.09k
        } 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
6.66k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
6.66k
            _dependency = _shared_state->create_source_dependency(
576
6.66k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
6.66k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
6.66k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
6.66k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
427
        }
584
7.09k
    }
585
586
7.09k
    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
7.09k
    _rows_returned_counter =
591
7.09k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
7.09k
    _blocks_returned_counter =
593
7.09k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
7.09k
    _output_block_bytes_counter =
595
7.09k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
7.09k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
7.09k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
7.09k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
7.09k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
7.09k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
7.09k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
7.09k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
7.09k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
7.09k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
7.09k
    _memory_used_counter =
606
7.09k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
7.09k
    _common_profile->add_info_string("IsColocate",
608
7.09k
                                     std::to_string(_parent->is_colocated_operator()));
609
7.09k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
7.09k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
7.09k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
7.09k
    return Status::OK();
613
7.09k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
11.6k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
11.6k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
11.6k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
11.6k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
11.6k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
11.6k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
11.6k
    _operator_profile->add_child(_common_profile.get(), true);
557
11.6k
    _operator_profile->add_child(_custom_profile.get(), true);
558
11.6k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
11.6k
    if constexpr (!is_fake_shared) {
560
11.6k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
11.6k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
10.8k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
10.8k
            _dependency = _shared_state->create_source_dependency(
576
10.8k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
10.8k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
10.8k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
10.8k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
771
        }
584
11.6k
    }
585
586
11.6k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
11.6k
    _rows_returned_counter =
591
11.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
11.6k
    _blocks_returned_counter =
593
11.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
11.6k
    _output_block_bytes_counter =
595
11.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
11.6k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
11.6k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
11.6k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
11.6k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
11.6k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
11.6k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
11.6k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
11.6k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
11.6k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
11.6k
    _memory_used_counter =
606
11.6k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
11.6k
    _common_profile->add_info_string("IsColocate",
608
11.6k
                                     std::to_string(_parent->is_colocated_operator()));
609
11.6k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
11.6k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
11.6k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
11.6k
    return Status::OK();
613
11.6k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
102k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
102k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
102k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
102k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
102k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
102k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
102k
    _operator_profile->add_child(_common_profile.get(), true);
557
102k
    _operator_profile->add_child(_custom_profile.get(), true);
558
102k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
102k
    if constexpr (!is_fake_shared) {
560
102k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
102k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
99.4k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
99.4k
            _dependency = _shared_state->create_source_dependency(
576
99.4k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
99.4k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
99.4k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
99.4k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
2.75k
        }
584
102k
    }
585
586
102k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
102k
    _rows_returned_counter =
591
102k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
102k
    _blocks_returned_counter =
593
102k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
102k
    _output_block_bytes_counter =
595
102k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
102k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
102k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
102k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
102k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
102k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
102k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
102k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
102k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
102k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
102k
    _memory_used_counter =
606
102k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
102k
    _common_profile->add_info_string("IsColocate",
608
102k
                                     std::to_string(_parent->is_colocated_operator()));
609
102k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
102k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
102k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
102k
    return Status::OK();
613
102k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
76.1k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
76.1k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
76.1k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
76.1k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
76.1k
    _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
76.1k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
76.1k
    _operator_profile->add_child(_common_profile.get(), true);
557
76.1k
    _operator_profile->add_child(_custom_profile.get(), true);
558
76.1k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
76.1k
    if constexpr (!is_fake_shared) {
560
76.1k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
76.1k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
76.1k
                                    .first.get()
563
76.1k
                                    ->template cast<SharedStateArg>();
564
565
76.1k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
76.1k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
76.1k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
76.1k
        } 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
29
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
29
        }
584
76.1k
    }
585
586
76.1k
    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
76.1k
    _rows_returned_counter =
591
76.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
76.1k
    _blocks_returned_counter =
593
76.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
76.1k
    _output_block_bytes_counter =
595
76.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
76.1k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
76.1k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
76.1k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
76.1k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
76.1k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
76.1k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
76.1k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
76.1k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
76.1k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
76.1k
    _memory_used_counter =
606
76.1k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
76.1k
    _common_profile->add_info_string("IsColocate",
608
76.1k
                                     std::to_string(_parent->is_colocated_operator()));
609
76.1k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
76.1k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
76.1k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
76.1k
    return Status::OK();
613
76.1k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
119
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
119
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
119
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
119
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
119
    _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
119
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
119
    _operator_profile->add_child(_common_profile.get(), true);
557
119
    _operator_profile->add_child(_custom_profile.get(), true);
558
119
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
119
    if constexpr (!is_fake_shared) {
560
119
        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
119
        } 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
119
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
119
            _dependency = _shared_state->create_source_dependency(
576
119
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
119
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
119
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
119
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
119
    }
585
586
119
    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
119
    _rows_returned_counter =
591
119
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
119
    _blocks_returned_counter =
593
119
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
119
    _output_block_bytes_counter =
595
119
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
119
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
119
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
119
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
119
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
119
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
119
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
119
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
119
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
119
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
119
    _memory_used_counter =
606
119
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
119
    _common_profile->add_info_string("IsColocate",
608
119
                                     std::to_string(_parent->is_colocated_operator()));
609
119
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
119
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
119
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
119
    return Status::OK();
613
119
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
842k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
842k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
842k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
842k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
842k
    _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
842k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
842k
    _operator_profile->add_child(_common_profile.get(), true);
557
842k
    _operator_profile->add_child(_custom_profile.get(), true);
558
842k
    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
842k
    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
842k
    _rows_returned_counter =
591
842k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
842k
    _blocks_returned_counter =
593
842k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
842k
    _output_block_bytes_counter =
595
842k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
842k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
842k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
842k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
842k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
842k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
842k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
842k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
842k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
842k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
842k
    _memory_used_counter =
606
842k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
842k
    _common_profile->add_info_string("IsColocate",
608
842k
                                     std::to_string(_parent->is_colocated_operator()));
609
842k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
842k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
842k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
842k
    return Status::OK();
613
842k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
55.9k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
55.9k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
55.9k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
55.9k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
55.9k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
55.9k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
55.9k
    _operator_profile->add_child(_common_profile.get(), true);
557
55.9k
    _operator_profile->add_child(_custom_profile.get(), true);
558
55.9k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
55.9k
    if constexpr (!is_fake_shared) {
560
55.9k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
55.9k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
4.27k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
4.27k
            _dependency = _shared_state->create_source_dependency(
576
4.27k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
4.27k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
4.27k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
51.6k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
51.6k
        }
584
55.9k
    }
585
586
55.9k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
55.9k
    _rows_returned_counter =
591
55.9k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
55.9k
    _blocks_returned_counter =
593
55.9k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
55.9k
    _output_block_bytes_counter =
595
55.9k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
55.9k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
55.9k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
55.9k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
55.9k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
55.9k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
55.9k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
55.9k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
55.9k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
55.9k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
55.9k
    _memory_used_counter =
606
55.9k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
55.9k
    _common_profile->add_info_string("IsColocate",
608
55.9k
                                     std::to_string(_parent->is_colocated_operator()));
609
55.9k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
55.9k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
55.9k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
55.9k
    return Status::OK();
613
55.9k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
26
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
26
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
26
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
26
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
26
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
26
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
26
    _operator_profile->add_child(_common_profile.get(), true);
557
26
    _operator_profile->add_child(_custom_profile.get(), true);
558
26
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
26
    if constexpr (!is_fake_shared) {
560
26
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
26
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
26
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
26
            _dependency = _shared_state->create_source_dependency(
576
26
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
26
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
26
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
26
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
26
    }
585
586
26
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
26
    _rows_returned_counter =
591
26
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
26
    _blocks_returned_counter =
593
26
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
26
    _output_block_bytes_counter =
595
26
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
26
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
26
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
26
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
26
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
26
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
26
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
26
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
26
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
26
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
26
    _memory_used_counter =
606
26
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
26
    _common_profile->add_info_string("IsColocate",
608
26
                                     std::to_string(_parent->is_colocated_operator()));
609
26
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
26
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
26
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
26
    return Status::OK();
613
26
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
5.97k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
5.97k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
5.97k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
5.97k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
5.97k
    _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.97k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
5.97k
    _operator_profile->add_child(_common_profile.get(), true);
557
5.97k
    _operator_profile->add_child(_custom_profile.get(), true);
558
5.97k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
5.97k
    if constexpr (!is_fake_shared) {
560
5.97k
        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.97k
        } 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.82k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
5.82k
            _dependency = _shared_state->create_source_dependency(
576
5.82k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
5.82k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
5.82k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
5.82k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
148
        }
584
5.97k
    }
585
586
5.97k
    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.97k
    _rows_returned_counter =
591
5.97k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
5.97k
    _blocks_returned_counter =
593
5.97k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
5.97k
    _output_block_bytes_counter =
595
5.97k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
5.97k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
5.97k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
5.97k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
5.97k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
5.97k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
5.97k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
5.97k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
5.97k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
5.97k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
5.97k
    _memory_used_counter =
606
5.97k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
5.97k
    _common_profile->add_info_string("IsColocate",
608
5.97k
                                     std::to_string(_parent->is_colocated_operator()));
609
5.97k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
5.97k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
5.97k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
5.97k
    return Status::OK();
613
5.97k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
495
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
495
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
495
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
495
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
495
    _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
495
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
495
    _operator_profile->add_child(_common_profile.get(), true);
557
495
    _operator_profile->add_child(_custom_profile.get(), true);
558
495
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
495
    if constexpr (!is_fake_shared) {
560
495
        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
495
        } 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
495
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
495
            _dependency = _shared_state->create_source_dependency(
576
495
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
495
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
495
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
495
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
495
    }
585
586
495
    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
495
    _rows_returned_counter =
591
495
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
495
    _blocks_returned_counter =
593
495
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
495
    _output_block_bytes_counter =
595
495
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
495
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
495
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
495
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
495
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
495
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
495
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
495
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
495
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
495
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
495
    _memory_used_counter =
606
495
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
495
    _common_profile->add_info_string("IsColocate",
608
495
                                     std::to_string(_parent->is_colocated_operator()));
609
495
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
495
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
495
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
495
    return Status::OK();
613
495
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
5.09k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
5.09k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
5.09k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
5.09k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
5.09k
    _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.09k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
5.09k
    _operator_profile->add_child(_common_profile.get(), true);
557
5.09k
    _operator_profile->add_child(_custom_profile.get(), true);
558
5.09k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
5.09k
    if constexpr (!is_fake_shared) {
560
5.09k
        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.09k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
5.05k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
5.05k
            _dependency = _shared_state->create_source_dependency(
576
5.05k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
5.05k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
5.05k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
5.05k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
38
        }
584
5.09k
    }
585
586
5.09k
    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.09k
    _rows_returned_counter =
591
5.09k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
5.09k
    _blocks_returned_counter =
593
5.09k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
5.09k
    _output_block_bytes_counter =
595
5.09k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
5.09k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
5.09k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
5.09k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
5.09k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
5.09k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
5.09k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
5.09k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
5.09k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
5.09k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
5.09k
    _memory_used_counter =
606
5.09k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
5.09k
    _common_profile->add_info_string("IsColocate",
608
5.09k
                                     std::to_string(_parent->is_colocated_operator()));
609
5.09k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
5.09k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
5.09k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
5.09k
    return Status::OK();
613
5.09k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
694k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
694k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
694k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
694k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
694k
    _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
694k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
694k
    _operator_profile->add_child(_common_profile.get(), true);
557
694k
    _operator_profile->add_child(_custom_profile.get(), true);
558
694k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
694k
    if constexpr (!is_fake_shared) {
560
694k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
680k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
680k
                                    .first.get()
563
680k
                                    ->template cast<SharedStateArg>();
564
565
680k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
680k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
680k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
680k
        } 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
14.2k
        } else {
580
14.2k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
14.2k
                DCHECK(false);
582
14.2k
            }
583
14.2k
        }
584
694k
    }
585
586
694k
    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
694k
    _rows_returned_counter =
591
694k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
694k
    _blocks_returned_counter =
593
694k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
694k
    _output_block_bytes_counter =
595
694k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
694k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
694k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
694k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
694k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
694k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
694k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
694k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
694k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
694k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
694k
    _memory_used_counter =
606
694k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
694k
    _common_profile->add_info_string("IsColocate",
608
694k
                                     std::to_string(_parent->is_colocated_operator()));
609
694k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
694k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
694k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
694k
    return Status::OK();
613
694k
}
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
168
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
168
            _dependency = _shared_state->create_source_dependency(
576
168
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
168
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
168
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
168
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
1
        }
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.13M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
2.13M
    _conjuncts.resize(_parent->_conjuncts.size());
618
2.44M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
312k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
312k
    }
621
2.13M
    if (_parent->has_projection()) {
622
401k
        const auto& projection = *_parent->_projection;
623
401k
        _projections.resize(projection.projections.size());
624
2.53M
        for (size_t i = 0; i < _projections.size(); i++) {
625
2.13M
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
2.13M
        }
627
401k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
425k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
23.2k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
419k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
396k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
396k
                        state, _intermediate_projections[i][j]));
633
396k
            }
634
23.2k
        }
635
401k
    }
636
2.13M
    return Status::OK();
637
2.13M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
75.1k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
75.1k
    _conjuncts.resize(_parent->_conjuncts.size());
618
77.3k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
2.26k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
2.26k
    }
621
75.1k
    if (_parent->has_projection()) {
622
75.1k
        const auto& projection = *_parent->_projection;
623
75.1k
        _projections.resize(projection.projections.size());
624
440k
        for (size_t i = 0; i < _projections.size(); i++) {
625
365k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
365k
        }
627
75.1k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
85.8k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
10.7k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
345k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
334k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
334k
                        state, _intermediate_projections[i][j]));
633
334k
            }
634
10.7k
        }
635
75.1k
    }
636
75.1k
    return Status::OK();
637
75.1k
}
_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
244k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
244k
    _conjuncts.resize(_parent->_conjuncts.size());
618
244k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
244k
    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
244k
    return Status::OK();
637
244k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
151
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
151
    _conjuncts.resize(_parent->_conjuncts.size());
618
151
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
151
    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
151
    return Status::OK();
637
151
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
7.35k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
7.35k
    _conjuncts.resize(_parent->_conjuncts.size());
618
7.42k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
62
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
62
    }
621
7.35k
    if (_parent->has_projection()) {
622
7.35k
        const auto& projection = *_parent->_projection;
623
7.35k
        _projections.resize(projection.projections.size());
624
33.1k
        for (size_t i = 0; i < _projections.size(); i++) {
625
25.8k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
25.8k
        }
627
7.35k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
7.38k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
28
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
193
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
165
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
165
                        state, _intermediate_projections[i][j]));
633
165
            }
634
28
        }
635
7.35k
    }
636
7.35k
    return Status::OK();
637
7.35k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
11.8k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
11.8k
    _conjuncts.resize(_parent->_conjuncts.size());
618
12.6k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
801
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
801
    }
621
11.8k
    if (_parent->has_projection()) {
622
6.52k
        const auto& projection = *_parent->_projection;
623
6.52k
        _projections.resize(projection.projections.size());
624
26.8k
        for (size_t i = 0; i < _projections.size(); i++) {
625
20.2k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
20.2k
        }
627
6.52k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
6.61k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
83
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
618
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
535
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
535
                        state, _intermediate_projections[i][j]));
633
535
            }
634
83
        }
635
6.52k
    }
636
11.8k
    return Status::OK();
637
11.8k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
102k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
102k
    _conjuncts.resize(_parent->_conjuncts.size());
618
104k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
1.54k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1.54k
    }
621
102k
    if (_parent->has_projection()) {
622
32.0k
        const auto& projection = *_parent->_projection;
623
32.0k
        _projections.resize(projection.projections.size());
624
294k
        for (size_t i = 0; i < _projections.size(); i++) {
625
262k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
262k
        }
627
32.0k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
32.7k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
709
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
4.40k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
3.69k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
3.69k
                        state, _intermediate_projections[i][j]));
633
3.69k
            }
634
709
        }
635
32.0k
    }
636
102k
    return Status::OK();
637
102k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
76.2k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
76.2k
    _conjuncts.resize(_parent->_conjuncts.size());
618
76.2k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
18
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
18
    }
621
76.2k
    if (_parent->has_projection()) {
622
378
        const auto& projection = *_parent->_projection;
623
378
        _projections.resize(projection.projections.size());
624
1.51k
        for (size_t i = 0; i < _projections.size(); i++) {
625
1.14k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
1.14k
        }
627
378
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
381
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
3
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
19
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
16
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
16
                        state, _intermediate_projections[i][j]));
633
16
            }
634
3
        }
635
378
    }
636
76.2k
    return Status::OK();
637
76.2k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
123
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
123
    _conjuncts.resize(_parent->_conjuncts.size());
618
123
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
123
    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
123
    return Status::OK();
637
123
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
846k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
846k
    _conjuncts.resize(_parent->_conjuncts.size());
618
1.15M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
306k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
306k
    }
621
846k
    if (_parent->has_projection()) {
622
267k
        const auto& projection = *_parent->_projection;
623
267k
        _projections.resize(projection.projections.size());
624
1.62M
        for (size_t i = 0; i < _projections.size(); i++) {
625
1.35M
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
1.35M
        }
627
267k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
279k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
11.4k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
66.8k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
55.4k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
55.4k
                        state, _intermediate_projections[i][j]));
633
55.4k
            }
634
11.4k
        }
635
267k
    }
636
846k
    return Status::OK();
637
846k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
56.4k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
56.4k
    _conjuncts.resize(_parent->_conjuncts.size());
618
56.4k
    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.4k
    if (_parent->has_projection()) {
622
11.9k
        const auto& projection = *_parent->_projection;
623
11.9k
        _projections.resize(projection.projections.size());
624
115k
        for (size_t i = 0; i < _projections.size(); i++) {
625
103k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
103k
        }
627
11.9k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
12.1k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
164
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
2.21k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
2.05k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
2.05k
                        state, _intermediate_projections[i][j]));
633
2.05k
            }
634
164
        }
635
11.9k
    }
636
56.4k
    return Status::OK();
637
56.4k
}
_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
6.00k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
6.00k
    _conjuncts.resize(_parent->_conjuncts.size());
618
6.46k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
459
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
459
    }
621
6.00k
    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
6.00k
    return Status::OK();
637
6.00k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
495
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
495
    _conjuncts.resize(_parent->_conjuncts.size());
618
495
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
495
    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
495
    return Status::OK();
637
495
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
5.09k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
5.09k
    _conjuncts.resize(_parent->_conjuncts.size());
618
5.09k
    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.09k
    if (_parent->has_projection()) {
622
87
        const auto& projection = *_parent->_projection;
623
87
        _projections.resize(projection.projections.size());
624
282
        for (size_t i = 0; i < _projections.size(); i++) {
625
195
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
195
        }
627
87
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
87
        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
87
    }
636
5.09k
    return Status::OK();
637
5.09k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
701k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
701k
    _conjuncts.resize(_parent->_conjuncts.size());
618
701k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
701k
    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
701k
    return Status::OK();
637
701k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4openEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
169
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
169
    _conjuncts.resize(_parent->_conjuncts.size());
618
176
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
7
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
7
    }
621
169
    if (_parent->has_projection()) {
622
166
        const auto& projection = *_parent->_projection;
623
166
        _projections.resize(projection.projections.size());
624
491
        for (size_t i = 0; i < _projections.size(); i++) {
625
325
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
325
        }
627
166
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
169
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
3
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
11
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
8
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
8
                        state, _intermediate_projections[i][j]));
633
8
            }
634
3
        }
635
166
    }
636
169
    return Status::OK();
637
169
}
638
639
template <typename SharedStateArg>
640
9.08k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
9.08k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
9.08k
    _terminated = true;
645
9.08k
    return Status::OK();
646
9.08k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
346
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
346
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
346
    _terminated = true;
645
346
    return Status::OK();
646
346
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
55
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
55
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
55
    _terminated = true;
645
55
    return Status::OK();
646
55
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
26
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
26
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
26
    _terminated = true;
645
26
    return Status::OK();
646
26
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
1
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
1
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
1
    _terminated = true;
645
1
    return Status::OK();
646
1
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
136
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
136
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
136
    _terminated = true;
645
136
    return Status::OK();
646
136
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
6.98k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
6.98k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
6.98k
    _terminated = true;
645
6.98k
    return Status::OK();
646
6.98k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
68
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
68
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
68
    _terminated = true;
645
68
    return Status::OK();
646
68
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
10
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
10
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
10
    _terminated = true;
645
10
    return Status::OK();
646
10
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
17
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
17
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
17
    _terminated = true;
645
17
    return Status::OK();
646
17
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
1.40k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
1.40k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
1.40k
    _terminated = true;
645
1.40k
    return Status::OK();
646
1.40k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
35
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
35
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
35
    _terminated = true;
645
35
    return Status::OK();
646
35
}
647
648
template <typename SharedStateArg>
649
2.39M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
2.39M
    if (_closed) {
651
264k
        return Status::OK();
652
264k
    }
653
2.13M
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
1.28M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
1.28M
    }
656
2.13M
    _closed = true;
657
2.13M
    return Status::OK();
658
2.39M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
75.0k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
75.0k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
75.0k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
75.0k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
75.0k
    }
656
75.0k
    _closed = true;
657
75.0k
    return Status::OK();
658
75.0k
}
_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
484k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
484k
    if (_closed) {
651
242k
        return Status::OK();
652
242k
    }
653
241k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
241k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
241k
    }
656
241k
    _closed = true;
657
241k
    return Status::OK();
658
484k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
155
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
155
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
155
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
155
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
155
    }
656
155
    _closed = true;
657
155
    return Status::OK();
658
155
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
7.35k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
7.35k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
7.35k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
7.35k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
7.35k
    }
656
7.35k
    _closed = true;
657
7.35k
    return Status::OK();
658
7.35k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
11.8k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
11.8k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
11.8k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
11.8k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
11.8k
    }
656
11.8k
    _closed = true;
657
11.8k
    return Status::OK();
658
11.8k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
102k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
102k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
102k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
102k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
102k
    }
656
102k
    _closed = true;
657
102k
    return Status::OK();
658
102k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
75.9k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
75.9k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
75.9k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
75.9k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
75.9k
    }
656
75.9k
    _closed = true;
657
75.9k
    return Status::OK();
658
75.9k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
118
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
118
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
118
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
118
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
118
    }
656
118
    _closed = true;
657
118
    return Status::OK();
658
118
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
862k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
862k
    if (_closed) {
651
15.5k
        return Status::OK();
652
15.5k
    }
653
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
    }
656
847k
    _closed = true;
657
847k
    return Status::OK();
658
862k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
56.4k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
56.4k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
56.4k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
56.4k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
56.4k
    }
656
56.4k
    _closed = true;
657
56.4k
    return Status::OK();
658
56.4k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
28
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
28
    if (_closed) {
651
14
        return Status::OK();
652
14
    }
653
14
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
14
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
14
    }
656
14
    _closed = true;
657
14
    return Status::OK();
658
28
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
5.97k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
5.97k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
5.97k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
5.97k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
5.97k
    }
656
5.97k
    _closed = true;
657
5.97k
    return Status::OK();
658
5.97k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
782
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
782
    if (_closed) {
651
393
        return Status::OK();
652
393
    }
653
389
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
389
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
389
    }
656
389
    _closed = true;
657
389
    return Status::OK();
658
782
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
10.4k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
10.4k
    if (_closed) {
651
5.33k
        return Status::OK();
652
5.33k
    }
653
5.08k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
5.08k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
5.08k
    }
656
5.08k
    _closed = true;
657
5.08k
    return Status::OK();
658
10.4k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
702k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
702k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
702k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
702k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
702k
    }
656
702k
    _closed = true;
657
702k
    return Status::OK();
658
702k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
340
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
340
    if (_closed) {
651
180
        return Status::OK();
652
180
    }
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
340
}
659
660
template <typename SharedState>
661
1.82M
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
1.82M
    _operator_profile =
664
1.82M
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
1.82M
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
1.82M
    _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.82M
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
1.82M
    _operator_profile->add_child(_common_profile, true);
673
1.82M
    _operator_profile->add_child(_custom_profile, true);
674
675
1.82M
    _operator_profile->set_metadata(_parent->node_id());
676
1.82M
    _wait_for_finish_dependency_timer =
677
1.82M
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
1.82M
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
1.82M
    if constexpr (!is_fake_shared) {
680
1.28M
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
1.28M
            info.shared_state_map.end()) {
682
353k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
264k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
264k
            }
685
353k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
353k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
353k
                                                  ? 0
688
353k
                                                  : info.task_idx]
689
353k
                                  .get();
690
353k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
930k
        } else {
692
18.4E
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
18.4E
                DCHECK(false);
694
18.4E
            }
695
930k
            _shared_state = info.shared_state->template cast<SharedState>();
696
930k
            _dependency = _shared_state->create_sink_dependency(
697
930k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
930k
        }
699
1.28M
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
1.28M
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
1.28M
    }
702
703
1.82M
    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.82M
    _rows_input_counter =
708
1.82M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
1.82M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
1.82M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
1.82M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
1.82M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
1.82M
    _memory_used_counter =
714
1.82M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
1.82M
    _common_profile->add_info_string("IsColocate",
716
1.82M
                                     std::to_string(_parent->is_colocated_operator()));
717
1.82M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
1.82M
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
1.82M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
1.82M
    return Status::OK();
721
1.82M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
122k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
122k
    _operator_profile =
664
122k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
122k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
122k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
122k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
122k
    _operator_profile->add_child(_common_profile, true);
673
122k
    _operator_profile->add_child(_custom_profile, true);
674
675
122k
    _operator_profile->set_metadata(_parent->node_id());
676
122k
    _wait_for_finish_dependency_timer =
677
122k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
122k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
122k
    if constexpr (!is_fake_shared) {
680
122k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
122k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
12.8k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
12.8k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
12.8k
                                                  ? 0
688
12.8k
                                                  : info.task_idx]
689
12.8k
                                  .get();
690
12.8k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
109k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
109k
            _shared_state = info.shared_state->template cast<SharedState>();
696
109k
            _dependency = _shared_state->create_sink_dependency(
697
109k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
109k
        }
699
122k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
122k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
122k
    }
702
703
122k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
122k
    _rows_input_counter =
708
122k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
122k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
122k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
122k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
122k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
122k
    _memory_used_counter =
714
122k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
122k
    _common_profile->add_info_string("IsColocate",
716
122k
                                     std::to_string(_parent->is_colocated_operator()));
717
122k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
122k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
122k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
122k
    return Status::OK();
721
122k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
5
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
5
    _operator_profile =
664
5
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
5
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
5
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
5
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
5
    _operator_profile->add_child(_common_profile, true);
673
5
    _operator_profile->add_child(_custom_profile, true);
674
675
5
    _operator_profile->set_metadata(_parent->node_id());
676
5
    _wait_for_finish_dependency_timer =
677
5
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
5
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
5
    if constexpr (!is_fake_shared) {
680
5
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
5
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
5
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
5
            _shared_state = info.shared_state->template cast<SharedState>();
696
5
            _dependency = _shared_state->create_sink_dependency(
697
5
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
5
        }
699
5
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
5
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
5
    }
702
703
5
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
5
    _rows_input_counter =
708
5
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
5
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
5
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
5
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
5
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
5
    _memory_used_counter =
714
5
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
5
    _common_profile->add_info_string("IsColocate",
716
5
                                     std::to_string(_parent->is_colocated_operator()));
717
5
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
5
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
5
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
5
    return Status::OK();
721
5
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
242k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
242k
    _operator_profile =
664
242k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
242k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
242k
    _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
242k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
242k
    _operator_profile->add_child(_common_profile, true);
673
242k
    _operator_profile->add_child(_custom_profile, true);
674
675
242k
    _operator_profile->set_metadata(_parent->node_id());
676
242k
    _wait_for_finish_dependency_timer =
677
242k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
242k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
242k
    if constexpr (!is_fake_shared) {
680
242k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
242k
            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
242k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
242k
            _shared_state = info.shared_state->template cast<SharedState>();
696
242k
            _dependency = _shared_state->create_sink_dependency(
697
242k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
242k
        }
699
242k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
242k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
242k
    }
702
703
242k
    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
242k
    _rows_input_counter =
708
242k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
242k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
242k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
242k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
242k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
242k
    _memory_used_counter =
714
242k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
242k
    _common_profile->add_info_string("IsColocate",
716
242k
                                     std::to_string(_parent->is_colocated_operator()));
717
242k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
242k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
242k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
242k
    return Status::OK();
721
242k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
162
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
162
    _operator_profile =
664
162
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
162
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
162
    _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
162
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
162
    _operator_profile->add_child(_common_profile, true);
673
162
    _operator_profile->add_child(_custom_profile, true);
674
675
162
    _operator_profile->set_metadata(_parent->node_id());
676
162
    _wait_for_finish_dependency_timer =
677
162
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
162
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
162
    if constexpr (!is_fake_shared) {
680
162
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
162
            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
162
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
162
            _shared_state = info.shared_state->template cast<SharedState>();
696
162
            _dependency = _shared_state->create_sink_dependency(
697
162
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
162
        }
699
162
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
162
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
162
    }
702
703
162
    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
162
    _rows_input_counter =
708
162
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
162
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
162
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
162
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
162
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
162
    _memory_used_counter =
714
162
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
162
    _common_profile->add_info_string("IsColocate",
716
162
                                     std::to_string(_parent->is_colocated_operator()));
717
162
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
162
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
162
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
162
    return Status::OK();
721
162
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
7.27k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
7.27k
    _operator_profile =
664
7.27k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
7.27k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
7.27k
    _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
7.27k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
7.27k
    _operator_profile->add_child(_common_profile, true);
673
7.27k
    _operator_profile->add_child(_custom_profile, true);
674
675
7.27k
    _operator_profile->set_metadata(_parent->node_id());
676
7.27k
    _wait_for_finish_dependency_timer =
677
7.27k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
7.27k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
7.27k
    if constexpr (!is_fake_shared) {
680
7.27k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
7.27k
            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
7.27k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
7.27k
            _shared_state = info.shared_state->template cast<SharedState>();
696
7.27k
            _dependency = _shared_state->create_sink_dependency(
697
7.27k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
7.27k
        }
699
7.27k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
7.27k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
7.27k
    }
702
703
7.27k
    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
7.27k
    _rows_input_counter =
708
7.27k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
7.27k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
7.27k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
7.27k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
7.27k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
7.27k
    _memory_used_counter =
714
7.27k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
7.27k
    _common_profile->add_info_string("IsColocate",
716
7.27k
                                     std::to_string(_parent->is_colocated_operator()));
717
7.27k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
7.27k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
7.27k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
7.27k
    return Status::OK();
721
7.27k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
11.8k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
11.8k
    _operator_profile =
664
11.8k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
11.8k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
11.8k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
11.8k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
11.8k
    _operator_profile->add_child(_common_profile, true);
673
11.8k
    _operator_profile->add_child(_custom_profile, true);
674
675
11.8k
    _operator_profile->set_metadata(_parent->node_id());
676
11.8k
    _wait_for_finish_dependency_timer =
677
11.8k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
11.8k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
11.8k
    if constexpr (!is_fake_shared) {
680
11.8k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
11.8k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
11.8k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
11.8k
            _shared_state = info.shared_state->template cast<SharedState>();
696
11.8k
            _dependency = _shared_state->create_sink_dependency(
697
11.8k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
11.8k
        }
699
11.8k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
11.8k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
11.8k
    }
702
703
11.8k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
11.8k
    _rows_input_counter =
708
11.8k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
11.8k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
11.8k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
11.8k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
11.8k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
11.8k
    _memory_used_counter =
714
11.8k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
11.8k
    _common_profile->add_info_string("IsColocate",
716
11.8k
                                     std::to_string(_parent->is_colocated_operator()));
717
11.8k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
11.8k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
11.8k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
11.8k
    return Status::OK();
721
11.8k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
102k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
102k
    _operator_profile =
664
102k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
102k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
102k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
102k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
102k
    _operator_profile->add_child(_common_profile, true);
673
102k
    _operator_profile->add_child(_custom_profile, true);
674
675
102k
    _operator_profile->set_metadata(_parent->node_id());
676
102k
    _wait_for_finish_dependency_timer =
677
102k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
102k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
102k
    if constexpr (!is_fake_shared) {
680
102k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
102k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
102k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
102k
            _shared_state = info.shared_state->template cast<SharedState>();
696
102k
            _dependency = _shared_state->create_sink_dependency(
697
102k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
102k
        }
699
102k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
102k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
102k
    }
702
703
102k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
102k
    _rows_input_counter =
708
102k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
102k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
102k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
102k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
102k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
102k
    _memory_used_counter =
714
102k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
102k
    _common_profile->add_info_string("IsColocate",
716
102k
                                     std::to_string(_parent->is_colocated_operator()));
717
102k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
102k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
102k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
102k
    return Status::OK();
721
102k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
76.1k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
76.1k
    _operator_profile =
664
76.1k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
76.1k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
76.1k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
76.1k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
76.1k
    _operator_profile->add_child(_common_profile, true);
673
76.1k
    _operator_profile->add_child(_custom_profile, true);
674
675
76.1k
    _operator_profile->set_metadata(_parent->node_id());
676
76.1k
    _wait_for_finish_dependency_timer =
677
76.1k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
76.1k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
76.1k
    if constexpr (!is_fake_shared) {
680
76.1k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
76.1k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
76.1k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
76.1k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
76.1k
                                                  ? 0
688
76.1k
                                                  : info.task_idx]
689
76.1k
                                  .get();
690
76.1k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
76.1k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
33
            _shared_state = info.shared_state->template cast<SharedState>();
696
33
            _dependency = _shared_state->create_sink_dependency(
697
33
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
33
        }
699
76.1k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
76.1k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
76.1k
    }
702
703
76.1k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
76.1k
    _rows_input_counter =
708
76.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
76.1k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
76.1k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
76.1k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
76.1k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
76.1k
    _memory_used_counter =
714
76.1k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
76.1k
    _common_profile->add_info_string("IsColocate",
716
76.1k
                                     std::to_string(_parent->is_colocated_operator()));
717
76.1k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
76.1k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
76.1k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
76.1k
    return Status::OK();
721
76.1k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
129
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
129
    _operator_profile =
664
129
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
129
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
129
    _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
129
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
129
    _operator_profile->add_child(_common_profile, true);
673
129
    _operator_profile->add_child(_custom_profile, true);
674
675
129
    _operator_profile->set_metadata(_parent->node_id());
676
129
    _wait_for_finish_dependency_timer =
677
129
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
129
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
129
    if constexpr (!is_fake_shared) {
680
129
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
129
            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
129
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
129
            _shared_state = info.shared_state->template cast<SharedState>();
696
129
            _dependency = _shared_state->create_sink_dependency(
697
129
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
129
        }
699
129
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
129
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
129
    }
702
703
129
    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
129
    _rows_input_counter =
708
129
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
129
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
129
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
129
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
129
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
129
    _memory_used_counter =
714
129
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
129
    _common_profile->add_info_string("IsColocate",
716
129
                                     std::to_string(_parent->is_colocated_operator()));
717
129
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
129
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
129
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
129
    return Status::OK();
721
129
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
535k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
535k
    _operator_profile =
664
535k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
535k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
535k
    _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
535k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
535k
    _operator_profile->add_child(_common_profile, true);
673
535k
    _operator_profile->add_child(_custom_profile, true);
674
675
535k
    _operator_profile->set_metadata(_parent->node_id());
676
535k
    _wait_for_finish_dependency_timer =
677
535k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
535k
    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
535k
    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
535k
    _rows_input_counter =
708
535k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
535k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
535k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
535k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
535k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
535k
    _memory_used_counter =
714
535k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
535k
    _common_profile->add_info_string("IsColocate",
716
535k
                                     std::to_string(_parent->is_colocated_operator()));
717
535k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
535k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
535k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
535k
    return Status::OK();
721
535k
}
_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
495
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
495
    _operator_profile =
664
495
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
495
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
495
    _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
495
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
495
    _operator_profile->add_child(_common_profile, true);
673
495
    _operator_profile->add_child(_custom_profile, true);
674
675
495
    _operator_profile->set_metadata(_parent->node_id());
676
495
    _wait_for_finish_dependency_timer =
677
495
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
495
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
495
    if constexpr (!is_fake_shared) {
680
495
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
495
            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
495
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
495
            _shared_state = info.shared_state->template cast<SharedState>();
696
495
            _dependency = _shared_state->create_sink_dependency(
697
495
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
495
        }
699
495
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
495
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
495
    }
702
703
495
    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
495
    _rows_input_counter =
708
495
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
495
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
495
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
495
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
495
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
495
    _memory_used_counter =
714
495
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
495
    _common_profile->add_info_string("IsColocate",
716
495
                                     std::to_string(_parent->is_colocated_operator()));
717
495
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
495
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
495
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
495
    return Status::OK();
721
495
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
2.42k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
2.42k
    _operator_profile =
664
2.42k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
2.42k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
2.42k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
2.42k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
2.42k
    _operator_profile->add_child(_common_profile, true);
673
2.42k
    _operator_profile->add_child(_custom_profile, true);
674
675
2.42k
    _operator_profile->set_metadata(_parent->node_id());
676
2.42k
    _wait_for_finish_dependency_timer =
677
2.42k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
2.42k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
2.42k
    if constexpr (!is_fake_shared) {
680
2.42k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
2.42k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
2.42k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
2.42k
            _shared_state = info.shared_state->template cast<SharedState>();
696
2.42k
            _dependency = _shared_state->create_sink_dependency(
697
2.42k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
2.42k
        }
699
2.42k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
2.42k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
2.42k
    }
702
703
2.42k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
2.42k
    _rows_input_counter =
708
2.42k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
2.42k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
2.42k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
2.42k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
2.42k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
2.42k
    _memory_used_counter =
714
2.42k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
2.42k
    _common_profile->add_info_string("IsColocate",
716
2.42k
                                     std::to_string(_parent->is_colocated_operator()));
717
2.42k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
2.42k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
2.42k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
2.42k
    return Status::OK();
721
2.42k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
12.4k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
12.4k
    _operator_profile =
664
12.4k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
12.4k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
12.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
12.4k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
12.4k
    _operator_profile->add_child(_common_profile, true);
673
12.4k
    _operator_profile->add_child(_custom_profile, true);
674
675
12.4k
    _operator_profile->set_metadata(_parent->node_id());
676
12.4k
    _wait_for_finish_dependency_timer =
677
12.4k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
12.4k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
12.4k
    if constexpr (!is_fake_shared) {
680
12.4k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
12.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
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.4k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
12.4k
            _shared_state = info.shared_state->template cast<SharedState>();
696
12.4k
            _dependency = _shared_state->create_sink_dependency(
697
12.4k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
12.4k
        }
699
12.4k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
12.4k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
12.4k
    }
702
703
12.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
12.4k
    _rows_input_counter =
708
12.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
12.4k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
12.4k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
12.4k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
12.4k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
12.4k
    _memory_used_counter =
714
12.4k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
12.4k
    _common_profile->add_info_string("IsColocate",
716
12.4k
                                     std::to_string(_parent->is_colocated_operator()));
717
12.4k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
12.4k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
12.4k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
12.4k
    return Status::OK();
721
12.4k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
264k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
264k
    _operator_profile =
664
264k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
264k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
264k
    _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
264k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
264k
    _operator_profile->add_child(_common_profile, true);
673
264k
    _operator_profile->add_child(_custom_profile, true);
674
675
264k
    _operator_profile->set_metadata(_parent->node_id());
676
264k
    _wait_for_finish_dependency_timer =
677
264k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
264k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
264k
    if constexpr (!is_fake_shared) {
680
264k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
264k
            info.shared_state_map.end()) {
682
264k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
264k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
264k
            }
685
264k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
264k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
264k
                                                  ? 0
688
264k
                                                  : info.task_idx]
689
264k
                                  .get();
690
264k
            _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
264k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
264k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
264k
    }
702
703
264k
    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
264k
    _rows_input_counter =
708
264k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
264k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
264k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
264k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
264k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
264k
    _memory_used_counter =
714
264k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
264k
    _common_profile->add_info_string("IsColocate",
716
264k
                                     std::to_string(_parent->is_colocated_operator()));
717
264k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
264k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
264k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
264k
    return Status::OK();
721
264k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
430k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
430k
    _operator_profile =
664
430k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
430k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
430k
    _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
430k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
430k
    _operator_profile->add_child(_common_profile, true);
673
430k
    _operator_profile->add_child(_custom_profile, true);
674
675
430k
    _operator_profile->set_metadata(_parent->node_id());
676
430k
    _wait_for_finish_dependency_timer =
677
430k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
430k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
430k
    if constexpr (!is_fake_shared) {
680
430k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
430k
            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
430k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
430k
            _shared_state = info.shared_state->template cast<SharedState>();
696
430k
            _dependency = _shared_state->create_sink_dependency(
697
430k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
430k
        }
699
430k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
430k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
430k
    }
702
703
430k
    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
430k
    _rows_input_counter =
708
430k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
430k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
430k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
430k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
430k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
430k
    _memory_used_counter =
714
430k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
430k
    _common_profile->add_info_string("IsColocate",
716
430k
                                     std::to_string(_parent->is_colocated_operator()));
717
430k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
430k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
430k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
430k
    return Status::OK();
721
430k
}
_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.82M
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
1.82M
    if (_closed) {
726
2
        return Status::OK();
727
2
    }
728
1.82M
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
1.28M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
1.28M
    }
731
1.82M
    _closed = true;
732
1.82M
    return Status::OK();
733
1.82M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
122k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
122k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
122k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
122k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
122k
    }
731
122k
    _closed = true;
732
122k
    return Status::OK();
733
122k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
4
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
4
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
4
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
4
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
4
    }
731
4
    _closed = true;
732
4
    return Status::OK();
733
4
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
243k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
243k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
243k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
243k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
243k
    }
731
243k
    _closed = true;
732
243k
    return Status::OK();
733
243k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
151
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
151
    if (_closed) {
726
2
        return Status::OK();
727
2
    }
728
149
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
149
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
149
    }
731
149
    _closed = true;
732
149
    return Status::OK();
733
151
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
7.23k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
7.23k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
7.23k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
7.23k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
7.23k
    }
731
7.23k
    _closed = true;
732
7.23k
    return Status::OK();
733
7.23k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
11.7k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
11.7k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
11.7k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
11.7k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
11.7k
    }
731
11.7k
    _closed = true;
732
11.7k
    return Status::OK();
733
11.7k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
102k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
102k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
102k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
102k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
102k
    }
731
102k
    _closed = true;
732
102k
    return Status::OK();
733
102k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
75.7k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
75.7k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
75.7k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
75.7k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
75.7k
    }
731
75.7k
    _closed = true;
732
75.7k
    return Status::OK();
733
75.7k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
118
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
118
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
118
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
118
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
118
    }
731
118
    _closed = true;
732
118
    return Status::OK();
733
118
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
539k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
539k
    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
539k
    _closed = true;
732
539k
    return Status::OK();
733
539k
}
_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
387
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
387
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
387
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
387
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
387
    }
731
387
    _closed = true;
732
387
    return Status::OK();
733
387
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
2.45k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
2.45k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
2.45k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
2.45k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
2.45k
    }
731
2.45k
    _closed = true;
732
2.45k
    return Status::OK();
733
2.45k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
12.4k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
12.4k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
12.4k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
12.4k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
12.4k
    }
731
12.4k
    _closed = true;
732
12.4k
    return Status::OK();
733
12.4k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
266k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
266k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
266k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
266k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
266k
    }
731
266k
    _closed = true;
732
266k
    return Status::OK();
733
266k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
431k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
431k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
431k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
431k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
431k
    }
731
431k
    _closed = true;
732
431k
    return Status::OK();
733
431k
}
_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.21k
                                                          bool* eos) {
738
1.21k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
1.21k
    return pull(state, block, eos);
740
1.21k
}
_ZN5doris18StreamingOperatorXINS_23AssertNumRowsLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
39
                                                          bool* eos) {
738
39
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
39
    return pull(state, block, eos);
740
39
}
_ZN5doris18StreamingOperatorXINS_16SelectLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
1.17k
                                                          bool* eos) {
738
1.17k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
1.17k
    return pull(state, block, eos);
740
1.17k
}
741
742
template <typename LocalStateType>
743
Status StatefulOperatorX<LocalStateType>::get_block_impl(RuntimeState* state, Block* block,
744
503k
                                                         bool* eos) {
745
503k
    auto& local_state = get_local_state(state);
746
503k
    if (need_more_input_data(state)) {
747
473k
        local_state._child_block->clear_column_data(
748
473k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
473k
                        .num_slots());
750
473k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
473k
                state, local_state._child_block.get(), &local_state._child_eos));
752
473k
        *eos = local_state._child_eos;
753
473k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
50.5k
            return Status::OK();
755
50.5k
        }
756
422k
        {
757
422k
            SCOPED_TIMER(local_state.exec_time_counter());
758
422k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
422k
        }
760
422k
    }
761
762
453k
    if (!need_more_input_data(state)) {
763
427k
        SCOPED_TIMER(local_state.exec_time_counter());
764
427k
        bool new_eos = false;
765
427k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
427k
        if (new_eos) {
767
347k
            *eos = true;
768
347k
        } else if (!need_more_input_data(state)) {
769
22.2k
            *eos = false;
770
22.2k
        }
771
427k
    }
772
453k
    return Status::OK();
773
453k
}
_ZN5doris17StatefulOperatorXINS_23HashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
143k
                                                         bool* eos) {
745
143k
    auto& local_state = get_local_state(state);
746
143k
    if (need_more_input_data(state)) {
747
124k
        local_state._child_block->clear_column_data(
748
124k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
124k
                        .num_slots());
750
124k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
124k
                state, local_state._child_block.get(), &local_state._child_eos));
752
124k
        *eos = local_state._child_eos;
753
124k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
32.5k
            return Status::OK();
755
32.5k
        }
756
92.2k
        {
757
92.2k
            SCOPED_TIMER(local_state.exec_time_counter());
758
92.2k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
92.2k
        }
760
92.2k
    }
761
762
111k
    if (!need_more_input_data(state)) {
763
111k
        SCOPED_TIMER(local_state.exec_time_counter());
764
111k
        bool new_eos = false;
765
111k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
111k
        if (new_eos) {
767
50.6k
            *eos = true;
768
60.4k
        } else if (!need_more_input_data(state)) {
769
9.72k
            *eos = false;
770
9.72k
        }
771
111k
    }
772
111k
    return Status::OK();
773
111k
}
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_34PartitionedHashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
_ZN5doris17StatefulOperatorXINS_16RepeatLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
4.03k
                                                         bool* eos) {
745
4.03k
    auto& local_state = get_local_state(state);
746
4.03k
    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
427
            return Status::OK();
755
427
        }
756
1.79k
        {
757
1.79k
            SCOPED_TIMER(local_state.exec_time_counter());
758
1.79k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
1.79k
        }
760
1.79k
    }
761
762
3.65k
    if (!need_more_input_data(state)) {
763
3.65k
        SCOPED_TIMER(local_state.exec_time_counter());
764
3.65k
        bool new_eos = false;
765
3.65k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
3.65k
        if (new_eos) {
767
1.17k
            *eos = true;
768
2.48k
        } else if (!need_more_input_data(state)) {
769
1.82k
            *eos = false;
770
1.82k
        }
771
3.65k
    }
772
3.61k
    return Status::OK();
773
3.61k
}
_ZN5doris17StatefulOperatorXINS_25MaterializationLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
1.84k
                                                         bool* eos) {
745
1.84k
    auto& local_state = get_local_state(state);
746
1.84k
    if (need_more_input_data(state)) {
747
1.84k
        local_state._child_block->clear_column_data(
748
1.84k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
1.84k
                        .num_slots());
750
1.84k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
1.84k
                state, local_state._child_block.get(), &local_state._child_eos));
752
1.84k
        *eos = local_state._child_eos;
753
1.84k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
784
            return Status::OK();
755
784
        }
756
1.05k
        {
757
1.05k
            SCOPED_TIMER(local_state.exec_time_counter());
758
1.05k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
1.05k
        }
760
1.05k
    }
761
762
1.05k
    if (!need_more_input_data(state)) {
763
1.05k
        SCOPED_TIMER(local_state.exec_time_counter());
764
1.05k
        bool new_eos = false;
765
1.05k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
1.05k
        if (new_eos) {
767
801
            *eos = true;
768
801
        } else if (!need_more_input_data(state)) {
769
0
            *eos = false;
770
0
        }
771
1.05k
    }
772
1.05k
    return Status::OK();
773
1.05k
}
_ZN5doris17StatefulOperatorXINS_22StreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
17.6k
                                                         bool* eos) {
745
17.6k
    auto& local_state = get_local_state(state);
746
17.6k
    if (need_more_input_data(state)) {
747
17.5k
        local_state._child_block->clear_column_data(
748
17.5k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
17.5k
                        .num_slots());
750
17.5k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
17.5k
                state, local_state._child_block.get(), &local_state._child_eos));
752
17.5k
        *eos = local_state._child_eos;
753
17.5k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
5.77k
            return Status::OK();
755
5.77k
        }
756
11.8k
        {
757
11.8k
            SCOPED_TIMER(local_state.exec_time_counter());
758
11.8k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
11.8k
        }
760
11.8k
    }
761
762
11.8k
    if (!need_more_input_data(state)) {
763
5.79k
        SCOPED_TIMER(local_state.exec_time_counter());
764
5.79k
        bool new_eos = false;
765
5.79k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
5.79k
        if (new_eos) {
767
5.61k
            *eos = true;
768
5.61k
        } else if (!need_more_input_data(state)) {
769
19
            *eos = false;
770
19
        }
771
5.79k
    }
772
11.8k
    return Status::OK();
773
11.8k
}
_ZN5doris17StatefulOperatorXINS_30DistinctStreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
307k
                                                         bool* eos) {
745
307k
    auto& local_state = get_local_state(state);
746
308k
    if (need_more_input_data(state)) {
747
308k
        local_state._child_block->clear_column_data(
748
308k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
308k
                        .num_slots());
750
308k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
308k
                state, local_state._child_block.get(), &local_state._child_eos));
752
308k
        *eos = local_state._child_eos;
753
308k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
10.1k
            return Status::OK();
755
10.1k
        }
756
298k
        {
757
298k
            SCOPED_TIMER(local_state.exec_time_counter());
758
298k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
298k
        }
760
298k
    }
761
762
297k
    if (!need_more_input_data(state)) {
763
277k
        SCOPED_TIMER(local_state.exec_time_counter());
764
277k
        bool new_eos = false;
765
277k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
277k
        if (new_eos) {
767
277k
            *eos = true;
768
277k
        } else if (!need_more_input_data(state)) {
769
5
            *eos = false;
770
5
        }
771
277k
    }
772
297k
    return Status::OK();
773
297k
}
_ZN5doris17StatefulOperatorXINS_29NestedLoopJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
21.3k
                                                         bool* eos) {
745
21.3k
    auto& local_state = get_local_state(state);
746
21.3k
    if (need_more_input_data(state)) {
747
11.0k
        local_state._child_block->clear_column_data(
748
11.0k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
11.0k
                        .num_slots());
750
11.0k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
11.0k
                state, local_state._child_block.get(), &local_state._child_eos));
752
11.0k
        *eos = local_state._child_eos;
753
11.0k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
346
            return Status::OK();
755
346
        }
756
10.6k
        {
757
10.6k
            SCOPED_TIMER(local_state.exec_time_counter());
758
10.6k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
10.6k
        }
760
10.6k
    }
761
762
20.9k
    if (!need_more_input_data(state)) {
763
20.4k
        SCOPED_TIMER(local_state.exec_time_counter());
764
20.4k
        bool new_eos = false;
765
20.4k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
20.4k
        if (new_eos) {
767
7.31k
            *eos = true;
768
13.1k
        } else if (!need_more_input_data(state)) {
769
10.3k
            *eos = false;
770
10.3k
        }
771
20.4k
    }
772
20.9k
    return Status::OK();
773
20.9k
}
_ZN5doris17StatefulOperatorXINS_23TableFunctionLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
8.01k
                                                         bool* eos) {
745
8.01k
    auto& local_state = get_local_state(state);
746
8.01k
    if (need_more_input_data(state)) {
747
7.64k
        local_state._child_block->clear_column_data(
748
7.64k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
7.64k
                        .num_slots());
750
7.64k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
7.64k
                state, local_state._child_block.get(), &local_state._child_eos));
752
7.64k
        *eos = local_state._child_eos;
753
7.64k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
589
            return Status::OK();
755
589
        }
756
7.05k
        {
757
7.05k
            SCOPED_TIMER(local_state.exec_time_counter());
758
7.05k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
7.05k
        }
760
7.05k
    }
761
762
7.42k
    if (!need_more_input_data(state)) {
763
7.42k
        SCOPED_TIMER(local_state.exec_time_counter());
764
7.42k
        bool new_eos = false;
765
7.42k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
7.42k
        if (new_eos) {
767
5.11k
            *eos = true;
768
5.11k
        } else if (!need_more_input_data(state)) {
769
366
            *eos = false;
770
366
        }
771
7.42k
    }
772
7.41k
    return Status::OK();
773
7.41k
}
774
775
template <typename Writer, typename Parent>
776
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
777
50.7k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
50.7k
    RETURN_IF_ERROR(Base::init(state, info));
779
50.7k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
50.7k
                                                         "AsyncWriterDependency", true);
781
50.7k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
50.7k
                             _finish_dependency));
783
784
50.7k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
50.7k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
50.7k
    return Status::OK();
787
50.7k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
360
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
360
    RETURN_IF_ERROR(Base::init(state, info));
779
360
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
360
                                                         "AsyncWriterDependency", true);
781
360
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
360
                             _finish_dependency));
783
784
360
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
360
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
360
    return Status::OK();
787
360
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
50.3k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
50.3k
    RETURN_IF_ERROR(Base::init(state, info));
779
50.3k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
50.3k
                                                         "AsyncWriterDependency", true);
781
50.3k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
50.3k
                             _finish_dependency));
783
784
50.3k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
50.3k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
50.3k
    return Status::OK();
787
50.3k
}
_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
51.6k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
51.6k
    RETURN_IF_ERROR(Base::open(state));
793
51.6k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
399k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
348k
        RETURN_IF_ERROR(
796
348k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
348k
    }
798
51.6k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
51.6k
    return Status::OK();
800
51.6k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
360
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
360
    RETURN_IF_ERROR(Base::open(state));
793
360
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
1.83k
    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
360
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
360
    return Status::OK();
800
360
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
51.2k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
51.2k
    RETURN_IF_ERROR(Base::open(state));
793
51.2k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
398k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
346k
        RETURN_IF_ERROR(
796
346k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
346k
    }
798
51.2k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
51.2k
    return Status::OK();
800
51.2k
}
_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
66.8k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
66.8k
    return _writer->sink(block, eos);
806
66.8k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
1.52k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
1.52k
    return _writer->sink(block, eos);
806
1.52k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
65.2k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
65.2k
    return _writer->sink(block, eos);
806
65.2k
}
_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
51.7k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
51.7k
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
51.7k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
51.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
51.7k
    if (_writer) {
818
51.7k
        Status st = _writer->get_writer_status();
819
51.7k
        if (exec_status.ok()) {
820
51.6k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
51.6k
                                                       : Status::Cancelled("force close"));
822
51.6k
        } else {
823
151
            _writer->force_close(exec_status);
824
151
        }
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
51.7k
        RETURN_IF_ERROR(st);
829
51.7k
    }
830
51.6k
    return Base::close(state, exec_status);
831
51.7k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
349
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
349
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
349
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
349
    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
349
    if (_writer) {
818
349
        Status st = _writer->get_writer_status();
819
349
        if (exec_status.ok()) {
820
349
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
349
                                                       : Status::Cancelled("force close"));
822
349
        } 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
349
        RETURN_IF_ERROR(st);
829
349
    }
830
349
    return Base::close(state, exec_status);
831
349
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
51.3k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
51.3k
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
51.3k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
51.3k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
816
    // if the init failed, the _writer may be nullptr. so here need check
817
51.4k
    if (_writer) {
818
51.4k
        Status st = _writer->get_writer_status();
819
51.4k
        if (exec_status.ok()) {
820
51.2k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
51.2k
                                                       : Status::Cancelled("force close"));
822
51.2k
        } else {
823
151
            _writer->force_close(exec_status);
824
151
        }
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
51.4k
        RETURN_IF_ERROR(st);
829
51.4k
    }
830
51.3k
    return Base::close(state, exec_status);
831
51.3k
}
_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