Coverage Report

Created: 2026-09-14 20:34

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
365k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
365k
    if (_parent->nereids_id() == -1) {
122
170k
        return fmt::format("(id={})", _parent->node_id());
123
194k
    } else {
124
194k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
194k
    }
126
365k
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
40.8k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
40.8k
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
40.8k
    } else {
124
40.8k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
40.8k
    }
126
40.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
74.6k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
74.6k
    if (_parent->nereids_id() == -1) {
122
12
        return fmt::format("(id={})", _parent->node_id());
123
74.6k
    } else {
124
74.6k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
74.6k
    }
126
74.6k
}
_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
3.85k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
3.85k
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
3.85k
    } else {
124
3.85k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
3.85k
    }
126
3.85k
}
_ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
3.29k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
3.29k
    if (_parent->nereids_id() == -1) {
122
12
        return fmt::format("(id={})", _parent->node_id());
123
3.28k
    } else {
124
3.28k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
3.28k
    }
126
3.29k
}
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
35.8k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
35.8k
    if (_parent->nereids_id() == -1) {
122
29
        return fmt::format("(id={})", _parent->node_id());
123
35.8k
    } else {
124
35.8k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
35.8k
    }
126
35.8k
}
_ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
67
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
67
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
67
    } else {
124
67
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
67
    }
126
67
}
_ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
36
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
36
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
36
    } else {
124
36
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
36
    }
126
36
}
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
56.9k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
56.9k
    if (_parent->nereids_id() == -1) {
122
45.0k
        return fmt::format("(id={})", _parent->node_id());
123
45.0k
    } else {
124
11.8k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
11.8k
    }
126
56.9k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
23.5k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
23.5k
    if (_parent->nereids_id() == -1) {
122
2
        return fmt::format("(id={})", _parent->node_id());
123
23.5k
    } else {
124
23.5k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
23.5k
    }
126
23.5k
}
_ZNK5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
12
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
12
    if (_parent->nereids_id() == -1) {
122
12
        return fmt::format("(id={})", _parent->node_id());
123
12
    } else {
124
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
0
    }
126
12
}
_ZNK5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
1.74k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
1.75k
    if (_parent->nereids_id() == -1) {
122
1.75k
        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
1.74k
}
_ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
410
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
410
    if (_parent->nereids_id() == -1) {
122
102
        return fmt::format("(id={})", _parent->node_id());
123
308
    } else {
124
308
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
308
    }
126
410
}
_ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
536
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
536
    if (_parent->nereids_id() == -1) {
122
13
        return fmt::format("(id={})", _parent->node_id());
123
523
    } else {
124
523
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
523
    }
126
536
}
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
123k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
124k
    if (_parent->nereids_id() == -1) {
122
124k
        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
123k
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
127
128
template <typename SharedStateArg>
129
349k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
349k
    if (_parent->nereids_id() == -1) {
131
139k
        return fmt::format("(id={})", _parent->node_id());
132
209k
    } else {
133
209k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
209k
    }
135
349k
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
88.9k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
88.9k
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
88.9k
    } else {
133
88.9k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
88.9k
    }
135
88.9k
}
_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
75.0k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
75.0k
    if (_parent->nereids_id() == -1) {
131
9
        return fmt::format("(id={})", _parent->node_id());
132
75.0k
    } else {
133
75.0k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
75.0k
    }
135
75.0k
}
_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
3.86k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
3.86k
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
3.86k
    } else {
133
3.86k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
3.86k
    }
135
3.86k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
3.30k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
3.30k
    if (_parent->nereids_id() == -1) {
131
12
        return fmt::format("(id={})", _parent->node_id());
132
3.28k
    } else {
133
3.28k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
3.28k
    }
135
3.30k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
36.0k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
36.0k
    if (_parent->nereids_id() == -1) {
131
29
        return fmt::format("(id={})", _parent->node_id());
132
35.9k
    } else {
133
35.9k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
35.9k
    }
135
36.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
67
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
67
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
67
    } else {
133
67
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
67
    }
135
67
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
46
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
46
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
46
    } else {
133
46
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
46
    }
135
46
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
2.06k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
2.06k
    if (_parent->nereids_id() == -1) {
131
3
        return fmt::format("(id={})", _parent->node_id());
132
2.06k
    } else {
133
2.06k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
2.06k
    }
135
2.06k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
419
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
419
    if (_parent->nereids_id() == -1) {
131
102
        return fmt::format("(id={})", _parent->node_id());
132
317
    } else {
133
317
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
317
    }
135
419
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
1.15k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
1.15k
    if (_parent->nereids_id() == -1) {
131
1.15k
        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
1.15k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
49.3k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
49.4k
    if (_parent->nereids_id() == -1) {
131
49.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
49.3k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
89.0k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
89.0k
    if (_parent->nereids_id() == -1) {
131
89.0k
        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
89.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
11
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
11
    if (_parent->nereids_id() == -1) {
131
11
        return fmt::format("(id={})", _parent->node_id());
132
11
    } else {
133
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
0
    }
135
11
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
136
137
template <typename SharedStateArg>
138
25.7k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
25.7k
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
25.7k
    _terminated = true;
143
25.7k
    return Status::OK();
144
25.7k
}
_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
515
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
515
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
515
    _terminated = true;
143
515
    return Status::OK();
144
515
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
5
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
5
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
5
    _terminated = true;
143
5
    return Status::OK();
144
5
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
1
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
1
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
1
    _terminated = true;
143
1
    return Status::OK();
144
1
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
825
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
825
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
825
    _terminated = true;
143
825
    return Status::OK();
144
825
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
14
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
14
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
14
    _terminated = true;
143
14
    return Status::OK();
144
14
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
96
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
96
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
96
    _terminated = true;
143
96
    return Status::OK();
144
96
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
28
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
28
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
28
    _terminated = true;
143
28
    return Status::OK();
144
28
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_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_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
113
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
113
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
113
    _terminated = true;
143
113
    return Status::OK();
144
113
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
10
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
10
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
10
    _terminated = true;
143
10
    return Status::OK();
144
10
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
108
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
108
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
108
    _terminated = true;
143
108
    return Status::OK();
144
108
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
145
146
97.6k
DataDistribution OperatorBase::required_data_distribution(RuntimeState* /*state*/) const {
147
97.6k
    return _child && _child->is_serial_operator() && !is_source()
148
97.6k
                   ? DataDistribution(TLocalPartitionType::PASSTHROUGH)
149
97.6k
                   : DataDistribution(TLocalPartitionType::NOOP);
150
97.6k
}
151
152
3.91k
bool OperatorBase::child_breaks_local_key_distribution(RuntimeState* state) const {
153
3.91k
    if (!_child) {
154
3.13k
        return false;
155
3.13k
    }
156
779
    if (_child->is_serial_operator()) {
157
78
        return true;
158
78
    }
159
701
    const auto child_distribution = _child->required_data_distribution(state);
160
701
    return child_distribution.need_local_exchange() &&
161
701
           !is_shuffled_exchange(child_distribution.distribution_type);
162
779
}
163
164
template <typename SharedStateArg>
165
20.0k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
166
20.0k
    fmt::memory_buffer debug_string_buffer;
167
20.0k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
168
20.0k
    return fmt::to_string(debug_string_buffer);
169
20.0k
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
_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
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
165
20.0k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
166
20.0k
    fmt::memory_buffer debug_string_buffer;
167
20.0k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
168
20.0k
    return fmt::to_string(debug_string_buffer);
169
20.0k
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE12debug_stringB5cxx11Ei
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
20.0k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
20.0k
    fmt::memory_buffer debug_string_buffer;
174
20.0k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
20.0k
    return fmt::to_string(debug_string_buffer);
176
20.0k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
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
20.0k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
20.0k
    fmt::memory_buffer debug_string_buffer;
174
20.0k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
20.0k
    return fmt::to_string(debug_string_buffer);
176
20.0k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
177
178
20.1k
std::string OperatorXBase::debug_string(int indentation_level) const {
179
20.1k
    fmt::memory_buffer debug_string_buffer;
180
20.1k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, parallel_tasks={}, _is_serial_operator={}",
181
20.1k
                   std::string(indentation_level * 2, ' '), _op_name, node_id(), _parallel_tasks,
182
20.1k
                   _is_serial_operator);
183
20.1k
    return fmt::to_string(debug_string_buffer);
184
20.1k
}
185
186
20.0k
std::string OperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
187
20.0k
    return state->get_local_state(operator_id())->debug_string(indentation_level);
188
20.0k
}
189
190
197k
Status OperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
191
197k
    std::string node_name = print_plan_node_type(tnode.node_type);
192
197k
    _nereids_id = tnode.nereids_id;
193
197k
    if (!tnode.intermediate_output_tuple_id_list.empty()) {
194
553
        if (!has_projection()) {
195
0
            return Status::InternalError("no final output tuple id");
196
0
        }
197
553
        if (tnode.intermediate_output_tuple_id_list.size() !=
198
553
            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
553
    }
206
197k
    auto substr = node_name.substr(0, node_name.find("_NODE"));
207
197k
    _op_name = substr + "_OPERATOR";
208
209
197k
    if (tnode.__isset.vconjunct) {
210
0
        return Status::InternalError("vconjunct is not supported yet");
211
197k
    } else if (tnode.__isset.conjuncts) {
212
146k
        for (const auto& conjunct : tnode.conjuncts) {
213
146k
            VExprContextSPtr context;
214
146k
            RETURN_IF_ERROR(VExpr::create_expr_tree(conjunct, context));
215
146k
            _conjuncts.emplace_back(context);
216
146k
        }
217
45.0k
    }
218
219
    // create the projections expr
220
197k
    if (tnode.__isset.projections) {
221
100k
        RETURN_IF_ERROR(VExpr::create_expr_trees(tnode.projections, _projection->projections));
222
100k
    }
223
197k
    if (!tnode.intermediate_projections_list.empty()) {
224
553
        DCHECK(has_projection()) << "no final projections";
225
553
        _projection->intermediate_projections.reserve(tnode.intermediate_projections_list.size());
226
1.09k
        for (const auto& tnode_projections : tnode.intermediate_projections_list) {
227
1.09k
            VExprContextSPtrs projections;
228
1.09k
            RETURN_IF_ERROR(VExpr::create_expr_trees(tnode_projections, projections));
229
1.09k
            _projection->intermediate_projections.push_back(projections);
230
1.09k
        }
231
553
    }
232
197k
    return Status::OK();
233
197k
}
234
235
222k
Status OperatorXBase::prepare(RuntimeState* state) {
236
222k
    for (auto& conjunct : _conjuncts) {
237
146k
        RETURN_IF_ERROR(conjunct->prepare(state, operator_row_desc_before_projection()));
238
146k
    }
239
222k
    if (state->enable_adjust_conjunct_order_by_cost()) {
240
199k
        std::ranges::stable_sort(_conjuncts, [](const auto& a, const auto& b) {
241
199k
            return a->execute_cost() < b->execute_cost();
242
199k
        });
243
173k
    };
244
245
222k
    if (has_projection()) {
246
100k
        auto& projection = *_projection;
247
101k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
248
1.09k
            const auto& input_row_desc =
249
1.09k
                    i == 0 ? operator_row_desc_before_projection()
250
1.09k
                           : projection.intermediate_output_row_descriptors[i - 1];
251
1.09k
            RETURN_IF_ERROR(
252
1.09k
                    VExpr::prepare(projection.intermediate_projections[i], state, input_row_desc));
253
1.09k
        }
254
100k
        const auto& final_projection_input_row_desc =
255
100k
                projection.intermediate_output_row_descriptors.empty()
256
100k
                        ? operator_row_desc_before_projection()
257
100k
                        : projection.intermediate_output_row_descriptors.back();
258
100k
        RETURN_IF_ERROR(
259
100k
                VExpr::prepare(projection.projections, state, final_projection_input_row_desc));
260
100k
        RETURN_IF_ERROR(VExpr::check_expr_output_type(projection.projections,
261
100k
                                                      projection.output_row_descriptor));
262
100k
    }
263
264
222k
    for (auto& conjunct : _conjuncts) {
265
146k
        RETURN_IF_ERROR(conjunct->open(state));
266
146k
    }
267
222k
    if (has_projection()) {
268
100k
        RETURN_IF_ERROR(VExpr::open(_projection->projections, state));
269
100k
        for (auto& projections : _projection->intermediate_projections) {
270
1.09k
            RETURN_IF_ERROR(VExpr::open(projections, state));
271
1.09k
        }
272
100k
    }
273
222k
    if (_child && !is_source()) {
274
33.9k
        RETURN_IF_ERROR(_child->prepare(state));
275
33.9k
    }
276
277
222k
    if (VExpr::contains_blockable_function(_conjuncts) ||
278
223k
        (has_projection() && VExpr::contains_blockable_function(_projection->projections))) {
279
0
        _blockable = true;
280
0
    }
281
282
222k
    return Status::OK();
