Coverage Report

Created: 2026-10-27 18:28

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
2.15M
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
2.15M
    if (_parent->nereids_id() == -1) {
123
1.14M
        return fmt::format("(id={})", _parent->node_id());
124
1.14M
    } else {
125
1.01M
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
1.01M
    }
127
2.15M
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
69.3k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
69.3k
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
69.3k
    } else {
125
69.3k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
69.3k
    }
127
69.3k
}
_ZNK5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
1
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
1
    if (_parent->nereids_id() == -1) {
123
1
        return fmt::format("(id={})", _parent->node_id());
124
1
    } else {
125
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
0
    }
127
1
}
_ZNK5doris19PipelineXLocalStateINS_15SortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
230k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
230k
    if (_parent->nereids_id() == -1) {
123
12
        return fmt::format("(id={})", _parent->node_id());
124
230k
    } else {
125
230k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
230k
    }
127
230k
}
_ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
152
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
152
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
152
    } else {
125
152
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
152
    }
127
152
}
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
6.06k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
6.06k
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
6.06k
    } else {
125
6.06k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
6.06k
    }
127
6.06k
}
_ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
8.53k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
8.53k
    if (_parent->nereids_id() == -1) {
123
59
        return fmt::format("(id={})", _parent->node_id());
124
8.47k
    } else {
125
8.47k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
8.47k
    }
127
8.53k
}
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
106k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
106k
    if (_parent->nereids_id() == -1) {
123
29
        return fmt::format("(id={})", _parent->node_id());
124
106k
    } else {
125
106k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
106k
    }
127
106k
}
_ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
74.0k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
74.0k
    if (_parent->nereids_id() == -1) {
123
2
        return fmt::format("(id={})", _parent->node_id());
124
74.0k
    } else {
125
74.0k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
74.0k
    }
127
74.0k
}
_ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
108
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
108
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
108
    } else {
125
108
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
108
    }
127
108
}
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
817k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
817k
    if (_parent->nereids_id() == -1) {
123
359k
        return fmt::format("(id={})", _parent->node_id());
124
458k
    } else {
125
458k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
458k
    }
127
817k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
55.9k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
55.9k
    if (_parent->nereids_id() == -1) {
123
2
        return fmt::format("(id={})", _parent->node_id());
124
55.9k
    } else {
125
55.9k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
55.9k
    }
127
55.9k
}
_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
6.03k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
6.05k
    if (_parent->nereids_id() == -1) {
123
6.05k
        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
6.03k
}
_ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
377
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
377
    if (_parent->nereids_id() == -1) {
123
102
        return fmt::format("(id={})", _parent->node_id());
124
275
    } else {
125
275
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
275
    }
127
377
}
_ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
5.30k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
5.30k
    if (_parent->nereids_id() == -1) {
123
13
        return fmt::format("(id={})", _parent->node_id());
124
5.29k
    } else {
125
5.29k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
5.29k
    }
127
5.30k
}
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
777k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
778k
    if (_parent->nereids_id() == -1) {
123
778k
        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
777k
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
_ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
169
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
169
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
169
    } else {
125
169
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
169
    }
127
169
}
128
129
template <typename SharedStateArg>
130
1.37M
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
1.37M
    if (_parent->nereids_id() == -1) {
132
814k
        return fmt::format("(id={})", _parent->node_id());
133
814k
    } else {
134
555k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
555k
    }
136
1.37M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
117k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
117k
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
117k
    } else {
134
117k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
117k
    }
136
117k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
2
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
2
    if (_parent->nereids_id() == -1) {
132
1
        return fmt::format("(id={})", _parent->node_id());
133
1
    } else {
134
1
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
1
    }
136
2
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
233k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
233k
    if (_parent->nereids_id() == -1) {
132
9
        return fmt::format("(id={})", _parent->node_id());
133
233k
    } else {
134
233k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
233k
    }
136
233k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
159
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
159
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
159
    } else {
134
159
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
159
    }
136
159
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
6.05k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
6.05k
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
6.05k
    } else {
134
6.05k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
6.05k
    }
136
6.05k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
8.63k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
8.63k
    if (_parent->nereids_id() == -1) {
132
59
        return fmt::format("(id={})", _parent->node_id());
133
8.57k
    } else {
134
8.57k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
8.57k
    }
136
8.63k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
106k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
106k
    if (_parent->nereids_id() == -1) {
132
29
        return fmt::format("(id={})", _parent->node_id());
133
106k
    } else {
134
106k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
106k
    }
136
106k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
73.8k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
73.8k
    if (_parent->nereids_id() == -1) {
132
4
        return fmt::format("(id={})", _parent->node_id());
133
73.8k
    } else {
134
73.8k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
73.8k
    }
136
73.8k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
118
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
118
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
118
    } else {
134
118
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
118
    }
136
118
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
22
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
22
    if (_parent->nereids_id() == -1) {
132
22
        return fmt::format("(id={})", _parent->node_id());
133
22
    } else {
134
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
0
    }
136
22
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
9.64k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
9.64k
    if (_parent->nereids_id() == -1) {
132
3
        return fmt::format("(id={})", _parent->node_id());
133
9.63k
    } else {
134
9.63k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
9.63k
    }
136
9.64k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
377
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
377
    if (_parent->nereids_id() == -1) {
132
102
        return fmt::format("(id={})", _parent->node_id());
133
275
    } else {
134
275
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
275
    }
136
377
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
12.7k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
12.8k
    if (_parent->nereids_id() == -1) {
132
12.8k
        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.7k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
299k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
300k
    if (_parent->nereids_id() == -1) {
132
300k
        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
299k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
501k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
501k
    if (_parent->nereids_id() == -1) {
132
501k
        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
501k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
25
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
25
    if (_parent->nereids_id() == -1) {
132
25
        return fmt::format("(id={})", _parent->node_id());
133
25
    } else {
134
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
0
    }
136
25
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
338
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
338
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
338
    } else {
134
338
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
338
    }
136
338
}
137
138
template <typename SharedStateArg>
139
29.4k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
29.4k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
29.4k
    _terminated = true;
144
29.4k
    return Status::OK();
145
29.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.47k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
2.47k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
2.47k
    _terminated = true;
144
2.47k
    return Status::OK();
145
2.47k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
2
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
2
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
2
    _terminated = true;
144
2
    return Status::OK();
145
2
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
3
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
3
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
3
    _terminated = true;
144
3
    return Status::OK();
145
3
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
1.30k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
1.30k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
1.30k
    _terminated = true;
144
1.30k
    return Status::OK();
145
1.30k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
529
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
529
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
529
    _terminated = true;
144
529
    return Status::OK();
145
529
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
419
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
419
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
419
    _terminated = true;
144
419
    return Status::OK();
145
419
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
182
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
182
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
182
    _terminated = true;
144
182
    return Status::OK();
145
182
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
2
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
2
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
2
    _terminated = true;
144
2
    return Status::OK();
145
2
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
71
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
71
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
71
    _terminated = true;
144
71
    return Status::OK();
145
71
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
6
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
6
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
6
    _terminated = true;
144
6
    return Status::OK();
145
6
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
233
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
233
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
233
    _terminated = true;
144
233
    return Status::OK();
145
233
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
136
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
136
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
136
    _terminated = true;
144
136
    return Status::OK();
145
136
}
146
147
330k
DataDistribution OperatorBase::required_data_distribution(RuntimeState* /*state*/) const {
148
330k
    return _child && _child->is_serial_operator() && !is_source()
149
330k
                   ? DataDistribution(TLocalPartitionType::PASSTHROUGH)
150
330k
                   : DataDistribution(TLocalPartitionType::NOOP);
151
330k
}
152
153
27.7k
bool OperatorBase::child_breaks_local_key_distribution(RuntimeState* state) const {
154
27.7k
    if (!_child) {
155
27.1k
        return false;
156
27.1k
    }
157
690
    if (_child->is_serial_operator()) {
158
31
        return true;
159
31
    }
160
659
    const auto child_distribution = _child->required_data_distribution(state);
161
659
    return child_distribution.need_local_exchange() &&
162
659
           !is_shuffled_exchange(child_distribution.distribution_type);
163
690
}
164
165
template <typename SharedStateArg>
166
15.3k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
15.3k
    fmt::memory_buffer debug_string_buffer;
168
15.3k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
15.3k
    return fmt::to_string(debug_string_buffer);
170
15.3k
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
6
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
6
    fmt::memory_buffer debug_string_buffer;
168
6
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
6
    return fmt::to_string(debug_string_buffer);
170
6
}
_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
18
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
18
    fmt::memory_buffer debug_string_buffer;
168
18
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
18
    return fmt::to_string(debug_string_buffer);
170
18
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
31
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
31
    fmt::memory_buffer debug_string_buffer;
168
31
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
31
    return fmt::to_string(debug_string_buffer);
170
31
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
15.1k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
15.1k
    fmt::memory_buffer debug_string_buffer;
168
15.1k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
15.1k
    return fmt::to_string(debug_string_buffer);
170
15.1k
}
_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
72
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
72
    fmt::memory_buffer debug_string_buffer;
168
72
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
72
    return fmt::to_string(debug_string_buffer);
170
72
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
171
172
template <typename SharedStateArg>
173
15.2k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
15.2k
    fmt::memory_buffer debug_string_buffer;
175
15.2k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
15.2k
    return fmt::to_string(debug_string_buffer);
177
15.2k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
18
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
18
    fmt::memory_buffer debug_string_buffer;
175
18
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
18
    return fmt::to_string(debug_string_buffer);
177
18
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
31
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
31
    fmt::memory_buffer debug_string_buffer;
175
31
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
31
    return fmt::to_string(debug_string_buffer);
177
31
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
48
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
48
    fmt::memory_buffer debug_string_buffer;
175
48
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
48
    return fmt::to_string(debug_string_buffer);
177
48
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
52
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
52
    fmt::memory_buffer debug_string_buffer;
175
52
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
52
    return fmt::to_string(debug_string_buffer);
177
52
}
_ZNK5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
15.1k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
15.1k
    fmt::memory_buffer debug_string_buffer;
175
15.1k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
15.1k
    return fmt::to_string(debug_string_buffer);
177
15.1k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
178
179
15.3k
std::string OperatorXBase::debug_string(int indentation_level) const {
180
15.3k
    fmt::memory_buffer debug_string_buffer;
181
15.3k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, parallel_tasks={}, _is_serial_operator={}",
182
15.3k
                   std::string(indentation_level * 2, ' '), _op_name, node_id(), _parallel_tasks,
183
15.3k
                   _is_serial_operator);
184
15.3k
    return fmt::to_string(debug_string_buffer);
185
15.3k
}
186
187
15.3k
std::string OperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
188
15.3k
    return state->get_local_state(operator_id())->debug_string(indentation_level);
189
15.3k
}
190
191
727k
Status OperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
192
727k
    std::string node_name = print_plan_node_type(tnode.node_type);
193
727k
    _nereids_id = tnode.nereids_id;
194
727k
    if (!tnode.intermediate_output_tuple_id_list.empty()) {
195
6.77k
        if (!has_projection()) {
196
0
            return Status::InternalError("no final output tuple id");
197
0
        }
198
6.77k
        if (tnode.intermediate_output_tuple_id_list.size() !=
199
6.77k
            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.77k
    }
207
727k
    auto substr = node_name.substr(0, node_name.find("_NODE"));
208
727k
    _op_name = substr + "_OPERATOR";
209
210
727k
    if (tnode.__isset.vconjunct) {
211
0
        return Status::InternalError("vconjunct is not supported yet");
212
727k
    } else if (tnode.__isset.conjuncts) {
213
284k
        for (const auto& conjunct : tnode.conjuncts) {
214
284k
            VExprContextSPtr context;
215
284k
            RETURN_IF_ERROR(VExpr::create_expr_tree(conjunct, context));
216
284k
            _conjuncts.emplace_back(context);
217
284k
        }
218
106k
    }
219
220
    // create the projections expr
221
727k
    if (tnode.__isset.projections) {
222
276k
        RETURN_IF_ERROR(VExpr::create_expr_trees(tnode.projections, _projection->projections));
223
276k
    }
224
727k
    if (!tnode.intermediate_projections_list.empty()) {
225
6.77k
        DCHECK(has_projection()) << "no final projections";
226
6.77k
        _projection->intermediate_projections.reserve(tnode.intermediate_projections_list.size());
227
12.1k
        for (const auto& tnode_projections : tnode.intermediate_projections_list) {
228
12.1k
            VExprContextSPtrs projections;
229
12.1k
            RETURN_IF_ERROR(VExpr::create_expr_trees(tnode_projections, projections));
230
12.1k
            _projection->intermediate_projections.push_back(projections);
231
12.1k
        }
232
6.77k
    }
233
727k
    return Status::OK();
234
727k
}
235
236
753k
Status OperatorXBase::prepare(RuntimeState* state) {
237
753k
    for (auto& conjunct : _conjuncts) {
238
283k
        RETURN_IF_ERROR(conjunct->prepare(state, operator_row_desc_before_projection()));
239
283k
    }
240
753k
    if (state->enable_adjust_conjunct_order_by_cost()) {
241
703k
        std::ranges::stable_sort(_conjuncts, [](const auto& a, const auto& b) {
242
346k
            return a->execute_cost() < b->execute_cost();
243
346k
        });
244
703k
    };
245
246
753k
    if (has_projection()) {
247
276k
        auto& projection = *_projection;
248
288k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
249
12.1k
            const auto& input_row_desc =
250
12.1k
                    i == 0 ? operator_row_desc_before_projection()
251
12.1k
                           : projection.intermediate_output_row_descriptors[i - 1];
252
12.1k
            RETURN_IF_ERROR(
253
12.1k
                    VExpr::prepare(projection.intermediate_projections[i], state, input_row_desc));
254
12.1k
        }
255
276k
        const auto& final_projection_input_row_desc =
256
276k
                projection.intermediate_output_row_descriptors.empty()
257
276k
                        ? operator_row_desc_before_projection()
258
276k
                        : projection.intermediate_output_row_descriptors.back();
259
276k
        RETURN_IF_ERROR(
260
276k
                VExpr::prepare(projection.projections, state, final_projection_input_row_desc));
261
276k
        RETURN_IF_ERROR(VExpr::check_expr_output_type(projection.projections,
262
276k
                                                      projection.output_row_descriptor));
263
276k
    }
264
265
753k
    for (auto& conjunct : _conjuncts) {
266
284k
        RETURN_IF_ERROR(conjunct->open(state));
267
284k
    }
268
753k
    if (has_projection()) {
269
276k
        RETURN_IF_ERROR(VExpr::open(_projection->projections, state));
270
276k
        for (auto& projections : _projection->intermediate_projections) {
271
12.1k
            RETURN_IF_ERROR(VExpr::open(projections, state));
272
12.1k
        }
273
276k
    }
274
753k
    if (_child && !is_source()) {
275
112k
        RETURN_IF_ERROR(_child->prepare(state));
276
112k
    }
277
278
753k
    if (VExpr::contains_blockable_function(_conjuncts) ||
279
753k
        (has_projection() && VExpr::contains_blockable_function(_projection->projections))) {
280
0
        _blockable = true;
281
0
    }
282
283
753k
    return Status::OK();
