Coverage Report

Created: 2026-08-28 11:16

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/partition_sort_sink_operator.h"
68
#include "exec/operator/partition_sort_source_operator.h"
69
#include "exec/operator/partitioned_aggregation_sink_operator.h"
70
#include "exec/operator/partitioned_aggregation_source_operator.h"
71
#include "exec/operator/partitioned_hash_join_probe_operator.h"
72
#include "exec/operator/partitioned_hash_join_sink_operator.h"
73
#include "exec/operator/rec_cte_anchor_sink_operator.h"
74
#include "exec/operator/rec_cte_scan_operator.h"
75
#include "exec/operator/rec_cte_sink_operator.h"
76
#include "exec/operator/rec_cte_source_operator.h"
77
#include "exec/operator/repeat_operator.h"
78
#include "exec/operator/result_file_sink_operator.h"
79
#include "exec/operator/result_sink_operator.h"
80
#include "exec/operator/schema_scan_operator.h"
81
#include "exec/operator/select_operator.h"
82
#include "exec/operator/set_probe_sink_operator.h"
83
#include "exec/operator/set_sink_operator.h"
84
#include "exec/operator/set_source_operator.h"
85
#include "exec/operator/sort_sink_operator.h"
86
#include "exec/operator/sort_source_operator.h"
87
#include "exec/operator/spill_iceberg_table_sink_operator.h"
88
#include "exec/operator/spill_sort_sink_operator.h"
89
#include "exec/operator/spill_sort_source_operator.h"
90
#include "exec/operator/streaming_aggregation_operator.h"
91
#include "exec/operator/table_function_operator.h"
92
#include "exec/operator/tvf_table_sink_operator.h"
93
#include "exec/operator/union_sink_operator.h"
94
#include "exec/operator/union_source_operator.h"
95
#include "exec/pipeline/dependency.h"
96
#include "exec/pipeline/pipeline.h"
97
#include "exprs/vexpr.h"
98
#include "exprs/vexpr_context.h"
99
#include "runtime/runtime_profile.h"
100
#include "runtime/runtime_profile_counter_names.h"
101
#include "util/debug_util.h"
102
#include "util/string_util.h"
103
104
namespace doris {
105
class RowDescriptor;
106
class RuntimeState;
107
} // namespace doris
108
109
namespace doris {
110
111
0
Status OperatorBase::close(RuntimeState* state) {
112
0
    if (_is_closed) {
113
0
        return Status::OK();
114
0
    }
115
0
    _is_closed = true;
116
0
    return Status::OK();
117
0
}
118
119
template <typename SharedStateArg>
120
1.51M
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
1.51M
    if (_parent->nereids_id() == -1) {
122
774k
        return fmt::format("(id={})", _parent->node_id());
123
774k
    } else {
124
740k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
740k
    }
126
1.51M
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
63.8k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
63.8k
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
63.8k
    } else {
124
63.8k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
63.8k
    }
126
63.8k
}
_ZNK5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
1
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
1
    if (_parent->nereids_id() == -1) {
122
1
        return fmt::format("(id={})", _parent->node_id());
123
1
    } else {
124
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
0
    }
126
1
}
_ZNK5doris19PipelineXLocalStateINS_15SortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
174k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
174k
    if (_parent->nereids_id() == -1) {
122
12
        return fmt::format("(id={})", _parent->node_id());
123
174k
    } else {
124
174k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
174k
    }
126
174k
}
_ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
22
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
22
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
22
    } else {
124
22
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
22
    }
126
22
}
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
5.23k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
5.23k
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
5.23k
    } else {
124
5.23k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
5.23k
    }
126
5.23k
}
_ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
7.23k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
7.23k
    if (_parent->nereids_id() == -1) {
122
11
        return fmt::format("(id={})", _parent->node_id());
123
7.22k
    } else {
124
7.22k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
7.22k
    }
126
7.23k
}
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
82.0k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
82.0k
    if (_parent->nereids_id() == -1) {
122
29
        return fmt::format("(id={})", _parent->node_id());
123
81.9k
    } else {
124
81.9k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
81.9k
    }
126
82.0k
}
_ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
68.5k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
68.5k
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
68.5k
    } else {
124
68.5k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
68.5k
    }
126
68.5k
}
_ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
120
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
120
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
120
    } else {
124
120
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
120
    }
126
120
}
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
518k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
518k
    if (_parent->nereids_id() == -1) {
122
235k
        return fmt::format("(id={})", _parent->node_id());
123
282k
    } else {
124
282k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
282k
    }
126
518k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
50.7k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
50.7k
    if (_parent->nereids_id() == -1) {
122
2
        return fmt::format("(id={})", _parent->node_id());
123
50.7k
    } else {
124
50.7k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
50.7k
    }
126
50.7k
}
_ZNK5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
26
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
26
    if (_parent->nereids_id() == -1) {
122
26
        return fmt::format("(id={})", _parent->node_id());
123
26
    } else {
124
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
0
    }
126
26
}
_ZNK5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
4.43k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
4.43k
    if (_parent->nereids_id() == -1) {
122
4.43k
        return fmt::format("(id={})", _parent->node_id());
123
18.4E
    } else {
124
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
18.4E
    }
126
4.43k
}
_ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
454
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
454
    if (_parent->nereids_id() == -1) {
122
102
        return fmt::format("(id={})", _parent->node_id());
123
352
    } else {
124
352
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
352
    }
126
454
}
_ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
4.89k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
4.89k
    if (_parent->nereids_id() == -1) {
122
13
        return fmt::format("(id={})", _parent->node_id());
123
4.88k
    } else {
124
4.88k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
4.88k
    }
126
4.89k
}
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
533k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
533k
    if (_parent->nereids_id() == -1) {
122
533k
        return fmt::format("(id={})", _parent->node_id());
123
18.4E
    } else {
124
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
18.4E
    }
126
533k
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
_ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
164
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
164
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
164
    } else {
124
164
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
164
    }
126
164
}
127
128
template <typename SharedStateArg>
129
1.05M
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
1.05M
    if (_parent->nereids_id() == -1) {
131
597k
        return fmt::format("(id={})", _parent->node_id());
132
597k
    } else {
133
456k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
456k
    }
135
1.05M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
112k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
112k
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
112k
    } else {
133
112k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
112k
    }
135
112k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
2
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
2
    if (_parent->nereids_id() == -1) {
131
1
        return fmt::format("(id={})", _parent->node_id());
132
1
    } else {
133
1
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
1
    }
135
2
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
176k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
176k
    if (_parent->nereids_id() == -1) {
131
9
        return fmt::format("(id={})", _parent->node_id());
132
176k
    } else {
133
176k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
176k
    }
135
176k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
29
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
29
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
29
    } else {
133
29
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
29
    }
135
29
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
5.27k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
5.27k
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
5.27k
    } else {
133
5.27k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
5.27k
    }
135
5.27k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
7.29k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
7.29k
    if (_parent->nereids_id() == -1) {
131
11
        return fmt::format("(id={})", _parent->node_id());
132
7.28k
    } else {
133
7.28k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
7.28k
    }
135
7.29k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
82.3k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
82.3k
    if (_parent->nereids_id() == -1) {
131
29
        return fmt::format("(id={})", _parent->node_id());
132
82.3k
    } else {
133
82.3k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
82.3k
    }
135
82.3k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
68.1k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
68.1k
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
68.1k
    } else {
133
68.1k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
68.1k
    }
135
68.1k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
130
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
130
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
130
    } else {
133
130
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
130
    }
135
130
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
24
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
24
    if (_parent->nereids_id() == -1) {
131
24
        return fmt::format("(id={})", _parent->node_id());
132
24
    } else {
133
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
0
    }
135
24
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
4.62k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
4.62k
    if (_parent->nereids_id() == -1) {
131
3
        return fmt::format("(id={})", _parent->node_id());
132
4.61k
    } else {
133
4.61k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
4.61k
    }
135
4.62k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
455
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
455
    if (_parent->nereids_id() == -1) {
131
102
        return fmt::format("(id={})", _parent->node_id());
132
353
    } else {
133
353
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
353
    }
135
455
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
12.4k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
12.4k
    if (_parent->nereids_id() == -1) {
131
12.4k
        return fmt::format("(id={})", _parent->node_id());
132
18.4E
    } else {
133
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
18.4E
    }
135
12.4k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
205k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
205k
    if (_parent->nereids_id() == -1) {
131
205k
        return fmt::format("(id={})", _parent->node_id());
132
18.4E
    } else {
133
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
18.4E
    }
135
205k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
379k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
380k
    if (_parent->nereids_id() == -1) {
131
380k
        return fmt::format("(id={})", _parent->node_id());
132
18.4E
    } else {
133
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
18.4E
    }
135
379k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
25
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
25
    if (_parent->nereids_id() == -1) {
131
25
        return fmt::format("(id={})", _parent->node_id());
132
25
    } else {
133
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
0
    }
135
25
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
328
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
328
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
328
    } else {
133
328
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
328
    }
135
328
}
136
137
template <typename SharedStateArg>
138
30.4k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
30.4k
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
30.4k
    _terminated = true;
143
30.4k
    return Status::OK();
144
30.4k
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
24.0k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
24.0k
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
24.0k
    _terminated = true;
143
24.0k
    return Status::OK();
144
24.0k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
2.34k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
2.34k
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
2.34k
    _terminated = true;
143
2.34k
    return Status::OK();
144
2.34k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
2
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
2
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
2
    _terminated = true;
143
2
    return Status::OK();
144
2
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
3
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
3
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
3
    _terminated = true;
143
3
    return Status::OK();
144
3
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
1.84k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
1.84k
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
1.84k
    _terminated = true;
143
1.84k
    return Status::OK();
144
1.84k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
1.01k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
1.01k
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
1.01k
    _terminated = true;
143
1.01k
    return Status::OK();
144
1.01k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
617
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
617
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
617
    _terminated = true;
143
617
    return Status::OK();
144
617
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
38
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
38
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
38
    _terminated = true;
143
38
    return Status::OK();
144
38
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
3
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
3
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
3
    _terminated = true;
143
3
    return Status::OK();
144
3
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
245
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
245
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
245
    _terminated = true;
143
245
    return Status::OK();
144
245
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
12
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
12
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
12
    _terminated = true;
143
12
    return Status::OK();
144
12
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
165
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
165
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
165
    _terminated = true;
143
165
    return Status::OK();
144
165
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
127
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
127
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
127
    _terminated = true;
143
127
    return Status::OK();
144
127
}
145
146
275k
DataDistribution OperatorBase::required_data_distribution(RuntimeState* /*state*/) const {
147
275k
    return _child && _child->is_serial_operator() && !is_source()
148
275k
                   ? DataDistribution(TLocalPartitionType::PASSTHROUGH)
149
275k
                   : DataDistribution(TLocalPartitionType::NOOP);
150
275k
}
151
152
22.2k
bool OperatorBase::child_breaks_local_key_distribution(RuntimeState* state) const {
153
22.2k
    if (!_child) {
154
20.9k
        return false;
155
20.9k
    }
156
1.25k
    if (_child->is_serial_operator()) {
157
139
        return true;
158
139
    }
159
1.11k
    const auto child_distribution = _child->required_data_distribution(state);
160
1.11k
    return child_distribution.need_local_exchange() &&
161
1.11k
           !is_shuffled_exchange(child_distribution.distribution_type);
162
1.25k
}
163
164
template <typename SharedStateArg>
165
18.8k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
166
18.8k
    fmt::memory_buffer debug_string_buffer;
167
18.8k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
168
18.8k
    return fmt::to_string(debug_string_buffer);
169
18.8k
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
165
8
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
166
8
    fmt::memory_buffer debug_string_buffer;
167
8
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
168
8
    return fmt::to_string(debug_string_buffer);
169
8
}
_ZNK5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
165
3
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
166
3
    fmt::memory_buffer debug_string_buffer;
167
3
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
168
3
    return fmt::to_string(debug_string_buffer);
169
3
}
_ZNK5doris19PipelineXLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
165
2
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
166
2
    fmt::memory_buffer debug_string_buffer;
167
2
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
168
2
    return fmt::to_string(debug_string_buffer);
169
2
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
165
2
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
166
2
    fmt::memory_buffer debug_string_buffer;
167
2
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
168
2
    return fmt::to_string(debug_string_buffer);
169
2
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
165
18.7k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
166
18.7k
    fmt::memory_buffer debug_string_buffer;
167
18.7k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
168
18.7k
    return fmt::to_string(debug_string_buffer);
169
18.7k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
165
1
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
166
1
    fmt::memory_buffer debug_string_buffer;
167
1
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
168
1
    return fmt::to_string(debug_string_buffer);
169
1
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
170
171
template <typename SharedStateArg>
172
18.7k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
18.7k
    fmt::memory_buffer debug_string_buffer;
174
18.7k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
18.7k
    return fmt::to_string(debug_string_buffer);
176
18.7k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
172
2
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
2
    fmt::memory_buffer debug_string_buffer;
174
2
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
2
    return fmt::to_string(debug_string_buffer);
176
2
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
172
2
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
2
    fmt::memory_buffer debug_string_buffer;
174
2
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
2
    return fmt::to_string(debug_string_buffer);
176
2
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
172
4
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
4
    fmt::memory_buffer debug_string_buffer;
174
4
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
4
    return fmt::to_string(debug_string_buffer);
176
4
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
172
18.7k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
18.7k
    fmt::memory_buffer debug_string_buffer;
174
18.7k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
18.7k
    return fmt::to_string(debug_string_buffer);
176
18.7k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
177
178
18.8k
std::string OperatorXBase::debug_string(int indentation_level) const {
179
18.8k
    fmt::memory_buffer debug_string_buffer;
180
18.8k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, parallel_tasks={}, _is_serial_operator={}",
181
18.8k
                   std::string(indentation_level * 2, ' '), _op_name, node_id(), _parallel_tasks,
182
18.8k
                   _is_serial_operator);
183
18.8k
    return fmt::to_string(debug_string_buffer);
184
18.8k
}
185
186
18.8k
std::string OperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
187
18.8k
    return state->get_local_state(operator_id())->debug_string(indentation_level);
188
18.8k
}
189
190
591k
Status OperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
191
591k
    std::string node_name = print_plan_node_type(tnode.node_type);
192
591k
    _nereids_id = tnode.nereids_id;
193
591k
    if (!tnode.intermediate_output_tuple_id_list.empty()) {
194
3.22k
        if (!has_projection()) {
195
0
            return Status::InternalError("no final output tuple id");
196
0
        }
197
3.22k
        if (tnode.intermediate_output_tuple_id_list.size() !=
198
3.22k
            tnode.intermediate_projections_list.size()) {
199
0
            return Status::InternalError(
200
0
                    "intermediate_output_tuple_id_list size:{} not match "
201
0
                    "intermediate_projections_list size:{}",
202
0
                    tnode.intermediate_output_tuple_id_list.size(),
203
0
                    tnode.intermediate_projections_list.size());
204
0
        }
205
3.22k
    }
206
591k
    auto substr = node_name.substr(0, node_name.find("_NODE"));
207
591k
    _op_name = substr + "_OPERATOR";
208
209
591k
    if (tnode.__isset.vconjunct) {
210
0
        return Status::InternalError("vconjunct is not supported yet");
211
591k
    } else if (tnode.__isset.conjuncts) {
212
253k
        for (const auto& conjunct : tnode.conjuncts) {
213
253k
            VExprContextSPtr context;
214
253k
            RETURN_IF_ERROR(VExpr::create_expr_tree(conjunct, context));
215
253k
            _conjuncts.emplace_back(context);
216
253k
        }
217
86.4k
    }
218
219
    // create the projections expr
220
591k
    if (tnode.__isset.projections) {
221
235k
        RETURN_IF_ERROR(VExpr::create_expr_trees(tnode.projections, _projection->projections));
222
235k
    }