283
222k
}
284
285
2.11k
Status OperatorXBase::terminate(RuntimeState* state) {
286
2.11k
    if (_child && !is_source()) {
287
384
        RETURN_IF_ERROR(_child->terminate(state));
288
384
    }
289
2.11k
    auto result = state->get_local_state_result(operator_id());
290
2.11k
    if (!result) {
291
0
        return result.error();
292
0
    }
293
2.11k
    return result.value()->terminate(state);
294
2.11k
}
295
296
961k
Status OperatorXBase::close(RuntimeState* state) {
297
961k
    if (_child && !is_source()) {
298
98.2k
        RETURN_IF_ERROR(_child->close(state));
299
98.2k
    }
300
961k
    auto result = state->get_local_state_result(operator_id());
301
961k
    if (!result) {
302
0
        return result.error();
303
0
    }
304
961k
    return result.value()->close(state);
305
961k
}
306
307
113k
void PipelineXLocalStateBase::clear_origin_block() {
308
113k
    _origin_block.clear_column_data(
309
113k
            _parent->operator_row_desc_before_projection().num_materialized_slots());
310
113k
}
311
312
106k
Status PipelineXLocalStateBase::filter_block(const VExprContextSPtrs& expr_contexts, Block* block) {
313
106k
    RETURN_IF_ERROR(VExprContext::filter_block(expr_contexts, block, block->columns()));
314
315
106k
    _estimate_memory_usage += VExprContext::get_memory_usage(expr_contexts);
316
106k
    return Status::OK();
317
106k
}
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
113k
                                     Block* output_block) const {
326
113k
    auto* local_state = state->get_local_state(operator_id());
327
113k
    SCOPED_TIMER(local_state->exec_time_counter());
328
113k
    SCOPED_TIMER(local_state->_projection_timer);
329
113k
    const size_t rows = origin_block->rows();
330
113k
    if (rows == 0) {
331
50.9k
        return Status::OK();
332
50.9k
    }
333
62.3k
    SCOPED_PEAK_MEM(&local_state->_estimate_memory_usage);
334
335
62.3k
    {
336
62.3k
        Block input_block = *origin_block;
337
338
62.3k
        ColumnsWithTypeAndName new_columns;
339
62.3k
        for (const auto& projections : local_state->_intermediate_projections) {
340
970
            if (projections.empty()) {
341
0
                return Status::InternalError("meet empty intermediate projection, node id: {}",
342
0
                                             node_id());
343
0
            }
344
970
            new_columns.resize(projections.size());
345
10.9k
            for (int i = 0; i < projections.size(); i++) {
346
9.93k
                RETURN_IF_ERROR(projections[i]->execute(&input_block, new_columns[i]));
347
9.93k
                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
9.93k
            }
355
970
            Block tmp_block {new_columns};
356
970
            input_block.swap(tmp_block);
357
970
        }
358
359
62.3k
        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
62.3k
        auto scoped_mutable_block = VectorizedUtils::build_scoped_mutable_mem_reuse_block(
367
62.3k
                output_block, _projection->output_row_descriptor);
368
62.3k
        auto& mutable_columns = scoped_mutable_block.mutable_columns();
369
62.3k
        DCHECK_EQ(mutable_columns.size(), local_state->_projections.size()) << debug_string();
370
62.3k
        Columns shared_columns(mutable_columns.size());
371
372
286k
        for (int i = 0; i < mutable_columns.size(); ++i) {
373
224k
            ColumnPtr column_ptr;
374
224k
            RETURN_IF_ERROR(local_state->_projections[i]->execute(&input_block, column_ptr));
375
224k
            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
224k
            column_ptr = column_ptr->convert_to_full_column_if_const();
382
224k
            if (is_column_nullable(*mutable_columns[i]) && !is_column_nullable(*column_ptr)) {
383
0
                column_ptr = make_nullable(column_ptr, false);
384
0
            }
385
224k
            if (column_ptr->is_exclusive()) {
386
58.8k
                mutable_columns[i] = IColumn::mutate(std::move(column_ptr));
387
165k
            } else {
388
165k
                shared_columns[i] = std::move(column_ptr);
389
165k
            }
390
224k
        }
391
392
62.3k
        scoped_mutable_block.restore();
393
286k
        for (int i = 0; i < shared_columns.size(); ++i) {
394
224k
            if (shared_columns[i]) {
395
165k
                output_block->replace_by_position(i, std::move(shared_columns[i]));
396
165k
            }
397
224k
        }
398
62.3k
    }
399
400
0
    origin_block->clear_column_data(
401
62.3k
            local_state->_parent->operator_row_desc_before_projection().num_materialized_slots());
402
62.3k
    DCHECK_EQ(output_block->rows(), rows);
403
404
62.3k
    return Status::OK();
405
62.3k
}
406
407
2.18M
Status OperatorXBase::get_block_after_projects(RuntimeState* state, Block* block, bool* eos) {
408
2.18M
    DBUG_EXECUTE_IF("Pipeline::return_empty_block", {
409
2.18M
        if (this->_op_name == "AGGREGATION_OPERATOR" || this->_op_name == "HASH_JOIN_OPERATOR" ||
410
2.18M
            this->_op_name == "PARTITIONED_AGGREGATION_OPERATOR" ||
411
2.18M
            this->_op_name == "PARTITIONED_HASH_JOIN_OPERATOR" ||
412
2.18M
            this->_op_name == "CROSS_JOIN_OPERATOR" || this->_op_name == "SORT_OPERATOR") {
413
2.18M
            if (_debug_point_count++ % 2 == 0) {
414
2.18M
                return Status::OK();
415
2.18M
            }
416
2.18M
        }
417
2.18M
    });
418
419
2.18M
    Status status;
420
2.18M
    auto* local_state = state->get_local_state(operator_id());
421
2.18M
    Defer defer([&]() {
422
2.18M
        if (status.ok()) {
423
2.18M
            local_state->update_output_block_counters(*block);
424
2.18M
        }
425
2.18M
    });
426
2.18M
    if (has_projection()) {
427
113k
        local_state->clear_origin_block();
428
113k
        status = get_block(state, &local_state->_origin_block, eos);
429
113k
        if (UNLIKELY(!status.ok())) {
430
10
            return status;
431
10
        }
432
113k
        status = do_projections(state, &local_state->_origin_block, block);
433
113k
        return status;
434
113k
    }
435
2.07M
    status = get_block(state, block, eos);
436
2.07M
    RETURN_IF_ERROR(block->check_type_and_column());
437
2.07M
    return status;
438
2.07M
}
439
440
863k
void PipelineXLocalStateBase::reached_limit(Block* block, bool* eos) {
441
863k
    if (_parent->_limit != -1 and _num_rows_returned + block->rows() >= _parent->_limit) {
442
1.55k
        block->set_num_rows(_parent->_limit - _num_rows_returned);
443
1.55k
        *eos = true;
444
1.55k
    }
445
446
863k
    DBUG_EXECUTE_IF("Pipeline::reached_limit_early", {
447
863k
        auto op_name = to_lower(_parent->_op_name);
448
863k
        auto arg_op_name = dp->param<std::string>("op_name");
449
863k
        arg_op_name = to_lower(arg_op_name);
450
451
863k
        if (op_name == arg_op_name) {
452
863k
            *eos = true;
453
863k
        }
454
863k
    });
455
456
863k
    if (auto rows = block->rows()) {
457
311k
        _num_rows_returned += rows;
458
311k
        _state->get_query_ctx()->resource_ctx()->io_context()->update_process_rows(rows);
459
311k
    }
460
863k
}
461
462
25.7k
Status DataSinkOperatorXBase::terminate(RuntimeState* state) {
463
25.7k
    auto result = state->get_sink_local_state_result();
464
25.7k
    if (!result) {
465
0
        return result.error();
466
0
    }
467
25.7k
    return result.value()->terminate(state);
468
25.7k
}
469
470
20.0k
std::string DataSinkOperatorXBase::debug_string(int indentation_level) const {
471
20.0k
    fmt::memory_buffer debug_string_buffer;
472
473
20.0k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, _is_serial_operator={}",
474
20.0k
                   std::string(indentation_level * 2, ' '), _name, node_id(), _is_serial_operator);
475
20.0k
    return fmt::to_string(debug_string_buffer);
476
20.0k
}
477
478
20.0k
std::string DataSinkOperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
479
20.0k
    return state->get_sink_local_state()->debug_string(indentation_level);
480
20.0k
}
481
482
110k
Status DataSinkOperatorXBase::init(const TDataSink& tsink) {
483
110k
    std::string op_name = "UNKNOWN_SINK";
484
110k
    auto it = _TDataSinkType_VALUES_TO_NAMES.find(tsink.type);
485
486
110k
    if (it != _TDataSinkType_VALUES_TO_NAMES.end()) {
487
110k
        op_name = it->second;
488
110k
    }
489
110k
    _name = op_name + "_OPERATOR";
490
110k
    return Status::OK();
491
110k
}
492
493
125k
Status DataSinkOperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
494
125k
    std::string op_name = print_plan_node_type(tnode.node_type);
495
125k
    _nereids_id = tnode.nereids_id;
496
125k
    auto substr = op_name.substr(0, op_name.find("_NODE"));
497
125k
    _name = substr + "_SINK_OPERATOR";
498
125k
    return Status::OK();
499
125k
}
500
501
template <typename LocalStateType>
502
Status DataSinkOperatorX<LocalStateType>::setup_local_state(RuntimeState* state,
503
474k
                                                            LocalSinkStateInfo& info) {
504
474k
    auto local_state = LocalStateType::create_unique(this, state);
505
474k
    RETURN_IF_ERROR(local_state->init(state, info));
506
474k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
474k
    return Status::OK();
508
474k
}
_ZN5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
88.9k
                                                            LocalSinkStateInfo& info) {
504
88.9k
    auto local_state = LocalStateType::create_unique(this, state);
505
88.9k
    RETURN_IF_ERROR(local_state->init(state, info));
506
88.9k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
88.9k
    return Status::OK();
508
88.9k
}
_ZN5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
67.5k
                                                            LocalSinkStateInfo& info) {
504
67.5k
    auto local_state = LocalStateType::create_unique(this, state);
505
67.5k
    RETURN_IF_ERROR(local_state->init(state, info));
506
67.5k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
67.5k
    return Status::OK();
508
67.5k
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_24ResultFileSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
27
                                                            LocalSinkStateInfo& info) {
504
27
    auto local_state = LocalStateType::create_unique(this, state);
505
27
    RETURN_IF_ERROR(local_state->init(state, info));
506
27
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
27
    return Status::OK();
508
27
}
_ZN5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
21.5k
                                                            LocalSinkStateInfo& info) {
504
21.5k
    auto local_state = LocalStateType::create_unique(this, state);
505
21.5k
    RETURN_IF_ERROR(local_state->init(state, info));
506
21.5k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
21.5k
    return Status::OK();
508
21.5k
}
_ZN5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
12
                                                            LocalSinkStateInfo& info) {
504
12
    auto local_state = LocalStateType::create_unique(this, state);
505
12
    RETURN_IF_ERROR(local_state->init(state, info));
506
12
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
12
    return Status::OK();
508
12
}
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
3.29k
                                                            LocalSinkStateInfo& info) {
504
3.29k
    auto local_state = LocalStateType::create_unique(this, state);
505
3.29k
    RETURN_IF_ERROR(local_state->init(state, info));
506
3.29k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
3.29k
    return Status::OK();
508
3.29k
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
75.2k
                                                            LocalSinkStateInfo& info) {
504
75.2k
    auto local_state = LocalStateType::create_unique(this, state);
505
75.2k
    RETURN_IF_ERROR(local_state->init(state, info));
506
75.2k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
75.2k
    return Status::OK();
508
75.2k
}
_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
49.4k
                                                            LocalSinkStateInfo& info) {
504
49.4k
    auto local_state = LocalStateType::create_unique(this, state);
505
49.4k
    RETURN_IF_ERROR(local_state->init(state, info));
506
49.4k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
49.4k
    return Status::OK();
508
49.4k
}
_ZN5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
36.0k
                                                            LocalSinkStateInfo& info) {
504
36.0k
    auto local_state = LocalStateType::create_unique(this, state);
505
36.0k
    RETURN_IF_ERROR(local_state->init(state, info));
506
36.0k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
36.0k
    return Status::OK();
508
36.0k
}
_ZN5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
67
                                                            LocalSinkStateInfo& info) {
504
67
    auto local_state = LocalStateType::create_unique(this, state);
505
67
    RETURN_IF_ERROR(local_state->init(state, info));
506
67
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
67
    return Status::OK();
508
67
}
_ZN5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
46
                                                            LocalSinkStateInfo& info) {
504
46
    auto local_state = LocalStateType::create_unique(this, state);
505
46
    RETURN_IF_ERROR(local_state->init(state, info));
506
46
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
46
    return Status::OK();
508
46
}
_ZN5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
124k
                                                            LocalSinkStateInfo& info) {
504
124k
    auto local_state = LocalStateType::create_unique(this, state);
505
124k
    RETURN_IF_ERROR(local_state->init(state, info));
506
124k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
124k
    return Status::OK();
508
124k
}
_ZN5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
3.87k
                                                            LocalSinkStateInfo& info) {
504
3.87k
    auto local_state = LocalStateType::create_unique(this, state);
505
3.87k
    RETURN_IF_ERROR(local_state->init(state, info));
506
3.87k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
3.87k
    return Status::OK();
508
3.87k
}
_ZN5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.06k
                                                            LocalSinkStateInfo& info) {
504
2.06k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.06k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.06k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.06k
    return Status::OK();
508
2.06k
}
_ZN5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
686
                                                            LocalSinkStateInfo& info) {
504
686
    auto local_state = LocalStateType::create_unique(this, state);
505
686
    RETURN_IF_ERROR(local_state->init(state, info));
506
686
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
686
    return Status::OK();
508
686
}
_ZN5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
316
                                                            LocalSinkStateInfo& info) {
504
316
    auto local_state = LocalStateType::create_unique(this, state);
505
316
    RETURN_IF_ERROR(local_state->init(state, info));
506
316
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
316
    return Status::OK();
508
316
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
316
                                                            LocalSinkStateInfo& info) {
504
316
    auto local_state = LocalStateType::create_unique(this, state);
505
316
    RETURN_IF_ERROR(local_state->init(state, info));
506
316
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
316
    return Status::OK();
508
316
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
284
                                                            LocalSinkStateInfo& info) {
504
284
    auto local_state = LocalStateType::create_unique(this, state);
505
284
    RETURN_IF_ERROR(local_state->init(state, info));
506
284
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
284
    return Status::OK();
508
284
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
275
                                                            LocalSinkStateInfo& info) {
504
275
    auto local_state = LocalStateType::create_unique(this, state);
505
275
    RETURN_IF_ERROR(local_state->init(state, info));
506
275
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
275
    return Status::OK();
508
275
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
248
                                                            LocalSinkStateInfo& info) {
504
248
    auto local_state = LocalStateType::create_unique(this, state);
505
248
    RETURN_IF_ERROR(local_state->init(state, info));
506
248
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
248
    return Status::OK();
508
248
}
_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
142
                                                            LocalSinkStateInfo& info) {
504
142
    auto local_state = LocalStateType::create_unique(this, state);
505
142
    RETURN_IF_ERROR(local_state->init(state, info));
506
142
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
142
    return Status::OK();
508
142
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
62
                                                            LocalSinkStateInfo& info) {
504
62
    auto local_state = LocalStateType::create_unique(this, state);
505
62
    RETURN_IF_ERROR(local_state->init(state, info));
506
62
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
62
    return Status::OK();
508
62
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
509
510
template <typename LocalStateType>
511
415k
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
415k
    } else {
519
415k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
415k
        ss->id = operator_id();
521
415k
        for (auto& dest : dests_id()) {
522
413k
            ss->related_op_ids.insert(dest);
523
413k
        }
524
415k
        return ss;
525
415k
    }