284
753k
}
285
286
5.98k
Status OperatorXBase::terminate(RuntimeState* state) {
287
5.98k
    if (_child && !is_source()) {
288
573
        RETURN_IF_ERROR(_child->terminate(state));
289
573
    }
290
5.98k
    auto result = state->get_local_state_result(operator_id());
291
5.98k
    if (!result) {
292
0
        return result.error();
293
0
    }
294
5.98k
    return result.value()->terminate(state);
295
5.98k
}
296
297
5.85M
Status OperatorXBase::close(RuntimeState* state) {
298
5.85M
    if (_child && !is_source()) {
299
1.04M
        RETURN_IF_ERROR(_child->close(state));
300
1.04M
    }
301
5.85M
    auto result = state->get_local_state_result(operator_id());
302
5.85M
    if (!result) {
303
0
        return result.error();
304
0
    }
305
5.85M
    return result.value()->close(state);
306
5.85M
}
307
308
294k
void PipelineXLocalStateBase::clear_origin_block() {
309
294k
    _origin_block.clear_column_data(_parent->operator_row_desc_before_projection().num_slots());
310
294k
}
311
312
983k
Status PipelineXLocalStateBase::filter_block(const VExprContextSPtrs& expr_contexts, Block* block) {
313
983k
    RETURN_IF_ERROR(VExprContext::filter_block(expr_contexts, block, block->columns()));
314
315
983k
    _estimate_memory_usage += VExprContext::get_memory_usage(expr_contexts);
316
983k
    return Status::OK();
317
983k
}
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
294k
                                     Block* output_block) const {
326
294k
    auto* local_state = state->get_local_state(operator_id());
327
294k
    SCOPED_TIMER(local_state->exec_time_counter());
328
294k
    SCOPED_TIMER(local_state->_projection_timer);
329
294k
    const size_t rows = origin_block->rows();
330
294k
    if (rows == 0) {
331
147k
        return Status::OK();
332
147k
    }
333
147k
    SCOPED_PEAK_MEM(&local_state->_estimate_memory_usage);
334
335
147k
    {
336
147k
        Block input_block = *origin_block;
337
338
147k
        ColumnsWithTypeAndName new_columns;
339
147k
        for (const auto& projections : local_state->_intermediate_projections) {
340
5.09k
            if (projections.empty()) {
341
0
                return Status::InternalError("meet empty intermediate projection, node id: {}",
342
0
                                             node_id());
343
0
            }
344
5.09k
            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.08k
            Block tmp_block {new_columns};
356
5.08k
            input_block.swap(tmp_block);
357
5.08k
        }
358
359
147k
        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
147k
        auto scoped_mutable_block = VectorizedUtils::build_scoped_mutable_mem_reuse_block(
367
147k
                output_block, _projection->output_row_descriptor);
368
147k
        auto& mutable_columns = scoped_mutable_block.mutable_columns();
369
147k
        DCHECK_EQ(mutable_columns.size(), local_state->_projections.size()) << debug_string();
370
147k
        Columns shared_columns(mutable_columns.size());
371
372
833k
        for (int i = 0; i < mutable_columns.size(); ++i) {
373
686k
            ColumnPtr column_ptr;
374
686k
            RETURN_IF_ERROR(local_state->_projections[i]->execute(&input_block, column_ptr));
375
686k
            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
686k
            column_ptr = column_ptr->convert_to_full_column_if_const();
382
686k
            if (is_column_nullable(*mutable_columns[i]) && !is_column_nullable(*column_ptr)) {
383
0
                column_ptr = make_nullable(column_ptr, false);
384
0
            }
385
686k
            if (column_ptr->is_exclusive()) {
386
242k
                mutable_columns[i] = IColumn::mutate(std::move(column_ptr));
387
443k
            } else {
388
443k
                shared_columns[i] = std::move(column_ptr);
389
443k
            }
390
686k
        }
391
392
147k
        scoped_mutable_block.restore();
393
833k
        for (int i = 0; i < shared_columns.size(); ++i) {
394
686k
            if (shared_columns[i]) {
395
444k
                output_block->replace_by_position(i, std::move(shared_columns[i]));
396
444k
            }
397
686k
        }
398
147k
    }
399
400
0
    origin_block->clear_column_data(
401
147k
            local_state->_parent->operator_row_desc_before_projection().num_slots());
402
147k
    DCHECK_EQ(output_block->rows(), rows);
403
404
147k
    return Status::OK();
405
147k
}
406
407
4.68M
Status OperatorXBase::get_block_after_projects(RuntimeState* state, Block* block, bool* eos) {
408
4.68M
    DBUG_EXECUTE_IF("Pipeline::return_empty_block", {
409
4.68M
        if (this->_op_name == "AGGREGATION_OPERATOR" || this->_op_name == "HASH_JOIN_OPERATOR" ||
410
4.68M
            this->_op_name == "PARTITIONED_AGGREGATION_OPERATOR" ||
411
4.68M
            this->_op_name == "PARTITIONED_HASH_JOIN_OPERATOR" ||
412
4.68M
            this->_op_name == "CROSS_JOIN_OPERATOR" || this->_op_name == "SORT_OPERATOR") {
413
4.68M
            if (_debug_point_count++ % 2 == 0) {
414
4.68M
                return Status::OK();
415
4.68M
            }
416
4.68M
        }
417
4.68M
    });
418
419
4.68M
    Status status;
420
4.68M
    auto* local_state = state->get_local_state(operator_id());
421
4.68M
    Defer defer([&]() {
422
4.68M
        if (status.ok()) {
423
4.68M
            local_state->update_output_block_counters(*block);
424
4.68M
        }
425
4.68M
    });
426
4.68M
    if (has_projection()) {
427
294k
        local_state->clear_origin_block();
428
294k
        status = get_block(state, &local_state->_origin_block, eos);
429
294k
        if (UNLIKELY(!status.ok())) {
430
43
            return status;
431
43
        }
432
294k
        status = do_projections(state, &local_state->_origin_block, block);
433
294k
        return status;
434
294k
    }
435
4.39M
    status = get_block(state, block, eos);
436
4.39M
    RETURN_IF_ERROR(block->check_type_and_column());
437
4.39M
    return status;
438
4.39M
}
439
440
3.06M
void PipelineXLocalStateBase::reached_limit(Block* block, bool* eos) {
441
3.06M
    if (_parent->_limit != -1 and _num_rows_returned + block->rows() >= _parent->_limit) {
442
10.1k
        block->set_num_rows(_parent->_limit - _num_rows_returned);
443
10.1k
        *eos = true;
444
10.1k
    }
445
446
3.06M
    DBUG_EXECUTE_IF("Pipeline::reached_limit_early", {
447
3.06M
        auto op_name = to_lower(_parent->_op_name);
448
3.06M
        auto arg_op_name = dp->param<std::string>("op_name");
449
3.06M
        arg_op_name = to_lower(arg_op_name);
450
451
3.06M
        if (op_name == arg_op_name) {
452
3.06M
            *eos = true;
453
3.06M
        }
454
3.06M
    });
455
456
3.06M
    if (auto rows = block->rows()) {
457
817k
        _num_rows_returned += rows;
458
817k
        _state->get_query_ctx()->resource_ctx()->io_context()->update_process_rows(rows);
459
817k
    }
460
3.06M
}
461
462
29.4k
Status DataSinkOperatorXBase::terminate(RuntimeState* state) {
463
29.4k
    auto result = state->get_sink_local_state_result();
464
29.4k
    if (!result) {
465
0
        return result.error();
466
0
    }
467
29.4k
    return result.value()->terminate(state);
468
29.4k
}
469
470
15.2k
std::string DataSinkOperatorXBase::debug_string(int indentation_level) const {
471
15.2k
    fmt::memory_buffer debug_string_buffer;
472
473
15.2k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, _is_serial_operator={}",
474
15.2k
                   std::string(indentation_level * 2, ' '), _name, node_id(), _is_serial_operator);
475
15.2k
    return fmt::to_string(debug_string_buffer);
476
15.2k
}
477
478
15.2k
std::string DataSinkOperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
479
15.2k
    return state->get_sink_local_state()->debug_string(indentation_level);
480
15.2k
}
481
482
372k
Status DataSinkOperatorXBase::init(const TDataSink& tsink) {
483
372k
    std::string op_name = "UNKNOWN_SINK";
484
372k
    auto it = _TDataSinkType_VALUES_TO_NAMES.find(tsink.type);
485
486
373k
    if (it != _TDataSinkType_VALUES_TO_NAMES.end()) {
487
373k
        op_name = it->second;
488
373k
    }
489
372k
    _name = op_name + "_OPERATOR";
490
372k
    return Status::OK();
491
372k
}
492
493
315k
Status DataSinkOperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
494
315k
    std::string op_name = print_plan_node_type(tnode.node_type);
495
315k
    _nereids_id = tnode.nereids_id;
496
315k
    auto substr = op_name.substr(0, op_name.find("_NODE"));
497
315k
    _name = substr + "_SINK_OPERATOR";
498
315k
    return Status::OK();
499
315k
}
500
501
template <typename LocalStateType>
502
Status DataSinkOperatorX<LocalStateType>::setup_local_state(RuntimeState* state,
503
1.97M
                                                            LocalSinkStateInfo& info) {
504
1.97M
    auto local_state = LocalStateType::create_unique(this, state);
505
1.97M
    RETURN_IF_ERROR(local_state->init(state, info));
506
1.97M
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
1.97M
    return Status::OK();
508
1.97M
}
_ZN5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
117k
                                                            LocalSinkStateInfo& info) {
504
117k
    auto local_state = LocalStateType::create_unique(this, state);
505
117k
    RETURN_IF_ERROR(local_state->init(state, info));
506
117k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
117k
    return Status::OK();
508
117k
}
_ZN5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
452k
                                                            LocalSinkStateInfo& info) {
504
452k
    auto local_state = LocalStateType::create_unique(this, state);
505
452k
    RETURN_IF_ERROR(local_state->init(state, info));
506
452k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
452k
    return Status::OK();
508
452k
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
3
                                                            LocalSinkStateInfo& info) {
504
3
    auto local_state = LocalStateType::create_unique(this, state);
505
3
    RETURN_IF_ERROR(local_state->init(state, info));
506
3
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
3
    return Status::OK();
508
3
}
_ZN5doris17DataSinkOperatorXINS_24ResultFileSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
366
                                                            LocalSinkStateInfo& info) {
504
366
    auto local_state = LocalStateType::create_unique(this, state);
505
366
    RETURN_IF_ERROR(local_state->init(state, info));
506
366
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
366
    return Status::OK();
508
366
}
_ZN5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
49.3k
                                                            LocalSinkStateInfo& info) {
504
49.3k
    auto local_state = LocalStateType::create_unique(this, state);
505
49.3k
    RETURN_IF_ERROR(local_state->init(state, info));
506
49.3k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
49.3k
    return Status::OK();
508
49.3k
}
_ZN5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
34
                                                            LocalSinkStateInfo& info) {
504
34
    auto local_state = LocalStateType::create_unique(this, state);
505
34
    RETURN_IF_ERROR(local_state->init(state, info));
506
34
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
34
    return Status::OK();
508
34
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
16
                                                            LocalSinkStateInfo& info) {
504
16
    auto local_state = LocalStateType::create_unique(this, state);
505
16
    RETURN_IF_ERROR(local_state->init(state, info));
506
16
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
16
    return Status::OK();
508
16
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_25PaimonTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_27IcebergDeleteSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_26IcebergMergeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_21MCTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
8.58k
                                                            LocalSinkStateInfo& info) {
504
8.58k
    auto local_state = LocalStateType::create_unique(this, state);
505
8.58k
    RETURN_IF_ERROR(local_state->init(state, info));
506
8.58k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
8.58k
    return Status::OK();
508
8.58k
}
_ZN5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
3
                                                            LocalSinkStateInfo& info) {
504
3
    auto local_state = LocalStateType::create_unique(this, state);
505
3
    RETURN_IF_ERROR(local_state->init(state, info));
506
3
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
3
    return Status::OK();
508
3
}
_ZN5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
234k
                                                            LocalSinkStateInfo& info) {
504
234k
    auto local_state = LocalStateType::create_unique(this, state);
505
234k
    RETURN_IF_ERROR(local_state->init(state, info));
506
234k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
234k
    return Status::OK();
508
234k
}
_ZN5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
159
                                                            LocalSinkStateInfo& info) {
504
159
    auto local_state = LocalStateType::create_unique(this, state);
505
159
    RETURN_IF_ERROR(local_state->init(state, info));
506
159
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
159
    return Status::OK();
508
159
}
_ZN5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
300k
                                                            LocalSinkStateInfo& info) {
504
300k
    auto local_state = LocalStateType::create_unique(this, state);
505
300k
    RETURN_IF_ERROR(local_state->init(state, info));
506
300k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
300k
    return Status::OK();
508
300k
}
_ZN5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
106k
                                                            LocalSinkStateInfo& info) {
504
106k
    auto local_state = LocalStateType::create_unique(this, state);
505
106k
    RETURN_IF_ERROR(local_state->init(state, info));
506
106k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
106k
    return Status::OK();
508
106k
}
_ZN5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
73.9k
                                                            LocalSinkStateInfo& info) {
504
73.9k
    auto local_state = LocalStateType::create_unique(this, state);
505
73.9k
    RETURN_IF_ERROR(local_state->init(state, info));
506
73.9k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
73.9k
    return Status::OK();
508
73.9k
}
_ZN5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
118
                                                            LocalSinkStateInfo& info) {
504
118
    auto local_state = LocalStateType::create_unique(this, state);
505
118
    RETURN_IF_ERROR(local_state->init(state, info));
506
118
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
118
    return Status::OK();
508
118
}
_ZN5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
599k
                                                            LocalSinkStateInfo& info) {
504
599k
    auto local_state = LocalStateType::create_unique(this, state);
505
599k
    RETURN_IF_ERROR(local_state->init(state, info));
506
599k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
599k
    return Status::OK();
508
599k
}
_ZN5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
6.07k
                                                            LocalSinkStateInfo& info) {
504
6.07k
    auto local_state = LocalStateType::create_unique(this, state);
505
6.07k
    RETURN_IF_ERROR(local_state->init(state, info));
506
6.07k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
6.07k
    return Status::OK();
508
6.07k
}
_ZN5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
9.64k
                                                            LocalSinkStateInfo& info) {
504
9.64k
    auto local_state = LocalStateType::create_unique(this, state);
505
9.64k
    RETURN_IF_ERROR(local_state->init(state, info));
506
9.64k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
9.64k
    return Status::OK();
508
9.64k
}
_ZN5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.60k
                                                            LocalSinkStateInfo& info) {
504
2.60k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.60k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.60k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.60k
    return Status::OK();
508
2.60k
}
_ZN5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
276
                                                            LocalSinkStateInfo& info) {
504
276
    auto local_state = LocalStateType::create_unique(this, state);
505
276
    RETURN_IF_ERROR(local_state->init(state, info));
506
276
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
276
    return Status::OK();
508
276
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
4.85k
                                                            LocalSinkStateInfo& info) {
504
4.85k
    auto local_state = LocalStateType::create_unique(this, state);
505
4.85k
    RETURN_IF_ERROR(local_state->init(state, info));
506
4.85k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
4.85k
    return Status::OK();
508
4.85k
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.64k
                                                            LocalSinkStateInfo& info) {
504
2.64k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.64k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.64k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.64k
    return Status::OK();
508
2.64k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.68k
                                                            LocalSinkStateInfo& info) {
504
2.68k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.68k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.68k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.68k
    return Status::OK();
508
2.68k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.57k
                                                            LocalSinkStateInfo& info) {
504
2.57k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.57k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.57k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.57k
    return Status::OK();
508
2.57k
}
_ZN5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
1
                                                            LocalSinkStateInfo& info) {
504
1
    auto local_state = LocalStateType::create_unique(this, state);
505
1
    RETURN_IF_ERROR(local_state->init(state, info));
506
1
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
1
    return Status::OK();
508
1
}
_ZN5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
569
                                                            LocalSinkStateInfo& info) {
504
569
    auto local_state = LocalStateType::create_unique(this, state);
505
569
    RETURN_IF_ERROR(local_state->init(state, info));
506
569
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
569
    return Status::OK();
508
569
}
_ZN5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
14
                                                            LocalSinkStateInfo& info) {
504
14
    auto local_state = LocalStateType::create_unique(this, state);
505
14
    RETURN_IF_ERROR(local_state->init(state, info));
506
14
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
14
    return Status::OK();
508
14
}
_ZN5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
106
                                                            LocalSinkStateInfo& info) {
504
106
    auto local_state = LocalStateType::create_unique(this, state);
505
106
    RETURN_IF_ERROR(local_state->init(state, info));
506
106
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
106
    return Status::OK();
508
106
}
_ZN5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
169
                                                            LocalSinkStateInfo& info) {
504
169
    auto local_state = LocalStateType::create_unique(this, state);
505
169
    RETURN_IF_ERROR(local_state->init(state, info));
506
169
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
169
    return Status::OK();
508
169
}
_ZN5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
169
                                                            LocalSinkStateInfo& info) {
504
169
    auto local_state = LocalStateType::create_unique(this, state);
505
169
    RETURN_IF_ERROR(local_state->init(state, info));
506
169
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
169
    return Status::OK();
508
169
}
509
510
template <typename LocalStateType>
511
1.57M
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.57M
    } else {
519
1.57M
        auto ss = LocalStateType::SharedStateType::create_shared();
520
1.57M
        ss->id = operator_id();
521
1.57M
        for (auto& dest : dests_id()) {
522
1.56M
            ss->related_op_ids.insert(dest);
523
1.56M
        }
524
1.57M
        return ss;
525
1.57M
    }