223
591k
    if (!tnode.intermediate_projections_list.empty()) {
224
3.22k
        DCHECK(has_projection()) << "no final projections";
225
3.22k
        _projection->intermediate_projections.reserve(tnode.intermediate_projections_list.size());
226
4.29k
        for (const auto& tnode_projections : tnode.intermediate_projections_list) {
227
4.29k
            VExprContextSPtrs projections;
228
4.29k
            RETURN_IF_ERROR(VExpr::create_expr_trees(tnode_projections, projections));
229
4.29k
            _projection->intermediate_projections.push_back(projections);
230
4.29k
        }
231
3.22k
    }
232
591k
    return Status::OK();
233
591k
}
234
235
619k
Status OperatorXBase::prepare(RuntimeState* state) {
236
619k
    for (auto& conjunct : _conjuncts) {
237
253k
        RETURN_IF_ERROR(conjunct->prepare(state, operator_row_desc_before_projection()));
238
253k
    }
239
619k
    if (state->enable_adjust_conjunct_order_by_cost()) {
240
568k
        std::ranges::stable_sort(_conjuncts, [](const auto& a, const auto& b) {
241
328k
            return a->execute_cost() < b->execute_cost();
242
328k
        });
243
568k
    };
244
245
619k
    if (has_projection()) {
246
235k
        auto& projection = *_projection;
247
239k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
248
4.29k
            const auto& input_row_desc =
249
4.29k
                    i == 0 ? operator_row_desc_before_projection()
250
4.29k
                           : projection.intermediate_output_row_descriptors[i - 1];
251
4.29k
            RETURN_IF_ERROR(
252
4.29k
                    VExpr::prepare(projection.intermediate_projections[i], state, input_row_desc));
253
4.29k
        }
254
235k
        const auto& final_projection_input_row_desc =
255
235k
                projection.intermediate_output_row_descriptors.empty()
256
235k
                        ? operator_row_desc_before_projection()
257
235k
                        : projection.intermediate_output_row_descriptors.back();
258
235k
        RETURN_IF_ERROR(
259
235k
                VExpr::prepare(projection.projections, state, final_projection_input_row_desc));
260
235k
        RETURN_IF_ERROR(VExpr::check_expr_output_type(projection.projections,
261
235k
                                                      projection.output_row_descriptor));
262
235k
    }
263
264
619k
    for (auto& conjunct : _conjuncts) {
265
253k
        RETURN_IF_ERROR(conjunct->open(state));
266
253k
    }
267
619k
    if (has_projection()) {
268
235k
        RETURN_IF_ERROR(VExpr::open(_projection->projections, state));
269
235k
        for (auto& projections : _projection->intermediate_projections) {
270
4.29k
            RETURN_IF_ERROR(VExpr::open(projections, state));
271
4.29k
        }
272
235k
    }
273
619k
    if (_child && !is_source()) {
274
93.3k
        RETURN_IF_ERROR(_child->prepare(state));
275
93.3k
    }
276
277
619k
    if (VExpr::contains_blockable_function(_conjuncts) ||
278
619k
        (has_projection() && VExpr::contains_blockable_function(_projection->projections))) {
279
0
        _blockable = true;
280
0
    }
281
282
619k
    return Status::OK();
283
619k
}
284
285
7.04k
Status OperatorXBase::terminate(RuntimeState* state) {
286
7.04k
    if (_child && !is_source()) {
287
629
        RETURN_IF_ERROR(_child->terminate(state));
288
629
    }
289
7.04k
    auto result = state->get_local_state_result(operator_id());
290
7.04k
    if (!result) {
291
0
        return result.error();
292
0
    }
293
7.04k
    return result.value()->terminate(state);
294
7.04k
}
295
296
4.16M
Status OperatorXBase::close(RuntimeState* state) {
297
4.16M
    if (_child && !is_source()) {
298
691k
        RETURN_IF_ERROR(_child->close(state));
299
691k
    }
300
4.16M
    auto result = state->get_local_state_result(operator_id());
301
4.16M
    if (!result) {
302
0
        return result.error();
303
0
    }
304
4.16M
    return result.value()->close(state);
305
4.16M
}
306
307
244k
void PipelineXLocalStateBase::clear_origin_block() {
308
244k
    _origin_block.clear_column_data(
309
244k
            _parent->operator_row_desc_before_projection().num_materialized_slots());
310
244k
}
311
312
712k
Status PipelineXLocalStateBase::filter_block(const VExprContextSPtrs& expr_contexts, Block* block) {
313
712k
    RETURN_IF_ERROR(VExprContext::filter_block(expr_contexts, block, block->columns()));
314
315
712k
    _estimate_memory_usage += VExprContext::get_memory_usage(expr_contexts);
316
712k
    return Status::OK();
317
712k
}
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
244k
                                     Block* output_block) const {
326
244k
    auto* local_state = state->get_local_state(operator_id());
327
244k
    SCOPED_TIMER(local_state->exec_time_counter());
328
244k
    SCOPED_TIMER(local_state->_projection_timer);
329
244k
    const size_t rows = origin_block->rows();
330
244k
    if (rows == 0) {
331
125k
        return Status::OK();
332
125k
    }
333
119k
    SCOPED_PEAK_MEM(&local_state->_estimate_memory_usage);
334
335
119k
    {
336
119k
        Block input_block = *origin_block;
337
338
119k
        ColumnsWithTypeAndName new_columns;
339
119k
        for (const auto& projections : local_state->_intermediate_projections) {
340
1.43k
            if (projections.empty()) {
341
0
                return Status::InternalError("meet empty intermediate projection, node id: {}",
342
0
                                             node_id());
343
0
            }
344
1.43k
            new_columns.resize(projections.size());
345
8.94k
            for (int i = 0; i < projections.size(); i++) {
346
7.51k
                RETURN_IF_ERROR(projections[i]->execute(&input_block, new_columns[i]));
347
7.51k
                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
7.51k
            }
355
1.43k
            Block tmp_block {new_columns};
356
1.43k
            input_block.swap(tmp_block);
357
1.43k
        }
358
359
119k
        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
119k
        auto scoped_mutable_block = VectorizedUtils::build_scoped_mutable_mem_reuse_block(
367
119k
                output_block, _projection->output_row_descriptor);
368
119k
        auto& mutable_columns = scoped_mutable_block.mutable_columns();
369
119k
        DCHECK_EQ(mutable_columns.size(), local_state->_projections.size()) << debug_string();
370
119k
        Columns shared_columns(mutable_columns.size());
371
372
660k
        for (int i = 0; i < mutable_columns.size(); ++i) {
373
540k
            ColumnPtr column_ptr;
374
540k
            RETURN_IF_ERROR(local_state->_projections[i]->execute(&input_block, column_ptr));
375
540k
            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
540k
            column_ptr = column_ptr->convert_to_full_column_if_const();
382
540k
            if (is_column_nullable(*mutable_columns[i]) && !is_column_nullable(*column_ptr)) {
383
0
                column_ptr = make_nullable(column_ptr, false);
384
0
            }
385
540k
            if (column_ptr->is_exclusive()) {
386
197k
                mutable_columns[i] = IColumn::mutate(std::move(column_ptr));
387
343k
            } else {
388
343k
                shared_columns[i] = std::move(column_ptr);
389
343k
            }
390
540k
        }
391
392
119k
        scoped_mutable_block.restore();
393
660k
        for (int i = 0; i < shared_columns.size(); ++i) {
394
541k
            if (shared_columns[i]) {
395
343k
                output_block->replace_by_position(i, std::move(shared_columns[i]));
396
343k
            }
397
541k
        }
398
119k
    }
399
400
0
    origin_block->clear_column_data(
401
119k
            local_state->_parent->operator_row_desc_before_projection().num_materialized_slots());
402
119k
    DCHECK_EQ(output_block->rows(), rows);
403
404
119k
    return Status::OK();
405
119k
}
406
407
4.06M
Status OperatorXBase::get_block_after_projects(RuntimeState* state, Block* block, bool* eos) {
408
4.06M
    DBUG_EXECUTE_IF("Pipeline::return_empty_block", {
409
4.06M
        if (this->_op_name == "AGGREGATION_OPERATOR" || this->_op_name == "HASH_JOIN_OPERATOR" ||
410
4.06M
            this->_op_name == "PARTITIONED_AGGREGATION_OPERATOR" ||
411
4.06M
            this->_op_name == "PARTITIONED_HASH_JOIN_OPERATOR" ||
412
4.06M
            this->_op_name == "CROSS_JOIN_OPERATOR" || this->_op_name == "SORT_OPERATOR") {
413
4.06M
            if (_debug_point_count++ % 2 == 0) {
414
4.06M
                return Status::OK();
415
4.06M
            }
416
4.06M
        }
417
4.06M
    });
418
419
4.06M
    Status status;
420
4.06M
    auto* local_state = state->get_local_state(operator_id());
421
4.06M
    Defer defer([&]() {
422
4.06M
        if (status.ok()) {
423
4.06M
            local_state->update_output_block_counters(*block);
424
4.06M
        }
425
4.06M
    });
426
4.06M
    if (has_projection()) {
427
244k
        local_state->clear_origin_block();
428
244k
        status = get_block(state, &local_state->_origin_block, eos);
429
244k
        if (UNLIKELY(!status.ok())) {
430
26
            return status;
431
26
        }
432
244k
        status = do_projections(state, &local_state->_origin_block, block);
433
244k
        return status;
434
244k
    }
435
3.81M
    status = get_block(state, block, eos);
436
3.81M
    RETURN_IF_ERROR(block->check_type_and_column());
437
3.81M
    return status;
438
3.81M
}
439
440
2.47M
void PipelineXLocalStateBase::reached_limit(Block* block, bool* eos) {
441
2.47M
    if (_parent->_limit != -1 and _num_rows_returned + block->rows() >= _parent->_limit) {
442
3.44k
        block->set_num_rows(_parent->_limit - _num_rows_returned);
443
3.44k
        *eos = true;
444
3.44k
    }
445
446
2.47M
    DBUG_EXECUTE_IF("Pipeline::reached_limit_early", {
447
2.47M
        auto op_name = to_lower(_parent->_op_name);
448
2.47M
        auto arg_op_name = dp->param<std::string>("op_name");
449
2.47M
        arg_op_name = to_lower(arg_op_name);
450
451
2.47M
        if (op_name == arg_op_name) {
452
2.47M
            *eos = true;
453
2.47M
        }
454
2.47M
    });
455
456
2.47M
    if (auto rows = block->rows()) {
457
672k
        _num_rows_returned += rows;
458
672k
        _state->get_query_ctx()->resource_ctx()->io_context()->update_process_rows(rows);
459
672k
    }
460
2.47M
}
461
462
30.4k
Status DataSinkOperatorXBase::terminate(RuntimeState* state) {
463
30.4k
    auto result = state->get_sink_local_state_result();
464
30.4k
    if (!result) {
465
0
        return result.error();
466
0
    }
467
30.4k
    return result.value()->terminate(state);
468
30.4k
}
469
470
18.7k
std::string DataSinkOperatorXBase::debug_string(int indentation_level) const {
471
18.7k
    fmt::memory_buffer debug_string_buffer;
472
473
18.7k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, _is_serial_operator={}",
474
18.7k
                   std::string(indentation_level * 2, ' '), _name, node_id(), _is_serial_operator);
475
18.7k
    return fmt::to_string(debug_string_buffer);
476
18.7k
}
477
478
18.7k
std::string DataSinkOperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
479
18.7k
    return state->get_sink_local_state()->debug_string(indentation_level);
480
18.7k
}
481
482
312k
Status DataSinkOperatorXBase::init(const TDataSink& tsink) {
483
312k
    std::string op_name = "UNKNOWN_SINK";
484
312k
    auto it = _TDataSinkType_VALUES_TO_NAMES.find(tsink.type);
485
486
313k
    if (it != _TDataSinkType_VALUES_TO_NAMES.end()) {
487
313k
        op_name = it->second;
488
313k
    }
489
312k
    _name = op_name + "_OPERATOR";
490
312k
    return Status::OK();
491
312k
}
492
493
259k
Status DataSinkOperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
494
259k
    std::string op_name = print_plan_node_type(tnode.node_type);
495
259k
    _nereids_id = tnode.nereids_id;
496
259k
    auto substr = op_name.substr(0, op_name.find("_NODE"));
497
259k
    _name = substr + "_SINK_OPERATOR";
498
259k
    return Status::OK();
499
259k
}
500
501
template <typename LocalStateType>
502
Status DataSinkOperatorX<LocalStateType>::setup_local_state(RuntimeState* state,
503
1.48M
                                                            LocalSinkStateInfo& info) {
504
1.48M
    auto local_state = LocalStateType::create_unique(this, state);
505
1.48M
    RETURN_IF_ERROR(local_state->init(state, info));
506
1.48M
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
1.48M
    return Status::OK();
508
1.48M
}
_ZN5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
112k
                                                            LocalSinkStateInfo& info) {
504
112k
    auto local_state = LocalStateType::create_unique(this, state);
505
112k
    RETURN_IF_ERROR(local_state->init(state, info));
506
112k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
112k
    return Status::OK();
508
112k
}
_ZN5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
338k
                                                            LocalSinkStateInfo& info) {
504
338k
    auto local_state = LocalStateType::create_unique(this, state);
505
338k
    RETURN_IF_ERROR(local_state->init(state, info));
506
338k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
338k
    return Status::OK();
508
338k
}
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
361
                                                            LocalSinkStateInfo& info) {
504
361
    auto local_state = LocalStateType::create_unique(this, state);
505
361
    RETURN_IF_ERROR(local_state->init(state, info));
506
361
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
361
    return Status::OK();
508
361
}
_ZN5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
41.8k
                                                            LocalSinkStateInfo& info) {
504
41.8k
    auto local_state = LocalStateType::create_unique(this, state);
505
41.8k
    RETURN_IF_ERROR(local_state->init(state, info));
506
41.8k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
41.8k
    return Status::OK();
508
41.8k
}
_ZN5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
30
                                                            LocalSinkStateInfo& info) {
504
30
    auto local_state = LocalStateType::create_unique(this, state);
505
30
    RETURN_IF_ERROR(local_state->init(state, info));
506
30
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
30
    return Status::OK();
508
30
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE17setup_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
7.31k
                                                            LocalSinkStateInfo& info) {
504
7.31k
    auto local_state = LocalStateType::create_unique(this, state);
505
7.31k
    RETURN_IF_ERROR(local_state->init(state, info));
506
7.31k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
7.31k
    return Status::OK();
508
7.31k
}
_ZN5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
21
                                                            LocalSinkStateInfo& info) {
504
21
    auto local_state = LocalStateType::create_unique(this, state);
505
21
    RETURN_IF_ERROR(local_state->init(state, info));
506
21
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
21
    return Status::OK();
508
21
}
_ZN5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
176k
                                                            LocalSinkStateInfo& info) {
504
176k
    auto local_state = LocalStateType::create_unique(this, state);
505
176k
    RETURN_IF_ERROR(local_state->init(state, info));
506
176k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
176k
    return Status::OK();
508
176k
}
_ZN5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
29
                                                            LocalSinkStateInfo& info) {
504
29
    auto local_state = LocalStateType::create_unique(this, state);
505
29
    RETURN_IF_ERROR(local_state->init(state, info));
506
29
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
29
    return Status::OK();
508
29
}
_ZN5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
205k
                                                            LocalSinkStateInfo& info) {
504
205k
    auto local_state = LocalStateType::create_unique(this, state);
505
205k
    RETURN_IF_ERROR(local_state->init(state, info));
506
205k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
205k
    return Status::OK();
508
205k
}
_ZN5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
82.4k
                                                            LocalSinkStateInfo& info) {
504
82.4k
    auto local_state = LocalStateType::create_unique(this, state);
505
82.4k
    RETURN_IF_ERROR(local_state->init(state, info));
506
82.4k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
82.4k
    return Status::OK();
508
82.4k
}
_ZN5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
68.2k
                                                            LocalSinkStateInfo& info) {
504
68.2k
    auto local_state = LocalStateType::create_unique(this, state);
505
68.2k
    RETURN_IF_ERROR(local_state->init(state, info));
506
68.2k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
68.2k
    return Status::OK();
508
68.2k
}
_ZN5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
130
                                                            LocalSinkStateInfo& info) {
504
130
    auto local_state = LocalStateType::create_unique(this, state);
505
130
    RETURN_IF_ERROR(local_state->init(state, info));
506
130
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
130
    return Status::OK();
508
130
}
_ZN5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
425k
                                                            LocalSinkStateInfo& info) {
504
425k
    auto local_state = LocalStateType::create_unique(this, state);
505
425k
    RETURN_IF_ERROR(local_state->init(state, info));
506
425k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
425k
    return Status::OK();
508
425k
}
_ZN5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
5.29k
                                                            LocalSinkStateInfo& info) {
504
5.29k
    auto local_state = LocalStateType::create_unique(this, state);
505
5.29k
    RETURN_IF_ERROR(local_state->init(state, info));
506
5.29k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
5.29k
    return Status::OK();
508
5.29k
}
_ZN5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
4.61k
                                                            LocalSinkStateInfo& info) {
504
4.61k
    auto local_state = LocalStateType::create_unique(this, state);
505
4.61k
    RETURN_IF_ERROR(local_state->init(state, info));
506
4.61k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
4.61k
    return Status::OK();
508
4.61k
}
_ZN5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
1.80k
                                                            LocalSinkStateInfo& info) {
504
1.80k
    auto local_state = LocalStateType::create_unique(this, state);
505
1.80k
    RETURN_IF_ERROR(local_state->init(state, info));
506
1.80k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
1.80k
    return Status::OK();
508
1.80k
}
_ZN5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
354
                                                            LocalSinkStateInfo& info) {
504
354
    auto local_state = LocalStateType::create_unique(this, state);
505
354
    RETURN_IF_ERROR(local_state->init(state, info));
506
354
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
354
    return Status::OK();
508
354
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
4.77k
                                                            LocalSinkStateInfo& info) {
504
4.77k
    auto local_state = LocalStateType::create_unique(this, state);
505
4.77k
    RETURN_IF_ERROR(local_state->init(state, info));
506
4.77k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
4.77k
    return Status::OK();
508
4.77k
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.54k
                                                            LocalSinkStateInfo& info) {
504
2.54k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.54k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.54k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.54k
    return Status::OK();
508
2.54k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.59k
                                                            LocalSinkStateInfo& info) {
504
2.59k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.59k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.59k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.59k
    return Status::OK();
508
2.59k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.47k
                                                            LocalSinkStateInfo& info) {
504
2.47k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.47k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.47k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.47k
    return Status::OK();
508
2.47k
}
_ZN5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
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
564
                                                            LocalSinkStateInfo& info) {
504
564
    auto local_state = LocalStateType::create_unique(this, state);
505
564
    RETURN_IF_ERROR(local_state->init(state, info));
506
564
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
564
    return Status::OK();
508
564
}
_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
102
                                                            LocalSinkStateInfo& info) {
504
102
    auto local_state = LocalStateType::create_unique(this, state);
505
102
    RETURN_IF_ERROR(local_state->init(state, info));
506
102
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
102
    return Status::OK();
508
102
}
_ZN5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
164
                                                            LocalSinkStateInfo& info) {
504
164
    auto local_state = LocalStateType::create_unique(this, state);
505
164
    RETURN_IF_ERROR(local_state->init(state, info));
506
164
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
164
    return Status::OK();
508
164
}
_ZN5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
164
                                                            LocalSinkStateInfo& info) {
504
164
    auto local_state = LocalStateType::create_unique(this, state);
505
164
    RETURN_IF_ERROR(local_state->init(state, info));
506
164
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
164
    return Status::OK();
508
164
}
509
510
template <typename LocalStateType>
511
1.18M
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.18M
    } else {
519
1.18M
        auto ss = LocalStateType::SharedStateType::create_shared();
520
1.18M
        ss->id = operator_id();
521
1.18M
        for (auto& dest : dests_id()) {
522
1.17M
            ss->related_op_ids.insert(dest);
523
1.17M
        }
524
1.18M
        return ss;
525
1.18M
    }