526
415k
}
_ZNK5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
81.7k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
81.7k
    } else {
519
81.7k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
81.7k
        ss->id = operator_id();
521
81.7k
        for (auto& dest : dests_id()) {
522
81.6k
            ss->related_op_ids.insert(dest);
523
81.6k
        }
524
81.7k
        return ss;
525
81.7k
    }
526
81.7k
}
_ZNK5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
67.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
67.6k
    } else {
519
67.6k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
67.6k
        ss->id = operator_id();
521
67.6k
        for (auto& dest : dests_id()) {
522
67.1k
            ss->related_op_ids.insert(dest);
523
67.1k
        }
524
67.6k
        return ss;
525
67.6k
    }
526
67.6k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_24ResultFileSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
27
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
27
    } else {
519
27
        auto ss = LocalStateType::SharedStateType::create_shared();
520
27
        ss->id = operator_id();
521
27
        for (auto& dest : dests_id()) {
522
27
            ss->related_op_ids.insert(dest);
523
27
        }
524
27
        return ss;
525
27
    }
526
27
}
_ZNK5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
21.5k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
21.5k
    } else {
519
21.5k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
21.5k
        ss->id = operator_id();
521
21.5k
        for (auto& dest : dests_id()) {
522
21.4k
            ss->related_op_ids.insert(dest);
523
21.4k
        }
524
21.5k
        return ss;
525
21.5k
    }
526
21.5k
}
_ZNK5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE19create_shared_stateEv
Line
Count
Source
511
12
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
12
    } else {
519
12
        auto ss = LocalStateType::SharedStateType::create_shared();
520
12
        ss->id = operator_id();
521
12
        for (auto& dest : dests_id()) {
522
12
            ss->related_op_ids.insert(dest);
523
12
        }
524
12
        return ss;
525
12
    }
526
12
}
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
3.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
3.30k
    } else {
519
3.30k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
3.30k
        ss->id = operator_id();
521
3.30k
        for (auto& dest : dests_id()) {
522
3.29k
            ss->related_op_ids.insert(dest);
523
3.29k
        }
524
3.30k
        return ss;
525
3.30k
    }
526
3.30k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
75.3k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
75.3k
    } else {
519
75.3k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
75.3k
        ss->id = operator_id();
521
75.3k
        for (auto& dest : dests_id()) {
522
75.1k
            ss->related_op_ids.insert(dest);
523
75.1k
        }
524
75.3k
        return ss;
525
75.3k
    }
526
75.3k
}
_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
36.1k
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
36.1k
    } else {
519
36.1k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
36.1k
        ss->id = operator_id();
521
36.1k
        for (auto& dest : dests_id()) {
522
35.9k
            ss->related_op_ids.insert(dest);
523
35.9k
        }
524
36.1k
        return ss;
525
36.1k
    }
526
36.1k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
45
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
45
    } else {
519
45
        auto ss = LocalStateType::SharedStateType::create_shared();
520
45
        ss->id = operator_id();
521
45
        for (auto& dest : dests_id()) {
522
45
            ss->related_op_ids.insert(dest);
523
45
        }
524
45
        return ss;
525
45
    }
526
45
}
_ZNK5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
124k
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
124k
    } else {
519
124k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
124k
        ss->id = operator_id();
521
124k
        for (auto& dest : dests_id()) {
522
123k
            ss->related_op_ids.insert(dest);
523
123k
        }
524
124k
        return ss;
525
124k
    }
526
124k
}
_ZNK5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
3.87k
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.87k
    } else {
519
3.87k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
3.87k
        ss->id = operator_id();
521
3.87k
        for (auto& dest : dests_id()) {
522
3.86k
            ss->related_op_ids.insert(dest);
523
3.86k
        }
524
3.87k
        return ss;
525
3.87k
    }
526
3.87k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
420
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
420
    } else {
519
420
        auto ss = LocalStateType::SharedStateType::create_shared();
520
420
        ss->id = operator_id();
521
420
        for (auto& dest : dests_id()) {
522
419
            ss->related_op_ids.insert(dest);
523
419
        }
524
420
        return ss;
525
420
    }
526
420
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE19create_shared_stateEv
Line
Count
Source
511
283
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
283
    } else {
519
283
        auto ss = LocalStateType::SharedStateType::create_shared();
520
283
        ss->id = operator_id();
521
283
        for (auto& dest : dests_id()) {
522
283
            ss->related_op_ids.insert(dest);
523
283
        }
524
283
        return ss;
525
283
    }
526
283
}
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE19create_shared_stateEv
Line
Count
Source
511
254
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
254
    } else {
519
254
        auto ss = LocalStateType::SharedStateType::create_shared();
520
254
        ss->id = operator_id();
521
254
        for (auto& dest : dests_id()) {
522
254
            ss->related_op_ids.insert(dest);
523
254
        }
524
254
        return ss;
525
254
    }
526
254
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
142
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
142
    } else {
519
142
        auto ss = LocalStateType::SharedStateType::create_shared();
520
142
        ss->id = operator_id();
521
142
        for (auto& dest : dests_id()) {
522
142
            ss->related_op_ids.insert(dest);
523
142
        }
524
142
        return ss;
525
142
    }
526
142
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
62
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
62
    } else {
519
62
        auto ss = LocalStateType::SharedStateType::create_shared();
520
62
        ss->id = operator_id();
521
62
        for (auto& dest : dests_id()) {
522
62
            ss->related_op_ids.insert(dest);
523
62
        }
524
62
        return ss;
525
62
    }
526
62
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE19create_shared_stateEv
527
528
template <typename LocalStateType>
529
456k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
456k
    auto local_state = LocalStateType::create_unique(state, this);
531
456k
    RETURN_IF_ERROR(local_state->init(state, info));
532
456k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
456k
    return Status::OK();
534
456k
}
_ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
40.8k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
40.8k
    auto local_state = LocalStateType::create_unique(state, this);
531
40.8k
    RETURN_IF_ERROR(local_state->init(state, info));
532
40.8k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
40.8k
    return Status::OK();
534
40.8k
}
_ZN5doris9OperatorXINS_18OlapScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
88.3k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
88.3k
    auto local_state = LocalStateType::create_unique(state, this);
531
88.3k
    RETURN_IF_ERROR(local_state->init(state, info));
532
88.3k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
88.3k
    return Status::OK();
534
88.3k
}
_ZN5doris9OperatorXINS_21GroupCommitLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
61
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
61
    auto local_state = LocalStateType::create_unique(state, this);
531
61
    RETURN_IF_ERROR(local_state->init(state, info));
532
61
    state->emplace_local_state(operator_id(), std::move(local_state));
533
61
    return Status::OK();
534
61
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_18JDBCScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_18FileScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.16k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.16k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.16k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.16k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.16k
    return Status::OK();
534
1.16k
}
_ZN5doris9OperatorXINS_18AnalyticLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
3.28k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
3.28k
    auto local_state = LocalStateType::create_unique(state, this);
531
3.28k
    RETURN_IF_ERROR(local_state->init(state, info));
532
3.28k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
3.28k
    return Status::OK();
534
3.28k
}
_ZN5doris9OperatorXINS_14SortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
3.00k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
3.00k
    auto local_state = LocalStateType::create_unique(state, this);
531
3.00k
    RETURN_IF_ERROR(local_state->init(state, info));
532
3.00k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
3.00k
    return Status::OK();
534
3.00k
}
_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
72.0k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
72.0k
    auto local_state = LocalStateType::create_unique(state, this);
531
72.0k
    RETURN_IF_ERROR(local_state->init(state, info));
532
72.0k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
72.0k
    return Status::OK();
534
72.0k
}
_ZN5doris9OperatorXINS_13AggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
35.9k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
35.9k
    auto local_state = LocalStateType::create_unique(state, this);
531
35.9k
    RETURN_IF_ERROR(local_state->init(state, info));
532
35.9k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
35.9k
    return Status::OK();
534
35.9k
}
_ZN5doris9OperatorXINS_21BucketedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
67
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
67
    auto local_state = LocalStateType::create_unique(state, this);
531
67
    RETURN_IF_ERROR(local_state->init(state, info));
532
67
    state->emplace_local_state(operator_id(), std::move(local_state));
533
67
    return Status::OK();
534
67
}
_ZN5doris9OperatorXINS_24PartitionedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
36
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
36
    auto local_state = LocalStateType::create_unique(state, this);
531
36
    RETURN_IF_ERROR(local_state->init(state, info));
532
36
    state->emplace_local_state(operator_id(), std::move(local_state));
533
36
    return Status::OK();
534
36
}
_ZN5doris9OperatorXINS_23TableFunctionLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.15k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.15k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.15k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.15k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.15k
    return Status::OK();
534
1.15k
}
_ZN5doris9OperatorXINS_18ExchangeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
44.7k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
44.7k
    auto local_state = LocalStateType::create_unique(state, this);
531
44.7k
    RETURN_IF_ERROR(local_state->init(state, info));
532
44.7k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
44.7k
    return Status::OK();
534
44.7k
}
_ZN5doris9OperatorXINS_16RepeatLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
242
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
242
    auto local_state = LocalStateType::create_unique(state, this);
531
242
    RETURN_IF_ERROR(local_state->init(state, info));
532
242
    state->emplace_local_state(operator_id(), std::move(local_state));
533
242
    return Status::OK();
534
242
}
_ZN5doris9OperatorXINS_29NestedLoopJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
3.84k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
3.84k
    auto local_state = LocalStateType::create_unique(state, this);
531
3.84k
    RETURN_IF_ERROR(local_state->init(state, info));
532
3.84k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
3.84k
    return Status::OK();
534
3.84k
}
_ZN5doris9OperatorXINS_23AssertNumRowsLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
15
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
15
    auto local_state = LocalStateType::create_unique(state, this);
531
15
    RETURN_IF_ERROR(local_state->init(state, info));
532
15
    state->emplace_local_state(operator_id(), std::move(local_state));
533
15
    return Status::OK();
534
15
}
_ZN5doris9OperatorXINS_18EmptySetLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
467
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
467
    auto local_state = LocalStateType::create_unique(state, this);
531
467
    RETURN_IF_ERROR(local_state->init(state, info));
532
467
    state->emplace_local_state(operator_id(), std::move(local_state));
533
467
    return Status::OK();
534
467
}
_ZN5doris9OperatorXINS_21UnionSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
23.5k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
23.5k
    auto local_state = LocalStateType::create_unique(state, this);
531
23.5k
    RETURN_IF_ERROR(local_state->init(state, info));
532
23.5k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
23.5k
    return Status::OK();
534
23.5k
}
_ZN5doris9OperatorXINS_35MultiCastDataStreamSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.75k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.75k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.75k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.75k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.75k
    return Status::OK();
534
1.75k
}
_ZN5doris9OperatorXINS_29PartitionSortSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
313
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
313
    auto local_state = LocalStateType::create_unique(state, this);
531
313
    RETURN_IF_ERROR(local_state->init(state, info));