526
1.57M
}
_ZNK5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
105k
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
105k
    } else {
519
105k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
105k
        ss->id = operator_id();
521
105k
        for (auto& dest : dests_id()) {
522
105k
            ss->related_op_ids.insert(dest);
523
105k
        }
524
105k
        return ss;
525
105k
    }
526
105k
}
_ZNK5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
453k
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
453k
    } else {
519
453k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
453k
        ss->id = operator_id();
521
453k
        for (auto& dest : dests_id()) {
522
450k
            ss->related_op_ids.insert(dest);
523
450k
        }
524
453k
        return ss;
525
453k
    }
526
453k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEE19create_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_24ResultFileSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
366
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
366
    } else {
519
366
        auto ss = LocalStateType::SharedStateType::create_shared();
520
366
        ss->id = operator_id();
521
366
        for (auto& dest : dests_id()) {
522
366
            ss->related_op_ids.insert(dest);
523
366
        }
524
366
        return ss;
525
366
    }
526
366
}
_ZNK5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
49.5k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
49.5k
    } else {
519
49.5k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
49.5k
        ss->id = operator_id();
521
49.5k
        for (auto& dest : dests_id()) {
522
49.0k
            ss->related_op_ids.insert(dest);
523
49.0k
        }
524
49.5k
        return ss;
525
49.5k
    }
526
49.5k
}
_ZNK5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE19create_shared_stateEv
Line
Count
Source
511
34
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
34
    } else {
519
34
        auto ss = LocalStateType::SharedStateType::create_shared();
520
34
        ss->id = operator_id();
521
34
        for (auto& dest : dests_id()) {
522
34
            ss->related_op_ids.insert(dest);
523
34
        }
524
34
        return ss;
525
34
    }
526
34
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
16
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
16
    } else {
519
16
        auto ss = LocalStateType::SharedStateType::create_shared();
520
16
        ss->id = operator_id();
521
16
        for (auto& dest : dests_id()) {
522
16
            ss->related_op_ids.insert(dest);
523
16
        }
524
16
        return ss;
525
16
    }
526
16
}
_ZNK5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
8
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
8
    } else {
519
8
        auto ss = LocalStateType::SharedStateType::create_shared();
520
8
        ss->id = operator_id();
521
8
        for (auto& dest : dests_id()) {
522
8
            ss->related_op_ids.insert(dest);
523
8
        }
524
8
        return ss;
525
8
    }
526
8
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_25PaimonTableSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
8
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
8
    } else {
519
8
        auto ss = LocalStateType::SharedStateType::create_shared();
520
8
        ss->id = operator_id();
521
8
        for (auto& dest : dests_id()) {
522
8
            ss->related_op_ids.insert(dest);
523
8
        }
524
8
        return ss;
525
8
    }
526
8
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27IcebergDeleteSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26IcebergMergeSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_21MCTableSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
8.70k
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.70k
    } else {
519
8.70k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
8.70k
        ss->id = operator_id();
521
8.70k
        for (auto& dest : dests_id()) {
522
8.67k
            ss->related_op_ids.insert(dest);
523
8.67k
        }
524
8.70k
        return ss;
525
8.70k
    }
526
8.70k
}
_ZNK5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
3
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
3
    } else {
519
3
        auto ss = LocalStateType::SharedStateType::create_shared();
520
3
        ss->id = operator_id();
521
3
        for (auto& dest : dests_id()) {
522
3
            ss->related_op_ids.insert(dest);
523
3
        }
524
3
        return ss;
525
3
    }
526
3
}
_ZNK5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
235k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
235k
    } else {
519
235k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
235k
        ss->id = operator_id();
521
235k
        for (auto& dest : dests_id()) {
522
235k
            ss->related_op_ids.insert(dest);
523
235k
        }
524
235k
        return ss;
525
235k
    }
526
235k
}
_ZNK5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
161
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
161
    } else {
519
161
        auto ss = LocalStateType::SharedStateType::create_shared();
520
161
        ss->id = operator_id();
521
161
        for (auto& dest : dests_id()) {
522
161
            ss->related_op_ids.insert(dest);
523
161
        }
524
161
        return ss;
525
161
    }
526
161
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
106k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
106k
    } else {
519
106k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
106k
        ss->id = operator_id();
521
106k
        for (auto& dest : dests_id()) {
522
106k
            ss->related_op_ids.insert(dest);
523
106k
        }
524
106k
        return ss;
525
106k
    }
526
106k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
117
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
117
    } else {
519
117
        auto ss = LocalStateType::SharedStateType::create_shared();
520
117
        ss->id = operator_id();
521
117
        for (auto& dest : dests_id()) {
522
117
            ss->related_op_ids.insert(dest);
523
117
        }
524
117
        return ss;
525
117
    }
526
117
}
_ZNK5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
600k
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
600k
    } else {
519
600k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
600k
        ss->id = operator_id();
521
600k
        for (auto& dest : dests_id()) {
522
593k
            ss->related_op_ids.insert(dest);
523
593k
        }
524
600k
        return ss;
525
600k
    }
526
600k
}
_ZNK5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
6.07k
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.07k
    } else {
519
6.07k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
6.07k
        ss->id = operator_id();
521
6.07k
        for (auto& dest : dests_id()) {
522
6.07k
            ss->related_op_ids.insert(dest);
523
6.07k
        }
524
6.07k
        return ss;
525
6.07k
    }
526
6.07k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
378
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
378
    } else {
519
378
        auto ss = LocalStateType::SharedStateType::create_shared();
520
378
        ss->id = operator_id();
521
378
        for (auto& dest : dests_id()) {
522
375
            ss->related_op_ids.insert(dest);
523
375
        }
524
378
        return ss;
525
378
    }
526
378
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE19create_shared_stateEv
Line
Count
Source
511
2.69k
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.69k
    } else {
519
2.69k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
2.69k
        ss->id = operator_id();
521
2.69k
        for (auto& dest : dests_id()) {
522
2.68k
            ss->related_op_ids.insert(dest);
523
2.68k
        }
524
2.69k
        return ss;
525
2.69k
    }
526
2.69k
}
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE19create_shared_stateEv
Line
Count
Source
511
2.56k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
2.56k
    } else {
519
2.56k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
2.56k
        ss->id = operator_id();
521
2.57k
        for (auto& dest : dests_id()) {
522
2.57k
            ss->related_op_ids.insert(dest);
523
2.57k
        }
524
2.56k
        return ss;
525
2.56k
    }
526
2.56k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
570
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
570
    } else {
519
570
        auto ss = LocalStateType::SharedStateType::create_shared();
520
570
        ss->id = operator_id();
521
570
        for (auto& dest : dests_id()) {
522
562
            ss->related_op_ids.insert(dest);
523
562
        }
524
570
        return ss;
525
570
    }
526
570
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
106
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
106
    } else {
519
106
        auto ss = LocalStateType::SharedStateType::create_shared();
520
106
        ss->id = operator_id();
521
106
        for (auto& dest : dests_id()) {
522
104
            ss->related_op_ids.insert(dest);
523
104
        }
524
106
        return ss;
525
106
    }
526
106
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE19create_shared_stateEv
527
528
template <typename LocalStateType>
529
2.42M
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.42M
    auto local_state = LocalStateType::create_unique(state, this);
531
2.42M
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.42M
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.42M
    return Status::OK();
534
2.42M
}
_ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
69.5k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
69.5k
    auto local_state = LocalStateType::create_unique(state, this);
531
69.5k
    RETURN_IF_ERROR(local_state->init(state, info));
532
69.5k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
69.5k
    return Status::OK();
534
69.5k
}
_ZN5doris9OperatorXINS_18OlapScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
249k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
249k
    auto local_state = LocalStateType::create_unique(state, this);
531
249k
    RETURN_IF_ERROR(local_state->init(state, info));
532
249k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
249k
    return Status::OK();
534
249k
}
_ZN5doris9OperatorXINS_21GroupCommitLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
129
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
129
    auto local_state = LocalStateType::create_unique(state, this);
531
129
    RETURN_IF_ERROR(local_state->init(state, info));
532
129
    state->emplace_local_state(operator_id(), std::move(local_state));
533
129
    return Status::OK();
534
129
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_18JDBCScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_18FileScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
3.25k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
3.25k
    auto local_state = LocalStateType::create_unique(state, this);
531
3.25k
    RETURN_IF_ERROR(local_state->init(state, info));
532
3.25k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
3.25k
    return Status::OK();
534
3.25k
}
_ZN5doris9OperatorXINS_18AnalyticLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
8.55k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
8.55k
    auto local_state = LocalStateType::create_unique(state, this);
531
8.55k
    RETURN_IF_ERROR(local_state->init(state, info));
532
8.55k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
8.55k
    return Status::OK();
534
8.55k
}
_ZN5doris9OperatorXINS_14SortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
7.83k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
7.83k
    auto local_state = LocalStateType::create_unique(state, this);
531
7.83k
    RETURN_IF_ERROR(local_state->init(state, info));
532
7.83k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
7.83k
    return Status::OK();
534
7.83k
}
_ZN5doris9OperatorXINS_19SpillSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
152
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
152
    auto local_state = LocalStateType::create_unique(state, this);
531
152
    RETURN_IF_ERROR(local_state->init(state, info));
532
152
    state->emplace_local_state(operator_id(), std::move(local_state));
533
152
    return Status::OK();
534
152
}
_ZN5doris9OperatorXINS_24LocalMergeSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
225k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
225k
    auto local_state = LocalStateType::create_unique(state, this);
531
225k
    RETURN_IF_ERROR(local_state->init(state, info));
532
225k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
225k
    return Status::OK();
534
225k
}
_ZN5doris9OperatorXINS_13AggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
106k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
106k
    auto local_state = LocalStateType::create_unique(state, this);
531
106k
    RETURN_IF_ERROR(local_state->init(state, info));
532
106k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
106k
    return Status::OK();
534
106k
}
_ZN5doris9OperatorXINS_21BucketedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
74.2k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
74.2k
    auto local_state = LocalStateType::create_unique(state, this);
531
74.2k
    RETURN_IF_ERROR(local_state->init(state, info));
532
74.2k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
74.2k
    return Status::OK();
534
74.2k
}
_ZN5doris9OperatorXINS_24PartitionedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
108
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
108
    auto local_state = LocalStateType::create_unique(state, this);
531
108
    RETURN_IF_ERROR(local_state->init(state, info));
532
108
    state->emplace_local_state(operator_id(), std::move(local_state));
533
108
    return Status::OK();
534
108
}
_ZN5doris9OperatorXINS_23TableFunctionLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
4.40k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
4.40k
    auto local_state = LocalStateType::create_unique(state, this);
531
4.40k
    RETURN_IF_ERROR(local_state->init(state, info));
532
4.40k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
4.40k
    return Status::OK();
534
4.40k
}
_ZN5doris9OperatorXINS_18ExchangeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
360k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
360k
    auto local_state = LocalStateType::create_unique(state, this);
531
360k
    RETURN_IF_ERROR(local_state->init(state, info));
532
360k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
360k
    return Status::OK();
534
360k
}
_ZN5doris9OperatorXINS_16RepeatLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.26k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.26k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.26k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.26k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.26k
    return Status::OK();
534
1.26k
}
_ZN5doris9OperatorXINS_29NestedLoopJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
6.06k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
6.06k
    auto local_state = LocalStateType::create_unique(state, this);
531
6.06k
    RETURN_IF_ERROR(local_state->init(state, info));
532
6.06k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
6.06k
    return Status::OK();
534
6.06k
}
_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.68k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.68k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.68k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.68k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.68k
    return Status::OK();
534
1.68k
}
_ZN5doris9OperatorXINS_21UnionSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
56.1k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
56.1k
    auto local_state = LocalStateType::create_unique(state, this);
531
56.1k
    RETURN_IF_ERROR(local_state->init(state, info));
532
56.1k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
56.1k
    return Status::OK();
534
56.1k
}
_ZN5doris9OperatorXINS_35MultiCastDataStreamSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
6.07k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
6.07k
    auto local_state = LocalStateType::create_unique(state, this);
531
6.07k
    RETURN_IF_ERROR(local_state->init(state, info));
532
6.07k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
6.07k
    return Status::OK();
534
6.07k
}
_ZN5doris9OperatorXINS_29PartitionSortSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
276
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
276
    auto local_state = LocalStateType::create_unique(state, this);
531
276
    RETURN_IF_ERROR(local_state->init(state, info));
532
276
    state->emplace_local_state(operator_id(), std::move(local_state));
533
276
    return Status::OK();
534
276
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.70k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.70k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.70k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.70k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.70k
    return Status::OK();
534
2.70k
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.59k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.59k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.59k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.59k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.59k
    return Status::OK();
534
2.59k
}
_ZN5doris9OperatorXINS_17DataGenLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
604
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
604
    auto local_state = LocalStateType::create_unique(state, this);
531
604
    RETURN_IF_ERROR(local_state->init(state, info));
532
604
    state->emplace_local_state(operator_id(), std::move(local_state));
533
604
    return Status::OK();
534
604
}
_ZN5doris9OperatorXINS_20SchemaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.71k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.71k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.71k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.71k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.71k
    return Status::OK();
534
1.71k
}
_ZN5doris9OperatorXINS_18MetaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
10.8k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
10.8k
    auto local_state = LocalStateType::create_unique(state, this);
531
10.8k
    RETURN_IF_ERROR(local_state->init(state, info));
532
10.8k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
10.8k
    return Status::OK();
534
10.8k
}
_ZN5doris9OperatorXINS_29LocalExchangeSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
783k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
783k
    auto local_state = LocalStateType::create_unique(state, this);
531
783k
    RETURN_IF_ERROR(local_state->init(state, info));
532
783k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
783k
    return Status::OK();
534
783k
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_34PartitionedHashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_21CacheSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
14
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
14
    auto local_state = LocalStateType::create_unique(state, this);
531
14
    RETURN_IF_ERROR(local_state->init(state, info));
532
14
    state->emplace_local_state(operator_id(), std::move(local_state));
533
14
    return Status::OK();
534
14
}
_ZN5doris9OperatorXINS_22RecCTESourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
169
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
169
    auto local_state = LocalStateType::create_unique(state, this);
531
169
    RETURN_IF_ERROR(local_state->init(state, info));
532
169
    state->emplace_local_state(operator_id(), std::move(local_state));
533
169
    return Status::OK();
534
169
}
_ZN5doris9OperatorXINS_20RecCTEScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.20k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.20k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.20k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.20k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.20k
    return Status::OK();
534
2.20k
}
_ZN5doris9OperatorXINS_25MaterializationLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
794
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
794
    auto local_state = LocalStateType::create_unique(state, this);
531
794
    RETURN_IF_ERROR(local_state->init(state, info));
532
794
    state->emplace_local_state(operator_id(), std::move(local_state));
533
794
    return Status::OK();