526
1.18M
}
_ZNK5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
99.0k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
99.0k
    } else {
519
99.0k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
99.0k
        ss->id = operator_id();
521
99.0k
        for (auto& dest : dests_id()) {
522
98.9k
            ss->related_op_ids.insert(dest);
523
98.9k
        }
524
99.0k
        return ss;
525
99.0k
    }
526
99.0k
}
_ZNK5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
338k
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
338k
    } else {
519
338k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
338k
        ss->id = operator_id();
521
338k
        for (auto& dest : dests_id()) {
522
337k
            ss->related_op_ids.insert(dest);
523
337k
        }
524
338k
        return ss;
525
338k
    }
526
338k
}
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
361
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
361
    } else {
519
361
        auto ss = LocalStateType::SharedStateType::create_shared();
520
361
        ss->id = operator_id();
521
361
        for (auto& dest : dests_id()) {
522
361
            ss->related_op_ids.insert(dest);
523
361
        }
524
361
        return ss;
525
361
    }
526
361
}
_ZNK5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
41.9k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
41.9k
    } else {
519
41.9k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
41.9k
        ss->id = operator_id();
521
41.9k
        for (auto& dest : dests_id()) {
522
41.6k
            ss->related_op_ids.insert(dest);
523
41.6k
        }
524
41.9k
        return ss;
525
41.9k
    }
526
41.9k
}
_ZNK5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE19create_shared_stateEv
Line
Count
Source
511
30
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
30
    } else {
519
30
        auto ss = LocalStateType::SharedStateType::create_shared();
520
30
        ss->id = operator_id();
521
30
        for (auto& dest : dests_id()) {
522
30
            ss->related_op_ids.insert(dest);
523
30
        }
524
30
        return ss;
525
30
    }
526
30
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEE19create_shared_stateEv
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
7.31k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
7.31k
    } else {
519
7.31k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
7.31k
        ss->id = operator_id();
521
7.33k
        for (auto& dest : dests_id()) {
522
7.33k
            ss->related_op_ids.insert(dest);
523
7.33k
        }
524
7.31k
        return ss;
525
7.31k
    }
526
7.31k
}
_ZNK5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
21
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
21
    } else {
519
21
        auto ss = LocalStateType::SharedStateType::create_shared();
520
21
        ss->id = operator_id();
521
21
        for (auto& dest : dests_id()) {
522
21
            ss->related_op_ids.insert(dest);
523
21
        }
524
21
        return ss;
525
21
    }
526
21
}
_ZNK5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
176k
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
176k
    } else {
519
176k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
176k
        ss->id = operator_id();
521
176k
        for (auto& dest : dests_id()) {
522
176k
            ss->related_op_ids.insert(dest);
523
176k
        }
524
176k
        return ss;
525
176k
    }
526
176k
}
_ZNK5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
31
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
31
    } else {
519
31
        auto ss = LocalStateType::SharedStateType::create_shared();
520
31
        ss->id = operator_id();
521
31
        for (auto& dest : dests_id()) {
522
31
            ss->related_op_ids.insert(dest);
523
31
        }
524
31
        return ss;
525
31
    }
526
31
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
82.6k
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
82.6k
    } else {
519
82.6k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
82.6k
        ss->id = operator_id();
521
82.6k
        for (auto& dest : dests_id()) {
522
82.6k
            ss->related_op_ids.insert(dest);
523
82.6k
        }
524
82.6k
        return ss;
525
82.6k
    }
526
82.6k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
129
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
129
    } else {
519
129
        auto ss = LocalStateType::SharedStateType::create_shared();
520
129
        ss->id = operator_id();
521
129
        for (auto& dest : dests_id()) {
522
129
            ss->related_op_ids.insert(dest);
523
129
        }
524
129
        return ss;
525
129
    }
526
129
}
_ZNK5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
426k
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
426k
    } else {
519
426k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
426k
        ss->id = operator_id();
521
426k
        for (auto& dest : dests_id()) {
522
422k
            ss->related_op_ids.insert(dest);
523
422k
        }
524
426k
        return ss;
525
426k
    }
526
426k
}
_ZNK5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
5.30k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
5.30k
    } else {
519
5.30k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
5.30k
        ss->id = operator_id();
521
5.30k
        for (auto& dest : dests_id()) {
522
5.30k
            ss->related_op_ids.insert(dest);
523
5.30k
        }
524
5.30k
        return ss;
525
5.30k
    }
526
5.30k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
454
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
454
    } else {
519
454
        auto ss = LocalStateType::SharedStateType::create_shared();
520
454
        ss->id = operator_id();
521
455
        for (auto& dest : dests_id()) {
522
455
            ss->related_op_ids.insert(dest);
523
455
        }
524
454
        return ss;
525
454
    }
526
454
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE19create_shared_stateEv
Line
Count
Source
511
2.58k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
2.58k
    } else {
519
2.58k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
2.58k
        ss->id = operator_id();
521
2.59k
        for (auto& dest : dests_id()) {
522
2.59k
            ss->related_op_ids.insert(dest);
523
2.59k
        }
524
2.58k
        return ss;
525
2.58k
    }
526
2.58k
}
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE19create_shared_stateEv
Line
Count
Source
511
2.46k
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.46k
    } else {
519
2.46k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
2.46k
        ss->id = operator_id();
521
2.48k
        for (auto& dest : dests_id()) {
522
2.48k
            ss->related_op_ids.insert(dest);
523
2.48k
        }
524
2.46k
        return ss;
525
2.46k
    }
526
2.46k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
565
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
565
    } else {
519
565
        auto ss = LocalStateType::SharedStateType::create_shared();
520
565
        ss->id = operator_id();
521
565
        for (auto& dest : dests_id()) {
522
563
            ss->related_op_ids.insert(dest);
523
563
        }
524
565
        return ss;
525
565
    }
526
565
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
102
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
102
    } else {
519
102
        auto ss = LocalStateType::SharedStateType::create_shared();
520
102
        ss->id = operator_id();
521
102
        for (auto& dest : dests_id()) {
522
102
            ss->related_op_ids.insert(dest);
523
102
        }
524
102
        return ss;
525
102
    }
526
102
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE19create_shared_stateEv
527
528
template <typename LocalStateType>
529
1.75M
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.75M
    auto local_state = LocalStateType::create_unique(state, this);
531
1.75M
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.75M
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.75M
    return Status::OK();
534
1.75M
}
_ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
64.4k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
64.4k
    auto local_state = LocalStateType::create_unique(state, this);
531
64.4k
    RETURN_IF_ERROR(local_state->init(state, info));
532
64.4k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
64.4k
    return Status::OK();
534
64.4k
}
_ZN5doris9OperatorXINS_18OlapScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
231k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
231k
    auto local_state = LocalStateType::create_unique(state, this);
531
231k
    RETURN_IF_ERROR(local_state->init(state, info));
532
231k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
231k
    return Status::OK();
534
231k
}
_ZN5doris9OperatorXINS_21GroupCommitLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
119
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
119
    auto local_state = LocalStateType::create_unique(state, this);
531
119
    RETURN_IF_ERROR(local_state->init(state, info));
532
119
    state->emplace_local_state(operator_id(), std::move(local_state));
533
119
    return Status::OK();
534
119
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_18JDBCScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_18FileScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
3.08k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
3.08k
    auto local_state = LocalStateType::create_unique(state, this);
531
3.08k
    RETURN_IF_ERROR(local_state->init(state, info));
532
3.08k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
3.08k
    return Status::OK();
534
3.08k
}
_ZN5doris9OperatorXINS_18AnalyticLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
7.31k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
7.31k
    auto local_state = LocalStateType::create_unique(state, this);
531
7.31k
    RETURN_IF_ERROR(local_state->init(state, info));
532
7.31k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
7.31k
    return Status::OK();
534
7.31k
}
_ZN5doris9OperatorXINS_14SortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
7.21k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
7.21k
    auto local_state = LocalStateType::create_unique(state, this);
531
7.21k
    RETURN_IF_ERROR(local_state->init(state, info));
532
7.21k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
7.21k
    return Status::OK();
534
7.21k
}
_ZN5doris9OperatorXINS_19SpillSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
22
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
22
    auto local_state = LocalStateType::create_unique(state, this);
531
22
    RETURN_IF_ERROR(local_state->init(state, info));
532
22
    state->emplace_local_state(operator_id(), std::move(local_state));
533
22
    return Status::OK();
534
22
}
_ZN5doris9OperatorXINS_24LocalMergeSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
168k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
168k
    auto local_state = LocalStateType::create_unique(state, this);
531
168k
    RETURN_IF_ERROR(local_state->init(state, info));
532
168k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
168k
    return Status::OK();
534
168k
}
_ZN5doris9OperatorXINS_13AggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
82.4k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
82.4k
    auto local_state = LocalStateType::create_unique(state, this);
531
82.4k
    RETURN_IF_ERROR(local_state->init(state, info));
532
82.4k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
82.4k
    return Status::OK();
534
82.4k
}
_ZN5doris9OperatorXINS_21BucketedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
68.6k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
68.6k
    auto local_state = LocalStateType::create_unique(state, this);
531
68.6k
    RETURN_IF_ERROR(local_state->init(state, info));
532
68.6k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
68.6k
    return Status::OK();
534
68.6k
}
_ZN5doris9OperatorXINS_24PartitionedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
120
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
120
    auto local_state = LocalStateType::create_unique(state, this);
531
120
    RETURN_IF_ERROR(local_state->init(state, info));
532
120
    state->emplace_local_state(operator_id(), std::move(local_state));
533
120
    return Status::OK();
534
120
}
_ZN5doris9OperatorXINS_23TableFunctionLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
3.95k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
3.95k
    auto local_state = LocalStateType::create_unique(state, this);
531
3.95k
    RETURN_IF_ERROR(local_state->init(state, info));
532
3.95k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
3.95k
    return Status::OK();
534
3.95k
}
_ZN5doris9OperatorXINS_18ExchangeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
236k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
236k
    auto local_state = LocalStateType::create_unique(state, this);
531
236k
    RETURN_IF_ERROR(local_state->init(state, info));
532
236k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
236k
    return Status::OK();
534
236k
}
_ZN5doris9OperatorXINS_16RepeatLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.27k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.27k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.27k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.27k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.27k
    return Status::OK();
534
1.27k
}
_ZN5doris9OperatorXINS_29NestedLoopJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
5.27k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
5.27k
    auto local_state = LocalStateType::create_unique(state, this);
531
5.27k
    RETURN_IF_ERROR(local_state->init(state, info));
532
5.27k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
5.27k
    return Status::OK();
534
5.27k
}
_ZN5doris9OperatorXINS_23AssertNumRowsLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
27
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
27
    auto local_state = LocalStateType::create_unique(state, this);
531
27
    RETURN_IF_ERROR(local_state->init(state, info));
532
27
    state->emplace_local_state(operator_id(), std::move(local_state));
533
27
    return Status::OK();
534
27
}
_ZN5doris9OperatorXINS_18EmptySetLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.53k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.53k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.53k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.53k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.53k
    return Status::OK();
534
1.53k
}
_ZN5doris9OperatorXINS_21UnionSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
50.8k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
50.8k
    auto local_state = LocalStateType::create_unique(state, this);
531
50.8k
    RETURN_IF_ERROR(local_state->init(state, info));
532
50.8k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
50.8k
    return Status::OK();
534
50.8k
}
_ZN5doris9OperatorXINS_35MultiCastDataStreamSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
4.44k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
4.44k
    auto local_state = LocalStateType::create_unique(state, this);
531
4.44k
    RETURN_IF_ERROR(local_state->init(state, info));
532
4.44k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
4.44k
    return Status::OK();
534
4.44k
}
_ZN5doris9OperatorXINS_29PartitionSortSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
354
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
354
    auto local_state = LocalStateType::create_unique(state, this);
531
354
    RETURN_IF_ERROR(local_state->init(state, info));
532
354
    state->emplace_local_state(operator_id(), std::move(local_state));
533
354
    return Status::OK();
534
354
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.56k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.56k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.56k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.56k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.56k
    return Status::OK();
534
2.56k
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.45k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.45k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.45k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.45k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.45k
    return Status::OK();
534
2.45k
}
_ZN5doris9OperatorXINS_17DataGenLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
311
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
311
    auto local_state = LocalStateType::create_unique(state, this);