532
313
    state->emplace_local_state(operator_id(), std::move(local_state));
533
313
    return Status::OK();
534
313
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
276
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
276
    auto local_state = LocalStateType::create_unique(state, this);
531
276
    RETURN_IF_ERROR(local_state->init(state, info));
532
276
    state->emplace_local_state(operator_id(), std::move(local_state));
533
276
    return Status::OK();
534
276
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
248
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
248
    auto local_state = LocalStateType::create_unique(state, this);
531
248
    RETURN_IF_ERROR(local_state->init(state, info));
532
248
    state->emplace_local_state(operator_id(), std::move(local_state));
533
248
    return Status::OK();
534
248
}
_ZN5doris9OperatorXINS_17DataGenLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
173
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
173
    auto local_state = LocalStateType::create_unique(state, this);
531
173
    RETURN_IF_ERROR(local_state->init(state, info));
532
173
    state->emplace_local_state(operator_id(), std::move(local_state));
533
173
    return Status::OK();
534
173
}
_ZN5doris9OperatorXINS_20SchemaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.50k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.50k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.50k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.50k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.50k
    return Status::OK();
534
1.50k
}
_ZN5doris9OperatorXINS_18MetaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
855
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
855
    auto local_state = LocalStateType::create_unique(state, this);
531
855
    RETURN_IF_ERROR(local_state->init(state, info));
532
855
    state->emplace_local_state(operator_id(), std::move(local_state));
533
855
    return Status::OK();
534
855
}
_ZN5doris9OperatorXINS_29LocalExchangeSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
124k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
124k
    auto local_state = LocalStateType::create_unique(state, this);
531
124k
    RETURN_IF_ERROR(local_state->init(state, info));
532
124k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
124k
    return Status::OK();
534
124k
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_34PartitionedHashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Unexecuted instantiation: _ZN5doris9OperatorXINS_21CacheSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Unexecuted instantiation: _ZN5doris9OperatorXINS_22RecCTESourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Unexecuted instantiation: _ZN5doris9OperatorXINS_20RecCTEScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_25MaterializationLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
446
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
446
    auto local_state = LocalStateType::create_unique(state, this);
531
446
    RETURN_IF_ERROR(local_state->init(state, info));
532
446
    state->emplace_local_state(operator_id(), std::move(local_state));
533
446
    return Status::OK();
534
446
}
_ZN5doris9OperatorXINS_16SelectLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
715
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
715
    auto local_state = LocalStateType::create_unique(state, this);
531
715
    RETURN_IF_ERROR(local_state->init(state, info));
532
715
    state->emplace_local_state(operator_id(), std::move(local_state));
533
715
    return Status::OK();
534
715
}
_ZN5doris9OperatorXINS_22StreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.53k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.53k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.53k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.53k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.53k
    return Status::OK();
534
2.53k
}
_ZN5doris9OperatorXINS_30DistinctStreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
4.16k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
4.16k
    auto local_state = LocalStateType::create_unique(state, this);
531
4.16k
    RETURN_IF_ERROR(local_state->init(state, info));
532
4.16k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
4.16k
    return Status::OK();
534
4.16k
}
535
536
PipelineXSinkLocalStateBase::PipelineXSinkLocalStateBase(DataSinkOperatorXBase* parent,
537
                                                         RuntimeState* state)
538
473k
        : _parent(parent), _state(state) {}
539
540
PipelineXLocalStateBase::PipelineXLocalStateBase(RuntimeState* state, OperatorXBase* parent)
541
455k
        : _num_rows_returned(0),
542
455k
          _rows_returned_counter(nullptr),
543
455k
          _parent(parent),
544
455k
          _state(state),
545
455k
          _budget(state->batch_size(), state->preferred_block_size_bytes()) {}
546
547
template <typename SharedStateArg>
548
457k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
457k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
457k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
457k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
457k
    _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
457k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
457k
    _operator_profile->add_child(_common_profile.get(), true);
557
457k
    _operator_profile->add_child(_custom_profile.get(), true);
558
457k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
457k
    if constexpr (!is_fake_shared) {
560
310k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
131k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
131k
                                    .first.get()
563
131k
                                    ->template cast<SharedStateArg>();
564
565
131k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
131k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
131k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
178k
        } else if (info.shared_state) {
569
155k
            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
155k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
155k
            _dependency = _shared_state->create_source_dependency(
576
155k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
155k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
155k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
155k
        } else {
580
23.7k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
402
                DCHECK(false);
582
402
            }
583
23.7k
        }
584
310k
    }
585
586
457k
    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
457k
    _rows_returned_counter =
591
457k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
457k
    _blocks_returned_counter =
593
457k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
457k
    _output_block_bytes_counter =
595
457k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
457k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
457k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
457k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
457k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
457k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
457k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
457k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
457k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
457k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
457k
    _memory_used_counter =
606
457k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
457k
    _common_profile->add_info_string("IsColocate",
608
457k
                                     std::to_string(_parent->is_colocated_operator()));
609
457k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
457k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
457k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
457k
    return Status::OK();
613
457k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
40.9k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
40.9k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
40.9k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
40.9k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
40.9k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
40.9k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
40.9k
    _operator_profile->add_child(_common_profile.get(), true);
557
40.9k
    _operator_profile->add_child(_custom_profile.get(), true);
558
40.9k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
40.9k
    if constexpr (!is_fake_shared) {
560
40.9k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
7.22k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
7.22k
                                    .first.get()
563
7.22k
                                    ->template cast<SharedStateArg>();
564
565
7.22k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
7.22k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
7.22k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
33.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
33.6k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
33.6k
            _dependency = _shared_state->create_source_dependency(
576
33.6k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
33.6k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
33.6k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
33.6k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
21
        }
584
40.9k
    }
585
586
40.9k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
40.9k
    _rows_returned_counter =
591
40.9k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
40.9k
    _blocks_returned_counter =
593
40.9k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
40.9k
    _output_block_bytes_counter =
595
40.9k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
40.9k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
40.9k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
40.9k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
40.9k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
40.9k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
40.9k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
40.9k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
40.9k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
40.9k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
40.9k
    _memory_used_counter =
606
40.9k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
40.9k
    _common_profile->add_info_string("IsColocate",
608
40.9k
                                     std::to_string(_parent->is_colocated_operator()));
609
40.9k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
40.9k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
40.9k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
40.9k
    return Status::OK();
613
40.9k
}
_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
75.2k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
75.2k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
75.2k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
75.2k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
75.2k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
75.2k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
75.2k
    _operator_profile->add_child(_common_profile.get(), true);
557
75.2k
    _operator_profile->add_child(_custom_profile.get(), true);
558
75.2k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
75.2k
    if constexpr (!is_fake_shared) {
560
75.2k
        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
75.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
74.7k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
74.7k
            _dependency = _shared_state->create_source_dependency(
576
74.7k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
74.7k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
74.7k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
74.7k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
478
        }
584
75.2k
    }
585
586
75.2k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
75.2k
    _rows_returned_counter =
591
75.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
75.2k
    _blocks_returned_counter =
593
75.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
75.2k
    _output_block_bytes_counter =
595
75.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
75.2k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
75.2k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
75.2k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
75.2k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
75.2k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
75.2k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
75.2k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
75.2k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
75.2k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
75.2k
    _memory_used_counter =
606
75.2k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
75.2k
    _common_profile->add_info_string("IsColocate",
608
75.2k
                                     std::to_string(_parent->is_colocated_operator()));
609
75.2k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
75.2k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
75.2k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
75.2k
    return Status::OK();
613
75.2k
}
_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
3.87k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
3.87k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
3.87k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
3.87k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
3.87k
    _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
3.87k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
3.87k
    _operator_profile->add_child(_common_profile.get(), true);
557
3.87k
    _operator_profile->add_child(_custom_profile.get(), true);
558
3.87k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
3.87k
    if constexpr (!is_fake_shared) {
560
3.87k
        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
3.87k
        } 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
3.84k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
3.84k
            _dependency = _shared_state->create_source_dependency(
576
3.84k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
3.84k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
3.84k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
3.84k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
26
        }
584
3.87k
    }
585
586
3.87k
    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
3.87k
    _rows_returned_counter =
591
3.87k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
3.87k
    _blocks_returned_counter =
593
3.87k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
3.87k
    _output_block_bytes_counter =
595
3.87k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
3.87k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
3.87k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
3.87k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
3.87k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
3.87k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
3.87k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
3.87k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
3.87k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
3.87k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
3.87k
    _memory_used_counter =
606
3.87k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
3.87k
    _common_profile->add_info_string("IsColocate",
608
3.87k
                                     std::to_string(_parent->is_colocated_operator()));
609
3.87k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
3.87k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
3.87k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
3.87k
    return Status::OK();
613
3.87k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
3.30k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
3.30k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
3.30k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
3.30k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
3.30k
    _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
3.30k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
3.30k
    _operator_profile->add_child(_common_profile.get(), true);
557
3.30k
    _operator_profile->add_child(_custom_profile.get(), true);
558
3.30k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
3.30k
    if constexpr (!is_fake_shared) {
560
3.30k
        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
3.30k
        } 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
3.29k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
3.29k
            _dependency = _shared_state->create_source_dependency(
576
3.29k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
3.29k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
3.29k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
3.29k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
9
        }
584
3.30k
    }
585
586
3.30k
    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
3.30k
    _rows_returned_counter =
591
3.30k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
3.30k
    _blocks_returned_counter =
593
3.30k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
3.30k
    _output_block_bytes_counter =
595
3.30k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
3.30k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
3.30k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
3.30k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
3.30k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
3.30k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
3.30k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
3.30k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
3.30k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
3.30k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
3.30k
    _memory_used_counter =
606
3.30k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
3.30k
    _common_profile->add_info_string("IsColocate",
608
3.30k
                                     std::to_string(_parent->is_colocated_operator()));
609
3.30k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
3.30k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
3.30k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
3.30k
    return Status::OK();
613
3.30k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
36.1k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
36.1k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
36.1k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
36.1k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
36.1k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
36.1k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
36.1k
    _operator_profile->add_child(_common_profile.get(), true);
557
36.1k
    _operator_profile->add_child(_custom_profile.get(), true);
558
36.1k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
36.1k
    if constexpr (!is_fake_shared) {
560
36.1k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
36.1k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
35.8k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
35.8k
            _dependency = _shared_state->create_source_dependency(
576
35.8k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
35.8k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
35.8k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
35.8k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
222
        }
584
36.1k
    }
585
586
36.1k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
36.1k
    _rows_returned_counter =
591
36.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
36.1k
    _blocks_returned_counter =
593
36.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
36.1k
    _output_block_bytes_counter =
595
36.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
36.1k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
36.1k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
36.1k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
36.1k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
36.1k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
36.1k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
36.1k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
36.1k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
36.1k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
36.1k
    _memory_used_counter =
606
36.1k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
36.1k
    _common_profile->add_info_string("IsColocate",
608
36.1k
                                     std::to_string(_parent->is_colocated_operator()));
609
36.1k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
36.1k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
36.1k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
36.1k
    return Status::OK();
613
36.1k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
67
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
67
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
67
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
67
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
67
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
67
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
67
    _operator_profile->add_child(_common_profile.get(), true);
557
67
    _operator_profile->add_child(_custom_profile.get(), true);
558
67
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
67
    if constexpr (!is_fake_shared) {
560
67
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
67
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
67
                                    .first.get()
563
67
                                    ->template cast<SharedStateArg>();
564
565
67
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
67
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
67
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
67
        } 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
0
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
67
    }
585
586
67
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
67
    _rows_returned_counter =
591
67
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
67
    _blocks_returned_counter =
593
67
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
67
    _output_block_bytes_counter =
595
67
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
67
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
67
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
67
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
67
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
67
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
67
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
67
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
67
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
67
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
67
    _memory_used_counter =
606
67
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
67
    _common_profile->add_info_string("IsColocate",
608
67
                                     std::to_string(_parent->is_colocated_operator()));
609
67
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
67
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
67
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
67
    return Status::OK();
613
67
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
36
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
36
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
36
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
36
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
36
    _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
36
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
36
    _operator_profile->add_child(_common_profile.get(), true);
557
36
    _operator_profile->add_child(_custom_profile.get(), true);
558
36
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
36
    if constexpr (!is_fake_shared) {
560
36
        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
36
        } 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
36
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
36
            _dependency = _shared_state->create_source_dependency(
576
36
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
36
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
36
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
36
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
36
    }
585
586
36
    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
36
    _rows_returned_counter =
591
36
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
36
    _blocks_returned_counter =
593
36
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
36
    _output_block_bytes_counter =
595
36
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
36
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
36
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
36
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
36
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
36
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
36
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
36
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
36
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
36
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
36
    _memory_used_counter =
606
36
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
36
    _common_profile->add_info_string("IsColocate",
608
36
                                     std::to_string(_parent->is_colocated_operator()));
609
36
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
36
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
36
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
36
    return Status::OK();
613
36
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
146k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
146k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
146k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
146k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
146k
    _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
146k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
146k
    _operator_profile->add_child(_common_profile.get(), true);
557
146k
    _operator_profile->add_child(_custom_profile.get(), true);
558
146k
    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
146k
    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
146k
    _rows_returned_counter =
591
146k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
146k
    _blocks_returned_counter =
593
146k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
146k
    _output_block_bytes_counter =