534
794
}
_ZN5doris9OperatorXINS_16SelectLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
768
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
768
    auto local_state = LocalStateType::create_unique(state, this);
531
768
    RETURN_IF_ERROR(local_state->init(state, info));
532
768
    state->emplace_local_state(operator_id(), std::move(local_state));
533
768
    return Status::OK();
534
768
}
_ZN5doris9OperatorXINS_22StreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
8.44k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
8.44k
    auto local_state = LocalStateType::create_unique(state, this);
531
8.44k
    RETURN_IF_ERROR(local_state->init(state, info));
532
8.44k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
8.44k
    return Status::OK();
534
8.44k
}
_ZN5doris9OperatorXINS_30DistinctStreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
429k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
429k
    auto local_state = LocalStateType::create_unique(state, this);
531
429k
    RETURN_IF_ERROR(local_state->init(state, info));
532
429k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
429k
    return Status::OK();
534
429k
}
535
536
PipelineXSinkLocalStateBase::PipelineXSinkLocalStateBase(DataSinkOperatorXBase* parent,
537
                                                         RuntimeState* state)
538
1.97M
        : _parent(parent), _state(state) {}
539
540
PipelineXLocalStateBase::PipelineXLocalStateBase(RuntimeState* state, OperatorXBase* parent)
541
2.41M
        : _num_rows_returned(0),
542
2.41M
          _rows_returned_counter(nullptr),
543
2.41M
          _parent(parent),
544
2.41M
          _state(state),
545
2.41M
          _budget(state->batch_size(), state->preferred_block_size_bytes()) {}
546
547
template <typename SharedStateArg>
548
2.42M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
2.42M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
2.42M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
2.42M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
2.42M
    _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.42M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
2.42M
    _operator_profile->add_child(_common_profile.get(), true);
557
2.42M
    _operator_profile->add_child(_custom_profile.get(), true);
558
2.42M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
2.42M
    if constexpr (!is_fake_shared) {
560
1.35M
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
863k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
863k
                                    .first.get()
563
863k
                                    ->template cast<SharedStateArg>();
564
565
863k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
863k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
863k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
863k
        } else if (info.shared_state) {
569
416k
            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
416k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
416k
            _dependency = _shared_state->create_source_dependency(
576
416k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
416k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
416k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
416k
        } else {
580
76.1k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
10.7k
                DCHECK(false);
582
10.7k
            }
583
76.1k
        }
584
1.35M
    }
585
586
2.42M
    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.42M
    _rows_returned_counter =
591
2.42M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
2.42M
    _blocks_returned_counter =
593
2.42M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
2.42M
    _output_block_bytes_counter =
595
2.42M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
2.42M
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
2.42M
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
2.42M
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
2.42M
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
2.42M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
2.42M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
2.42M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
2.42M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
2.42M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
2.42M
    _memory_used_counter =
606
2.42M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
2.42M
    _common_profile->add_info_string("IsColocate",
608
2.42M
                                     std::to_string(_parent->is_colocated_operator()));
609
2.42M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
2.42M
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
2.42M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
2.42M
    return Status::OK();
613
2.42M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
69.7k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
69.7k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
69.7k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
69.7k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
69.7k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
69.7k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
69.7k
    _operator_profile->add_child(_common_profile.get(), true);
557
69.7k
    _operator_profile->add_child(_custom_profile.get(), true);
558
69.7k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
69.7k
    if constexpr (!is_fake_shared) {
560
69.7k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
12.0k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
12.0k
                                    .first.get()
563
12.0k
                                    ->template cast<SharedStateArg>();
564
565
12.0k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
12.0k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
12.0k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
57.7k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
57.0k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
57.0k
            _dependency = _shared_state->create_source_dependency(
576
57.0k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
57.0k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
57.0k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
57.0k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
683
        }
584
69.7k
    }
585
586
69.7k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
69.7k
    _rows_returned_counter =
591
69.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
69.7k
    _blocks_returned_counter =
593
69.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
69.7k
    _output_block_bytes_counter =
595
69.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
69.7k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
69.7k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
69.7k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
69.7k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
69.7k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
69.7k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
69.7k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
69.7k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
69.7k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
69.7k
    _memory_used_counter =
606
69.7k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
69.7k
    _common_profile->add_info_string("IsColocate",
608
69.7k
                                     std::to_string(_parent->is_colocated_operator()));
609
69.7k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
69.7k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
69.7k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
69.7k
    return Status::OK();
613
69.7k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
1
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
1
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
1
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
1
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
1
    _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
1
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
1
    _operator_profile->add_child(_common_profile.get(), true);
557
1
    _operator_profile->add_child(_custom_profile.get(), true);
558
1
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
1
    if constexpr (!is_fake_shared) {
560
1
        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
1
        } 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
1
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
1
            _dependency = _shared_state->create_source_dependency(
576
1
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
1
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
1
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
1
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
1
    }
585
586
1
    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
1
    _rows_returned_counter =
591
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
1
    _blocks_returned_counter =
593
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
1
    _output_block_bytes_counter =
595
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
1
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
1
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
1
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
1
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
1
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
1
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
1
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
1
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
1
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
1
    _memory_used_counter =
606
1
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
1
    _common_profile->add_info_string("IsColocate",
608
1
                                     std::to_string(_parent->is_colocated_operator()));
609
1
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
1
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
1
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
1
    return Status::OK();
613
1
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
234k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
234k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
234k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
234k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
234k
    _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
234k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
234k
    _operator_profile->add_child(_common_profile.get(), true);
557
234k
    _operator_profile->add_child(_custom_profile.get(), true);
558
234k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
234k
    if constexpr (!is_fake_shared) {
560
234k
        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
234k
        } 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
223k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
223k
            _dependency = _shared_state->create_source_dependency(
576
223k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
223k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
223k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
223k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
11.2k
        }
584
234k
    }
585
586
234k
    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
234k
    _rows_returned_counter =
591
234k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
234k
    _blocks_returned_counter =
593
234k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
234k
    _output_block_bytes_counter =
595
234k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
234k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
234k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
234k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
234k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
234k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
234k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
234k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
234k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
234k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
234k
    _memory_used_counter =
606
234k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
234k
    _common_profile->add_info_string("IsColocate",
608
234k
                                     std::to_string(_parent->is_colocated_operator()));
609
234k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
234k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
234k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
234k
    return Status::OK();
613
234k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
152
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
152
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
152
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
152
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
152
    _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
152
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
152
    _operator_profile->add_child(_common_profile.get(), true);
557
152
    _operator_profile->add_child(_custom_profile.get(), true);
558
152
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
152
    if constexpr (!is_fake_shared) {
560
152
        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
152
        } 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
152
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
152
            _dependency = _shared_state->create_source_dependency(
576
152
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
152
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
152
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
152
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
152
    }
585
586
152
    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
152
    _rows_returned_counter =
591
152
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
152
    _blocks_returned_counter =
593
152
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
152
    _output_block_bytes_counter =
595
152
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
152
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
152
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
152
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
152
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
152
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
152
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
152
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
152
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
152
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
152
    _memory_used_counter =
606
152
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
152
    _common_profile->add_info_string("IsColocate",
608
152
                                     std::to_string(_parent->is_colocated_operator()));
609
152
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
152
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
152
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
152
    return Status::OK();
613
152
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
6.07k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
6.07k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
6.07k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
6.07k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
6.07k
    _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
6.07k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
6.07k
    _operator_profile->add_child(_common_profile.get(), true);
557
6.07k
    _operator_profile->add_child(_custom_profile.get(), true);
558
6.07k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
6.07k
    if constexpr (!is_fake_shared) {
560
6.07k
        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
6.07k
        } 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.05k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
6.05k
            _dependency = _shared_state->create_source_dependency(
576
6.05k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
6.05k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
6.05k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
6.05k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
27
        }
584
6.07k
    }
585
586
6.07k
    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
6.07k
    _rows_returned_counter =
591
6.07k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
6.07k
    _blocks_returned_counter =
593
6.07k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
6.07k
    _output_block_bytes_counter =
595
6.07k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
6.07k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
6.07k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
6.07k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
6.07k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
6.07k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
6.07k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
6.07k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
6.07k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
6.07k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
6.07k
    _memory_used_counter =
606
6.07k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
6.07k
    _common_profile->add_info_string("IsColocate",
608
6.07k
                                     std::to_string(_parent->is_colocated_operator()));
609
6.07k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
6.07k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
6.07k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
6.07k
    return Status::OK();
613
6.07k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
8.59k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
8.59k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
8.59k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
8.59k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
8.59k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
8.59k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
8.59k
    _operator_profile->add_child(_common_profile.get(), true);
557
8.59k
    _operator_profile->add_child(_custom_profile.get(), true);
558
8.59k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
8.59k
    if constexpr (!is_fake_shared) {
560
8.59k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
8.59k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
8.56k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
8.56k
            _dependency = _shared_state->create_source_dependency(
576
8.56k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
8.56k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
8.56k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
8.56k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
31
        }
584
8.59k
    }
585
586
8.59k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
8.59k
    _rows_returned_counter =
591
8.59k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
8.59k
    _blocks_returned_counter =
593
8.59k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
8.59k
    _output_block_bytes_counter =
595
8.59k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
8.59k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
8.59k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
8.59k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
8.59k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
8.59k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
8.59k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
8.59k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
8.59k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
8.59k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
8.59k
    _memory_used_counter =
606
8.59k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
8.59k
    _common_profile->add_info_string("IsColocate",
608
8.59k
                                     std::to_string(_parent->is_colocated_operator()));
609
8.59k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
8.59k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
8.59k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
8.59k
    return Status::OK();
613
8.59k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
106k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
106k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
106k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
106k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
106k
    _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
106k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
106k
    _operator_profile->add_child(_common_profile.get(), true);
557
106k
    _operator_profile->add_child(_custom_profile.get(), true);
558
106k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
106k
    if constexpr (!is_fake_shared) {
560
106k
        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
106k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
105k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
105k
            _dependency = _shared_state->create_source_dependency(
576
105k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
105k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
105k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
105k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
1.25k
        }
584
106k
    }
585
586
106k
    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
106k
    _rows_returned_counter =
591
106k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
106k
    _blocks_returned_counter =
593
106k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
106k
    _output_block_bytes_counter =
595
106k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
106k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
106k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
106k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
106k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
106k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
106k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
106k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
106k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
106k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
106k
    _memory_used_counter =
606
106k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
106k
    _common_profile->add_info_string("IsColocate",
608
106k
                                     std::to_string(_parent->is_colocated_operator()));
609
106k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
106k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
106k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
106k
    return Status::OK();
613
106k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
74.1k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
74.1k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
74.1k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
74.1k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
74.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
74.1k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
74.1k
    _operator_profile->add_child(_common_profile.get(), true);
557
74.1k
    _operator_profile->add_child(_custom_profile.get(), true);
558
74.1k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
74.1k
    if constexpr (!is_fake_shared) {
560
74.1k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
74.1k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
74.1k
                                    .first.get()
563
74.1k
                                    ->template cast<SharedStateArg>();
564
565
74.1k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
74.1k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
74.1k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
18.4E
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
0
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
0
            _dependency = _shared_state->create_source_dependency(
576
0
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
18.4E
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
18.4E
        }
584
74.1k
    }
585
586
74.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
74.1k
    _rows_returned_counter =
591
74.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
74.1k
    _blocks_returned_counter =
593
74.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
74.1k
    _output_block_bytes_counter =
595
74.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
74.1k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
74.1k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
74.1k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
74.1k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
74.1k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
74.1k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
74.1k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
74.1k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
74.1k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
74.1k
    _memory_used_counter =
606
74.1k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
74.1k
    _common_profile->add_info_string("IsColocate",
608
74.1k
                                     std::to_string(_parent->is_colocated_operator()));
609
74.1k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
74.1k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
74.1k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
74.1k
    return Status::OK();
613
74.1k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
108
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
108
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
108
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
108
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
108
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
108
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
108
    _operator_profile->add_child(_common_profile.get(), true);
557
108
    _operator_profile->add_child(_custom_profile.get(), true);
558
108
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
108
    if constexpr (!is_fake_shared) {
560
108
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
108
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
108
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
108
            _dependency = _shared_state->create_source_dependency(
576
108
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
108
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
108
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
108
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
108
    }
585
586
108
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
108
    _rows_returned_counter =
591
108
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
108
    _blocks_returned_counter =
593
108
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
108
    _output_block_bytes_counter =
595
108
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
108
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
108
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
108
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
108
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
108
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
108
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
108
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
108
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
108
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
108
    _memory_used_counter =
606
108
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
108
    _common_profile->add_info_string("IsColocate",
608
108
                                     std::to_string(_parent->is_colocated_operator()));
609
108
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
108
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
108
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
108
    return Status::OK();
613
108
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
1.07M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
1.07M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
1.07M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
1.07M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
1.07M
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
1.07M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
1.07M
    _operator_profile->add_child(_common_profile.get(), true);
557
1.07M
    _operator_profile->add_child(_custom_profile.get(), true);
558
1.07M
    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
1.07M
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
1.07M
    _rows_returned_counter =
591
1.07M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
1.07M
    _blocks_returned_counter =
593
1.07M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
1.07M
    _output_block_bytes_counter =
595
1.07M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
1.07M
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
1.07M
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
1.07M
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
1.07M
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
1.07M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
1.07M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
1.07M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
1.07M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
1.07M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
1.07M
    _memory_used_counter =
606
1.07M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
1.07M
    _common_profile->add_info_string("IsColocate",
608
1.07M
                                     std::to_string(_parent->is_colocated_operator()));
609
1.07M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
1.07M
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
1.07M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
1.07M
    return Status::OK();
613
1.07M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
56.1k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
56.1k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
56.1k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
56.1k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
56.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
56.1k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
56.1k
    _operator_profile->add_child(_common_profile.get(), true);
557
56.1k
    _operator_profile->add_child(_custom_profile.get(), true);
558
56.1k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
56.1k
    if constexpr (!is_fake_shared) {
560
56.1k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
56.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
4.17k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
4.17k
            _dependency = _shared_state->create_source_dependency(
576
4.17k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
4.17k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
4.17k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
51.9k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
51.9k
        }
584
56.1k
    }
585
586
56.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
56.1k
    _rows_returned_counter =
591
56.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
56.1k
    _blocks_returned_counter =
593
56.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
56.1k
    _output_block_bytes_counter =
595
56.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
56.1k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
56.1k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
56.1k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
56.1k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
56.1k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
56.1k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
56.1k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
56.1k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
56.1k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
56.1k
    _memory_used_counter =
606
56.1k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
56.1k
    _common_profile->add_info_string("IsColocate",
608
56.1k
                                     std::to_string(_parent->is_colocated_operator()));
609
56.1k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
56.1k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
56.1k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
56.1k
    return Status::OK();
613
56.1k
}
_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
6.10k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
6.10k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
6.10k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
6.10k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
6.10k
    _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
6.10k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
6.10k
    _operator_profile->add_child(_common_profile.get(), true);
557
6.10k
    _operator_profile->add_child(_custom_profile.get(), true);
558
6.10k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
6.10k
    if constexpr (!is_fake_shared) {
560
6.10k
        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
6.10k
        } 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.97k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
5.97k
            _dependency = _shared_state->create_source_dependency(
576
5.97k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
5.97k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
5.97k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
5.97k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
127
        }
584
6.10k
    }
585
586
6.10k
    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
6.10k
    _rows_returned_counter =
591
6.10k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
6.10k
    _blocks_returned_counter =
593
6.10k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
6.10k
    _output_block_bytes_counter =
595
6.10k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
6.10k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
6.10k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
6.10k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
6.10k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
6.10k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
6.10k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
6.10k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
6.10k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
6.10k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
6.10k
    _memory_used_counter =
606
6.10k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
6.10k
    _common_profile->add_info_string("IsColocate",
608
6.10k
                                     std::to_string(_parent->is_colocated_operator()));