531
311
    RETURN_IF_ERROR(local_state->init(state, info));
532
311
    state->emplace_local_state(operator_id(), std::move(local_state));
533
311
    return Status::OK();
534
311
}
_ZN5doris9OperatorXINS_20SchemaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.58k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.58k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.58k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.58k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.58k
    return Status::OK();
534
1.58k
}
_ZN5doris9OperatorXINS_18MetaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
4.19k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
4.19k
    auto local_state = LocalStateType::create_unique(state, this);
531
4.19k
    RETURN_IF_ERROR(local_state->init(state, info));
532
4.19k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
4.19k
    return Status::OK();
534
4.19k
}
_ZN5doris9OperatorXINS_29LocalExchangeSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
538k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
538k
    auto local_state = LocalStateType::create_unique(state, this);
531
538k
    RETURN_IF_ERROR(local_state->init(state, info));
532
538k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
538k
    return Status::OK();
534
538k
}
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
164
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
164
    auto local_state = LocalStateType::create_unique(state, this);
531
164
    RETURN_IF_ERROR(local_state->init(state, info));
532
164
    state->emplace_local_state(operator_id(), std::move(local_state));
533
164
    return Status::OK();
534
164
}
_ZN5doris9OperatorXINS_20RecCTEScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.18k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.18k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.18k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.18k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.18k
    return Status::OK();
534
2.18k
}
_ZN5doris9OperatorXINS_25MaterializationLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
781
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
781
    auto local_state = LocalStateType::create_unique(state, this);
531
781
    RETURN_IF_ERROR(local_state->init(state, info));
532
781
    state->emplace_local_state(operator_id(), std::move(local_state));
533
781
    return Status::OK();
534
781
}
_ZN5doris9OperatorXINS_16SelectLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.05k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.05k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.05k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.05k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.05k
    return Status::OK();
534
1.05k
}
_ZN5doris9OperatorXINS_22StreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
5.49k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
5.49k
    auto local_state = LocalStateType::create_unique(state, this);
531
5.49k
    RETURN_IF_ERROR(local_state->init(state, info));
532
5.49k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
5.49k
    return Status::OK();
534
5.49k
}
_ZN5doris9OperatorXINS_30DistinctStreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
261k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
261k
    auto local_state = LocalStateType::create_unique(state, this);
531
261k
    RETURN_IF_ERROR(local_state->init(state, info));
532
261k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
261k
    return Status::OK();
534
261k
}
535
536
PipelineXSinkLocalStateBase::PipelineXSinkLocalStateBase(DataSinkOperatorXBase* parent,
537
                                                         RuntimeState* state)
538
1.47M
        : _parent(parent), _state(state) {}
539
540
PipelineXLocalStateBase::PipelineXLocalStateBase(RuntimeState* state, OperatorXBase* parent)
541
1.75M
        : _num_rows_returned(0),
542
1.75M
          _rows_returned_counter(nullptr),
543
1.75M
          _parent(parent),
544
1.75M
          _state(state),
545
1.75M
          _budget(state->batch_size(), state->preferred_block_size_bytes()) {}
546
547
template <typename SharedStateArg>
548
1.75M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
1.75M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
1.75M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
1.75M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
1.75M
    _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.75M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
1.75M
    _operator_profile->add_child(_common_profile.get(), true);
557
1.75M
    _operator_profile->add_child(_custom_profile.get(), true);
558
1.75M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
1.75M
    if constexpr (!is_fake_shared) {
560
1.00M
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
617k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
617k
                                    .first.get()
563
617k
                                    ->template cast<SharedStateArg>();
564
565
617k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
617k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
617k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
617k
        } else if (info.shared_state) {
569
327k
            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
327k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
327k
            _dependency = _shared_state->create_source_dependency(
576
327k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
327k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
327k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
327k
        } else {
580
59.9k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
3.89k
                DCHECK(false);
582
3.89k
            }
583
59.9k
        }
584
1.00M
    }
585
586
1.75M
    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.75M
    _rows_returned_counter =
591
1.75M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
1.75M
    _blocks_returned_counter =
593
1.75M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
1.75M
    _output_block_bytes_counter =
595
1.75M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
1.75M
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
1.75M
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
1.75M
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
1.75M
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
1.75M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
1.75M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
1.75M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
1.75M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
1.75M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
1.75M
    _memory_used_counter =
606
1.75M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
1.75M
    _common_profile->add_info_string("IsColocate",
608
1.75M
                                     std::to_string(_parent->is_colocated_operator()));
609
1.75M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
1.75M
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
1.75M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
1.75M
    return Status::OK();
613
1.75M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
64.5k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
64.5k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
64.5k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
64.5k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
64.5k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
64.5k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
64.5k
    _operator_profile->add_child(_common_profile.get(), true);
557
64.5k
    _operator_profile->add_child(_custom_profile.get(), true);
558
64.5k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
64.5k
    if constexpr (!is_fake_shared) {
560
64.5k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
13.2k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
13.2k
                                    .first.get()
563
13.2k
                                    ->template cast<SharedStateArg>();
564
565
13.2k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
13.2k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
13.2k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
51.2k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
50.6k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
50.6k
            _dependency = _shared_state->create_source_dependency(
576
50.6k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
50.6k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
50.6k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
50.6k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
674
        }
584
64.5k
    }
585
586
64.5k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
64.5k
    _rows_returned_counter =
591
64.5k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
64.5k
    _blocks_returned_counter =
593
64.5k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
64.5k
    _output_block_bytes_counter =
595
64.5k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
64.5k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
64.5k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
64.5k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
64.5k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
64.5k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
64.5k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
64.5k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
64.5k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
64.5k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
64.5k
    _memory_used_counter =
606
64.5k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
64.5k
    _common_profile->add_info_string("IsColocate",
608
64.5k
                                     std::to_string(_parent->is_colocated_operator()));
609
64.5k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
64.5k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
64.5k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
64.5k
    return Status::OK();
613
64.5k
}
_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
176k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
176k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
176k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
176k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
176k
    _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
176k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
176k
    _operator_profile->add_child(_common_profile.get(), true);
557
176k
    _operator_profile->add_child(_custom_profile.get(), true);
558
176k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
176k
    if constexpr (!is_fake_shared) {
560
176k
        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
176k
        } 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
171k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
171k
            _dependency = _shared_state->create_source_dependency(
576
171k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
171k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
171k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
171k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
5.07k
        }
584
176k
    }
585
586
176k
    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
176k
    _rows_returned_counter =
591
176k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
176k
    _blocks_returned_counter =
593
176k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
176k
    _output_block_bytes_counter =
595
176k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
176k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
176k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
176k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
176k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
176k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
176k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
176k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
176k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
176k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
176k
    _memory_used_counter =
606
176k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
176k
    _common_profile->add_info_string("IsColocate",
608
176k
                                     std::to_string(_parent->is_colocated_operator()));
609
176k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
176k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
176k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
176k
    return Status::OK();
613
176k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
22
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
22
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
22
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
22
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
22
    _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
22
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
22
    _operator_profile->add_child(_common_profile.get(), true);
557
22
    _operator_profile->add_child(_custom_profile.get(), true);
558
22
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
22
    if constexpr (!is_fake_shared) {
560
22
        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
22
        } 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
22
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
22
            _dependency = _shared_state->create_source_dependency(
576
22
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
22
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
22
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
22
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
22
    }
585
586
22
    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
22
    _rows_returned_counter =
591
22
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
22
    _blocks_returned_counter =
593
22
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
22
    _output_block_bytes_counter =
595
22
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
22
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
22
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
22
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
22
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
22
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
22
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
22
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
22
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
22
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
22
    _memory_used_counter =
606
22
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
22
    _common_profile->add_info_string("IsColocate",
608
22
                                     std::to_string(_parent->is_colocated_operator()));
609
22
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
22
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
22
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
22
    return Status::OK();
613
22
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
5.26k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
5.26k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
5.26k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
5.26k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
5.26k
    _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.26k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
5.26k
    _operator_profile->add_child(_common_profile.get(), true);
557
5.26k
    _operator_profile->add_child(_custom_profile.get(), true);
558
5.26k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
5.26k
    if constexpr (!is_fake_shared) {
560
5.26k
        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.26k
        } 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.19k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
5.19k
            _dependency = _shared_state->create_source_dependency(
576
5.19k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
5.19k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
5.19k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
5.19k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
69
        }
584
5.26k
    }
585
586
5.26k
    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.26k
    _rows_returned_counter =
591
5.26k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
5.26k
    _blocks_returned_counter =
593
5.26k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
5.26k
    _output_block_bytes_counter =
595
5.26k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
5.26k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
5.26k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
5.26k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
5.26k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
5.26k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
5.26k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
5.26k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
5.26k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
5.26k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
5.26k
    _memory_used_counter =
606
5.26k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
5.26k
    _common_profile->add_info_string("IsColocate",
608
5.26k
                                     std::to_string(_parent->is_colocated_operator()));
609
5.26k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
5.26k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
5.26k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
5.26k
    return Status::OK();
613
5.26k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
7.33k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
7.33k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
7.33k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
7.33k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
7.33k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
7.33k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
7.33k
    _operator_profile->add_child(_common_profile.get(), true);
557
7.33k
    _operator_profile->add_child(_custom_profile.get(), true);
558
7.33k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
7.33k
    if constexpr (!is_fake_shared) {
560
7.33k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
7.33k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
7.22k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
7.22k
            _dependency = _shared_state->create_source_dependency(
576
7.22k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
7.22k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
7.22k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
7.22k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
101
        }
584
7.33k
    }
585
586
7.33k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
7.33k
    _rows_returned_counter =
591
7.33k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
7.33k
    _blocks_returned_counter =
593
7.33k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
7.33k
    _output_block_bytes_counter =
595
7.33k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
7.33k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
7.33k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
7.33k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
7.33k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
7.33k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
7.33k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
7.33k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
7.33k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
7.33k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
7.33k
    _memory_used_counter =
606
7.33k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
7.33k
    _common_profile->add_info_string("IsColocate",
608
7.33k
                                     std::to_string(_parent->is_colocated_operator()));
609
7.33k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
7.33k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
7.33k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
7.33k
    return Status::OK();
613
7.33k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
82.7k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
82.7k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
82.7k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
82.7k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
82.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
82.7k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
82.7k
    _operator_profile->add_child(_common_profile.get(), true);
557
82.7k
    _operator_profile->add_child(_custom_profile.get(), true);
558
82.7k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
82.7k
    if constexpr (!is_fake_shared) {
560
82.7k
        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
82.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
81.4k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
81.4k
            _dependency = _shared_state->create_source_dependency(
576
81.4k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
81.4k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
81.4k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
81.4k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
1.23k
        }
584
82.7k
    }
585
586
82.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
82.7k
    _rows_returned_counter =
591
82.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
82.7k
    _blocks_returned_counter =
593
82.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
82.7k
    _output_block_bytes_counter =
595
82.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
82.7k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
82.7k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
82.7k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
82.7k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
82.7k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
82.7k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
82.7k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
82.7k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
82.7k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
82.7k
    _memory_used_counter =
606
82.7k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
82.7k
    _common_profile->add_info_string("IsColocate",
608
82.7k
                                     std::to_string(_parent->is_colocated_operator()));
609
82.7k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
82.7k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
82.7k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
82.7k
    return Status::OK();
613
82.7k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
68.6k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
68.6k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
68.6k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
68.6k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
68.6k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
68.6k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
68.6k
    _operator_profile->add_child(_common_profile.get(), true);
557
68.6k
    _operator_profile->add_child(_custom_profile.get(), true);
558
68.6k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
68.6k
    if constexpr (!is_fake_shared) {
560
68.6k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
68.6k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
68.6k
                                    .first.get()
563
68.6k
                                    ->template cast<SharedStateArg>();
564
565
68.6k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
68.6k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
68.6k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
68.6k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
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
43
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
43
        }
584
68.6k
    }
585
586
68.6k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
68.6k
    _rows_returned_counter =
591
68.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
68.6k
    _blocks_returned_counter =
593
68.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
68.6k
    _output_block_bytes_counter =
595
68.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
68.6k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
68.6k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
68.6k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
68.6k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
68.6k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
68.6k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
68.6k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
68.6k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
68.6k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
68.6k
    _memory_used_counter =
606
68.6k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
68.6k
    _common_profile->add_info_string("IsColocate",
608
68.6k
                                     std::to_string(_parent->is_colocated_operator()));
609
68.6k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
68.6k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
68.6k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
68.6k
    return Status::OK();
613
68.6k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
120
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
120
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
120
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
120
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
120
    _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
120
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
120
    _operator_profile->add_child(_common_profile.get(), true);
557
120
    _operator_profile->add_child(_custom_profile.get(), true);
558
120
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
120
    if constexpr (!is_fake_shared) {
560
120
        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
120
        } 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
120
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
120
            _dependency = _shared_state->create_source_dependency(
576
120
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
120
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
120
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
120
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
120
    }
585
586
120
    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
120
    _rows_returned_counter =
591
120
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
120
    _blocks_returned_counter =
593
120
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
120
    _output_block_bytes_counter =
595
120
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
120
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
120
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
120
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
120
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
120
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
120
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
120
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
120
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
120
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
120
    _memory_used_counter =
606
120
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
120
    _common_profile->add_info_string("IsColocate",
608
120
                                     std::to_string(_parent->is_colocated_operator()));
609
120
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
120
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
120
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
120
    return Status::OK();
613
120
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
752k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
752k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
752k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
752k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
752k
    _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
752k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
752k
    _operator_profile->add_child(_common_profile.get(), true);
557
752k
    _operator_profile->add_child(_custom_profile.get(), true);
558
752k
    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
752k
    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
752k
    _rows_returned_counter =
591
752k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
752k
    _blocks_returned_counter =
593
752k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
752k
    _output_block_bytes_counter =
595
752k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
752k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
752k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
752k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
752k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
752k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
752k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
752k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
752k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
752k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
752k
    _memory_used_counter =
606
752k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
752k
    _common_profile->add_info_string("IsColocate",
608
752k
                                     std::to_string(_parent->is_colocated_operator()));
609
752k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
752k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
752k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
752k
    return Status::OK();
613
752k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
50.7k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
50.7k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
50.7k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
50.7k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
50.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
50.7k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
50.7k
    _operator_profile->add_child(_common_profile.get(), true);
557
50.7k
    _operator_profile->add_child(_custom_profile.get(), true);
558
50.7k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
50.7k
    if constexpr (!is_fake_shared) {
560
50.7k
        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
50.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
2.19k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
2.19k
            _dependency = _shared_state->create_source_dependency(
576
2.19k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
2.19k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
2.19k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
48.5k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
48.5k
        }
584
50.7k
    }
585
586
50.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
50.7k
    _rows_returned_counter =
591
50.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
50.7k
    _blocks_returned_counter =
593
50.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
50.7k
    _output_block_bytes_counter =
595
50.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
50.7k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
50.7k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
50.7k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
50.7k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
50.7k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
50.7k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
50.7k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
50.7k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
50.7k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
50.7k
    _memory_used_counter =
606
50.7k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
50.7k
    _common_profile->add_info_string("IsColocate",
608
50.7k
                                     std::to_string(_parent->is_colocated_operator()));
609
50.7k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
50.7k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
50.7k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
50.7k
    return Status::OK();
613
50.7k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
26
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
26
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
26
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
26
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
26
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
26
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
26
    _operator_profile->add_child(_common_profile.get(), true);
557
26
    _operator_profile->add_child(_custom_profile.get(), true);