595
146k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
146k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
146k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
146k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
146k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
146k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
146k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
146k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
146k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
146k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
146k
    _memory_used_counter =
606
146k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
146k
    _common_profile->add_info_string("IsColocate",
608
146k
                                     std::to_string(_parent->is_colocated_operator()));
609
146k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
146k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
146k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
146k
    return Status::OK();
613
146k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
23.5k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
23.5k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
23.5k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
23.5k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
23.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
23.5k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
23.5k
    _operator_profile->add_child(_common_profile.get(), true);
557
23.5k
    _operator_profile->add_child(_custom_profile.get(), true);
558
23.5k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
23.5k
    if constexpr (!is_fake_shared) {
560
23.5k
        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
23.5k
        } 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
950
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
950
            _dependency = _shared_state->create_source_dependency(
576
950
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
950
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
950
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
22.6k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
22.6k
        }
584
23.5k
    }
585
586
23.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
23.5k
    _rows_returned_counter =
591
23.5k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
23.5k
    _blocks_returned_counter =
593
23.5k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
23.5k
    _output_block_bytes_counter =
595
23.5k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
23.5k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
23.5k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
23.5k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
23.5k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
23.5k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
23.5k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
23.5k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
23.5k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
23.5k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
23.5k
    _memory_used_counter =
606
23.5k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
23.5k
    _common_profile->add_info_string("IsColocate",
608
23.5k
                                     std::to_string(_parent->is_colocated_operator()));
609
23.5k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
23.5k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
23.5k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
23.5k
    return Status::OK();
613
23.5k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
12
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
12
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
12
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
12
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
12
    _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
12
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
12
    _operator_profile->add_child(_common_profile.get(), true);
557
12
    _operator_profile->add_child(_custom_profile.get(), true);
558
12
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
12
    if constexpr (!is_fake_shared) {
560
12
        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
12
        } 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
12
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
12
            _dependency = _shared_state->create_source_dependency(
576
12
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
12
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
12
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
12
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
12
    }
585
586
12
    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
12
    _rows_returned_counter =
591
12
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
12
    _blocks_returned_counter =
593
12
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
12
    _output_block_bytes_counter =
595
12
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
12
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
12
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
12
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
12
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
12
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
12
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
12
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
12
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
12
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
12
    _memory_used_counter =
606
12
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
12
    _common_profile->add_info_string("IsColocate",
608
12
                                     std::to_string(_parent->is_colocated_operator()));
609
12
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
12
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
12
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
12
    return Status::OK();
613
12
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
1.75k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
1.75k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
1.75k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
1.75k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
1.75k
    _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.75k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
1.75k
    _operator_profile->add_child(_common_profile.get(), true);
557
1.75k
    _operator_profile->add_child(_custom_profile.get(), true);
558
1.75k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
1.75k
    if constexpr (!is_fake_shared) {
560
1.75k
        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.75k
        } 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.75k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
1.75k
            _dependency = _shared_state->create_source_dependency(
576
1.75k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
1.75k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
1.75k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
1.75k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
1.75k
    }
585
586
1.75k
    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.75k
    _rows_returned_counter =
591
1.75k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
1.75k
    _blocks_returned_counter =
593
1.75k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
1.75k
    _output_block_bytes_counter =
595
1.75k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
1.75k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
1.75k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
1.75k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
1.75k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
1.75k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
1.75k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
1.75k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
1.75k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
1.75k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
1.75k
    _memory_used_counter =
606
1.75k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
1.75k
    _common_profile->add_info_string("IsColocate",
608
1.75k
                                     std::to_string(_parent->is_colocated_operator()));
609
1.75k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
1.75k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
1.75k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
1.75k
    return Status::OK();
613
1.75k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
417
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
417
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
417
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
417
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
417
    _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
417
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
417
    _operator_profile->add_child(_common_profile.get(), true);
557
417
    _operator_profile->add_child(_custom_profile.get(), true);
558
417
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
417
    if constexpr (!is_fake_shared) {
560
417
        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
417
        } 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
417
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
417
            _dependency = _shared_state->create_source_dependency(
576
417
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
417
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
417
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
417
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
417
    }
585
586
417
    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
417
    _rows_returned_counter =
591
417
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
417
    _blocks_returned_counter =
593
417
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
417
    _output_block_bytes_counter =
595
417
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
417
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
417
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
417
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
417
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
417
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
417
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
417
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
417
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
417
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
417
    _memory_used_counter =
606
417
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
417
    _common_profile->add_info_string("IsColocate",
608
417
                                     std::to_string(_parent->is_colocated_operator()));
609
417
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
417
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
417
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
417
    return Status::OK();
613
417
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
537
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
537
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
537
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
537
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
537
    _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
537
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
537
    _operator_profile->add_child(_common_profile.get(), true);
557
537
    _operator_profile->add_child(_custom_profile.get(), true);
558
537
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
537
    if constexpr (!is_fake_shared) {
560
537
        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
537
        } 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
537
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
537
            _dependency = _shared_state->create_source_dependency(
576
537
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
537
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
537
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
537
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
537
    }
585
586
537
    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
537
    _rows_returned_counter =
591
537
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
537
    _blocks_returned_counter =
593
537
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
537
    _output_block_bytes_counter =
595
537
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
537
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
537
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
537
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
537
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
537
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
537
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
537
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
537
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
537
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
537
    _memory_used_counter =
606
537
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
537
    _common_profile->add_info_string("IsColocate",
608
537
                                     std::to_string(_parent->is_colocated_operator()));
609
537
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
537
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
537
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
537
    return Status::OK();
613
537
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
124k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
124k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
124k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
124k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
124k
    _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
124k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
124k
    _operator_profile->add_child(_common_profile.get(), true);
557
124k
    _operator_profile->add_child(_custom_profile.get(), true);
558
124k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
124k
    if constexpr (!is_fake_shared) {
560
124k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
124k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
124k
                                    .first.get()
563
124k
                                    ->template cast<SharedStateArg>();
564
565
124k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
124k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
124k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
124k
        } 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
402
        } else {
580
402
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
402
                DCHECK(false);
582
402
            }
583
402
        }
584
124k
    }
585
586
124k
    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
124k
    _rows_returned_counter =
591
124k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
124k
    _blocks_returned_counter =
593
124k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
124k
    _output_block_bytes_counter =
595
124k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
124k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
124k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
124k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
124k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
124k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
124k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
124k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
124k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
124k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
124k
    _memory_used_counter =
606
124k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
124k
    _common_profile->add_info_string("IsColocate",
608
124k
                                     std::to_string(_parent->is_colocated_operator()));
609
124k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
124k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
124k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
124k
    return Status::OK();
613
124k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
614
615
template <typename SharedStateArg>
616
457k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
457k
    _conjuncts.resize(_parent->_conjuncts.size());
618
619k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
161k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
161k
    }
621
457k
    if (_parent->has_projection()) {
622
140k
        const auto& projection = *_parent->_projection;
623
140k
        _projections.resize(projection.projections.size());
624
994k
        for (size_t i = 0; i < _projections.size(); i++) {
625
854k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
854k
        }
627
140k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
142k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
2.30k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
32.2k
            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
2.30k
        }
635
140k
    }
636
457k
    return Status::OK();
637
457k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
40.8k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
40.8k
    _conjuncts.resize(_parent->_conjuncts.size());
618
41.6k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
718
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
718
    }
621
40.9k
    if (_parent->has_projection()) {
622
40.9k
        const auto& projection = *_parent->_projection;
623
40.9k
        _projections.resize(projection.projections.size());
624
179k
        for (size_t i = 0; i < _projections.size(); i++) {
625
138k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
138k
        }
627
40.9k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
42.0k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
1.16k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
24.9k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
23.7k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
23.7k
                        state, _intermediate_projections[i][j]));
633
23.7k
            }
634
1.16k
        }
635
40.9k
    }
636
40.8k
    return Status::OK();
637
40.8k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
3
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
3
    _conjuncts.resize(_parent->_conjuncts.size());
618
3
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
3
    if (_parent->has_projection()) {
622
0
        const auto& projection = *_parent->_projection;
623
0
        _projections.resize(projection.projections.size());
624
0
        for (size_t i = 0; i < _projections.size(); i++) {
625
0
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
0
        }
627
0
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
0
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
0
    }
636
3
    return Status::OK();
637
3
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
75.4k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
75.4k
    _conjuncts.resize(_parent->_conjuncts.size());
618
75.4k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
75.4k
    if (_parent->has_projection()) {
622
13
        const auto& projection = *_parent->_projection;
623
13
        _projections.resize(projection.projections.size());
624
29
        for (size_t i = 0; i < _projections.size(); i++) {
625
16
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
16
        }
627
13
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
13
        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
13
    }
636
75.4k
    return Status::OK();
637
75.4k
}
_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
3.87k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
3.87k
    _conjuncts.resize(_parent->_conjuncts.size());
618
4.00k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
129
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
129
    }
621
3.87k
    if (_parent->has_projection()) {
622
3.87k
        const auto& projection = *_parent->_projection;
623
3.87k
        _projections.resize(projection.projections.size());
624
15.9k
        for (size_t i = 0; i < _projections.size(); i++) {
625
12.0k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
12.0k
        }
627
3.87k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
3.91k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
36
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
251
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
215
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
215
                        state, _intermediate_projections[i][j]));
633
215
            }
634
36
        }
635
3.87k
    }
636
3.87k
    return Status::OK();
637
3.87k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
3.30k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
3.30k
    _conjuncts.resize(_parent->_conjuncts.size());
618
3.65k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
349
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
349
    }
621
3.30k
    if (_parent->has_projection()) {
622
2.18k
        const auto& projection = *_parent->_projection;
623
2.18k
        _projections.resize(projection.projections.size());
624
7.87k
        for (size_t i = 0; i < _projections.size(); i++) {
625
5.68k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
5.68k
        }
627
2.18k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
2.28k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
93
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
710
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
617
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
617
                        state, _intermediate_projections[i][j]));
633
617
            }
634
93
        }
635
2.18k
    }
636
3.30k
    return Status::OK();
637
3.30k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
36.1k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
36.1k
    _conjuncts.resize(_parent->_conjuncts.size());
618
37.0k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
921
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
921
    }
621
36.1k
    if (_parent->has_projection()) {
622
6.27k
        const auto& projection = *_parent->_projection;
623
6.27k
        _projections.resize(projection.projections.size());
624
37.9k
        for (size_t i = 0; i < _projections.size(); i++) {
625
31.6k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
31.6k
        }
627
6.27k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
6.29k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
15
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
58
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
43
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
43
                        state, _intermediate_projections[i][j]));
633
43
            }
634
15
        }
635
6.27k
    }
636
36.1k
    return Status::OK();
637
36.1k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
67
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
67
    _conjuncts.resize(_parent->_conjuncts.size());
618
67
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
67
    if (_parent->has_projection()) {
622
49
        const auto& projection = *_parent->_projection;
623
49
        _projections.resize(projection.projections.size());
624
163
        for (size_t i = 0; i < _projections.size(); i++) {
625
114
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
114
        }
627
49
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
49
        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
49
    }
636
67
    return Status::OK();
637
67
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
40
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
40
    _conjuncts.resize(_parent->_conjuncts.size());
618
40
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
40
    if (_parent->has_projection()) {
622
26
        const auto& projection = *_parent->_projection;
623
26
        _projections.resize(projection.projections.size());
624
78
        for (size_t i = 0; i < _projections.size(); i++) {
625
52
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
52
        }
627
26
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
26
        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
26
    }
636
40
    return Status::OK();
637
40
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
146k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
146k
    _conjuncts.resize(_parent->_conjuncts.size());
618
305k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
158k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
158k
    }
621
146k
    if (_parent->has_projection()) {
622
82.1k
        const auto& projection = *_parent->_projection;
623
82.1k
        _projections.resize(projection.projections.size());
624
703k
        for (size_t i = 0; i < _projections.size(); i++) {
625
621k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
621k
        }
627
82.1k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
83.1k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
988
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
6.27k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
5.28k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
5.28k
                        state, _intermediate_projections[i][j]));
633
5.28k
            }
634
988
        }
635
82.1k
    }
636
146k
    return Status::OK();
637
146k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
23.6k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
23.6k
    _conjuncts.resize(_parent->_conjuncts.size());
618
23.6k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
23.6k
    if (_parent->has_projection()) {
622
4.95k
        const auto& projection = *_parent->_projection;
623
4.95k
        _projections.resize(projection.projections.size());
624
49.6k
        for (size_t i = 0; i < _projections.size(); i++) {
625
44.6k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
44.6k
        }
627
4.95k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
4.95k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
7
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
39
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
32
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
32
                        state, _intermediate_projections[i][j]));
633
32
            }
634
7
        }
635
4.95k
    }
636
23.6k
    return Status::OK();
637
23.6k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
11
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
11
    _conjuncts.resize(_parent->_conjuncts.size());
618
11
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
11
    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
11
    return Status::OK();
637
11
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
1.73k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
1.73k
    _conjuncts.resize(_parent->_conjuncts.size());
618
2.02k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
283
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
283
    }
621
1.73k
    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
1.73k
    return Status::OK();
637
1.73k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
420
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
420
    _conjuncts.resize(_parent->_conjuncts.size());
618
420
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
420
    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