609
6.10k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
6.10k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
6.10k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
6.10k
    return Status::OK();
613
6.10k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
378
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
378
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
378
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
378
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
378
    _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
378
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
378
    _operator_profile->add_child(_common_profile.get(), true);
557
378
    _operator_profile->add_child(_custom_profile.get(), true);
558
378
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
378
    if constexpr (!is_fake_shared) {
560
378
        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
378
        } 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
374
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
374
            _dependency = _shared_state->create_source_dependency(
576
374
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
374
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
374
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
374
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
4
        }
584
378
    }
585
586
378
    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
378
    _rows_returned_counter =
591
378
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
378
    _blocks_returned_counter =
593
378
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
378
    _output_block_bytes_counter =
595
378
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
378
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
378
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
378
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
378
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
378
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
378
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
378
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
378
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
378
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
378
    _memory_used_counter =
606
378
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
378
    _common_profile->add_info_string("IsColocate",
608
378
                                     std::to_string(_parent->is_colocated_operator()));
609
378
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
378
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
378
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
378
    return Status::OK();
613
378
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
5.31k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
5.31k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
5.31k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
5.31k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
5.31k
    _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.31k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
5.31k
    _operator_profile->add_child(_common_profile.get(), true);
557
5.31k
    _operator_profile->add_child(_custom_profile.get(), true);
558
5.31k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
5.31k
    if constexpr (!is_fake_shared) {
560
5.31k
        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.31k
        } 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.27k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
5.27k
            _dependency = _shared_state->create_source_dependency(
576
5.27k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
5.27k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
5.27k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
5.27k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
40
        }
584
5.31k
    }
585
586
5.31k
    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.31k
    _rows_returned_counter =
591
5.31k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
5.31k
    _blocks_returned_counter =
593
5.31k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
5.31k
    _output_block_bytes_counter =
595
5.31k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
5.31k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
5.31k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
5.31k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
5.31k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
5.31k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
5.31k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
5.31k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
5.31k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
5.31k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
5.31k
    _memory_used_counter =
606
5.31k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
5.31k
    _common_profile->add_info_string("IsColocate",
608
5.31k
                                     std::to_string(_parent->is_colocated_operator()));
609
5.31k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
5.31k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
5.31k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
5.31k
    return Status::OK();
613
5.31k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
788k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
788k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
788k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
788k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
788k
    _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
788k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
788k
    _operator_profile->add_child(_common_profile.get(), true);
557
788k
    _operator_profile->add_child(_custom_profile.get(), true);
558
788k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
788k
    if constexpr (!is_fake_shared) {
560
788k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
777k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
777k
                                    .first.get()
563
777k
                                    ->template cast<SharedStateArg>();
564
565
777k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
777k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
777k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
777k
        } 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
10.7k
        } else {
580
10.7k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
10.7k
                DCHECK(false);
582
10.7k
            }
583
10.7k
        }
584
788k
    }
585
586
788k
    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
788k
    _rows_returned_counter =
591
788k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
788k
    _blocks_returned_counter =
593
788k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
788k
    _output_block_bytes_counter =
595
788k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
788k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
788k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
788k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
788k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
788k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
788k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
788k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
788k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
788k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
788k
    _memory_used_counter =
606
788k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
788k
    _common_profile->add_info_string("IsColocate",
608
788k
                                     std::to_string(_parent->is_colocated_operator()));
609
788k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
788k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
788k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
788k
    return Status::OK();
613
788k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
169
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
169
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
169
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
169
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
169
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
169
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
169
    _operator_profile->add_child(_common_profile.get(), true);
557
169
    _operator_profile->add_child(_custom_profile.get(), true);
558
169
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
169
    if constexpr (!is_fake_shared) {
560
169
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
169
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
169
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
169
            _dependency = _shared_state->create_source_dependency(
576
169
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
169
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
169
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
169
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
169
    }
585
586
169
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
169
    _rows_returned_counter =
591
169
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
169
    _blocks_returned_counter =
593
169
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
169
    _output_block_bytes_counter =
595
169
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
169
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
169
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
169
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
169
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
169
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
169
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
169
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
169
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
169
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
169
    _memory_used_counter =
606
169
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
169
    _common_profile->add_info_string("IsColocate",
608
169
                                     std::to_string(_parent->is_colocated_operator()));
609
169
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
169
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
169
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
169
    return Status::OK();
613
169
}
614
615
template <typename SharedStateArg>
616
2.44M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
2.44M
    _conjuncts.resize(_parent->_conjuncts.size());
618
2.75M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
311k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
311k
    }
621
2.44M
    if (_parent->has_projection()) {
622
394k
        const auto& projection = *_parent->_projection;
623
394k
        _projections.resize(projection.projections.size());
624
2.45M
        for (size_t i = 0; i < _projections.size(); i++) {
625
2.06M
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
2.06M
        }
627
394k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
415k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
21.9k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
404k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
382k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
382k
                        state, _intermediate_projections[i][j]));
633
382k
            }
634
21.9k
        }
635
394k
    }
636
2.44M
    return Status::OK();
637
2.44M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
69.8k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
69.8k
    _conjuncts.resize(_parent->_conjuncts.size());
618
71.6k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
1.74k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1.74k
    }
621
69.8k
    if (_parent->has_projection()) {
622
69.8k
        const auto& projection = *_parent->_projection;
623
69.8k
        _projections.resize(projection.projections.size());
624
383k
        for (size_t i = 0; i < _projections.size(); i++) {
625
313k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
313k
        }
627
69.8k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
80.1k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
10.2k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
334k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
324k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
324k
                        state, _intermediate_projections[i][j]));
633
324k
            }
634
10.2k
        }
635
69.8k
    }
636
69.8k
    return Status::OK();
637
69.8k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
3
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
3
    _conjuncts.resize(_parent->_conjuncts.size());
618
3
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
3
    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
3
    return Status::OK();
637
3
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
236k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
236k
    _conjuncts.resize(_parent->_conjuncts.size());
618
236k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
236k
    if (_parent->has_projection()) {
622
134
        const auto& projection = *_parent->_projection;
623
134
        _projections.resize(projection.projections.size());
624
624
        for (size_t i = 0; i < _projections.size(); i++) {
625
490
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
490
        }
627
134
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
134
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
134
    }
636
236k
    return Status::OK();
637
236k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
148
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
148
    _conjuncts.resize(_parent->_conjuncts.size());
618
148
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
148
    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
148
    return Status::OK();
637
148
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
6.07k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
6.07k
    _conjuncts.resize(_parent->_conjuncts.size());
618
6.15k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
76
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
76
    }
621
6.07k
    if (_parent->has_projection()) {
622
6.07k
        const auto& projection = *_parent->_projection;
623
6.07k
        _projections.resize(projection.projections.size());
624
25.2k
        for (size_t i = 0; i < _projections.size(); i++) {
625
19.1k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
19.1k
        }
627
6.07k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
6.12k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
50
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
333
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
283
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
283
                        state, _intermediate_projections[i][j]));
633
283
            }
634
50
        }
635
6.07k
    }
636
6.07k
    return Status::OK();
637
6.07k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
8.73k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
8.73k
    _conjuncts.resize(_parent->_conjuncts.size());
618
9.43k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
702
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
702
    }
621
8.73k
    if (_parent->has_projection()) {
622
4.55k
        const auto& projection = *_parent->_projection;
623
4.55k
        _projections.resize(projection.projections.size());
624
19.6k
        for (size_t i = 0; i < _projections.size(); i++) {
625
15.1k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
15.1k
        }
627
4.55k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
4.64k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
88
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
667
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
579
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
579
                        state, _intermediate_projections[i][j]));
633
579
            }
634
88
        }
635
4.55k
    }
636
8.73k
    return Status::OK();
637
8.73k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
106k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
106k
    _conjuncts.resize(_parent->_conjuncts.size());
618
108k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
1.58k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1.58k
    }
621
106k
    if (_parent->has_projection()) {
622
34.3k
        const auto& projection = *_parent->_projection;
623
34.3k
        _projections.resize(projection.projections.size());
624
304k
        for (size_t i = 0; i < _projections.size(); i++) {
625
270k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
270k
        }
627
34.3k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
35.1k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
822
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
5.25k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
4.43k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
4.43k
                        state, _intermediate_projections[i][j]));
633
4.43k
            }
634
822
        }
635
34.3k
    }
636
106k
    return Status::OK();
637
106k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
74.1k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
74.1k
    _conjuncts.resize(_parent->_conjuncts.size());
618
74.2k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
37
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
37
    }
621
74.1k
    if (_parent->has_projection()) {
622
368
        const auto& projection = *_parent->_projection;
623
368
        _projections.resize(projection.projections.size());
624
1.46k
        for (size_t i = 0; i < _projections.size(); i++) {
625
1.09k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
1.09k
        }
627
368
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
370
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
2
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
11
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
9
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
9
                        state, _intermediate_projections[i][j]));
633
9
            }
634
2
        }
635
368
    }
636
74.1k
    return Status::OK();
637
74.1k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
112
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
112
    _conjuncts.resize(_parent->_conjuncts.size());
618
112
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
112
    if (_parent->has_projection()) {
622
1
        const auto& projection = *_parent->_projection;
623
1
        _projections.resize(projection.projections.size());
624
3
        for (size_t i = 0; i < _projections.size(); i++) {
625
2
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
2
        }
627
1
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
1
        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
1
    }
636
112
    return Status::OK();
637
112
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
1.07M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
1.07M
    _conjuncts.resize(_parent->_conjuncts.size());
618
1.38M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
306k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
306k
    }
621
1.07M
    if (_parent->has_projection()) {
622
266k
        const auto& projection = *_parent->_projection;
623
266k
        _projections.resize(projection.projections.size());
624
1.60M
        for (size_t i = 0; i < _projections.size(); i++) {
625
1.33M
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
1.33M
        }
627
266k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
277k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
10.5k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
61.4k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
50.9k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
50.9k
                        state, _intermediate_projections[i][j]));
633
50.9k
            }
634
10.5k
        }
635
266k
    }
636
1.07M
    return Status::OK();
637
1.07M
}
_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.8k
        const auto& projection = *_parent->_projection;
623
11.8k
        _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.8k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
12.0k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
131
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
2.38k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
2.25k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
2.25k
                        state, _intermediate_projections[i][j]));
633
2.25k
            }
634
131
        }
635
11.8k
    }
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.09k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
6.09k
    _conjuncts.resize(_parent->_conjuncts.size());
618
6.47k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
387
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
387
    }
621
6.09k
    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.09k
    return Status::OK();
637
6.09k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
378
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
378
    _conjuncts.resize(_parent->_conjuncts.size());
618
378
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
378
    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
378
    return Status::OK();
637
378
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
5.31k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
5.31k
    _conjuncts.resize(_parent->_conjuncts.size());
618
5.31k
    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.31k
    if (_parent->has_projection()) {
622
111
        const auto& projection = *_parent->_projection;
623
111
        _projections.resize(projection.projections.size());
624
336
        for (size_t i = 0; i < _projections.size(); i++) {
625
225
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
225
        }
627
111
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
111
        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
111
    }
636
5.31k
    return Status::OK();
637
5.31k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
791k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
791k
    _conjuncts.resize(_parent->_conjuncts.size());
618
791k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
791k
    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
791k
    return Status::OK();
637
791k
}
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
5.99k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
5.99k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
5.99k
    _terminated = true;
645
5.99k
    return Status::OK();
646
5.99k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
309
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
309
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
309
    _terminated = true;
645
309
    return Status::OK();
646
309
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE9terminateEPNS_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
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
29
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
29
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
29
    _terminated = true;
645
29
    return Status::OK();
646
29
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
14
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
14
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
14
    _terminated = true;
645
14
    return Status::OK();
646
14
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
4.58k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
4.58k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
4.58k
    _terminated = true;
645
4.58k
    return Status::OK();
646
4.58k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE9terminateEPNS_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
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
6
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
6
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
6
    _terminated = true;
645
6
    return Status::OK();
646
6
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
957
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
957
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
957
    _terminated = true;
645
957
    return Status::OK();
646
957
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
34
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
34
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
34
    _terminated = true;
645
34
    return Status::OK();
646
34
}
647
648
template <typename SharedStateArg>
649
2.69M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
2.69M
    if (_closed) {
651
256k
        return Status::OK();
652
256k
    }
653
2.43M
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
1.35M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
1.35M
    }
656
2.43M
    _closed = true;
657
2.43M
    return Status::OK();
658
2.69M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
69.8k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
69.8k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
69.8k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
69.8k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
69.8k
    }
656
69.8k
    _closed = true;
657
69.8k
    return Status::OK();
658
69.8k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
4
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
4
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
4
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
4
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
4
    }
656
4
    _closed = true;
657
4
    return Status::OK();
658
4
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
468k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
468k
    if (_closed) {
651
234k
        return Status::OK();
652
234k
    }
653
233k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
233k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
233k
    }
656
233k
    _closed = true;
657
233k
    return Status::OK();
658
468k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
152
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
152
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
152
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
152
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
152
    }
656
152
    _closed = true;
657
152
    return Status::OK();
658
152
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
6.06k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
6.06k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
6.06k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
6.06k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
6.06k
    }
656
6.06k
    _closed = true;
657
6.06k
    return Status::OK();
658
6.06k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
8.66k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
8.66k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
8.66k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
8.66k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
8.66k
    }
656
8.66k
    _closed = true;
657
8.66k
    return Status::OK();
658
8.66k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
106k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
106k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
106k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
106k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
106k
    }
656
106k
    _closed = true;
657
106k
    return Status::OK();
658
106k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
73.6k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
73.6k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
73.6k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
73.6k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
73.6k
    }
656
73.6k
    _closed = true;
657
73.6k
    return Status::OK();
658
73.6k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
107
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
107
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
107
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
107
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
107
    }
656
107
    _closed = true;
657
107
    return Status::OK();
658
107
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
1.09M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
1.09M
    if (_closed) {
651
15.1k
        return Status::OK();
652
15.1k
    }
653
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
    }
656
1.07M
    _closed = true;
657
1.07M
    return Status::OK();
658
1.09M
}
_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
6.06k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
6.06k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
6.06k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
6.06k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
6.06k
    }
656
6.06k
    _closed = true;
657
6.06k
    return Status::OK();
658
6.06k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
551
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
551
    if (_closed) {
651
275
        return Status::OK();
652
275
    }
653
276
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
276
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
276
    }
656
276
    _closed = true;
657
276
    return Status::OK();
658
551
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
11.0k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
11.0k
    if (_closed) {
651
5.79k
        return Status::OK();
652
5.79k
    }
653
5.28k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
5.28k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
5.28k
    }
656
5.28k
    _closed = true;
657
5.28k
    return Status::OK();
658
11.0k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
792k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
792k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
792k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
792k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
792k
    }
656
792k
    _closed = true;
657
792k
    return Status::OK();
658
792k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
336
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
336
    if (_closed) {
651
176
        return Status::OK();
652
176
    }
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
336
}
659
660
template <typename SharedState>
661
1.98M
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
1.98M
    _operator_profile =
664
1.98M
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
1.98M
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
1.98M
    _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.98M
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
1.98M
    _operator_profile->add_child(_common_profile, true);
673
1.98M
    _operator_profile->add_child(_custom_profile, true);
674
675
1.98M
    _operator_profile->set_metadata(_parent->node_id());
676
1.98M
    _wait_for_finish_dependency_timer =
677
1.98M
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
1.98M
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
1.98M
    if constexpr (!is_fake_shared) {
680
1.38M
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
1.38M
            info.shared_state_map.end()) {
682
387k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
300k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
300k
            }
685
387k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
387k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
387k
                                                  ? 0
688
387k
                                                  : info.task_idx]
689
387k
                                  .get();
690
387k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
993k
        } else {
692
993k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
257
                DCHECK(false);
694
257
            }
695
993k
            _shared_state = info.shared_state->template cast<SharedState>();
696
993k
            _dependency = _shared_state->create_sink_dependency(
697
993k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
993k
        }