558
26
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
26
    if constexpr (!is_fake_shared) {
560
26
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
26
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
26
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
26
            _dependency = _shared_state->create_source_dependency(
576
26
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
26
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
26
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
26
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
26
    }
585
586
26
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
26
    _rows_returned_counter =
591
26
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
26
    _blocks_returned_counter =
593
26
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
26
    _output_block_bytes_counter =
595
26
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
26
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
26
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
26
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
26
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
26
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
26
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
26
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
26
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
26
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
26
    _memory_used_counter =
606
26
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
26
    _common_profile->add_info_string("IsColocate",
608
26
                                     std::to_string(_parent->is_colocated_operator()));
609
26
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
26
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
26
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
26
    return Status::OK();
613
26
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
4.44k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
4.44k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
4.44k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
4.44k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
4.44k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
4.44k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
4.44k
    _operator_profile->add_child(_common_profile.get(), true);
557
4.44k
    _operator_profile->add_child(_custom_profile.get(), true);
558
4.44k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
4.44k
    if constexpr (!is_fake_shared) {
560
4.44k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
4.44k
        } 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.42k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
4.42k
            _dependency = _shared_state->create_source_dependency(
576
4.42k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
4.42k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
4.42k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
4.42k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
23
        }
584
4.44k
    }
585
586
4.44k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
4.44k
    _rows_returned_counter =
591
4.44k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
4.44k
    _blocks_returned_counter =
593
4.44k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
4.44k
    _output_block_bytes_counter =
595
4.44k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
4.44k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
4.44k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
4.44k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
4.44k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
4.44k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
4.44k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
4.44k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
4.44k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
4.44k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
4.44k
    _memory_used_counter =
606
4.44k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
4.44k
    _common_profile->add_info_string("IsColocate",
608
4.44k
                                     std::to_string(_parent->is_colocated_operator()));
609
4.44k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
4.44k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
4.44k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
4.44k
    return Status::OK();
613
4.44k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
456
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
456
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
456
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
456
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
456
    _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
456
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
456
    _operator_profile->add_child(_common_profile.get(), true);
557
456
    _operator_profile->add_child(_custom_profile.get(), true);
558
456
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
456
    if constexpr (!is_fake_shared) {
560
456
        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
456
        } 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
456
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
456
            _dependency = _shared_state->create_source_dependency(
576
456
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
456
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
456
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
456
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
456
    }
585
586
456
    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
456
    _rows_returned_counter =
591
456
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
456
    _blocks_returned_counter =
593
456
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
456
    _output_block_bytes_counter =
595
456
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
456
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
456
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
456
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
456
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
456
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
456
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
456
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
456
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
456
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
456
    _memory_used_counter =
606
456
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
456
    _common_profile->add_info_string("IsColocate",
608
456
                                     std::to_string(_parent->is_colocated_operator()));
609
456
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
456
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
456
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
456
    return Status::OK();
613
456
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
5.09k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
5.09k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
5.09k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
5.09k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
5.09k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
5.09k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
5.09k
    _operator_profile->add_child(_common_profile.get(), true);
557
5.09k
    _operator_profile->add_child(_custom_profile.get(), true);
558
5.09k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
5.09k
    if constexpr (!is_fake_shared) {
560
5.09k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
5.09k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
4.75k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
4.75k
            _dependency = _shared_state->create_source_dependency(
576
4.75k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
4.75k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
4.75k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
4.75k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
335
        }
584
5.09k
    }
585
586
5.09k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
5.09k
    _rows_returned_counter =
591
5.09k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
5.09k
    _blocks_returned_counter =
593
5.09k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
5.09k
    _output_block_bytes_counter =
595
5.09k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
5.09k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
5.09k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
5.09k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
5.09k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
5.09k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
5.09k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
5.09k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
5.09k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
5.09k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
5.09k
    _memory_used_counter =
606
5.09k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
5.09k
    _common_profile->add_info_string("IsColocate",
608
5.09k
                                     std::to_string(_parent->is_colocated_operator()));
609
5.09k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
5.09k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
5.09k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
5.09k
    return Status::OK();
613
5.09k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
539k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
539k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
539k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
539k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
539k
    _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
539k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
539k
    _operator_profile->add_child(_common_profile.get(), true);
557
539k
    _operator_profile->add_child(_custom_profile.get(), true);
558
539k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
539k
    if constexpr (!is_fake_shared) {
560
539k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
536k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
536k
                                    .first.get()
563
536k
                                    ->template cast<SharedStateArg>();
564
565
536k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
536k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
536k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
536k
        } 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
3.89k
        } else {
580
3.89k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
3.89k
                DCHECK(false);
582
3.89k
            }
583
3.89k
        }
584
539k
    }
585
586
539k
    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
539k
    _rows_returned_counter =
591
539k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
539k
    _blocks_returned_counter =
593
539k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
539k
    _output_block_bytes_counter =
595
539k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
539k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
539k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
539k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
539k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
539k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
539k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
539k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
539k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
539k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
539k
    _memory_used_counter =
606
539k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
539k
    _common_profile->add_info_string("IsColocate",
608
539k
                                     std::to_string(_parent->is_colocated_operator()));
609
539k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
539k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
539k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
539k
    return Status::OK();
613
539k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
164
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
164
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
164
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
164
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
164
    _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
164
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
164
    _operator_profile->add_child(_common_profile.get(), true);
557
164
    _operator_profile->add_child(_custom_profile.get(), true);
558
164
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
164
    if constexpr (!is_fake_shared) {
560
164
        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
164
        } 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
164
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
164
            _dependency = _shared_state->create_source_dependency(
576
164
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
164
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
164
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
164
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
164
    }
585
586
164
    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
164
    _rows_returned_counter =
591
164
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
164
    _blocks_returned_counter =
593
164
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
164
    _output_block_bytes_counter =
595
164
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
164
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
164
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
164
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
164
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
164
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
164
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
164
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
164
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
164
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
164
    _memory_used_counter =
606
164
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
164
    _common_profile->add_info_string("IsColocate",
608
164
                                     std::to_string(_parent->is_colocated_operator()));
609
164
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
164
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
164
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
164
    return Status::OK();
613
164
}
614
615
template <typename SharedStateArg>
616
1.76M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
1.76M
    _conjuncts.resize(_parent->_conjuncts.size());
618
2.04M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
279k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
279k
    }
621
1.76M
    if (_parent->has_projection()) {
622
344k
        const auto& projection = *_parent->_projection;
623
344k
        _projections.resize(projection.projections.size());
624
2.14M
        for (size_t i = 0; i < _projections.size(); i++) {
625
1.80M
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
1.80M
        }
627
344k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
352k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
7.40k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
45.4k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
38.0k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
38.0k
                        state, _intermediate_projections[i][j]));
633
38.0k
            }
634
7.40k
        }
635
344k
    }
636
1.76M
    return Status::OK();
637
1.76M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
64.7k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
64.7k
    _conjuncts.resize(_parent->_conjuncts.size());
618
65.5k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
788
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
788
    }
621
64.7k
    if (_parent->has_projection()) {
622
64.7k
        const auto& projection = *_parent->_projection;
623
64.7k
        _projections.resize(projection.projections.size());
624
338k
        for (size_t i = 0; i < _projections.size(); i++) {
625
273k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
273k
        }
627
64.7k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
65.6k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
841
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
6.57k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
5.73k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
5.73k
                        state, _intermediate_projections[i][j]));
633
5.73k
            }
634
841
        }
635
64.7k
    }
636
64.7k
    return Status::OK();
637
64.7k
}
_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
177k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
177k
    _conjuncts.resize(_parent->_conjuncts.size());
618
177k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
177k
    if (_parent->has_projection()) {
622
74
        const auto& projection = *_parent->_projection;
623
74
        _projections.resize(projection.projections.size());
624
366
        for (size_t i = 0; i < _projections.size(); i++) {
625
292
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
292
        }
627
74
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
74
        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
74
    }
636
177k
    return Status::OK();
637
177k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
22
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
22
    _conjuncts.resize(_parent->_conjuncts.size());
618
22
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
22
    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
22
    return Status::OK();
637
22
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
5.31k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
5.31k
    _conjuncts.resize(_parent->_conjuncts.size());
618
5.38k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
61
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
61
    }
621
5.32k
    if (_parent->has_projection()) {
622
5.32k
        const auto& projection = *_parent->_projection;
623
5.32k
        _projections.resize(projection.projections.size());
624
26.3k
        for (size_t i = 0; i < _projections.size(); i++) {
625
21.0k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
21.0k
        }
627
5.32k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
5.33k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
10
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
69
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
59
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
59
                        state, _intermediate_projections[i][j]));
633
59
            }
634
10
        }
635
5.32k
    }
636
5.31k
    return Status::OK();
637
5.31k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
7.37k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
7.37k
    _conjuncts.resize(_parent->_conjuncts.size());
618
8.06k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
687
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
687
    }
621
7.37k
    if (_parent->has_projection()) {
622
4.18k
        const auto& projection = *_parent->_projection;
623
4.18k
        _projections.resize(projection.projections.size());
624
17.1k
        for (size_t i = 0; i < _projections.size(); i++) {
625
12.9k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
12.9k
        }
627
4.18k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
4.30k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
113
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
867
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
754
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
754
                        state, _intermediate_projections[i][j]));
633
754
            }
634
113
        }
635
4.18k
    }
636
7.37k
    return Status::OK();
637
7.37k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
82.8k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
82.8k
    _conjuncts.resize(_parent->_conjuncts.size());
618
84.4k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
1.61k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1.61k
    }
621
82.8k
    if (_parent->has_projection()) {
622
26.9k
        const auto& projection = *_parent->_projection;
623
26.9k
        _projections.resize(projection.projections.size());
624
240k
        for (size_t i = 0; i < _projections.size(); i++) {
625
213k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
213k
        }
627
26.9k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
27.1k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
229
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
1.80k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
1.57k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
1.57k
                        state, _intermediate_projections[i][j]));
633
1.57k
            }
634
229
        }
635
26.9k
    }
636
82.8k
    return Status::OK();
637
82.8k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
68.6k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
68.6k
    _conjuncts.resize(_parent->_conjuncts.size());
618
68.7k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
7
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
7
    }
621
68.6k
    if (_parent->has_projection()) {
622
133
        const auto& projection = *_parent->_projection;
623
133
        _projections.resize(projection.projections.size());
624
458
        for (size_t i = 0; i < _projections.size(); i++) {
625
325
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
325
        }
627
133
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
133
        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
133
    }
636
68.6k
    return Status::OK();
637
68.6k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
124
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
124
    _conjuncts.resize(_parent->_conjuncts.size());
618
124
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
124
    if (_parent->has_projection()) {
622
110
        const auto& projection = *_parent->_projection;
623
110
        _projections.resize(projection.projections.size());
624
330
        for (size_t i = 0; i < _projections.size(); i++) {
625
220
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
220
        }
627
110
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
110
        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
110
    }
636
124
    return Status::OK();
637
124
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
756k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
756k
    _conjuncts.resize(_parent->_conjuncts.size());
618
1.03M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
275k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
275k
    }
621
756k
    if (_parent->has_projection()) {
622
233k
        const auto& projection = *_parent->_projection;
623
233k
        _projections.resize(projection.projections.size());
624
1.42M
        for (size_t i = 0; i < _projections.size(); i++) {
625
1.19M
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
1.19M
        }
627
233k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
239k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
6.21k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
36.1k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
29.9k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
29.9k
                        state, _intermediate_projections[i][j]));
633
29.9k
            }
634
6.21k
        }
635
233k
    }
636
756k
    return Status::OK();
637
756k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
51.0k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
51.0k
    _conjuncts.resize(_parent->_conjuncts.size());
618
51.0k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
51.0k
    if (_parent->has_projection()) {
622
9.69k
        const auto& projection = *_parent->_projection;
623
9.69k
        _projections.resize(projection.projections.size());
624
94.8k
        for (size_t i = 0; i < _projections.size(); i++) {
625
85.1k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
85.1k
        }
627
9.69k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
9.69k
        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
9.69k
    }
636
51.0k
    return Status::OK();
637
51.0k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
25
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
25
    _conjuncts.resize(_parent->_conjuncts.size());
618
25
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
25
    if (_parent->has_projection()) {
622
0
        const auto& projection = *_parent->_projection;
623
0
        _projections.resize(projection.projections.size());
624
0
        for (size_t i = 0; i < _projections.size(); i++) {
625
0
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
0
        }
627
0
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
0
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
0
    }
636
25
    return Status::OK();
637
25
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
4.43k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
4.43k
    _conjuncts.resize(_parent->_conjuncts.size());
618
4.97k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
540
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
540
    }
621
4.43k
    if (_parent->has_projection()) {
622
0
        const auto& projection = *_parent->_projection;
623
0
        _projections.resize(projection.projections.size());
624
0
        for (size_t i = 0; i < _projections.size(); i++) {
625
0
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
0
        }
627
0
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
0
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
0
    }
636
4.43k
    return Status::OK();
637
4.43k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
455
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
455
    _conjuncts.resize(_parent->_conjuncts.size());
618
455
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
455
    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
455
    return Status::OK();
637
455
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
5.15k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
5.15k
    _conjuncts.resize(_parent->_conjuncts.size());
618
5.15k
    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.15k
    if (_parent->has_projection()) {
622
60
        const auto& projection = *_parent->_projection;
623
60
        _projections.resize(projection.projections.size());
624
228
        for (size_t i = 0; i < _projections.size(); i++) {
625
168
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
168
        }
627
60
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
60
        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
60
    }
636
5.15k
    return Status::OK();
637
5.15k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
543k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
543k
    _conjuncts.resize(_parent->_conjuncts.size());
618
543k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
543k
    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
543k
    return Status::OK();
637
543k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4openEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
164
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
164
    _conjuncts.resize(_parent->_conjuncts.size());
618
171
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
7
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
7
    }
621
164
    if (_parent->has_projection()) {
622
161
        const auto& projection = *_parent->_projection;
623
161
        _projections.resize(projection.projections.size());
624
480
        for (size_t i = 0; i < _projections.size(); i++) {
625
319
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
319
        }
627
161
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
164
        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
161
    }
636
164
    return Status::OK();
637
164
}
638
639
template <typename SharedStateArg>
640
7.04k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
7.04k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
7.04k
    _terminated = true;
645
7.04k
    return Status::OK();
646
7.04k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
285
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
285
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
285
    _terminated = true;
645
285
    return Status::OK();
646
285
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
16
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
16
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
16
    _terminated = true;
645
16
    return Status::OK();
646
16
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
33
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
33
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
33
    _terminated = true;
645
33
    return Status::OK();
646
33
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
119
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
119
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
119
    _terminated = true;
645
119
    return Status::OK();
646
119
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
2
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
2
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
2
    _terminated = true;
645
2
    return Status::OK();
646
2
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
5.57k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
5.57k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
5.57k
    _terminated = true;
645
5.57k
    return Status::OK();
646
5.57k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
16
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
16
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
16
    _terminated = true;
645
16
    return Status::OK();
646
16
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
3
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
3
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
3
    _terminated = true;
645
3
    return Status::OK();
646
3
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
241
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
241
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
241
    _terminated = true;
645
241
    return Status::OK();
646
241
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
723
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
723
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
723
    _terminated = true;
645
723
    return Status::OK();
646
723
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
32
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
32
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
32
    _terminated = true;
645
32
    return Status::OK();
646
32
}
647
648
template <typename SharedStateArg>
649
1.97M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
1.97M
    if (_closed) {
651
205k
        return Status::OK();
652
205k
    }
653
1.76M
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
1.00M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
1.00M
    }
656
1.76M
    _closed = true;
657
1.76M
    return Status::OK();
658
1.97M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
64.7k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
64.7k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
64.7k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
64.7k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
64.7k
    }
656
64.7k
    _closed = true;
657
64.7k
    return Status::OK();
658
64.7k
}
_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
352k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
352k
    if (_closed) {
651
176k
        return Status::OK();
652
176k
    }
653
175k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
175k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
175k
    }
656
175k
    _closed = true;
657
175k
    return Status::OK();
658
352k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
22
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
22
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
22
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
22
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
22
    }
656
22
    _closed = true;
657
22
    return Status::OK();
658
22
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
5.31k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
5.31k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
5.31k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
5.31k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
5.31k
    }
656
5.31k
    _closed = true;
657
5.31k
    return Status::OK();
658
5.31k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
14.9k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
14.9k
    if (_closed) {
651
7.56k
        return Status::OK();
652
7.56k
    }
653
7.36k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
7.36k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
7.36k
    }
656
7.36k
    _closed = true;