420
    return Status::OK();
637
420
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
537
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
537
    _conjuncts.resize(_parent->_conjuncts.size());
618
537
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
537
    if (_parent->has_projection()) {
622
60
        const auto& projection = *_parent->_projection;
623
60
        _projections.resize(projection.projections.size());
624
227
        for (size_t i = 0; i < _projections.size(); i++) {
625
167
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
167
        }
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
537
    return Status::OK();
637
537
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
125k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
125k
    _conjuncts.resize(_parent->_conjuncts.size());
618
125k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
125k
    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
125k
    return Status::OK();
637
125k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4openEPNS_12RuntimeStateE
638
639
template <typename SharedStateArg>
640
2.11k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
2.11k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
2.11k
    _terminated = true;
645
2.11k
    return Status::OK();
646
2.11k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
293
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
293
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
293
    _terminated = true;
645
293
    return Status::OK();
646
293
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
11
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
11
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
11
    _terminated = true;
645
11
    return Status::OK();
646
11
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
21
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
21
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
21
    _terminated = true;
645
21
    return Status::OK();
646
21
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
1
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
1
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
1
    _terminated = true;
645
1
    return Status::OK();
646
1
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
10
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
10
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
10
    _terminated = true;
645
10
    return Status::OK();
646
10
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
1.44k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
1.44k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
1.44k
    _terminated = true;
645
1.44k
    return Status::OK();
646
1.44k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
6
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
6
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
6
    _terminated = true;
645
6
    return Status::OK();
646
6
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
331
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
331
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
331
    _terminated = true;
645
331
    return Status::OK();
646
331
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
647
648
template <typename SharedStateArg>
649
541k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
541k
    if (_closed) {
651
84.1k
        return Status::OK();
652
84.1k
    }
653
457k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
311k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
311k
    }
656
457k
    _closed = true;
657
457k
    return Status::OK();
658
541k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
40.8k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
40.8k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
40.8k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
40.8k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
40.8k
    }
656
40.8k
    _closed = true;
657
40.8k
    return Status::OK();
658
40.8k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
4
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
4
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
4
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
4
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
4
    }
656
4
    _closed = true;
657
4
    return Status::OK();
658
4
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
150k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
150k
    if (_closed) {
651
75.0k
        return Status::OK();
652
75.0k
    }
653
75.3k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
75.3k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
75.3k
    }
656
75.3k
    _closed = true;
657
75.3k
    return Status::OK();
658
150k
}
_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
3.87k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
3.87k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
3.87k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
3.87k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
3.87k
    }
656
3.87k
    _closed = true;
657
3.87k
    return Status::OK();
658
3.87k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
6.64k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
6.64k
    if (_closed) {
651
3.35k
        return Status::OK();
652
3.35k
    }
653
3.29k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
3.29k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
3.29k
    }
656
3.29k
    _closed = true;
657
3.29k
    return Status::OK();
658
6.64k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
36.0k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
36.0k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
36.0k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
36.0k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
36.0k
    }
656
36.0k
    _closed = true;
657
36.0k
    return Status::OK();
658
36.0k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
67
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
67
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
67
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
67
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
67
    }
656
67
    _closed = true;
657
67
    return Status::OK();
658
67
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
35
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
35
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
35
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
35
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
35
    }
656
35
    _closed = true;
657
35
    return Status::OK();
658
35
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
151k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
151k
    if (_closed) {
651
4.84k
        return Status::OK();
652
4.84k
    }
653
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
    }
656
146k
    _closed = true;
657
146k
    return Status::OK();
658
151k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
23.6k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
23.6k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
23.6k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
23.6k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
23.6k
    }
656
23.6k
    _closed = true;
657
23.6k
    return Status::OK();
658
23.6k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
1.74k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
1.74k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
1.74k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
1.74k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
1.74k
    }
656
1.74k
    _closed = true;
657
1.74k
    return Status::OK();
658
1.74k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
634
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
634
    if (_closed) {
651
318
        return Status::OK();
652
318
    }
653
316
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
316
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
316
    }
656
316
    _closed = true;
657
316
    return Status::OK();
658
634
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
1.12k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
1.12k
    if (_closed) {
651
598
        return Status::OK();
652
598
    }
653
524
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
524
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
524
    }
656
524
    _closed = true;
657
524
    return Status::OK();
658
1.12k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
125k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
125k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
125k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
125k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
125k
    }
656
125k
    _closed = true;
657
125k
    return Status::OK();
658
125k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateE
659
660
template <typename SharedState>
661
473k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
473k
    _operator_profile =
664
473k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
473k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
473k
    _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
473k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
473k
    _operator_profile->add_child(_common_profile, true);
673
473k
    _operator_profile->add_child(_custom_profile, true);
674
675
473k
    _operator_profile->set_metadata(_parent->node_id());
676
473k
    _wait_for_finish_dependency_timer =
677
473k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
473k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
473k
    if constexpr (!is_fake_shared) {
680
349k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
349k
            info.shared_state_map.end()) {
682
56.7k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
49.4k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
49.4k
            }
685
56.7k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
56.7k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
56.7k
                                                  ? 0
688
56.7k
                                                  : info.task_idx]
689
56.7k
                                  .get();
690
56.7k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
293k
        } else {
692
18.4E
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
18.4E
                DCHECK(false);
694
18.4E
            }
695
293k
            _shared_state = info.shared_state->template cast<SharedState>();
696
293k
            _dependency = _shared_state->create_sink_dependency(
697
293k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
293k
        }
699
349k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
349k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
349k
    }
702
703
473k
    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
473k
    _rows_input_counter =
708
473k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
473k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
473k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
473k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
473k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
473k
    _memory_used_counter =
714
473k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
473k
    _common_profile->add_info_string("IsColocate",
716
473k
                                     std::to_string(_parent->is_colocated_operator()));
717
473k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
473k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
473k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
473k
    return Status::OK();
721
473k
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
88.8k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
88.8k
    _operator_profile =
664
88.8k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
88.8k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
88.8k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
88.8k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
88.8k
    _operator_profile->add_child(_common_profile, true);
673
88.8k
    _operator_profile->add_child(_custom_profile, true);
674
675
88.8k
    _operator_profile->set_metadata(_parent->node_id());
676
88.8k
    _wait_for_finish_dependency_timer =
677
88.8k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
88.8k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
88.8k
    if constexpr (!is_fake_shared) {
680
88.8k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
88.8k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
7.23k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
7.23k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
7.23k
                                                  ? 0
688
7.23k
                                                  : info.task_idx]
689
7.23k
                                  .get();
690
7.23k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
81.6k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
81.6k
            _shared_state = info.shared_state->template cast<SharedState>();
696
81.6k
            _dependency = _shared_state->create_sink_dependency(
697
81.6k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
81.6k
        }
699
88.8k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
88.8k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
88.8k
    }
702
703
88.8k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
88.8k
    _rows_input_counter =
708
88.8k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
88.8k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
88.8k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
88.8k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
88.8k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
88.8k
    _memory_used_counter =
714
88.8k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
88.8k
    _common_profile->add_info_string("IsColocate",
716
88.8k
                                     std::to_string(_parent->is_colocated_operator()));
717
88.8k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
88.8k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
88.8k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
88.8k
    return Status::OK();
721
88.8k
}
_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
75.1k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
75.1k
    _operator_profile =
664
75.1k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
75.1k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
75.1k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
75.1k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
75.1k
    _operator_profile->add_child(_common_profile, true);
673
75.1k
    _operator_profile->add_child(_custom_profile, true);
674
675
75.1k
    _operator_profile->set_metadata(_parent->node_id());
676
75.1k
    _wait_for_finish_dependency_timer =
677
75.1k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
75.1k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
75.1k
    if constexpr (!is_fake_shared) {
680
75.1k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
75.1k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
75.1k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
75.1k
            _shared_state = info.shared_state->template cast<SharedState>();
696
75.1k
            _dependency = _shared_state->create_sink_dependency(
697
75.1k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
75.1k
        }
699
75.1k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
75.1k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
75.1k
    }
702
703
75.1k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
75.1k
    _rows_input_counter =
708
75.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
75.1k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
75.1k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
75.1k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
75.1k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
75.1k
    _memory_used_counter =
714
75.1k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
75.1k
    _common_profile->add_info_string("IsColocate",
716
75.1k
                                     std::to_string(_parent->is_colocated_operator()));
717
75.1k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
75.1k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
75.1k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
75.1k
    return Status::OK();
721
75.1k
}
_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
3.86k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
3.86k
    _operator_profile =
664
3.86k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
3.86k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
3.86k
    _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
3.86k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
3.86k
    _operator_profile->add_child(_common_profile, true);
673
3.86k
    _operator_profile->add_child(_custom_profile, true);
674
675
3.86k
    _operator_profile->set_metadata(_parent->node_id());
676
3.86k
    _wait_for_finish_dependency_timer =
677
3.86k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
3.86k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
3.86k
    if constexpr (!is_fake_shared) {
680
3.86k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
3.86k
            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
3.86k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
3.86k
            _shared_state = info.shared_state->template cast<SharedState>();
696
3.86k
            _dependency = _shared_state->create_sink_dependency(
697
3.86k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
3.86k
        }
699
3.86k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
3.86k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
3.86k
    }
702
703
3.86k
    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
3.86k
    _rows_input_counter =
708
3.86k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
3.86k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
3.86k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
3.86k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
3.86k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
3.86k
    _memory_used_counter =
714
3.86k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
3.86k
    _common_profile->add_info_string("IsColocate",
716
3.86k
                                     std::to_string(_parent->is_colocated_operator()));
717
3.86k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
3.86k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
3.86k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
3.86k
    return Status::OK();
721
3.86k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
3.30k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
3.30k
    _operator_profile =
664
3.30k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
3.30k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
3.30k
    _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
3.30k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
3.30k
    _operator_profile->add_child(_common_profile, true);
673
3.30k
    _operator_profile->add_child(_custom_profile, true);
674
675
3.30k
    _operator_profile->set_metadata(_parent->node_id());
676
3.30k
    _wait_for_finish_dependency_timer =
677
3.30k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
3.30k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
3.30k
    if constexpr (!is_fake_shared) {
680
3.30k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
3.30k
            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
3.30k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
3.30k
            _shared_state = info.shared_state->template cast<SharedState>();
696
3.30k
            _dependency = _shared_state->create_sink_dependency(
697
3.30k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
3.30k
        }
699
3.30k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
3.30k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
3.30k
    }
702
703
3.30k
    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
3.30k
    _rows_input_counter =
708
3.30k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
3.30k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
3.30k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
3.30k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
3.30k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
3.30k
    _memory_used_counter =
714
3.30k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
3.30k
    _common_profile->add_info_string("IsColocate",
716
3.30k
                                     std::to_string(_parent->is_colocated_operator()));
717
3.30k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
3.30k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
3.30k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
3.30k
    return Status::OK();
721
3.30k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
36.0k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
36.0k
    _operator_profile =
664
36.0k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
36.0k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
36.0k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
36.0k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
36.0k
    _operator_profile->add_child(_common_profile, true);
673
36.0k
    _operator_profile->add_child(_custom_profile, true);
674
675
36.0k
    _operator_profile->set_metadata(_parent->node_id());
676
36.0k
    _wait_for_finish_dependency_timer =
677
36.0k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
36.0k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
36.0k
    if constexpr (!is_fake_shared) {
680
36.0k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
36.0k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
36.0k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
36.0k
            _shared_state = info.shared_state->template cast<SharedState>();
696
36.0k
            _dependency = _shared_state->create_sink_dependency(
697
36.0k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
36.0k
        }
699
36.0k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
36.0k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
36.0k
    }
702
703
36.0k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
36.0k
    _rows_input_counter =
708
36.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
36.0k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
36.0k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
36.0k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
36.0k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
36.0k
    _memory_used_counter =
714
36.0k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
36.0k
    _common_profile->add_info_string("IsColocate",
716
36.0k
                                     std::to_string(_parent->is_colocated_operator()));
717
36.0k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
36.0k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
36.0k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
36.0k
    return Status::OK();
721
36.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
67
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
67
    _operator_profile =
664
67
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
67
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
67
    _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
67
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
67
    _operator_profile->add_child(_common_profile, true);
673
67
    _operator_profile->add_child(_custom_profile, true);
674
675
67
    _operator_profile->set_metadata(_parent->node_id());
676
67
    _wait_for_finish_dependency_timer =
677
67
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
67
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
67
    if constexpr (!is_fake_shared) {
680
67
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
67
            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
67
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
67
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
67
                                                  ? 0
688
67
                                                  : info.task_idx]
689
67
                                  .get();
690
67
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
67
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
0
            _shared_state = info.shared_state->template cast<SharedState>();
696
0
            _dependency = _shared_state->create_sink_dependency(
697
0
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
0
        }
699
67
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
67
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
67
    }
702
703
67
    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
67
    _rows_input_counter =
708
67
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
67
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
67
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
67
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
67
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
67
    _memory_used_counter =
714
67
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
67
    _common_profile->add_info_string("IsColocate",
716
67
                                     std::to_string(_parent->is_colocated_operator()));
717
67
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
67
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
67
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
67
    return Status::OK();
721
67
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
46
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
46
    _operator_profile =
664
46
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
46
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
46
    _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