699
1.38M
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
1.38M
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
1.38M
    }
702
703
1.98M
    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.98M
    _rows_input_counter =
708
1.98M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
1.98M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
1.98M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
1.98M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
1.98M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
1.98M
    _memory_used_counter =
714
1.98M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
1.98M
    _common_profile->add_info_string("IsColocate",
716
1.98M
                                     std::to_string(_parent->is_colocated_operator()));
717
1.98M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
1.98M
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
1.98M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
1.98M
    return Status::OK();
721
1.98M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
117k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
117k
    _operator_profile =
664
117k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
117k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
117k
    _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
117k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
117k
    _operator_profile->add_child(_common_profile, true);
673
117k
    _operator_profile->add_child(_custom_profile, true);
674
675
117k
    _operator_profile->set_metadata(_parent->node_id());
676
117k
    _wait_for_finish_dependency_timer =
677
117k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
117k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
117k
    if constexpr (!is_fake_shared) {
680
117k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
117k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
12.2k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
12.2k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
12.2k
                                                  ? 0
688
12.2k
                                                  : info.task_idx]
689
12.2k
                                  .get();
690
12.2k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
105k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
105k
            _shared_state = info.shared_state->template cast<SharedState>();
696
105k
            _dependency = _shared_state->create_sink_dependency(
697
105k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
105k
        }
699
117k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
117k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
117k
    }
702
703
117k
    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
117k
    _rows_input_counter =
708
117k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
117k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
117k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
117k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
117k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
117k
    _memory_used_counter =
714
117k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
117k
    _common_profile->add_info_string("IsColocate",
716
117k
                                     std::to_string(_parent->is_colocated_operator()));
717
117k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
117k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
117k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
117k
    return Status::OK();
721
117k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
2
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
2
    _operator_profile =
664
2
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
2
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
2
    _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
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
2
    _operator_profile->add_child(_common_profile, true);
673
2
    _operator_profile->add_child(_custom_profile, true);
674
675
2
    _operator_profile->set_metadata(_parent->node_id());
676
2
    _wait_for_finish_dependency_timer =
677
2
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
2
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
2
    if constexpr (!is_fake_shared) {
680
2
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
2
            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
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
2
            _shared_state = info.shared_state->template cast<SharedState>();
696
2
            _dependency = _shared_state->create_sink_dependency(
697
2
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
2
        }
699
2
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
2
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
2
    }
702
703
2
    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
    _rows_input_counter =
708
2
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
2
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
2
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
2
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
2
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
2
    _memory_used_counter =
714
2
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
2
    _common_profile->add_info_string("IsColocate",
716
2
                                     std::to_string(_parent->is_colocated_operator()));
717
2
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
2
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
2
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
2
    return Status::OK();
721
2
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
235k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
235k
    _operator_profile =
664
235k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
235k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
235k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
235k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
235k
    _operator_profile->add_child(_common_profile, true);
673
235k
    _operator_profile->add_child(_custom_profile, true);
674
675
235k
    _operator_profile->set_metadata(_parent->node_id());
676
235k
    _wait_for_finish_dependency_timer =
677
235k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
235k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
235k
    if constexpr (!is_fake_shared) {
680
235k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
235k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
235k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
235k
            _shared_state = info.shared_state->template cast<SharedState>();
696
235k
            _dependency = _shared_state->create_sink_dependency(
697
235k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
235k
        }
699
235k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
235k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
235k
    }
702
703
235k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
235k
    _rows_input_counter =
708
235k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
235k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
235k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
235k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
235k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
235k
    _memory_used_counter =
714
235k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
235k
    _common_profile->add_info_string("IsColocate",
716
235k
                                     std::to_string(_parent->is_colocated_operator()));
717
235k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
235k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
235k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
235k
    return Status::OK();
721
235k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
159
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
159
    _operator_profile =
664
159
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
159
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
159
    _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
159
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
159
    _operator_profile->add_child(_common_profile, true);
673
159
    _operator_profile->add_child(_custom_profile, true);
674
675
159
    _operator_profile->set_metadata(_parent->node_id());
676
159
    _wait_for_finish_dependency_timer =
677
159
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
159
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
159
    if constexpr (!is_fake_shared) {
680
159
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
159
            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
159
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
159
            _shared_state = info.shared_state->template cast<SharedState>();
696
159
            _dependency = _shared_state->create_sink_dependency(
697
159
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
159
        }
699
159
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
159
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
159
    }
702
703
159
    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
159
    _rows_input_counter =
708
159
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
159
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
159
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
159
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
159
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
159
    _memory_used_counter =
714
159
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
159
    _common_profile->add_info_string("IsColocate",
716
159
                                     std::to_string(_parent->is_colocated_operator()));
717
159
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
159
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
159
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
159
    return Status::OK();
721
159
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
6.07k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
6.07k
    _operator_profile =
664
6.07k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
6.07k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
6.07k
    _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
6.07k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
6.07k
    _operator_profile->add_child(_common_profile, true);
673
6.07k
    _operator_profile->add_child(_custom_profile, true);
674
675
6.07k
    _operator_profile->set_metadata(_parent->node_id());
676
6.07k
    _wait_for_finish_dependency_timer =
677
6.07k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
6.07k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
6.07k
    if constexpr (!is_fake_shared) {
680
6.07k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
6.07k
            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
6.07k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
6.07k
            _shared_state = info.shared_state->template cast<SharedState>();
696
6.07k
            _dependency = _shared_state->create_sink_dependency(
697
6.07k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
6.07k
        }
699
6.07k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
6.07k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
6.07k
    }
702
703
6.07k
    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
6.07k
    _rows_input_counter =
708
6.07k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
6.07k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
6.07k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
6.07k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
6.07k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
6.07k
    _memory_used_counter =
714
6.07k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
6.07k
    _common_profile->add_info_string("IsColocate",
716
6.07k
                                     std::to_string(_parent->is_colocated_operator()));
717
6.07k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
6.07k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
6.07k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
6.07k
    return Status::OK();
721
6.07k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
8.68k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
8.68k
    _operator_profile =
664
8.68k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
8.68k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
8.68k
    _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
8.68k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
8.68k
    _operator_profile->add_child(_common_profile, true);
673
8.68k
    _operator_profile->add_child(_custom_profile, true);
674
675
8.68k
    _operator_profile->set_metadata(_parent->node_id());
676
8.68k
    _wait_for_finish_dependency_timer =
677
8.68k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
8.68k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
8.68k
    if constexpr (!is_fake_shared) {
680
8.68k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
8.68k
            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
8.68k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
8.68k
            _shared_state = info.shared_state->template cast<SharedState>();
696
8.68k
            _dependency = _shared_state->create_sink_dependency(
697
8.68k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
8.68k
        }
699
8.68k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
8.68k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
8.68k
    }
702
703
8.68k
    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
8.68k
    _rows_input_counter =
708
8.68k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
8.68k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
8.68k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
8.68k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
8.68k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
8.68k
    _memory_used_counter =
714
8.68k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
8.68k
    _common_profile->add_info_string("IsColocate",
716
8.68k
                                     std::to_string(_parent->is_colocated_operator()));
717
8.68k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
8.68k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
8.68k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
8.68k
    return Status::OK();
721
8.68k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
106k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
106k
    _operator_profile =
664
106k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
106k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
106k
    _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
106k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
106k
    _operator_profile->add_child(_common_profile, true);
673
106k
    _operator_profile->add_child(_custom_profile, true);
674
675
106k
    _operator_profile->set_metadata(_parent->node_id());
676
106k
    _wait_for_finish_dependency_timer =
677
106k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
106k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
106k
    if constexpr (!is_fake_shared) {
680
106k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
106k
            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
106k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
106k
            _shared_state = info.shared_state->template cast<SharedState>();
696
106k
            _dependency = _shared_state->create_sink_dependency(
697
106k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
106k
        }
699
106k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
106k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
106k
    }
702
703
106k
    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
106k
    _rows_input_counter =
708
106k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
106k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
106k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
106k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
106k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
106k
    _memory_used_counter =
714
106k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
106k
    _common_profile->add_info_string("IsColocate",
716
106k
                                     std::to_string(_parent->is_colocated_operator()));
717
106k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
106k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
106k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
106k
    return Status::OK();
721
106k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
74.0k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
74.0k
    _operator_profile =
664
74.0k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
74.0k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
74.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
74.0k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
74.0k
    _operator_profile->add_child(_common_profile, true);
673
74.0k
    _operator_profile->add_child(_custom_profile, true);
674
675
74.0k
    _operator_profile->set_metadata(_parent->node_id());
676
74.0k
    _wait_for_finish_dependency_timer =
677
74.0k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
74.0k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
74.0k
    if constexpr (!is_fake_shared) {
680
74.0k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
74.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
74.1k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
74.1k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
74.1k
                                                  ? 0
688
74.1k
                                                  : info.task_idx]
689
74.1k
                                  .get();
690
74.1k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
18.4E
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
18.4E
            _shared_state = info.shared_state->template cast<SharedState>();
696
18.4E
            _dependency = _shared_state->create_sink_dependency(
697
18.4E
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
18.4E
        }
699
74.0k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
74.0k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
74.0k
    }
702
703
74.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
74.0k
    _rows_input_counter =
708
74.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
74.0k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
74.0k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
74.0k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
74.0k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
74.0k
    _memory_used_counter =
714
74.0k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
74.0k
    _common_profile->add_info_string("IsColocate",
716
74.0k
                                     std::to_string(_parent->is_colocated_operator()));
717
74.0k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
74.0k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
74.0k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
74.0k
    return Status::OK();
721
74.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
118
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
118
    _operator_profile =
664
118
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
118
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
118
    _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
118
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
118
    _operator_profile->add_child(_common_profile, true);
673
118
    _operator_profile->add_child(_custom_profile, true);
674
675
118
    _operator_profile->set_metadata(_parent->node_id());
676
118
    _wait_for_finish_dependency_timer =
677
118
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
118
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
118
    if constexpr (!is_fake_shared) {
680
118
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
118
            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
118
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
118
            _shared_state = info.shared_state->template cast<SharedState>();
696
118
            _dependency = _shared_state->create_sink_dependency(
697
118
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
118
        }
699
118
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
118
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
118
    }
702
703
118
    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
118
    _rows_input_counter =
708
118
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
118
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
118
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
118
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
118
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
118
    _memory_used_counter =
714
118
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
118
    _common_profile->add_info_string("IsColocate",
716
118
                                     std::to_string(_parent->is_colocated_operator()));
717
118
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
118
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
118
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
118
    return Status::OK();
721
118
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
601k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
601k
    _operator_profile =
664
601k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
601k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
601k
    _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
601k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
601k
    _operator_profile->add_child(_common_profile, true);
673
601k
    _operator_profile->add_child(_custom_profile, true);
674
675
601k
    _operator_profile->set_metadata(_parent->node_id());
676
601k
    _wait_for_finish_dependency_timer =
677
601k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
601k
    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
601k
    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
601k
    _rows_input_counter =
708
601k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
601k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
601k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
601k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
601k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
601k
    _memory_used_counter =
714
601k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
601k
    _common_profile->add_info_string("IsColocate",
716
601k
                                     std::to_string(_parent->is_colocated_operator()));
717
601k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
601k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
601k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
601k
    return Status::OK();
721
601k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
9.73k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
9.73k
    _operator_profile =
664
9.73k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
9.73k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
9.73k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
9.73k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
9.73k
    _operator_profile->add_child(_common_profile, true);
673
9.73k
    _operator_profile->add_child(_custom_profile, true);
674
675
9.73k
    _operator_profile->set_metadata(_parent->node_id());
676
9.73k
    _wait_for_finish_dependency_timer =
677
9.73k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
9.73k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
9.73k
    if constexpr (!is_fake_shared) {
680
9.73k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
9.73k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
9.73k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
9.73k
            _shared_state = info.shared_state->template cast<SharedState>();
696
9.73k
            _dependency = _shared_state->create_sink_dependency(
697
9.73k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
9.73k
        }
699
9.73k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
9.73k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
9.73k
    }
702
703
9.73k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
9.73k
    _rows_input_counter =
708
9.73k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
9.73k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
9.73k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
9.73k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
9.73k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
9.73k
    _memory_used_counter =
714
9.73k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
9.73k
    _common_profile->add_info_string("IsColocate",
716
9.73k
                                     std::to_string(_parent->is_colocated_operator()));
717
9.73k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
9.73k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
9.73k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
9.73k
    return Status::OK();
721
9.73k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
378
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
378
    _operator_profile =
664
378
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
378
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
378
    _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
378
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
378
    _operator_profile->add_child(_common_profile, true);
673
378
    _operator_profile->add_child(_custom_profile, true);
674
675
378
    _operator_profile->set_metadata(_parent->node_id());
676
378
    _wait_for_finish_dependency_timer =
677
378
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
378
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
378
    if constexpr (!is_fake_shared) {
680
378
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
378
            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
378
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
378
            _shared_state = info.shared_state->template cast<SharedState>();
696
378
            _dependency = _shared_state->create_sink_dependency(
697
378
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
378
        }
699
378
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
378
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
378
    }
702
703
378
    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
378
    _rows_input_counter =
708
378
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
378
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
378
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
378
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
378
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
378
    _memory_used_counter =
714
378
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
378
    _common_profile->add_info_string("IsColocate",
716
378
                                     std::to_string(_parent->is_colocated_operator()));
717
378
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
378
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
378
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
378
    return Status::OK();
721
378
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
2.62k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
2.62k
    _operator_profile =
664
2.62k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
2.62k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
2.62k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
2.62k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
2.62k
    _operator_profile->add_child(_common_profile, true);
673
2.62k
    _operator_profile->add_child(_custom_profile, true);
674
675
2.62k
    _operator_profile->set_metadata(_parent->node_id());
676
2.62k
    _wait_for_finish_dependency_timer =
677
2.62k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
2.62k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
2.62k
    if constexpr (!is_fake_shared) {
680
2.62k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
2.62k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
2.62k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
2.62k
            _shared_state = info.shared_state->template cast<SharedState>();
696
2.62k
            _dependency = _shared_state->create_sink_dependency(
697
2.62k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
2.62k
        }
699
2.62k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
2.62k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
2.62k
    }
702
703
2.62k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
2.62k
    _rows_input_counter =
708
2.62k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
2.62k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
2.62k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
2.62k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
2.62k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
2.62k
    _memory_used_counter =
714
2.62k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
2.62k
    _common_profile->add_info_string("IsColocate",
716
2.62k
                                     std::to_string(_parent->is_colocated_operator()));
717
2.62k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
2.62k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
2.62k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
2.62k
    return Status::OK();
721
2.62k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
12.8k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
12.8k
    _operator_profile =
664
12.8k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
12.8k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
12.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
12.8k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
12.8k
    _operator_profile->add_child(_common_profile, true);
673
12.8k
    _operator_profile->add_child(_custom_profile, true);
674
675
12.8k
    _operator_profile->set_metadata(_parent->node_id());
676
12.8k
    _wait_for_finish_dependency_timer =
677
12.8k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
12.8k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
12.8k
    if constexpr (!is_fake_shared) {
680
12.8k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
12.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
12.8k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
12.8k
            _shared_state = info.shared_state->template cast<SharedState>();
696
12.8k
            _dependency = _shared_state->create_sink_dependency(
697
12.8k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
12.8k
        }
699
12.8k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
12.8k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
12.8k
    }
702
703
12.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
12.8k
    _rows_input_counter =
708
12.8k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
12.8k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
12.8k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
12.8k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
12.8k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
12.8k
    _memory_used_counter =
714
12.8k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
12.8k
    _common_profile->add_info_string("IsColocate",
716
12.8k
                                     std::to_string(_parent->is_colocated_operator()));
717
12.8k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
12.8k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
12.8k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
12.8k
    return Status::OK();
721
12.8k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
300k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
300k
    _operator_profile =
664
300k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
300k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
300k
    _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