657
7.36k
    return Status::OK();
658
14.9k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
82.6k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
82.6k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
82.6k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
82.6k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
82.6k
    }
656
82.6k
    _closed = true;
657
82.6k
    return Status::OK();
658
82.6k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
68.4k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
68.4k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
68.4k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
68.4k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
68.4k
    }
656
68.4k
    _closed = true;
657
68.4k
    return Status::OK();
658
68.4k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
119
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
119
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
119
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
119
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
119
    }
656
119
    _closed = true;
657
119
    return Status::OK();
658
119
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
772k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
772k
    if (_closed) {
651
15.3k
        return Status::OK();
652
15.3k
    }
653
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
    }
656
756k
    _closed = true;
657
756k
    return Status::OK();
658
772k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
51.0k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
51.0k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
51.0k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
51.0k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
51.0k
    }
656
51.0k
    _closed = true;
657
51.0k
    return Status::OK();
658
51.0k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
28
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
28
    if (_closed) {
651
14
        return Status::OK();
652
14
    }
653
14
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
14
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
14
    }
656
14
    _closed = true;
657
14
    return Status::OK();
658
28
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
4.41k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
4.41k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
4.41k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
4.41k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
4.41k
    }
656
4.41k
    _closed = true;
657
4.41k
    return Status::OK();
658
4.41k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
705
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
705
    if (_closed) {
651
352
        return Status::OK();
652
352
    }
653
353
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
353
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
353
    }
656
353
    _closed = true;
657
353
    return Status::OK();
658
705
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
10.5k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
10.5k
    if (_closed) {
651
5.41k
        return Status::OK();
652
5.41k
    }
653
5.14k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
5.14k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
5.14k
    }
656
5.14k
    _closed = true;
657
5.14k
    return Status::OK();
658
10.5k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
544k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
544k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
544k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
544k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
544k
    }
656
544k
    _closed = true;
657
544k
    return Status::OK();
658
544k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
326
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
326
    if (_closed) {
651
171
        return Status::OK();
652
171
    }
653
155
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
155
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
155
    }
656
155
    _closed = true;
657
155
    return Status::OK();
658
326
}
659
660
template <typename SharedState>
661
1.48M
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
1.48M
    _operator_profile =
664
1.48M
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
1.48M
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
1.48M
    _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.48M
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
1.48M
    _operator_profile->add_child(_common_profile, true);
673
1.48M
    _operator_profile->add_child(_custom_profile, true);
674
675
1.48M
    _operator_profile->set_metadata(_parent->node_id());
676
1.48M
    _wait_for_finish_dependency_timer =
677
1.48M
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
1.48M
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
1.48M
    if constexpr (!is_fake_shared) {
680
1.05M
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
1.05M
            info.shared_state_map.end()) {
682
287k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
205k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
205k
            }
685
287k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
287k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
287k
                                                  ? 0
688
287k
                                                  : info.task_idx]
689
287k
                                  .get();
690
287k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
771k
        } else {
692
18.4E
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
18.4E
                DCHECK(false);
694
18.4E
            }
695
771k
            _shared_state = info.shared_state->template cast<SharedState>();
696
771k
            _dependency = _shared_state->create_sink_dependency(
697
771k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
771k
        }
699
1.05M
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
1.05M
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
1.05M
    }
702
703
1.48M
    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.48M
    _rows_input_counter =
708
1.48M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
1.48M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
1.48M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
1.48M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
1.48M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
1.48M
    _memory_used_counter =
714
1.48M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
1.48M
    _common_profile->add_info_string("IsColocate",
716
1.48M
                                     std::to_string(_parent->is_colocated_operator()));
717
1.48M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
1.48M
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
1.48M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
1.48M
    return Status::OK();
721
1.48M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
112k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
112k
    _operator_profile =
664
112k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
112k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
112k
    _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
112k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
112k
    _operator_profile->add_child(_common_profile, true);
673
112k
    _operator_profile->add_child(_custom_profile, true);
674
675
112k
    _operator_profile->set_metadata(_parent->node_id());
676
112k
    _wait_for_finish_dependency_timer =
677
112k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
112k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
112k
    if constexpr (!is_fake_shared) {
680
112k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
112k
            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
13.5k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
13.5k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
13.5k
                                                  ? 0
688
13.5k
                                                  : info.task_idx]
689
13.5k
                                  .get();
690
13.5k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
98.8k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
98.8k
            _shared_state = info.shared_state->template cast<SharedState>();
696
98.8k
            _dependency = _shared_state->create_sink_dependency(
697
98.8k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
98.8k
        }
699
112k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
112k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
112k
    }
702
703
112k
    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
112k
    _rows_input_counter =
708
112k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
112k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
112k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
112k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
112k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
112k
    _memory_used_counter =
714
112k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
112k
    _common_profile->add_info_string("IsColocate",
716
112k
                                     std::to_string(_parent->is_colocated_operator()));
717
112k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
112k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
112k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
112k
    return Status::OK();
721
112k
}
_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
176k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
176k
    _operator_profile =
664
176k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
176k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
176k
    _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
176k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
176k
    _operator_profile->add_child(_common_profile, true);
673
176k
    _operator_profile->add_child(_custom_profile, true);
674
675
176k
    _operator_profile->set_metadata(_parent->node_id());
676
176k
    _wait_for_finish_dependency_timer =
677
176k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
176k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
176k
    if constexpr (!is_fake_shared) {
680
176k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
176k
            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
176k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
176k
            _shared_state = info.shared_state->template cast<SharedState>();
696
176k
            _dependency = _shared_state->create_sink_dependency(
697
176k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
176k
        }
699
176k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
176k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
176k
    }
702
703
176k
    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
176k
    _rows_input_counter =
708
176k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
176k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
176k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
176k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
176k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
176k
    _memory_used_counter =
714
176k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
176k
    _common_profile->add_info_string("IsColocate",
716
176k
                                     std::to_string(_parent->is_colocated_operator()));
717
176k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
176k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
176k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
176k
    return Status::OK();
721
176k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
29
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
29
    _operator_profile =
664
29
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
29
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
29
    _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
29
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
29
    _operator_profile->add_child(_common_profile, true);
673
29
    _operator_profile->add_child(_custom_profile, true);
674
675
29
    _operator_profile->set_metadata(_parent->node_id());
676
29
    _wait_for_finish_dependency_timer =
677
29
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
29
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
29
    if constexpr (!is_fake_shared) {
680
29
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
29
            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
29
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
29
            _shared_state = info.shared_state->template cast<SharedState>();
696
29
            _dependency = _shared_state->create_sink_dependency(
697
29
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
29
        }
699
29
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
29
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
29
    }
702
703
29
    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
29
    _rows_input_counter =
708
29
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
29
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
29
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
29
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
29
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
29
    _memory_used_counter =
714
29
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
29
    _common_profile->add_info_string("IsColocate",
716
29
                                     std::to_string(_parent->is_colocated_operator()));
717
29
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
29
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
29
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
29
    return Status::OK();
721
29
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
5.29k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
5.29k
    _operator_profile =
664
5.29k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
5.29k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
5.29k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
5.29k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
5.29k
    _operator_profile->add_child(_common_profile, true);
673
5.29k
    _operator_profile->add_child(_custom_profile, true);
674
675
5.29k
    _operator_profile->set_metadata(_parent->node_id());
676
5.29k
    _wait_for_finish_dependency_timer =
677
5.29k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
5.29k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
5.29k
    if constexpr (!is_fake_shared) {
680
5.29k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
5.29k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
5.29k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
5.29k
            _shared_state = info.shared_state->template cast<SharedState>();
696
5.29k
            _dependency = _shared_state->create_sink_dependency(
697
5.29k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
5.29k
        }
699
5.29k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
5.29k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
5.29k
    }
702
703
5.29k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
5.29k
    _rows_input_counter =
708
5.29k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
5.29k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
5.29k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
5.29k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
5.29k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
5.29k
    _memory_used_counter =
714
5.29k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
5.29k
    _common_profile->add_info_string("IsColocate",
716
5.29k
                                     std::to_string(_parent->is_colocated_operator()));
717
5.29k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
5.29k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
5.29k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
5.29k
    return Status::OK();
721
5.29k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
7.32k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
7.32k
    _operator_profile =
664
7.32k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
7.32k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
7.32k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
7.32k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
7.32k
    _operator_profile->add_child(_common_profile, true);
673
7.32k
    _operator_profile->add_child(_custom_profile, true);
674
675
7.32k
    _operator_profile->set_metadata(_parent->node_id());
676
7.32k
    _wait_for_finish_dependency_timer =
677
7.32k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
7.32k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
7.32k
    if constexpr (!is_fake_shared) {
680
7.32k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
7.32k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
7.32k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
7.32k
            _shared_state = info.shared_state->template cast<SharedState>();
696
7.32k
            _dependency = _shared_state->create_sink_dependency(
697
7.32k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
7.32k
        }
699
7.32k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
7.32k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
7.32k
    }
702
703
7.32k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
7.32k
    _rows_input_counter =
708
7.32k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
7.32k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
7.32k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
7.32k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
7.32k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
7.32k
    _memory_used_counter =
714
7.32k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
7.32k
    _common_profile->add_info_string("IsColocate",
716
7.32k
                                     std::to_string(_parent->is_colocated_operator()));
717
7.32k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
7.32k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
7.32k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
7.32k
    return Status::OK();
721
7.32k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
82.6k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
82.6k
    _operator_profile =
664
82.6k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
82.6k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
82.6k
    _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
82.6k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
82.6k
    _operator_profile->add_child(_common_profile, true);
673
82.6k
    _operator_profile->add_child(_custom_profile, true);
674
675
82.6k
    _operator_profile->set_metadata(_parent->node_id());
676
82.6k
    _wait_for_finish_dependency_timer =
677
82.6k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
82.6k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
82.6k
    if constexpr (!is_fake_shared) {
680
82.6k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
82.6k
            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
82.6k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
82.6k
            _shared_state = info.shared_state->template cast<SharedState>();
696
82.6k
            _dependency = _shared_state->create_sink_dependency(
697
82.6k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
82.6k
        }
699
82.6k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
82.6k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
82.6k
    }
702
703
82.6k
    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
82.6k
    _rows_input_counter =
708
82.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
82.6k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
82.6k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
82.6k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
82.6k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
82.6k
    _memory_used_counter =
714
82.6k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
82.6k
    _common_profile->add_info_string("IsColocate",
716
82.6k
                                     std::to_string(_parent->is_colocated_operator()));
717
82.6k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
82.6k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
82.6k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
82.6k
    return Status::OK();
721
82.6k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
68.5k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
68.5k
    _operator_profile =
664
68.5k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
68.5k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
68.5k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
68.5k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
68.5k
    _operator_profile->add_child(_common_profile, true);
673
68.5k
    _operator_profile->add_child(_custom_profile, true);
674
675
68.5k
    _operator_profile->set_metadata(_parent->node_id());
676
68.5k
    _wait_for_finish_dependency_timer =
677
68.5k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
68.5k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
68.5k
    if constexpr (!is_fake_shared) {
680
68.5k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
68.6k
            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
68.6k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
68.6k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
68.6k
                                                  ? 0
688
68.6k
                                                  : info.task_idx]
689
68.6k
                                  .get();
690
68.6k
            _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
68.5k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
68.5k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
68.5k
    }
702
703
68.5k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
68.5k
    _rows_input_counter =
708
68.5k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
68.5k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
68.5k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
68.5k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
68.5k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
68.5k
    _memory_used_counter =
714
68.5k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
68.5k
    _common_profile->add_info_string("IsColocate",
716
68.5k
                                     std::to_string(_parent->is_colocated_operator()));
717
68.5k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
68.5k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
68.5k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
68.5k
    return Status::OK();
721
68.5k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
130
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
130
    _operator_profile =
664
130
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
130
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
130
    _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
130
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
130
    _operator_profile->add_child(_common_profile, true);
673
130
    _operator_profile->add_child(_custom_profile, true);
674
675
130
    _operator_profile->set_metadata(_parent->node_id());
676
130
    _wait_for_finish_dependency_timer =
677
130
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
130
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
130
    if constexpr (!is_fake_shared) {
680
130
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
130
            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
130
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
130
            _shared_state = info.shared_state->template cast<SharedState>();
696
130
            _dependency = _shared_state->create_sink_dependency(
697
130
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
130
        }
699
130
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
130
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
130
    }
702
703
130
    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
130
    _rows_input_counter =
708
130
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
130
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
130
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
130
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
130
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
130
    _memory_used_counter =
714
130
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
130
    _common_profile->add_info_string("IsColocate",
716
130
                                     std::to_string(_parent->is_colocated_operator()));
717
130
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
130
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
130
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
130
    return Status::OK();
721
130
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
426k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
426k
    _operator_profile =
664
426k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
426k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
426k
    _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
426k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
426k
    _operator_profile->add_child(_common_profile, true);
673
426k
    _operator_profile->add_child(_custom_profile, true);
674
675
426k
    _operator_profile->set_metadata(_parent->node_id());
676
426k
    _wait_for_finish_dependency_timer =
677
426k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
426k
    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
426k
    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
426k
    _rows_input_counter =
708
426k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
426k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
426k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
426k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
426k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
426k
    _memory_used_counter =
714
426k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
426k
    _common_profile->add_info_string("IsColocate",
716
426k
                                     std::to_string(_parent->is_colocated_operator()));
717
426k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
426k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
426k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
426k
    return Status::OK();
721
426k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
4.63k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
4.63k
    _operator_profile =
664
4.63k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
4.63k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
4.63k
    _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
4.63k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
4.63k
    _operator_profile->add_child(_common_profile, true);
673
4.63k
    _operator_profile->add_child(_custom_profile, true);
674
675
4.63k
    _operator_profile->set_metadata(_parent->node_id());
676
4.63k
    _wait_for_finish_dependency_timer =
677
4.63k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
4.63k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
4.63k
    if constexpr (!is_fake_shared) {
680
4.63k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
4.63k
            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
4.63k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
4.63k
            _shared_state = info.shared_state->template cast<SharedState>();
696
4.63k
            _dependency = _shared_state->create_sink_dependency(
697
4.63k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
4.63k
        }
699
4.63k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
4.63k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
4.63k
    }
702
703
4.63k
    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
4.63k
    _rows_input_counter =
708
4.63k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
4.63k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
4.63k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
4.63k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
4.63k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
4.63k
    _memory_used_counter =
714
4.63k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
4.63k
    _common_profile->add_info_string("IsColocate",
716
4.63k
                                     std::to_string(_parent->is_colocated_operator()));
717
4.63k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
4.63k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
4.63k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
4.63k
    return Status::OK();
721
4.63k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
456
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
456
    _operator_profile =
664
456
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
456
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
456
    _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
456
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
456
    _operator_profile->add_child(_common_profile, true);
673
456
    _operator_profile->add_child(_custom_profile, true);
674
675
456
    _operator_profile->set_metadata(_parent->node_id());
676
456
    _wait_for_finish_dependency_timer =
677
456
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
456
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
456
    if constexpr (!is_fake_shared) {
680
456
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
456
            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
456
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
456
            _shared_state = info.shared_state->template cast<SharedState>();
696
456
            _dependency = _shared_state->create_sink_dependency(
697
456
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
456
        }
699
456
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
456
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
456
    }
702
703
456
    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
456
    _rows_input_counter =
708
456
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
456
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
456
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
456
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
456
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
456
    _memory_used_counter =
714
456
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
456
    _common_profile->add_info_string("IsColocate",
716
456
                                     std::to_string(_parent->is_colocated_operator()));
717
456
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
456
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
456
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
456
    return Status::OK();
721
456
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
1.79k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
1.79k
    _operator_profile =
664
1.79k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
1.79k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
1.79k
    _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.79k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
1.79k
    _operator_profile->add_child(_common_profile, true);
673
1.79k
    _operator_profile->add_child(_custom_profile, true);
674
675
1.79k
    _operator_profile->set_metadata(_parent->node_id());
676
1.79k
    _wait_for_finish_dependency_timer =