46
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
46
    _operator_profile->add_child(_common_profile, true);
673
46
    _operator_profile->add_child(_custom_profile, true);
674
675
46
    _operator_profile->set_metadata(_parent->node_id());
676
46
    _wait_for_finish_dependency_timer =
677
46
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
46
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
46
    if constexpr (!is_fake_shared) {
680
46
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
46
            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
46
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
46
            _shared_state = info.shared_state->template cast<SharedState>();
696
46
            _dependency = _shared_state->create_sink_dependency(
697
46
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
46
        }
699
46
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
46
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
46
    }
702
703
46
    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
46
    _rows_input_counter =
708
46
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
46
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
46
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
46
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
46
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
46
    _memory_used_counter =
714
46
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
46
    _common_profile->add_info_string("IsColocate",
716
46
                                     std::to_string(_parent->is_colocated_operator()));
717
46
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
46
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
46
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
46
    return Status::OK();
721
46
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
123k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
123k
    _operator_profile =
664
123k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
123k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
123k
    _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
123k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
123k
    _operator_profile->add_child(_common_profile, true);
673
123k
    _operator_profile->add_child(_custom_profile, true);
674
675
123k
    _operator_profile->set_metadata(_parent->node_id());
676
123k
    _wait_for_finish_dependency_timer =
677
123k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
123k
    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
123k
    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
123k
    _rows_input_counter =
708
123k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
123k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
123k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
123k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
123k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
123k
    _memory_used_counter =
714
123k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
123k
    _common_profile->add_info_string("IsColocate",
716
123k
                                     std::to_string(_parent->is_colocated_operator()));
717
123k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
123k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
123k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
123k
    return Status::OK();
721
123k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
2.06k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
2.06k
    _operator_profile =
664
2.06k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
2.06k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
2.06k
    _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.06k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
2.06k
    _operator_profile->add_child(_common_profile, true);
673
2.06k
    _operator_profile->add_child(_custom_profile, true);
674
675
2.06k
    _operator_profile->set_metadata(_parent->node_id());
676
2.06k
    _wait_for_finish_dependency_timer =
677
2.06k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
2.06k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
2.06k
    if constexpr (!is_fake_shared) {
680
2.06k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
2.06k
            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.06k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
2.06k
            _shared_state = info.shared_state->template cast<SharedState>();
696
2.06k
            _dependency = _shared_state->create_sink_dependency(
697
2.06k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
2.06k
        }
699
2.06k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
2.06k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
2.06k
    }
702
703
2.06k
    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.06k
    _rows_input_counter =
708
2.06k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
2.06k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
2.06k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
2.06k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
2.06k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
2.06k
    _memory_used_counter =
714
2.06k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
2.06k
    _common_profile->add_info_string("IsColocate",
716
2.06k
                                     std::to_string(_parent->is_colocated_operator()));
717
2.06k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
2.06k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
2.06k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
2.06k
    return Status::OK();
721
2.06k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
420
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
420
    _operator_profile =
664
420
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
420
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
420
    _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
420
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
420
    _operator_profile->add_child(_common_profile, true);
673
420
    _operator_profile->add_child(_custom_profile, true);
674
675
420
    _operator_profile->set_metadata(_parent->node_id());
676
420
    _wait_for_finish_dependency_timer =
677
420
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
420
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
420
    if constexpr (!is_fake_shared) {
680
420
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
420
            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
420
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
420
            _shared_state = info.shared_state->template cast<SharedState>();
696
420
            _dependency = _shared_state->create_sink_dependency(
697
420
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
420
        }
699
420
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
420
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
420
    }
702
703
420
    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
420
    _rows_input_counter =
708
420
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
420
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
420
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
420
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
420
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
420
    _memory_used_counter =
714
420
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
420
    _common_profile->add_info_string("IsColocate",
716
420
                                     std::to_string(_parent->is_colocated_operator()));
717
420
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
420
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
420
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
420
    return Status::OK();
721
420
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
686
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
686
    _operator_profile =
664
686
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
686
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
686
    _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
686
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
686
    _operator_profile->add_child(_common_profile, true);
673
686
    _operator_profile->add_child(_custom_profile, true);
674
675
686
    _operator_profile->set_metadata(_parent->node_id());
676
686
    _wait_for_finish_dependency_timer =
677
686
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
686
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
686
    if constexpr (!is_fake_shared) {
680
686
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
686
            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
686
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
686
            _shared_state = info.shared_state->template cast<SharedState>();
696
686
            _dependency = _shared_state->create_sink_dependency(
697
686
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
686
        }
699
686
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
686
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
686
    }
702
703
686
    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
686
    _rows_input_counter =
708
686
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
686
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
686
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
686
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
686
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
686
    _memory_used_counter =
714
686
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
686
    _common_profile->add_info_string("IsColocate",
716
686
                                     std::to_string(_parent->is_colocated_operator()));
717
686
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
686
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
686
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
686
    return Status::OK();
721
686
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
1.15k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
1.15k
    _operator_profile =
664
1.15k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
1.15k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
1.15k
    _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.15k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
1.15k
    _operator_profile->add_child(_common_profile, true);
673
1.15k
    _operator_profile->add_child(_custom_profile, true);
674
675
1.15k
    _operator_profile->set_metadata(_parent->node_id());
676
1.15k
    _wait_for_finish_dependency_timer =
677
1.15k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
1.15k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
1.15k
    if constexpr (!is_fake_shared) {
680
1.15k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
1.15k
            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.15k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
1.15k
            _shared_state = info.shared_state->template cast<SharedState>();
696
1.15k
            _dependency = _shared_state->create_sink_dependency(
697
1.15k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
1.15k
        }
699
1.15k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
1.15k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
1.15k
    }
702
703
1.15k
    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.15k
    _rows_input_counter =
708
1.15k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
1.15k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
1.15k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
1.15k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
1.15k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
1.15k
    _memory_used_counter =
714
1.15k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
1.15k
    _common_profile->add_info_string("IsColocate",
716
1.15k
                                     std::to_string(_parent->is_colocated_operator()));
717
1.15k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
1.15k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
1.15k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
1.15k
    return Status::OK();
721
1.15k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
49.4k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
49.4k
    _operator_profile =
664
49.4k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
49.4k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
49.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
49.4k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
49.4k
    _operator_profile->add_child(_common_profile, true);
673
49.4k
    _operator_profile->add_child(_custom_profile, true);
674
675
49.4k
    _operator_profile->set_metadata(_parent->node_id());
676
49.4k
    _wait_for_finish_dependency_timer =
677
49.4k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
49.4k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
49.4k
    if constexpr (!is_fake_shared) {
680
49.4k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
49.4k
            info.shared_state_map.end()) {
682
49.4k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
49.4k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
49.4k
            }
685
49.4k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
49.4k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
49.4k
                                                  ? 0
688
49.4k
                                                  : info.task_idx]
689
49.4k
                                  .get();
690
49.4k
            _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
49.4k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
49.4k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
49.4k
    }
702
703
49.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
49.4k
    _rows_input_counter =
708
49.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
49.4k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
49.4k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
49.4k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
49.4k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
49.4k
    _memory_used_counter =
714
49.4k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
49.4k
    _common_profile->add_info_string("IsColocate",
716
49.4k
                                     std::to_string(_parent->is_colocated_operator()));
717
49.4k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
49.4k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
49.4k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
49.4k
    return Status::OK();
721
49.4k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
88.8k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
88.8k
    _operator_profile =
664
88.8k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
88.8k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
88.8k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
88.8k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
88.8k
    _operator_profile->add_child(_common_profile, true);
673
88.8k
    _operator_profile->add_child(_custom_profile, true);
674
675
88.8k
    _operator_profile->set_metadata(_parent->node_id());
676
88.8k
    _wait_for_finish_dependency_timer =
677
88.8k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
88.8k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
88.8k
    if constexpr (!is_fake_shared) {
680
88.8k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
88.8k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
88.8k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
88.8k
            _shared_state = info.shared_state->template cast<SharedState>();
696
88.8k
            _dependency = _shared_state->create_sink_dependency(
697
88.8k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
88.8k
        }
699
88.8k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
88.8k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
88.8k
    }
702
703
88.8k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
88.8k
    _rows_input_counter =
708
88.8k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
88.8k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
88.8k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
88.8k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
88.8k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
88.8k
    _memory_used_counter =
714
88.8k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
88.8k
    _common_profile->add_info_string("IsColocate",
716
88.8k
                                     std::to_string(_parent->is_colocated_operator()));
717
88.8k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
88.8k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
88.8k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
88.8k
    return Status::OK();
721
88.8k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
11
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
11
    _operator_profile =
664
11
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
11
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
11
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
11
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
11
    _operator_profile->add_child(_common_profile, true);
673
11
    _operator_profile->add_child(_custom_profile, true);
674
675
11
    _operator_profile->set_metadata(_parent->node_id());
676
11
    _wait_for_finish_dependency_timer =
677
11
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
11
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
11
    if constexpr (!is_fake_shared) {
680
11
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
11
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
11
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
11
            _shared_state = info.shared_state->template cast<SharedState>();
696
11
            _dependency = _shared_state->create_sink_dependency(
697
11
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
11
        }
699
11
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
11
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
11
    }
702
703
11
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
11
    _rows_input_counter =
708
11
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
11
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
11
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
11
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
11
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
11
    _memory_used_counter =
714
11
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
11
    _common_profile->add_info_string("IsColocate",
716
11
                                     std::to_string(_parent->is_colocated_operator()));
717
11
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
11
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
11
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
11
    return Status::OK();
721
11
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
722
723
template <typename SharedState>
724
475k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
475k
    if (_closed) {
726
2
        return Status::OK();
727
2
    }
728
475k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
350k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
350k
    }
731
475k
    _closed = true;
732
475k
    return Status::OK();
733
475k
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
88.8k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
88.8k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
88.8k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
88.8k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
88.8k
    }
731
88.8k
    _closed = true;
732
88.8k
    return Status::OK();
733
88.8k
}
_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
75.3k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
75.3k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
75.3k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
75.3k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
75.3k
    }
731
75.3k
    _closed = true;
732
75.3k
    return Status::OK();
733
75.3k
}
_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
3.87k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
3.87k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
3.87k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
3.87k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
3.87k
    }
731
3.87k
    _closed = true;
732
3.87k
    return Status::OK();
733
3.87k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
3.28k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
3.28k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
3.28k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
3.28k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
3.28k
    }
731
3.28k
    _closed = true;
732
3.28k
    return Status::OK();
733
3.28k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
35.9k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
35.9k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
35.9k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
35.9k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
35.9k
    }
731
35.9k
    _closed = true;
732
35.9k
    return Status::OK();
733
35.9k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
67
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
67
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
67
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
67
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
67
    }
731
67
    _closed = true;
732
67
    return Status::OK();
733
67
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
35
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
35
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
35
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
35
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
35
    }
731
35
    _closed = true;
732
35
    return Status::OK();
733
35
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
124k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
124k
    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
124k
    _closed = true;
732
124k
    return Status::OK();
733
124k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
2.06k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
2.06k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
2.06k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
2.06k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
2.06k
    }
731
2.06k
    _closed = true;
732
2.06k
    return Status::OK();
733
2.06k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
317
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
317
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
317
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
317
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
317
    }
731
317
    _closed = true;
732
317
    return Status::OK();
733
317
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
688
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
688
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
688
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
688
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
688
    }
731
688
    _closed = true;
732
688
    return Status::OK();
733
688
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
1.12k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
1.12k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
1.12k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
1.12k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
1.12k
    }
731
1.12k
    _closed = true;
732
1.12k
    return Status::OK();
733
1.12k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
49.5k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
49.5k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
49.5k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
49.5k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
49.5k
    }
731
49.5k
    _closed = true;
732
49.5k
    return Status::OK();
733
49.5k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
89.4k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
89.4k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
89.4k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
89.4k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
89.4k
    }
731
89.4k
    _closed = true;
732
89.4k
    return Status::OK();
733
89.4k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
734
735
template <typename LocalStateType>
736
Status StreamingOperatorX<LocalStateType>::get_block_impl(RuntimeState* state, Block* block,
737
3.63k
                                                          bool* eos) {
738
3.63k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
3.63k
    return pull(state, block, eos);
740
3.63k
}
_ZN5doris18StreamingOperatorXINS_23AssertNumRowsLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
19
                                                          bool* eos) {
738
19
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
19
    return pull(state, block, eos);
740
19
}
_ZN5doris18StreamingOperatorXINS_16SelectLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
3.62k
                                                          bool* eos) {
738
3.62k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
3.61k
    return pull(state, block, eos);
740
3.62k
}
741
742
template <typename LocalStateType>
743
Status StatefulOperatorX<LocalStateType>::get_block_impl(RuntimeState* state, Block* block,
744
102k
                                                         bool* eos) {
745
102k
    auto& local_state = get_local_state(state);
746
102k
    if (need_more_input_data(state)) {
747
83.3k
        local_state._child_block->clear_column_data(
748
83.3k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
83.3k
                        .num_materialized_slots());
750
83.3k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
83.3k
                state, local_state._child_block.get(), &local_state._child_eos));
752
83.3k
        *eos = local_state._child_eos;
753
83.3k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
18.8k
            return Status::OK();
755
18.8k
        }