300k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
300k
    _operator_profile->add_child(_common_profile, true);
673
300k
    _operator_profile->add_child(_custom_profile, true);
674
675
300k
    _operator_profile->set_metadata(_parent->node_id());
676
300k
    _wait_for_finish_dependency_timer =
677
300k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
300k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
300k
    if constexpr (!is_fake_shared) {
680
300k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
300k
            info.shared_state_map.end()) {
682
300k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
300k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
300k
            }
685
300k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
300k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
300k
                                                  ? 0
688
300k
                                                  : info.task_idx]
689
300k
                                  .get();
690
300k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
300k
        } else {
692
257
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
257
                DCHECK(false);
694
257
            }
695
257
            _shared_state = info.shared_state->template cast<SharedState>();
696
257
            _dependency = _shared_state->create_sink_dependency(
697
257
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
257
        }
699
300k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
300k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
300k
    }
702
703
300k
    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
300k
    _rows_input_counter =
708
300k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
300k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
300k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
300k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
300k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
300k
    _memory_used_counter =
714
300k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
300k
    _common_profile->add_info_string("IsColocate",
716
300k
                                     std::to_string(_parent->is_colocated_operator()));
717
300k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
300k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
300k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
300k
    return Status::OK();
721
300k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
504k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
504k
    _operator_profile =
664
504k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
504k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
504k
    _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
504k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
504k
    _operator_profile->add_child(_common_profile, true);
673
504k
    _operator_profile->add_child(_custom_profile, true);
674
675
504k
    _operator_profile->set_metadata(_parent->node_id());
676
504k
    _wait_for_finish_dependency_timer =
677
504k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
504k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
504k
    if constexpr (!is_fake_shared) {
680
504k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
504k
            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
504k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
504k
            _shared_state = info.shared_state->template cast<SharedState>();
696
504k
            _dependency = _shared_state->create_sink_dependency(
697
504k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
504k
        }
699
504k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
504k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
504k
    }
702
703
504k
    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
504k
    _rows_input_counter =
708
504k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
504k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
504k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
504k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
504k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
504k
    _memory_used_counter =
714
504k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
504k
    _common_profile->add_info_string("IsColocate",
716
504k
                                     std::to_string(_parent->is_colocated_operator()));
717
504k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
504k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
504k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
504k
    return Status::OK();
721
504k
}
_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.98M
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
1.98M
    if (_closed) {
726
2
        return Status::OK();
727
2
    }
728
1.98M
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
1.38M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
1.38M
    }
731
1.98M
    _closed = true;
732
1.98M
    return Status::OK();
733
1.98M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
117k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
117k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
117k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
117k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
117k
    }
731
117k
    _closed = true;
732
117k
    return Status::OK();
733
117k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
1
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
1
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
1
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
1
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
1
    }
731
1
    _closed = true;
732
1
    return Status::OK();
733
1
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
235k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
235k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
235k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
235k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
235k
    }
731
235k
    _closed = true;
732
235k
    return Status::OK();
733
235k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
149
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
149
    if (_closed) {
726
2
        return Status::OK();
727
2
    }
728
147
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
147
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
147
    }
731
147
    _closed = true;
732
147
    return Status::OK();
733
149
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
6.05k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
6.05k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
6.05k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
6.05k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
6.05k
    }
731
6.05k
    _closed = true;
732
6.05k
    return Status::OK();
733
6.05k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
8.66k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
8.66k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
8.66k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
8.66k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
8.66k
    }
731
8.66k
    _closed = true;
732
8.66k
    return Status::OK();
733
8.66k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
106k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
106k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
106k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
106k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
106k
    }
731
106k
    _closed = true;
732
106k
    return Status::OK();
733
106k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
73.3k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
73.3k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
73.3k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
73.3k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
73.3k
    }
731
73.3k
    _closed = true;
732
73.3k
    return Status::OK();
733
73.3k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
107
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
107
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
107
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
107
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
107
    }
731
107
    _closed = true;
732
107
    return Status::OK();
733
107
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
604k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
604k
    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
604k
    _closed = true;
732
604k
    return Status::OK();
733
604k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
9.78k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
9.78k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
9.78k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
9.78k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
9.78k
    }
731
9.78k
    _closed = true;
732
9.78k
    return Status::OK();
733
9.78k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
275
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
275
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
275
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
275
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
275
    }
731
275
    _closed = true;
732
275
    return Status::OK();
733
275
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
2.65k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
2.65k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
2.65k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
2.65k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
2.65k
    }
731
2.65k
    _closed = true;
732
2.65k
    return Status::OK();
733
2.65k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
12.8k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
12.8k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
12.8k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
12.8k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
12.8k
    }
731
12.8k
    _closed = true;
732
12.8k
    return Status::OK();
733
12.8k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
302k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
302k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
302k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
302k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
302k
    }
731
302k
    _closed = true;
732
302k
    return Status::OK();
733
302k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
505k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
505k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
505k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
505k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
505k
    }
731
505k
    _closed = true;
732
505k
    return Status::OK();
733
505k
}
_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
337
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
337
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
337
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
337
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
337
    }
731
337
    _closed = true;
732
337
    return Status::OK();
733
337
}
734
735
template <typename LocalStateType>
736
Status StreamingOperatorX<LocalStateType>::get_block_impl(RuntimeState* state, Block* block,
737
1.47k
                                                          bool* eos) {
738
1.47k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
1.46k
    return pull(state, block, eos);
740
1.47k
}
_ZN5doris18StreamingOperatorXINS_23AssertNumRowsLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
41
                                                          bool* eos) {
738
41
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
41
    return pull(state, block, eos);
740
41
}
_ZN5doris18StreamingOperatorXINS_16SelectLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
1.43k
                                                          bool* eos) {
738
1.43k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
1.42k
    return pull(state, block, eos);
740
1.43k
}
741
742
template <typename LocalStateType>
743
Status StatefulOperatorX<LocalStateType>::get_block_impl(RuntimeState* state, Block* block,
744
664k
                                                         bool* eos) {
745
664k
    auto& local_state = get_local_state(state);
746
664k
    if (need_more_input_data(state)) {
747
631k
        local_state._child_block->clear_column_data(
748
631k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
631k
                        .num_slots());
750
631k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
631k
                state, local_state._child_block.get(), &local_state._child_eos));
752
631k
        *eos = local_state._child_eos;
753
631k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
53.6k
            return Status::OK();
755
53.6k
        }
756
577k
        {
757
577k
            SCOPED_TIMER(local_state.exec_time_counter());
758
577k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
577k
        }
760
577k
    }
761
762
610k
    if (!need_more_input_data(state)) {
763
573k
        SCOPED_TIMER(local_state.exec_time_counter());
764
573k
        bool new_eos = false;
765
573k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
573k
        if (new_eos) {
767
494k
            *eos = true;
768
494k
        } else if (!need_more_input_data(state)) {
769
25.9k
            *eos = false;
770
25.9k
        }
771
573k
    }
772
610k
    return Status::OK();
773
610k
}
_ZN5doris17StatefulOperatorXINS_23HashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
133k
                                                         bool* eos) {
745
133k
    auto& local_state = get_local_state(state);
746
133k
    if (need_more_input_data(state)) {
747
113k
        local_state._child_block->clear_column_data(
748
113k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
113k
                        .num_slots());
750
113k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
113k
                state, local_state._child_block.get(), &local_state._child_eos));
752
113k
        *eos = local_state._child_eos;
753
113k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
30.6k
            return Status::OK();
755
30.6k
        }
756
82.9k
        {
757
82.9k
            SCOPED_TIMER(local_state.exec_time_counter());
758
82.9k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
82.9k
        }
760
82.9k
    }
761
762
102k
    if (!need_more_input_data(state)) {
763
102k
        SCOPED_TIMER(local_state.exec_time_counter());
764
102k
        bool new_eos = false;
765
102k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
102k
        if (new_eos) {
767
45.3k
            *eos = true;
768
57.4k
        } else if (!need_more_input_data(state)) {
769
11.6k
            *eos = false;
770
11.6k
        }
771
102k
    }
772
102k
    return Status::OK();
773
102k
}
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_34PartitionedHashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
_ZN5doris17StatefulOperatorXINS_16RepeatLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
4.58k
                                                         bool* eos) {
745
4.58k
    auto& local_state = get_local_state(state);
746
4.58k
    if (need_more_input_data(state)) {
747
2.70k
        local_state._child_block->clear_column_data(
748
2.70k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
2.70k
                        .num_slots());
750
2.70k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
2.70k
                state, local_state._child_block.get(), &local_state._child_eos));
752
2.70k
        *eos = local_state._child_eos;
753
2.70k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
862
            return Status::OK();
755
862
        }
756
1.84k
        {
757
1.84k
            SCOPED_TIMER(local_state.exec_time_counter());
758
1.84k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
1.84k
        }
760
1.84k
    }
761
762
3.72k
    if (!need_more_input_data(state)) {
763
3.72k
        SCOPED_TIMER(local_state.exec_time_counter());
764
3.72k
        bool new_eos = false;
765
3.72k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
3.72k
        if (new_eos) {
767
1.26k
            *eos = true;
768
2.46k
        } else if (!need_more_input_data(state)) {
769
1.88k
            *eos = false;
770
1.88k
        }
771
3.72k
    }
772
3.71k
    return Status::OK();
773
3.71k
}
_ZN5doris17StatefulOperatorXINS_25MaterializationLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
1.82k
                                                         bool* eos) {
745
1.82k
    auto& local_state = get_local_state(state);
746
1.82k
    if (need_more_input_data(state)) {
747
1.82k
        local_state._child_block->clear_column_data(
748
1.82k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
1.82k
                        .num_slots());
750
1.82k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
1.82k
                state, local_state._child_block.get(), &local_state._child_eos));
752
1.82k
        *eos = local_state._child_eos;
753
1.82k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
789
            return Status::OK();
755
789
        }
756
1.03k
        {
757
1.03k
            SCOPED_TIMER(local_state.exec_time_counter());
758
1.03k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
1.03k
        }
760
1.03k
    }
761
762
1.03k
    if (!need_more_input_data(state)) {
763
1.03k
        SCOPED_TIMER(local_state.exec_time_counter());
764
1.03k
        bool new_eos = false;
765
1.03k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
1.03k
        if (new_eos) {
767
795
            *eos = true;
768
795
        } else if (!need_more_input_data(state)) {
769
0
            *eos = false;
770
0
        }
771
1.03k
    }
772
1.03k
    return Status::OK();
773
1.03k
}
_ZN5doris17StatefulOperatorXINS_22StreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
20.9k
                                                         bool* eos) {
745
20.9k
    auto& local_state = get_local_state(state);
746
20.9k
    if (need_more_input_data(state)) {
747
20.9k
        local_state._child_block->clear_column_data(
748
20.9k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
20.9k
                        .num_slots());
750
20.9k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
20.9k
                state, local_state._child_block.get(), &local_state._child_eos));
752
20.9k
        *eos = local_state._child_eos;
753
20.9k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
3.82k
            return Status::OK();
755
3.82k
        }
756
17.1k
        {
757
17.1k
            SCOPED_TIMER(local_state.exec_time_counter());
758
17.1k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
17.1k
        }
760
17.1k
    }
761
762
17.1k
    if (!need_more_input_data(state)) {
763
8.43k
        SCOPED_TIMER(local_state.exec_time_counter());
764
8.43k
        bool new_eos = false;
765
8.43k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
8.43k
        if (new_eos) {
767
8.31k
            *eos = true;
768
8.31k
        } else if (!need_more_input_data(state)) {
769
1
            *eos = false;
770
1
        }
771
8.43k
    }
772
17.1k
    return Status::OK();
773
17.1k
}
_ZN5doris17StatefulOperatorXINS_30DistinctStreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
474k
                                                         bool* eos) {
745
474k
    auto& local_state = get_local_state(state);
746
475k
    if (need_more_input_data(state)) {
747
475k
        local_state._child_block->clear_column_data(
748
475k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
475k
                        .num_slots());
750
475k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
475k
                state, local_state._child_block.get(), &local_state._child_eos));
752
475k
        *eos = local_state._child_eos;
753
475k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
16.7k
            return Status::OK();
755
16.7k
        }
756
458k
        {
757
458k
            SCOPED_TIMER(local_state.exec_time_counter());
758
458k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
458k
        }
760
458k
    }
761
762
457k
    if (!need_more_input_data(state)) {
763
429k
        SCOPED_TIMER(local_state.exec_time_counter());
764
429k
        bool new_eos = false;
765
429k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
429k
        if (new_eos) {
767
428k
            *eos = true;
768
428k
        } else if (!need_more_input_data(state)) {
769
7
            *eos = false;
770
7
        }
771
429k
    }
772
457k
    return Status::OK();
773
457k
}
_ZN5doris17StatefulOperatorXINS_29NestedLoopJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
21.7k
                                                         bool* eos) {
745
21.7k
    auto& local_state = get_local_state(state);
746
21.7k
    if (need_more_input_data(state)) {
747
9.69k
        local_state._child_block->clear_column_data(
748
9.69k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
9.69k
                        .num_slots());
750
9.69k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
9.69k
                state, local_state._child_block.get(), &local_state._child_eos));
752
9.69k
        *eos = local_state._child_eos;
753
9.69k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
344
            return Status::OK();
755
344
        }
756
9.34k
        {
757
9.34k
            SCOPED_TIMER(local_state.exec_time_counter());
758
9.34k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
9.34k
        }
760
9.34k
    }
761
762
21.3k
    if (!need_more_input_data(state)) {
763
20.8k
        SCOPED_TIMER(local_state.exec_time_counter());
764
20.8k
        bool new_eos = false;
765
20.8k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
20.8k
        if (new_eos) {
767
6.04k
            *eos = true;
768
14.8k
        } else if (!need_more_input_data(state)) {
769
12.0k
            *eos = false;
770
12.0k
        }
771
20.8k
    }
772
21.3k
    return Status::OK();
773
21.3k
}
_ZN5doris17StatefulOperatorXINS_23TableFunctionLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
7.05k
                                                         bool* eos) {
745
7.05k
    auto& local_state = get_local_state(state);
746
7.05k
    if (need_more_input_data(state)) {
747
6.69k
        local_state._child_block->clear_column_data(
748
6.69k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
6.69k
                        .num_slots());
750
6.69k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
6.69k
                state, local_state._child_block.get(), &local_state._child_eos));
752
6.69k
        *eos = local_state._child_eos;
753
6.69k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
454
            return Status::OK();
755
454
        }
756
6.23k
        {
757
6.23k
            SCOPED_TIMER(local_state.exec_time_counter());
758
6.23k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
6.23k
        }
760
6.23k
    }
761
762
6.61k
    if (!need_more_input_data(state)) {
763
6.61k
        SCOPED_TIMER(local_state.exec_time_counter());
764
6.61k
        bool new_eos = false;
765
6.61k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
6.61k
        if (new_eos) {
767
4.32k
            *eos = true;
768
4.32k
        } else if (!need_more_input_data(state)) {
769
366
            *eos = false;
770
366
        }
771
6.61k
    }
772
6.59k
    return Status::OK();
773
6.59k
}
774
775
template <typename Writer, typename Parent>
776
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
777
49.5k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
49.5k
    RETURN_IF_ERROR(Base::init(state, info));
779
49.5k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
49.5k
                                                         "AsyncWriterDependency", true);
781
49.5k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
49.5k
                             _finish_dependency));
783
784
49.5k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
49.5k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
49.5k
    return Status::OK();
787
49.5k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
366
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
366
    RETURN_IF_ERROR(Base::init(state, info));
779
366
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
366
                                                         "AsyncWriterDependency", true);
781
366
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
366
                             _finish_dependency));
783
784
366
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
366
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
366
    return Status::OK();
787
366
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
49.1k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
49.1k
    RETURN_IF_ERROR(Base::init(state, info));
779
49.1k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
49.1k
                                                         "AsyncWriterDependency", true);