677
1.79k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
1.79k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
1.79k
    if constexpr (!is_fake_shared) {
680
1.79k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
1.79k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
1.79k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
1.79k
            _shared_state = info.shared_state->template cast<SharedState>();
696
1.79k
            _dependency = _shared_state->create_sink_dependency(
697
1.79k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
1.79k
        }
699
1.79k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
1.79k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
1.79k
    }
702
703
1.79k
    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.79k
    _rows_input_counter =
708
1.79k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
1.79k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
1.79k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
1.79k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
1.79k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
1.79k
    _memory_used_counter =
714
1.79k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
1.79k
    _common_profile->add_info_string("IsColocate",
716
1.79k
                                     std::to_string(_parent->is_colocated_operator()));
717
1.79k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
1.79k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
1.79k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
1.79k
    return Status::OK();
721
1.79k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
12.4k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
12.4k
    _operator_profile =
664
12.4k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
12.4k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
12.4k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
12.4k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
12.4k
    _operator_profile->add_child(_common_profile, true);
673
12.4k
    _operator_profile->add_child(_custom_profile, true);
674
675
12.4k
    _operator_profile->set_metadata(_parent->node_id());
676
12.4k
    _wait_for_finish_dependency_timer =
677
12.4k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
12.4k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
12.4k
    if constexpr (!is_fake_shared) {
680
12.4k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
12.4k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
12.4k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
12.4k
            _shared_state = info.shared_state->template cast<SharedState>();
696
12.4k
            _dependency = _shared_state->create_sink_dependency(
697
12.4k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
12.4k
        }
699
12.4k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
12.4k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
12.4k
    }
702
703
12.4k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
12.4k
    _rows_input_counter =
708
12.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
12.4k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
12.4k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
12.4k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
12.4k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
12.4k
    _memory_used_counter =
714
12.4k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
12.4k
    _common_profile->add_info_string("IsColocate",
716
12.4k
                                     std::to_string(_parent->is_colocated_operator()));
717
12.4k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
12.4k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
12.4k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
12.4k
    return Status::OK();
721
12.4k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
205k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
205k
    _operator_profile =
664
205k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
205k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
205k
    _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
205k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
205k
    _operator_profile->add_child(_common_profile, true);
673
205k
    _operator_profile->add_child(_custom_profile, true);
674
675
205k
    _operator_profile->set_metadata(_parent->node_id());
676
205k
    _wait_for_finish_dependency_timer =
677
205k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
205k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
205k
    if constexpr (!is_fake_shared) {
680
205k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
205k
            info.shared_state_map.end()) {
682
205k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
205k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
205k
            }
685
205k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
205k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
205k
                                                  ? 0
688
205k
                                                  : info.task_idx]
689
205k
                                  .get();
690
205k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
18.4E
        } else {
692
18.4E
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
18.4E
                DCHECK(false);
694
18.4E
            }
695
18.4E
            _shared_state = info.shared_state->template cast<SharedState>();
696
18.4E
            _dependency = _shared_state->create_sink_dependency(
697
18.4E
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
18.4E
        }
699
205k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
205k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
205k
    }
702
703
205k
    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
205k
    _rows_input_counter =
708
205k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
205k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
205k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
205k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
205k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
205k
    _memory_used_counter =
714
205k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
205k
    _common_profile->add_info_string("IsColocate",
716
205k
                                     std::to_string(_parent->is_colocated_operator()));
717
205k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
205k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
205k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
205k
    return Status::OK();
721
205k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
381k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
381k
    _operator_profile =
664
381k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
381k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
381k
    _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
381k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
381k
    _operator_profile->add_child(_common_profile, true);
673
381k
    _operator_profile->add_child(_custom_profile, true);
674
675
381k
    _operator_profile->set_metadata(_parent->node_id());
676
381k
    _wait_for_finish_dependency_timer =
677
381k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
381k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
381k
    if constexpr (!is_fake_shared) {
680
381k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
381k
            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
381k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
381k
            _shared_state = info.shared_state->template cast<SharedState>();
696
381k
            _dependency = _shared_state->create_sink_dependency(
697
381k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
381k
        }
699
381k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
381k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
381k
    }
702
703
381k
    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
381k
    _rows_input_counter =
708
381k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
381k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
381k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
381k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
381k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
381k
    _memory_used_counter =
714
381k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
381k
    _common_profile->add_info_string("IsColocate",
716
381k
                                     std::to_string(_parent->is_colocated_operator()));
717
381k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
381k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
381k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
381k
    return Status::OK();
721
381k
}
_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
328
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
328
    _operator_profile =
664
328
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
328
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
328
    _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
328
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
328
    _operator_profile->add_child(_common_profile, true);
673
328
    _operator_profile->add_child(_custom_profile, true);
674
675
328
    _operator_profile->set_metadata(_parent->node_id());
676
328
    _wait_for_finish_dependency_timer =
677
328
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
328
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
328
    if constexpr (!is_fake_shared) {
680
328
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
328
            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
328
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
328
            _shared_state = info.shared_state->template cast<SharedState>();
696
328
            _dependency = _shared_state->create_sink_dependency(
697
328
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
328
        }
699
328
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
328
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
328
    }
702
703
328
    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
328
    _rows_input_counter =
708
328
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
328
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
328
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
328
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
328
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
328
    _memory_used_counter =
714
328
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
328
    _common_profile->add_info_string("IsColocate",
716
328
                                     std::to_string(_parent->is_colocated_operator()));
717
328
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
328
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
328
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
328
    return Status::OK();
721
328
}
722
723
template <typename SharedState>
724
1.49M
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
1.49M
    if (_closed) {
726
2
        return Status::OK();
727
2
    }
728
1.49M
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
1.06M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
1.06M
    }
731
1.49M
    _closed = true;
732
1.49M
    return Status::OK();
733
1.49M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
112k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
112k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
112k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
112k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
112k
    }
731
112k
    _closed = true;
732
112k
    return Status::OK();
733
112k
}
_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
176k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
176k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
176k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
176k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
176k
    }
731
176k
    _closed = true;
732
176k
    return Status::OK();
733
176k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
20
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
20
    if (_closed) {
726
2
        return Status::OK();
727
2
    }
728
18
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
18
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
18
    }
731
18
    _closed = true;
732
18
    return Status::OK();
733
20
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
5.30k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
5.30k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
5.30k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
5.30k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
5.30k
    }
731
5.30k
    _closed = true;
732
5.30k
    return Status::OK();
733
5.30k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
7.34k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
7.34k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
7.34k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
7.34k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
7.34k
    }
731
7.34k
    _closed = true;
732
7.34k
    return Status::OK();
733
7.34k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
82.4k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
82.4k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
82.4k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
82.4k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
82.4k
    }
731
82.4k
    _closed = true;
732
82.4k
    return Status::OK();
733
82.4k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
68.4k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
68.4k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
68.4k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
68.4k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
68.4k
    }
731
68.4k
    _closed = true;
732
68.4k
    return Status::OK();
733
68.4k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
119
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
119
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
119
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
119
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
119
    }
731
119
    _closed = true;
732
119
    return Status::OK();
733
119
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
429k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
429k
    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
429k
    _closed = true;
732
429k
    return Status::OK();
733
429k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
4.65k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
4.65k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
4.65k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
4.65k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
4.65k
    }
731
4.65k
    _closed = true;
732
4.65k
    return Status::OK();
733
4.65k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
354
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
354
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
354
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
354
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
354
    }
731
354
    _closed = true;
732
354
    return Status::OK();
733
354
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
1.81k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
1.81k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
1.81k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
1.81k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
1.81k
    }
731
1.81k
    _closed = true;
732
1.81k
    return Status::OK();
733
1.81k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
12.4k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
12.4k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
12.4k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
12.4k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
12.4k
    }
731
12.4k
    _closed = true;
732
12.4k
    return Status::OK();
733
12.4k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
206k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
206k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
206k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
206k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
206k
    }
731
206k
    _closed = true;
732
206k
    return Status::OK();
733
206k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
383k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
383k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
383k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
383k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
383k
    }
731
383k
    _closed = true;
732
383k
    return Status::OK();
733
383k
}
_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
328
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
328
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
328
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
328
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
328
    }
731
328
    _closed = true;
732
328
    return Status::OK();
733
328
}
734
735
template <typename LocalStateType>
736
Status StreamingOperatorX<LocalStateType>::get_block_impl(RuntimeState* state, Block* block,
737
7.28k
                                                          bool* eos) {
738
7.28k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
7.27k
    return pull(state, block, eos);
740
7.28k
}
_ZN5doris18StreamingOperatorXINS_23AssertNumRowsLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
38
                                                          bool* eos) {
738
38
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
38
    return pull(state, block, eos);
740
38
}
_ZN5doris18StreamingOperatorXINS_16SelectLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
7.24k
                                                          bool* eos) {
738
7.24k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
7.24k
    return pull(state, block, eos);
740
7.24k
}
741
742
template <typename LocalStateType>
743
Status StatefulOperatorX<LocalStateType>::get_block_impl(RuntimeState* state, Block* block,
744
470k
                                                         bool* eos) {
745
470k
    auto& local_state = get_local_state(state);
746
470k
    if (need_more_input_data(state)) {
747
438k
        local_state._child_block->clear_column_data(
748
438k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
438k
                        .num_materialized_slots());
750
438k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
438k
                state, local_state._child_block.get(), &local_state._child_eos));
752
438k
        *eos = local_state._child_eos;
753
438k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
47.9k
            return Status::OK();
755
47.9k
        }
756
390k
        {
757
390k
            SCOPED_TIMER(local_state.exec_time_counter());
758
390k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
390k
        }
760
390k
    }
761
762
422k
    if (!need_more_input_data(state)) {
763
395k
        SCOPED_TIMER(local_state.exec_time_counter());
764
395k
        bool new_eos = false;
765
395k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
395k
        if (new_eos) {
767
318k
            *eos = true;
768
318k
        } else if (!need_more_input_data(state)) {
769
25.7k
            *eos = false;
770
25.7k
        }
771
395k
    }
772
422k
    return Status::OK();
773
422k
}
_ZN5doris17StatefulOperatorXINS_23HashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
125k
                                                         bool* eos) {
745
125k
    auto& local_state = get_local_state(state);
746
125k
    if (need_more_input_data(state)) {
747
107k
        local_state._child_block->clear_column_data(
748
107k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
107k
                        .num_materialized_slots());
750
107k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
107k
                state, local_state._child_block.get(), &local_state._child_eos));
752
107k
        *eos = local_state._child_eos;
753
107k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
29.2k
            return Status::OK();
755
29.2k
        }
756
78.5k
        {
757
78.5k
            SCOPED_TIMER(local_state.exec_time_counter());
758
78.5k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
78.5k
        }
760
78.5k
    }
761
762
96.2k
    if (!need_more_input_data(state)) {
763
96.2k
        SCOPED_TIMER(local_state.exec_time_counter());
764
96.2k
        bool new_eos = false;
765
96.2k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
96.2k
        if (new_eos) {
767
40.4k
            *eos = true;
768
55.7k
        } else if (!need_more_input_data(state)) {
769
11.4k
            *eos = false;
770
11.4k
        }
771
96.2k
    }
772
96.2k
    return Status::OK();
773
96.2k
}
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_34PartitionedHashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
_ZN5doris17StatefulOperatorXINS_16RepeatLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
4.03k
                                                         bool* eos) {
745
4.03k
    auto& local_state = get_local_state(state);
746
4.03k
    if (need_more_input_data(state)) {
747
2.21k
        local_state._child_block->clear_column_data(
748
2.21k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
2.21k
                        .num_materialized_slots());
750
2.21k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
2.21k
                state, local_state._child_block.get(), &local_state._child_eos));
752
2.21k
        *eos = local_state._child_eos;
753
2.21k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
342
            return Status::OK();
755
342
        }
756
1.87k
        {
757
1.87k
            SCOPED_TIMER(local_state.exec_time_counter());
758
1.87k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
1.87k
        }
760
1.87k
    }
761
762
3.69k
    if (!need_more_input_data(state)) {
763
3.69k
        SCOPED_TIMER(local_state.exec_time_counter());
764
3.69k
        bool new_eos = false;
765
3.69k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
3.69k
        if (new_eos) {
767
1.27k
            *eos = true;
768
2.42k
        } else if (!need_more_input_data(state)) {
769
1.82k
            *eos = false;
770
1.82k
        }
771
3.69k
    }
772
3.69k
    return Status::OK();
773
3.69k
}
_ZN5doris17StatefulOperatorXINS_25MaterializationLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
1.86k
                                                         bool* eos) {
745
1.86k
    auto& local_state = get_local_state(state);
746
1.86k
    if (need_more_input_data(state)) {
747
1.86k
        local_state._child_block->clear_column_data(
748
1.86k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
1.86k
                        .num_materialized_slots());
750
1.86k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
1.86k
                state, local_state._child_block.get(), &local_state._child_eos));
752
1.86k
        *eos = local_state._child_eos;
753
1.86k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
764
            return Status::OK();
755
764
        }
756
1.10k
        {
757
1.10k
            SCOPED_TIMER(local_state.exec_time_counter());
758
1.10k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
1.10k
        }
760
1.10k
    }
761
762
1.10k
    if (!need_more_input_data(state)) {
763
1.10k
        SCOPED_TIMER(local_state.exec_time_counter());
764
1.10k
        bool new_eos = false;
765
1.10k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
1.10k
        if (new_eos) {
767
781
            *eos = true;
768
781
        } else if (!need_more_input_data(state)) {
769
0
            *eos = false;
770
0
        }
771
1.10k
    }
772
1.10k
    return Status::OK();
773
1.10k
}
_ZN5doris17StatefulOperatorXINS_22StreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
15.7k
                                                         bool* eos) {
745
15.7k
    auto& local_state = get_local_state(state);
746
15.7k
    if (need_more_input_data(state)) {
747
15.7k
        local_state._child_block->clear_column_data(
748
15.7k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
15.7k
                        .num_materialized_slots());
750
15.7k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
15.7k
                state, local_state._child_block.get(), &local_state._child_eos));
752
15.7k
        *eos = local_state._child_eos;
753
15.7k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
3.26k
            return Status::OK();
755
3.26k
        }
756
12.4k
        {
757
12.4k
            SCOPED_TIMER(local_state.exec_time_counter());
758
12.4k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
12.4k
        }
760
12.4k
    }
761
762
12.4k
    if (!need_more_input_data(state)) {
763
5.51k
        SCOPED_TIMER(local_state.exec_time_counter());
764
5.51k
        bool new_eos = false;
765
5.51k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
5.51k
        if (new_eos) {
767
5.45k
            *eos = true;
768
5.45k
        } else if (!need_more_input_data(state)) {
769
14
            *eos = false;
770
14
        }
771
5.51k
    }
772
12.4k
    return Status::OK();
773
12.4k
}
_ZN5doris17StatefulOperatorXINS_30DistinctStreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
294k
                                                         bool* eos) {
745
294k
    auto& local_state = get_local_state(state);
746
294k
    if (need_more_input_data(state)) {
747
294k
        local_state._child_block->clear_column_data(
748
294k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
294k
                        .num_materialized_slots());
750
294k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
294k
                state, local_state._child_block.get(), &local_state._child_eos));
752
294k
        *eos = local_state._child_eos;
753
294k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
12.5k
            return Status::OK();
755
12.5k
        }
756
282k
        {
757
282k
            SCOPED_TIMER(local_state.exec_time_counter());
758
282k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
282k
        }
760
282k
    }
761
762
281k
    if (!need_more_input_data(state)) {
763
261k
        SCOPED_TIMER(local_state.exec_time_counter());
764
261k
        bool new_eos = false;
765
261k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
261k
        if (new_eos) {
767
261k
            *eos = true;
768
261k
        } else if (!need_more_input_data(state)) {
769
0
            *eos = false;
770
0
        }
771
261k
    }
772
281k
    return Status::OK();