756
64.5k
        {
757
64.5k
            SCOPED_TIMER(local_state.exec_time_counter());
758
64.5k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
64.5k
        }
760
64.5k
    }
761
762
83.2k
    if (!need_more_input_data(state)) {
763
78.7k
        SCOPED_TIMER(local_state.exec_time_counter());
764
78.7k
        bool new_eos = false;
765
78.7k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
78.7k
        if (new_eos) {
767
29.0k
            *eos = true;
768
49.7k
        } else if (!need_more_input_data(state)) {
769
17.6k
            *eos = false;
770
17.6k
        }
771
78.7k
    }
772
83.2k
    return Status::OK();
773
83.2k
}
_ZN5doris17StatefulOperatorXINS_23HashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
65.5k
                                                         bool* eos) {
745
65.5k
    auto& local_state = get_local_state(state);
746
65.5k
    if (need_more_input_data(state)) {
747
57.7k
        local_state._child_block->clear_column_data(
748
57.7k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
57.7k
                        .num_materialized_slots());
750
57.7k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
57.7k
                state, local_state._child_block.get(), &local_state._child_eos));
752
57.7k
        *eos = local_state._child_eos;
753
57.7k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
13.8k
            return Status::OK();
755
13.8k
        }
756
43.8k
        {
757
43.8k
            SCOPED_TIMER(local_state.exec_time_counter());
758
43.8k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
43.8k
        }
760
43.8k
    }
761
762
51.7k
    if (!need_more_input_data(state)) {
763
51.7k
        SCOPED_TIMER(local_state.exec_time_counter());
764
51.7k
        bool new_eos = false;
765
51.7k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
51.7k
        if (new_eos) {
767
16.7k
            *eos = true;
768
35.0k
        } else if (!need_more_input_data(state)) {
769
6.74k
            *eos = false;
770
6.74k
        }
771
51.7k
    }
772
51.7k
    return Status::OK();
773
51.7k
}
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_34PartitionedHashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
_ZN5doris17StatefulOperatorXINS_16RepeatLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
662
                                                         bool* eos) {
745
662
    auto& local_state = get_local_state(state);
746
662
    if (need_more_input_data(state)) {
747
410
        local_state._child_block->clear_column_data(
748
410
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
410
                        .num_materialized_slots());
750
410
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
410
                state, local_state._child_block.get(), &local_state._child_eos));
752
410
        *eos = local_state._child_eos;
753
410
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
101
            return Status::OK();
755
101
        }
756
309
        {
757
309
            SCOPED_TIMER(local_state.exec_time_counter());
758
309
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
309
        }
760
309
    }
761
762
562
    if (!need_more_input_data(state)) {
763
562
        SCOPED_TIMER(local_state.exec_time_counter());
764
562
        bool new_eos = false;
765
562
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
562
        if (new_eos) {
767
242
            *eos = true;
768
320
        } else if (!need_more_input_data(state)) {
769
252
            *eos = false;
770
252
        }
771
562
    }
772
561
    return Status::OK();
773
561
}
_ZN5doris17StatefulOperatorXINS_25MaterializationLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
1.08k
                                                         bool* eos) {
745
1.08k
    auto& local_state = get_local_state(state);
746
1.08k
    if (need_more_input_data(state)) {
747
1.08k
        local_state._child_block->clear_column_data(
748
1.08k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
1.08k
                        .num_materialized_slots());
750
1.08k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
1.08k
                state, local_state._child_block.get(), &local_state._child_eos));
752
1.08k
        *eos = local_state._child_eos;
753
1.08k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
445
            return Status::OK();
755
445
        }
756
639
        {
757
639
            SCOPED_TIMER(local_state.exec_time_counter());
758
639
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
639
        }
760
639
    }
761
762
639
    if (!need_more_input_data(state)) {
763
639
        SCOPED_TIMER(local_state.exec_time_counter());
764
639
        bool new_eos = false;
765
639
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
639
        if (new_eos) {
767
446
            *eos = true;
768
446
        } else if (!need_more_input_data(state)) {
769
0
            *eos = false;
770
0
        }
771
639
    }
772
639
    return Status::OK();
773
639
}
_ZN5doris17StatefulOperatorXINS_22StreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
6.20k
                                                         bool* eos) {
745
6.20k
    auto& local_state = get_local_state(state);
746
6.22k
    if (need_more_input_data(state)) {
747
6.22k
        local_state._child_block->clear_column_data(
748
6.22k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
6.22k
                        .num_materialized_slots());
750
6.22k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
6.22k
                state, local_state._child_block.get(), &local_state._child_eos));
752
6.22k
        *eos = local_state._child_eos;
753
6.22k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
1.95k
            return Status::OK();
755
1.95k
        }
756
4.27k
        {
757
4.27k
            SCOPED_TIMER(local_state.exec_time_counter());
758
4.27k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
4.27k
        }
760
4.27k
    }
761
762
4.24k
    if (!need_more_input_data(state)) {
763
2.55k
        SCOPED_TIMER(local_state.exec_time_counter());
764
2.55k
        bool new_eos = false;
765
2.55k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
2.55k
        if (new_eos) {
767
2.52k
            *eos = true;
768
2.52k
        } else if (!need_more_input_data(state)) {
769
4
            *eos = false;
770
4
        }
771
2.55k
    }
772
4.24k
    return Status::OK();
773
4.24k
}
_ZN5doris17StatefulOperatorXINS_30DistinctStreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
7.80k
                                                         bool* eos) {
745
7.80k
    auto& local_state = get_local_state(state);
746
7.81k
    if (need_more_input_data(state)) {
747
7.81k
        local_state._child_block->clear_column_data(
748
7.81k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
7.81k
                        .num_materialized_slots());
750
7.81k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
7.81k
                state, local_state._child_block.get(), &local_state._child_eos));
752
7.81k
        *eos = local_state._child_eos;
753
7.81k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
1.23k
            return Status::OK();
755
1.23k
        }
756
6.58k
        {
757
6.58k
            SCOPED_TIMER(local_state.exec_time_counter());
758
6.58k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
6.58k
        }
760
6.58k
    }
761
762
6.56k
    if (!need_more_input_data(state)) {
763
4.16k
        SCOPED_TIMER(local_state.exec_time_counter());
764
4.16k
        bool new_eos = false;
765
4.16k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
4.16k
        if (new_eos) {
767
4.14k
            *eos = true;
768
4.14k
        } else if (!need_more_input_data(state)) {
769
0
            *eos = false;
770
0
        }
771
4.16k
    }
772
6.56k
    return Status::OK();
773
6.56k
}
_ZN5doris17StatefulOperatorXINS_29NestedLoopJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
18.0k
                                                         bool* eos) {
745
18.0k
    auto& local_state = get_local_state(state);
746
18.0k
    if (need_more_input_data(state)) {
747
7.67k
        local_state._child_block->clear_column_data(
748
7.67k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
7.67k
                        .num_materialized_slots());
750
7.67k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
7.67k
                state, local_state._child_block.get(), &local_state._child_eos));
752
7.67k
        *eos = local_state._child_eos;
753
7.67k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
819
            return Status::OK();
755
819
        }
756
6.85k
        {
757
6.85k
            SCOPED_TIMER(local_state.exec_time_counter());
758
6.85k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
6.85k
        }
760
6.85k
    }
761
762
17.1k
    if (!need_more_input_data(state)) {
763
16.7k
        SCOPED_TIMER(local_state.exec_time_counter());
764
16.7k
        bool new_eos = false;
765
16.7k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
16.7k
        if (new_eos) {
767
3.81k
            *eos = true;
768
12.9k
        } else if (!need_more_input_data(state)) {
769
10.3k
            *eos = false;
770
10.3k
        }
771
16.7k
    }
772
17.1k
    return Status::OK();
773
17.1k
}
_ZN5doris17StatefulOperatorXINS_23TableFunctionLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
2.74k
                                                         bool* eos) {
745
2.74k
    auto& local_state = get_local_state(state);
746
2.74k
    if (need_more_input_data(state)) {
747
2.44k
        local_state._child_block->clear_column_data(
748
2.44k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
2.44k
                        .num_materialized_slots());
750
2.44k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
2.44k
                state, local_state._child_block.get(), &local_state._child_eos));
752
2.44k
        *eos = local_state._child_eos;
753
2.44k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
391
            return Status::OK();
755
391
        }
756
2.05k
        {
757
2.05k
            SCOPED_TIMER(local_state.exec_time_counter());
758
2.05k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
2.05k
        }
760
2.05k
    }
761
762
2.35k
    if (!need_more_input_data(state)) {
763
2.35k
        SCOPED_TIMER(local_state.exec_time_counter());
764
2.35k
        bool new_eos = false;
765
2.35k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
2.35k
        if (new_eos) {
767
1.14k
            *eos = true;
768
1.21k
        } else if (!need_more_input_data(state)) {
769
304
            *eos = false;
770
304
        }
771
2.35k
    }
772
2.35k
    return Status::OK();
773
2.35k
}
774
775
template <typename Writer, typename Parent>
776
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
777
21.5k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
21.5k
    RETURN_IF_ERROR(Base::init(state, info));
779
21.5k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
21.5k
                                                         "AsyncWriterDependency", true);
781
21.5k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
21.5k
                             _finish_dependency));
783
784
21.5k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
21.5k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
21.5k
    return Status::OK();
787
21.5k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
27
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
27
    RETURN_IF_ERROR(Base::init(state, info));
779
27
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
27
                                                         "AsyncWriterDependency", true);
781
27
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
27
                             _finish_dependency));
783
784
27
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
27
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
27
    return Status::OK();
787
27
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
21.4k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
21.4k
    RETURN_IF_ERROR(Base::init(state, info));
779
21.4k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
21.4k
                                                         "AsyncWriterDependency", true);
781
21.4k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
21.4k
                             _finish_dependency));
783
784
21.4k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
21.4k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
21.4k
    return Status::OK();
787
21.4k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
12
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
12
    RETURN_IF_ERROR(Base::init(state, info));
779
12
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
12
                                                         "AsyncWriterDependency", true);
781
12
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
12
                             _finish_dependency));
783
784
12
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
12
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
12
    return Status::OK();
787
12
}
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
21.5k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
21.5k
    RETURN_IF_ERROR(Base::open(state));
793
21.5k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
193k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
171k
        RETURN_IF_ERROR(
796
171k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
171k
    }
798
21.5k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
21.5k
    return Status::OK();
800
21.5k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
27
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
27
    RETURN_IF_ERROR(Base::open(state));
793
27
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
224
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
197
        RETURN_IF_ERROR(
796
197
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
197
    }
798
27
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
27
    return Status::OK();
800
27
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
21.5k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
21.5k
    RETURN_IF_ERROR(Base::open(state));
793
21.5k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
193k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
171k
        RETURN_IF_ERROR(
796
171k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
171k
    }
798
21.5k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
21.5k
    return Status::OK();
800
21.5k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
12
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
12
    RETURN_IF_ERROR(Base::open(state));
793
12
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
216
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
204
        RETURN_IF_ERROR(
796
204
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
204
    }
798
12
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
12
    return Status::OK();
800
12
}
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
29.5k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
29.5k
    return _writer->sink(block, eos);
806
29.5k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
95
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
95
    return _writer->sink(block, eos);
806
95
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
29.3k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
29.3k
    return _writer->sink(block, eos);
806
29.3k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
12
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
12
    return _writer->sink(block, eos);
806
12
}
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
21.6k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
21.6k
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
21.6k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
21.6k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
816
    // if the init failed, the _writer may be nullptr. so here need check
817
21.6k
    if (_writer) {
818
21.6k
        Status st = _writer->get_writer_status();
819
21.6k
        if (exec_status.ok()) {
820
21.6k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
21.6k
                                                       : Status::Cancelled("force close"));
822
21.6k
        } else {
823
6
            _writer->force_close(exec_status);
824
6
        }
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
21.6k
        RETURN_IF_ERROR(st);
829
21.6k
    }
830
21.5k
    return Base::close(state, exec_status);
831
21.6k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
21
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
21
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
21
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
21
    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
21
    if (_writer) {
818
21
        Status st = _writer->get_writer_status();
819
21
        if (exec_status.ok()) {
820
21
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
21
                                                       : Status::Cancelled("force close"));
822
21
        } 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
21
        RETURN_IF_ERROR(st);
829
21
    }
830
21
    return Base::close(state, exec_status);
831
21
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
21.5k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
21.5k
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
21.5k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
21.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
21.5k
    if (_writer) {
818
21.5k
        Status st = _writer->get_writer_status();
819
21.5k
        if (exec_status.ok()) {
820
21.5k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
21.5k
                                                       : Status::Cancelled("force close"));
822
21.5k
        } else {
823
6
            _writer->force_close(exec_status);
824
6
        }
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
21.5k
        RETURN_IF_ERROR(st);
829
21.5k
    }
830
21.5k
    return Base::close(state, exec_status);
831
21.5k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
12
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
12
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
12
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
12
    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
12
    if (_writer) {
818
12
        Status st = _writer->get_writer_status();
819
12
        if (exec_status.ok()) {
820
12
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
12
                                                       : Status::Cancelled("force close"));
822
12
        } 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
12
        RETURN_IF_ERROR(st);
829
12
    }
830
12
    return Base::close(state, exec_status);
831
12
}
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