781
49.1k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
49.1k
                             _finish_dependency));
783
784
49.1k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
49.1k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
49.1k
    return Status::OK();
787
49.1k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
34
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
34
    RETURN_IF_ERROR(Base::init(state, info));
779
34
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
34
                                                         "AsyncWriterDependency", true);
781
34
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
34
                             _finish_dependency));
783
784
34
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
34
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
34
    return Status::OK();
787
34
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
16
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
16
    RETURN_IF_ERROR(Base::init(state, info));
779
16
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
16
                                                         "AsyncWriterDependency", true);
781
16
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
16
                             _finish_dependency));
783
784
16
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
16
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
16
    return Status::OK();
787
16
}
788
789
template <typename Writer, typename Parent>
790
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
791
50.0k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
50.0k
    RETURN_IF_ERROR(Base::open(state));
793
50.0k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
394k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
343k
        RETURN_IF_ERROR(
796
343k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
343k
    }
798
50.0k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
50.0k
    return Status::OK();
800
50.0k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
366
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
366
    RETURN_IF_ERROR(Base::open(state));
793
366
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
1.85k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
1.48k
        RETURN_IF_ERROR(
796
1.48k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
1.48k
    }
798
366
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
366
    return Status::OK();
800
366
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
49.6k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
49.6k
    RETURN_IF_ERROR(Base::open(state));
793
49.6k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
391k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
341k
        RETURN_IF_ERROR(
796
341k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
341k
    }
798
49.6k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
49.6k
    return Status::OK();
800
49.6k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
34
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
34
    RETURN_IF_ERROR(Base::open(state));
793
34
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
612
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
578
        RETURN_IF_ERROR(
796
578
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
578
    }
798
34
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
34
    return Status::OK();
800
34
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
16
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
16
    RETURN_IF_ERROR(Base::open(state));
793
16
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
33
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
17
        RETURN_IF_ERROR(
796
17
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
17
    }
798
16
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
16
    return Status::OK();
800
16
}
801
802
template <typename Writer, typename Parent>
803
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
804
65.1k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
65.1k
    return _writer->sink(block, eos);
806
65.1k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
1.22k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
1.22k
    return _writer->sink(block, eos);
806
1.22k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
63.8k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
63.8k
    return _writer->sink(block, eos);
806
63.8k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
34
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
34
    return _writer->sink(block, eos);
806
34
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
52
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
52
    return _writer->sink(block, eos);
806
52
}
807
808
template <typename Writer, typename Parent>
809
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
810
50.1k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
50.1k
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
50.1k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
50.1k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
816
    // if the init failed, the _writer may be nullptr. so here need check
817
50.1k
    if (_writer) {
818
50.1k
        Status st = _writer->get_writer_status();
819
50.1k
        if (exec_status.ok()) {
820
50.0k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
50.0k
                                                       : Status::Cancelled("force close"));
822
50.0k
        } else {
823
101
            _writer->force_close(exec_status);
824
101
        }
825
        // If there is an error in process_block thread, then we should get the writer
826
        // status before call force_close. For example, the thread may failed in commit
827
        // transaction.
828
50.1k
        RETURN_IF_ERROR(st);
829
50.1k
    }
830
50.0k
    return Base::close(state, exec_status);
831
50.1k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
355
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
355
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
355
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
355
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
816
    // if the init failed, the _writer may be nullptr. so here need check
817
355
    if (_writer) {
818
355
        Status st = _writer->get_writer_status();
819
355
        if (exec_status.ok()) {
820
355
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
355
                                                       : Status::Cancelled("force close"));
822
355
        } else {
823
0
            _writer->force_close(exec_status);
824
0
        }
825
        // If there is an error in process_block thread, then we should get the writer
826
        // status before call force_close. For example, the thread may failed in commit
827
        // transaction.
828
355
        RETURN_IF_ERROR(st);
829
355
    }
830
355
    return Base::close(state, exec_status);
831
355
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
49.7k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
49.7k
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
49.7k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
49.7k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
816
    // if the init failed, the _writer may be nullptr. so here need check
817
49.7k
    if (_writer) {
818
49.7k
        Status st = _writer->get_writer_status();
819
49.7k
        if (exec_status.ok()) {
820
49.6k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
49.6k
                                                       : Status::Cancelled("force close"));
822
49.6k
        } else {
823
101
            _writer->force_close(exec_status);
824
101
        }
825
        // If there is an error in process_block thread, then we should get the writer
826
        // status before call force_close. For example, the thread may failed in commit
827
        // transaction.
828
49.7k
        RETURN_IF_ERROR(st);
829
49.7k
    }
830
49.6k
    return Base::close(state, exec_status);
831
49.7k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
34
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
34
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
34
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
34
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
816
    // if the init failed, the _writer may be nullptr. so here need check
817
34
    if (_writer) {
818
34
        Status st = _writer->get_writer_status();
819
34
        if (exec_status.ok()) {
820
34
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
34
                                                       : Status::Cancelled("force close"));
822
34
        } else {
823
0
            _writer->force_close(exec_status);
824
0
        }
825
        // If there is an error in process_block thread, then we should get the writer
826
        // status before call force_close. For example, the thread may failed in commit
827
        // transaction.
828
34
        RETURN_IF_ERROR(st);
829
34
    }
830
34
    return Base::close(state, exec_status);
831
34
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
16
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
16
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
16
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
16
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
816
    // if the init failed, the _writer may be nullptr. so here need check
817
16
    if (_writer) {
818
16
        Status st = _writer->get_writer_status();
819
16
        if (exec_status.ok()) {
820
16
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
16
                                                       : Status::Cancelled("force close"));
822
16
        } else {
823
0
            _writer->force_close(exec_status);
824
0
        }
825
        // If there is an error in process_block thread, then we should get the writer
826
        // status before call force_close. For example, the thread may failed in commit
827
        // transaction.
828
16
        RETURN_IF_ERROR(st);
829
16
    }
830
16
    return Base::close(state, exec_status);
831
16
}
832
833
// An instantiation added outside the macros below needs the matching
834
// 'extern template' declaration in the operator's header (enforced by
835
// build-support/check-extern-template-pairing.py). Instantiations expanded
836
// through DECLARE_OPERATOR are invisible to that check -- macro bodies are
837
// skipped -- so their extern pairing has to be kept in sync by hand.
838
#define DECLARE_OPERATOR(LOCAL_STATE) template class DataSinkOperatorX<LOCAL_STATE>;
839
DECLARE_OPERATOR(HashJoinBuildSinkLocalState)
840
DECLARE_OPERATOR(ResultSinkLocalState)
841
DECLARE_OPERATOR(JdbcTableSinkLocalState)
842
DECLARE_OPERATOR(MemoryScratchSinkLocalState)
843
DECLARE_OPERATOR(ResultFileSinkLocalState)
844
DECLARE_OPERATOR(OlapTableSinkLocalState)
845
DECLARE_OPERATOR(OlapTableSinkV2LocalState)
846
DECLARE_OPERATOR(HiveTableSinkLocalState)
847
DECLARE_OPERATOR(TVFTableSinkLocalState)
848
DECLARE_OPERATOR(IcebergTableSinkLocalState)
849
DECLARE_OPERATOR(PaimonTableSinkLocalState)
850
DECLARE_OPERATOR(SpillIcebergTableSinkLocalState)
851
DECLARE_OPERATOR(IcebergDeleteSinkLocalState)
852
DECLARE_OPERATOR(IcebergMergeSinkLocalState)
853
DECLARE_OPERATOR(MCTableSinkLocalState)
854
DECLARE_OPERATOR(AnalyticSinkLocalState)
855
DECLARE_OPERATOR(BlackholeSinkLocalState)
856
DECLARE_OPERATOR(SortSinkLocalState)
857
DECLARE_OPERATOR(SpillSortSinkLocalState)
858
DECLARE_OPERATOR(LocalExchangeSinkLocalState)
859
DECLARE_OPERATOR(AggSinkLocalState)
860
DECLARE_OPERATOR(BucketedAggSinkLocalState)
861
DECLARE_OPERATOR(PartitionedAggSinkLocalState)
862
DECLARE_OPERATOR(ExchangeSinkLocalState)
863
DECLARE_OPERATOR(NestedLoopJoinBuildSinkLocalState)
864
DECLARE_OPERATOR(UnionSinkLocalState)
865
DECLARE_OPERATOR(MultiCastDataStreamSinkLocalState)
866
DECLARE_OPERATOR(PartitionSortSinkLocalState)
867
DECLARE_OPERATOR(SetProbeSinkLocalState<true>)
868
DECLARE_OPERATOR(SetProbeSinkLocalState<false>)
869
DECLARE_OPERATOR(SetSinkLocalState<true>)
870
DECLARE_OPERATOR(SetSinkLocalState<false>)
871
DECLARE_OPERATOR(PartitionedHashJoinSinkLocalState)
872
DECLARE_OPERATOR(GroupCommitBlockSinkLocalState)
873
DECLARE_OPERATOR(CacheSinkLocalState)
874
DECLARE_OPERATOR(DictSinkLocalState)
875
DECLARE_OPERATOR(RecCTESinkLocalState)
876
DECLARE_OPERATOR(RecCTEAnchorSinkLocalState)
877
878
#undef DECLARE_OPERATOR
879
880
#define DECLARE_OPERATOR(LOCAL_STATE) template class OperatorX<LOCAL_STATE>;
881
DECLARE_OPERATOR(HashJoinProbeLocalState)
882
DECLARE_OPERATOR(OlapScanLocalState)
883
DECLARE_OPERATOR(GroupCommitLocalState)
884
DECLARE_OPERATOR(JDBCScanLocalState)
885
DECLARE_OPERATOR(FileScanLocalState)
886
DECLARE_OPERATOR(AnalyticLocalState)
887
DECLARE_OPERATOR(SortLocalState)
888
DECLARE_OPERATOR(SpillSortLocalState)
889
DECLARE_OPERATOR(LocalMergeSortLocalState)
890
DECLARE_OPERATOR(AggLocalState)
891
DECLARE_OPERATOR(BucketedAggLocalState)
892
DECLARE_OPERATOR(PartitionedAggLocalState)
893
DECLARE_OPERATOR(TableFunctionLocalState)
894
DECLARE_OPERATOR(ExchangeLocalState)
895
DECLARE_OPERATOR(RepeatLocalState)
896
DECLARE_OPERATOR(NestedLoopJoinProbeLocalState)
897
DECLARE_OPERATOR(AssertNumRowsLocalState)
898
DECLARE_OPERATOR(EmptySetLocalState)
899
DECLARE_OPERATOR(UnionSourceLocalState)
900
DECLARE_OPERATOR(MultiCastDataStreamSourceLocalState)
901
DECLARE_OPERATOR(PartitionSortSourceLocalState)
902
DECLARE_OPERATOR(SetSourceLocalState<true>)
903
DECLARE_OPERATOR(SetSourceLocalState<false>)
904
DECLARE_OPERATOR(DataGenLocalState)
905
DECLARE_OPERATOR(SchemaScanLocalState)
906
DECLARE_OPERATOR(MetaScanLocalState)
907
DECLARE_OPERATOR(LocalExchangeSourceLocalState)
908
DECLARE_OPERATOR(PartitionedHashJoinProbeLocalState)
909
DECLARE_OPERATOR(CacheSourceLocalState)
910
DECLARE_OPERATOR(RecCTESourceLocalState)
911
DECLARE_OPERATOR(RecCTEScanLocalState)
912
913
#ifdef BE_TEST
914
DECLARE_OPERATOR(MockLocalState)
915
DECLARE_OPERATOR(MockScanLocalState)
916
#endif
917
#undef DECLARE_OPERATOR
918
919
template class StreamingOperatorX<AssertNumRowsLocalState>;
920
template class StreamingOperatorX<SelectLocalState>;
921
922
template class StatefulOperatorX<HashJoinProbeLocalState>;
923
template class StatefulOperatorX<PartitionedHashJoinProbeLocalState>;
924
template class StatefulOperatorX<RepeatLocalState>;
925
template class StatefulOperatorX<MaterializationLocalState>;
926
template class StatefulOperatorX<StreamingAggLocalState>;
927
template class StatefulOperatorX<DistinctStreamingAggLocalState>;
928
template class StatefulOperatorX<NestedLoopJoinProbeLocalState>;
929
template class StatefulOperatorX<TableFunctionLocalState>;
930
931
template class PipelineXSinkLocalState<HashJoinSharedState>;
932
template class PipelineXSinkLocalState<PartitionedHashJoinSharedState>;
933
template class PipelineXSinkLocalState<SortSharedState>;
934
template class PipelineXSinkLocalState<SpillSortSharedState>;
935
template class PipelineXSinkLocalState<NestedLoopJoinSharedState>;
936
template class PipelineXSinkLocalState<AnalyticSharedState>;
937
template class PipelineXSinkLocalState<AggSharedState>;
938
template class PipelineXSinkLocalState<BucketedAggSharedState>;
939
template class PipelineXSinkLocalState<PartitionedAggSharedState>;
940
template class PipelineXSinkLocalState<FakeSharedState>;
941
template class PipelineXSinkLocalState<UnionSharedState>;
942
template class PipelineXSinkLocalState<PartitionSortNodeSharedState>;
943
template class PipelineXSinkLocalState<MultiCastSharedState>;
944
template class PipelineXSinkLocalState<SetSharedState>;
945
template class PipelineXSinkLocalState<LocalExchangeSharedState>;
946
template class PipelineXSinkLocalState<BasicSharedState>;
947
template class PipelineXSinkLocalState<DataQueueSharedState>;
948
template class PipelineXSinkLocalState<RecCTESharedState>;
949
950
template class PipelineXLocalState<HashJoinSharedState>;
951
template class PipelineXLocalState<PartitionedHashJoinSharedState>;
952
template class PipelineXLocalState<SortSharedState>;
953
template class PipelineXLocalState<SpillSortSharedState>;
954
template class PipelineXLocalState<NestedLoopJoinSharedState>;
955
template class PipelineXLocalState<AnalyticSharedState>;
956
template class PipelineXLocalState<AggSharedState>;
957
template class PipelineXLocalState<BucketedAggSharedState>;
958
template class PipelineXLocalState<PartitionedAggSharedState>;
959
template class PipelineXLocalState<FakeSharedState>;
960
template class PipelineXLocalState<UnionSharedState>;
961
template class PipelineXLocalState<DataQueueSharedState>;
962
template class PipelineXLocalState<MultiCastSharedState>;
963
template class PipelineXLocalState<PartitionSortNodeSharedState>;
964
template class PipelineXLocalState<SetSharedState>;
965
template class PipelineXLocalState<LocalExchangeSharedState>;
966
template class PipelineXLocalState<BasicSharedState>;
967
template class PipelineXLocalState<RecCTESharedState>;
968
969
template class AsyncWriterSink<doris::VFileResultWriter, ResultFileSinkOperatorX>;
970
template class AsyncWriterSink<doris::VJdbcTableWriter, JdbcTableSinkOperatorX>;
971
template class AsyncWriterSink<doris::VTabletWriter, OlapTableSinkOperatorX>;
972
template class AsyncWriterSink<doris::VTabletWriterV2, OlapTableSinkV2OperatorX>;
973
template class AsyncWriterSink<doris::VHiveTableWriter, HiveTableSinkOperatorX>;
974
template class AsyncWriterSink<doris::VIcebergDeleteSink, IcebergDeleteSinkOperatorX>;
975
template class AsyncWriterSink<doris::VIcebergMergeSink, IcebergMergeSinkOperatorX>;
976
template class AsyncWriterSink<doris::VMCTableWriter, MCTableSinkOperatorX>;
977
template class AsyncWriterSink<doris::VTVFTableWriter, TVFTableSinkOperatorX>;
978
979
#ifdef BE_TEST
980
template class OperatorX<DummyOperatorLocalState>;
981
template class DataSinkOperatorX<DummySinkLocalState>;
982
#endif
983
984
} // namespace doris