773
281k
}
_ZN5doris17StatefulOperatorXINS_29NestedLoopJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
22.0k
                                                         bool* eos) {
745
22.0k
    auto& local_state = get_local_state(state);
746
22.0k
    if (need_more_input_data(state)) {
747
10.0k
        local_state._child_block->clear_column_data(
748
10.0k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
10.0k
                        .num_materialized_slots());
750
10.0k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
10.0k
                state, local_state._child_block.get(), &local_state._child_eos));
752
10.0k
        *eos = local_state._child_eos;
753
10.0k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
786
            return Status::OK();
755
786
        }
756
9.23k
        {
757
9.23k
            SCOPED_TIMER(local_state.exec_time_counter());
758
9.23k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
9.23k
        }
760
9.23k
    }
761
762
21.3k
    if (!need_more_input_data(state)) {
763
20.6k
        SCOPED_TIMER(local_state.exec_time_counter());
764
20.6k
        bool new_eos = false;
765
20.6k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
20.6k
        if (new_eos) {
767
5.28k
            *eos = true;
768
15.3k
        } else if (!need_more_input_data(state)) {
769
12.0k
            *eos = false;
770
12.0k
        }
771
20.6k
    }
772
21.3k
    return Status::OK();
773
21.3k
}
_ZN5doris17StatefulOperatorXINS_23TableFunctionLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
6.99k
                                                         bool* eos) {
745
6.99k
    auto& local_state = get_local_state(state);
746
6.99k
    if (need_more_input_data(state)) {
747
6.64k
        local_state._child_block->clear_column_data(
748
6.64k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
6.64k
                        .num_materialized_slots());
750
6.64k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
6.64k
                state, local_state._child_block.get(), &local_state._child_eos));
752
6.64k
        *eos = local_state._child_eos;
753
6.64k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
1.04k
            return Status::OK();
755
1.04k
        }
756
5.59k
        {
757
5.59k
            SCOPED_TIMER(local_state.exec_time_counter());
758
5.59k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
5.59k
        }
760
5.59k
    }
761
762
5.95k
    if (!need_more_input_data(state)) {
763
5.95k
        SCOPED_TIMER(local_state.exec_time_counter());
764
5.95k
        bool new_eos = false;
765
5.95k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
5.95k
        if (new_eos) {
767
3.92k
            *eos = true;
768
3.92k
        } else if (!need_more_input_data(state)) {
769
366
            *eos = false;
770
366
        }
771
5.95k
    }
772
5.94k
    return Status::OK();
773
5.94k
}
774
775
template <typename Writer, typename Parent>
776
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
777
41.8k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
41.8k
    RETURN_IF_ERROR(Base::init(state, info));
779
41.8k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
41.8k
                                                         "AsyncWriterDependency", true);
781
41.8k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
41.8k
                             _finish_dependency));
783
784
41.8k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
41.8k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
41.8k
    return Status::OK();
787
41.8k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
361
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
361
    RETURN_IF_ERROR(Base::init(state, info));
779
361
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
361
                                                         "AsyncWriterDependency", true);
781
361
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
361
                             _finish_dependency));
783
784
361
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
361
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
361
    return Status::OK();
787
361
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
41.5k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
41.5k
    RETURN_IF_ERROR(Base::init(state, info));
779
41.5k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
41.5k
                                                         "AsyncWriterDependency", true);
781
41.5k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
41.5k
                             _finish_dependency));
783
784
41.5k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
41.5k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
41.5k
    return Status::OK();
787
41.5k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
30
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
30
    RETURN_IF_ERROR(Base::init(state, info));
779
30
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
30
                                                         "AsyncWriterDependency", true);
781
30
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
30
                             _finish_dependency));
783
784
30
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
30
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
30
    return Status::OK();
787
30
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
788
789
template <typename Writer, typename Parent>
790
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
791
42.4k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
42.4k
    RETURN_IF_ERROR(Base::open(state));
793
42.4k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
327k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
284k
        RETURN_IF_ERROR(
796
284k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
284k
    }
798
42.4k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
42.4k
    return Status::OK();
800
42.4k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
361
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
361
    RETURN_IF_ERROR(Base::open(state));
793
361
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
1.86k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
1.50k
        RETURN_IF_ERROR(
796
1.50k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
1.50k
    }
798
361
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
361
    return Status::OK();
800
361
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
42.0k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
42.0k
    RETURN_IF_ERROR(Base::open(state));
793
42.0k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
324k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
282k
        RETURN_IF_ERROR(
796
282k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
282k
    }
798
42.0k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
42.0k
    return Status::OK();
800
42.0k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
30
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
30
    RETURN_IF_ERROR(Base::open(state));
793
30
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
540
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
510
        RETURN_IF_ERROR(
796
510
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
510
    }
798
30
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
30
    return Status::OK();
800
30
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4openEPNS_12RuntimeStateE
801
802
template <typename Writer, typename Parent>
803
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
804
57.2k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
57.2k
    return _writer->sink(block, eos);
806
57.2k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
1.03k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
1.03k
    return _writer->sink(block, eos);
806
1.03k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
56.1k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
56.1k
    return _writer->sink(block, eos);
806
56.1k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
30
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
30
    return _writer->sink(block, eos);
806
30
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
807
808
template <typename Writer, typename Parent>
809
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
810
42.5k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
42.5k
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
42.5k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
42.5k
    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
42.5k
    if (_writer) {
818
42.5k
        Status st = _writer->get_writer_status();
819
42.5k
        if (exec_status.ok()) {
820
42.4k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
42.4k
                                                       : Status::Cancelled("force close"));
822
42.4k
        } else {
823
93
            _writer->force_close(exec_status);
824
93
        }
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
42.5k
        RETURN_IF_ERROR(st);
829
42.5k
    }
830
42.4k
    return Base::close(state, exec_status);
831
42.5k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
349
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
349
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
349
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
349
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
816
    // if the init failed, the _writer may be nullptr. so here need check
817
349
    if (_writer) {
818
349
        Status st = _writer->get_writer_status();
819
349
        if (exec_status.ok()) {
820
349
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
349
                                                       : Status::Cancelled("force close"));
822
349
        } else {
823
0
            _writer->force_close(exec_status);
824
0
        }
825
        // If there is an error in process_block thread, then we should get the writer
826
        // status before call force_close. For example, the thread may failed in commit
827
        // transaction.
828
349
        RETURN_IF_ERROR(st);
829
349
    }
830
349
    return Base::close(state, exec_status);
831
349
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
42.1k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
42.1k
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
42.1k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
42.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
42.1k
    if (_writer) {
818
42.1k
        Status st = _writer->get_writer_status();
819
42.1k
        if (exec_status.ok()) {
820
42.0k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
42.0k
                                                       : Status::Cancelled("force close"));
822
42.0k
        } else {
823
93
            _writer->force_close(exec_status);
824
93
        }
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
42.1k
        RETURN_IF_ERROR(st);
829
42.1k
    }
830
42.0k
    return Base::close(state, exec_status);
831
42.1k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
30
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
30
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
30
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
30
    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
30
    if (_writer) {
818
30
        Status st = _writer->get_writer_status();
819
30
        if (exec_status.ok()) {
820
30
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
30
                                                       : Status::Cancelled("force close"));
822
30
        } 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
30
        RETURN_IF_ERROR(st);
829
30
    }
830
30
    return Base::close(state, exec_status);
831
30
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
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(SpillIcebergTableSinkLocalState)
850
DECLARE_OPERATOR(IcebergDeleteSinkLocalState)
851
DECLARE_OPERATOR(IcebergMergeSinkLocalState)
852
DECLARE_OPERATOR(MCTableSinkLocalState)
853
DECLARE_OPERATOR(AnalyticSinkLocalState)
854
DECLARE_OPERATOR(BlackholeSinkLocalState)
855
DECLARE_OPERATOR(SortSinkLocalState)
856
DECLARE_OPERATOR(SpillSortSinkLocalState)
857
DECLARE_OPERATOR(LocalExchangeSinkLocalState)
858
DECLARE_OPERATOR(AggSinkLocalState)
859
DECLARE_OPERATOR(BucketedAggSinkLocalState)
860
DECLARE_OPERATOR(PartitionedAggSinkLocalState)
861
DECLARE_OPERATOR(ExchangeSinkLocalState)
862
DECLARE_OPERATOR(NestedLoopJoinBuildSinkLocalState)
863
DECLARE_OPERATOR(UnionSinkLocalState)
864
DECLARE_OPERATOR(MultiCastDataStreamSinkLocalState)
865
DECLARE_OPERATOR(PartitionSortSinkLocalState)
866
DECLARE_OPERATOR(SetProbeSinkLocalState<true>)
867
DECLARE_OPERATOR(SetProbeSinkLocalState<false>)
868
DECLARE_OPERATOR(SetSinkLocalState<true>)
869
DECLARE_OPERATOR(SetSinkLocalState<false>)
870
DECLARE_OPERATOR(PartitionedHashJoinSinkLocalState)
871
DECLARE_OPERATOR(GroupCommitBlockSinkLocalState)
872
DECLARE_OPERATOR(CacheSinkLocalState)
873
DECLARE_OPERATOR(DictSinkLocalState)
874
DECLARE_OPERATOR(RecCTESinkLocalState)
875
DECLARE_OPERATOR(RecCTEAnchorSinkLocalState)
876
877
#undef DECLARE_OPERATOR
878
879
#define DECLARE_OPERATOR(LOCAL_STATE) template class OperatorX<LOCAL_STATE>;
880
DECLARE_OPERATOR(HashJoinProbeLocalState)
881
DECLARE_OPERATOR(OlapScanLocalState)
882
DECLARE_OPERATOR(GroupCommitLocalState)
883
DECLARE_OPERATOR(JDBCScanLocalState)
884
DECLARE_OPERATOR(FileScanLocalState)
885
DECLARE_OPERATOR(AnalyticLocalState)
886
DECLARE_OPERATOR(SortLocalState)
887
DECLARE_OPERATOR(SpillSortLocalState)
888
DECLARE_OPERATOR(LocalMergeSortLocalState)
889
DECLARE_OPERATOR(AggLocalState)
890
DECLARE_OPERATOR(BucketedAggLocalState)
891
DECLARE_OPERATOR(PartitionedAggLocalState)
892
DECLARE_OPERATOR(TableFunctionLocalState)
893
DECLARE_OPERATOR(ExchangeLocalState)
894
DECLARE_OPERATOR(RepeatLocalState)
895
DECLARE_OPERATOR(NestedLoopJoinProbeLocalState)
896
DECLARE_OPERATOR(AssertNumRowsLocalState)
897
DECLARE_OPERATOR(EmptySetLocalState)
898
DECLARE_OPERATOR(UnionSourceLocalState)
899
DECLARE_OPERATOR(MultiCastDataStreamSourceLocalState)
900
DECLARE_OPERATOR(PartitionSortSourceLocalState)
901
DECLARE_OPERATOR(SetSourceLocalState<true>)
902
DECLARE_OPERATOR(SetSourceLocalState<false>)
903
DECLARE_OPERATOR(DataGenLocalState)
904
DECLARE_OPERATOR(SchemaScanLocalState)
905
DECLARE_OPERATOR(MetaScanLocalState)
906
DECLARE_OPERATOR(LocalExchangeSourceLocalState)
907
DECLARE_OPERATOR(PartitionedHashJoinProbeLocalState)
908
DECLARE_OPERATOR(CacheSourceLocalState)
909
DECLARE_OPERATOR(RecCTESourceLocalState)
910
DECLARE_OPERATOR(RecCTEScanLocalState)
911
912
#ifdef BE_TEST
913
DECLARE_OPERATOR(MockLocalState)
914
DECLARE_OPERATOR(MockScanLocalState)
915
#endif
916
#undef DECLARE_OPERATOR
917
918
template class StreamingOperatorX<AssertNumRowsLocalState>;
919
template class StreamingOperatorX<SelectLocalState>;
920
921
template class StatefulOperatorX<HashJoinProbeLocalState>;
922
template class StatefulOperatorX<PartitionedHashJoinProbeLocalState>;
923
template class StatefulOperatorX<RepeatLocalState>;
924
template class StatefulOperatorX<MaterializationLocalState>;
925
template class StatefulOperatorX<StreamingAggLocalState>;
926
template class StatefulOperatorX<DistinctStreamingAggLocalState>;
927
template class StatefulOperatorX<NestedLoopJoinProbeLocalState>;
928
template class StatefulOperatorX<TableFunctionLocalState>;
929
930
template class PipelineXSinkLocalState<HashJoinSharedState>;
931
template class PipelineXSinkLocalState<PartitionedHashJoinSharedState>;
932
template class PipelineXSinkLocalState<SortSharedState>;
933
template class PipelineXSinkLocalState<SpillSortSharedState>;
934
template class PipelineXSinkLocalState<NestedLoopJoinSharedState>;
935
template class PipelineXSinkLocalState<AnalyticSharedState>;
936
template class PipelineXSinkLocalState<AggSharedState>;
937
template class PipelineXSinkLocalState<BucketedAggSharedState>;
938
template class PipelineXSinkLocalState<PartitionedAggSharedState>;
939
template class PipelineXSinkLocalState<FakeSharedState>;
940
template class PipelineXSinkLocalState<UnionSharedState>;
941
template class PipelineXSinkLocalState<PartitionSortNodeSharedState>;
942
template class PipelineXSinkLocalState<MultiCastSharedState>;
943
template class PipelineXSinkLocalState<SetSharedState>;
944
template class PipelineXSinkLocalState<LocalExchangeSharedState>;
945
template class PipelineXSinkLocalState<BasicSharedState>;
946
template class PipelineXSinkLocalState<DataQueueSharedState>;
947
template class PipelineXSinkLocalState<RecCTESharedState>;
948
949
template class PipelineXLocalState<HashJoinSharedState>;
950
template class PipelineXLocalState<PartitionedHashJoinSharedState>;
951
template class PipelineXLocalState<SortSharedState>;
952
template class PipelineXLocalState<SpillSortSharedState>;
953
template class PipelineXLocalState<NestedLoopJoinSharedState>;
954
template class PipelineXLocalState<AnalyticSharedState>;
955
template class PipelineXLocalState<AggSharedState>;
956
template class PipelineXLocalState<BucketedAggSharedState>;
957
template class PipelineXLocalState<PartitionedAggSharedState>;
958
template class PipelineXLocalState<FakeSharedState>;
959
template class PipelineXLocalState<UnionSharedState>;
960
template class PipelineXLocalState<DataQueueSharedState>;
961
template class PipelineXLocalState<MultiCastSharedState>;
962
template class PipelineXLocalState<PartitionSortNodeSharedState>;
963
template class PipelineXLocalState<SetSharedState>;
964
template class PipelineXLocalState<LocalExchangeSharedState>;
965
template class PipelineXLocalState<BasicSharedState>;
966
template class PipelineXLocalState<RecCTESharedState>;
967
968
template class AsyncWriterSink<doris::VFileResultWriter, ResultFileSinkOperatorX>;
969
template class AsyncWriterSink<doris::VJdbcTableWriter, JdbcTableSinkOperatorX>;
970
template class AsyncWriterSink<doris::VTabletWriter, OlapTableSinkOperatorX>;
971
template class AsyncWriterSink<doris::VTabletWriterV2, OlapTableSinkV2OperatorX>;
972
template class AsyncWriterSink<doris::VHiveTableWriter, HiveTableSinkOperatorX>;
973
template class AsyncWriterSink<doris::VIcebergTableWriter, IcebergTableSinkOperatorX>;
974
template class AsyncWriterSink<doris::VIcebergTableWriter, SpillIcebergTableSinkOperatorX>;
975
template class AsyncWriterSink<doris::VIcebergDeleteSink, IcebergDeleteSinkOperatorX>;
976
template class AsyncWriterSink<doris::VIcebergMergeSink, IcebergMergeSinkOperatorX>;
977
template class AsyncWriterSink<doris::VMCTableWriter, MCTableSinkOperatorX>;
978
template class AsyncWriterSink<doris::VTVFTableWriter, TVFTableSinkOperatorX>;
979
980
#ifdef BE_TEST
981
template class OperatorX<DummyOperatorLocalState>;
982
template class DataSinkOperatorX<DummySinkLocalState>;
983
#endif
984
985
} // namespace doris