Coverage Report

Created: 2026-09-29 06:08

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
be/src/exec/operator/operator.cpp
Line
Count
Source
1
// Licensed to the Apache Software Foundation (ASF) under one
2
// or more contributor license agreements.  See the NOTICE file
3
// distributed with this work for additional information
4
// regarding copyright ownership.  The ASF licenses this file
5
// to you under the Apache License, Version 2.0 (the
6
// "License"); you may not use this file except in compliance
7
// with the License.  You may obtain a copy of the License at
8
//
9
//   http://www.apache.org/licenses/LICENSE-2.0
10
//
11
// Unless required by applicable law or agreed to in writing,
12
// software distributed under the License is distributed on an
13
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
// KIND, either express or implied.  See the License for the
15
// specific language governing permissions and limitations
16
// under the License.
17
18
#include "exec/operator/operator.h"
19
20
#include <algorithm>
21
22
#include "common/status.h"
23
#include "exec/common/util.hpp"
24
#include "exec/exchange/local_exchange_sink_operator.h"
25
#include "exec/exchange/local_exchange_source_operator.h"
26
#include "exec/operator/aggregation_sink_operator.h"
27
#include "exec/operator/aggregation_source_operator.h"
28
#include "exec/operator/analytic_sink_operator.h"
29
#include "exec/operator/analytic_source_operator.h"
30
#include "exec/operator/assert_num_rows_operator.h"
31
#include "exec/operator/blackhole_sink_operator.h"
32
#include "exec/operator/bucketed_aggregation_sink_operator.h"
33
#include "exec/operator/bucketed_aggregation_source_operator.h"
34
#include "exec/operator/cache_sink_operator.h"
35
#include "exec/operator/cache_source_operator.h"
36
#include "exec/operator/datagen_operator.h"
37
#include "exec/operator/dict_sink_operator.h"
38
#include "exec/operator/distinct_streaming_aggregation_operator.h"
39
#include "exec/operator/empty_set_operator.h"
40
#include "exec/operator/exchange_sink_operator.h"
41
#include "exec/operator/exchange_source_operator.h"
42
#include "exec/operator/file_scan_operator.h"
43
#include "exec/operator/group_commit_block_sink_operator.h"
44
#include "exec/operator/group_commit_scan_operator.h"
45
#include "exec/operator/hashjoin_build_sink.h"
46
#include "exec/operator/hashjoin_probe_operator.h"
47
#include "exec/operator/hive_table_sink_operator.h"
48
#include "exec/operator/iceberg_delete_sink_operator.h"
49
#include "exec/operator/iceberg_merge_sink_operator.h"
50
#include "exec/operator/iceberg_table_sink_operator.h"
51
#include "exec/operator/jdbc_scan_operator.h"
52
#include "exec/operator/jdbc_table_sink_operator.h"
53
#include "exec/operator/local_merge_sort_source_operator.h"
54
#include "exec/operator/materialization_opertor.h"
55
#include "exec/operator/maxcompute_table_sink_operator.h"
56
#include "exec/operator/memory_scratch_sink_operator.h"
57
#include "exec/operator/meta_scan_operator.h"
58
#include "exec/operator/mock_operator.h"
59
#include "exec/operator/mock_scan_operator.h"
60
#include "exec/operator/multi_cast_data_stream_sink.h"
61
#include "exec/operator/multi_cast_data_stream_source.h"
62
#include "exec/operator/nested_loop_join_build_operator.h"
63
#include "exec/operator/nested_loop_join_probe_operator.h"
64
#include "exec/operator/olap_scan_operator.h"
65
#include "exec/operator/olap_table_sink_operator.h"
66
#include "exec/operator/olap_table_sink_v2_operator.h"
67
#include "exec/operator/partition_sort_sink_operator.h"
68
#include "exec/operator/partition_sort_source_operator.h"
69
#include "exec/operator/partitioned_aggregation_sink_operator.h"
70
#include "exec/operator/partitioned_aggregation_source_operator.h"
71
#include "exec/operator/partitioned_hash_join_probe_operator.h"
72
#include "exec/operator/partitioned_hash_join_sink_operator.h"
73
#include "exec/operator/rec_cte_anchor_sink_operator.h"
74
#include "exec/operator/rec_cte_scan_operator.h"
75
#include "exec/operator/rec_cte_sink_operator.h"
76
#include "exec/operator/rec_cte_source_operator.h"
77
#include "exec/operator/repeat_operator.h"
78
#include "exec/operator/result_file_sink_operator.h"
79
#include "exec/operator/result_sink_operator.h"
80
#include "exec/operator/schema_scan_operator.h"
81
#include "exec/operator/select_operator.h"
82
#include "exec/operator/set_probe_sink_operator.h"
83
#include "exec/operator/set_sink_operator.h"
84
#include "exec/operator/set_source_operator.h"
85
#include "exec/operator/sort_sink_operator.h"
86
#include "exec/operator/sort_source_operator.h"
87
#include "exec/operator/spill_iceberg_table_sink_operator.h"
88
#include "exec/operator/spill_sort_sink_operator.h"
89
#include "exec/operator/spill_sort_source_operator.h"
90
#include "exec/operator/streaming_aggregation_operator.h"
91
#include "exec/operator/table_function_operator.h"
92
#include "exec/operator/tvf_table_sink_operator.h"
93
#include "exec/operator/union_sink_operator.h"
94
#include "exec/operator/union_source_operator.h"
95
#include "exec/pipeline/dependency.h"
96
#include "exec/pipeline/pipeline.h"
97
#include "exprs/vexpr.h"
98
#include "exprs/vexpr_context.h"
99
#include "runtime/runtime_profile.h"
100
#include "runtime/runtime_profile_counter_names.h"
101
#include "util/debug_util.h"
102
#include "util/string_util.h"
103
104
namespace doris {
105
class RowDescriptor;
106
class RuntimeState;
107
} // namespace doris
108
109
namespace doris {
110
111
0
Status OperatorBase::close(RuntimeState* state) {
112
0
    if (_is_closed) {
113
0
        return Status::OK();
114
0
    }
115
0
    _is_closed = true;
116
0
    return Status::OK();
117
0
}
118
119
template <typename SharedStateArg>
120
1.80M
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
1.80M
    if (_parent->nereids_id() == -1) {
122
920k
        return fmt::format("(id={})", _parent->node_id());
123
920k
    } else {
124
885k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
885k
    }
126
1.80M
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
89.5k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
89.5k
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
89.5k
    } else {
124
89.5k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
89.5k
    }
126
89.5k
}
_ZNK5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
2
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
2
    if (_parent->nereids_id() == -1) {
122
2
        return fmt::format("(id={})", _parent->node_id());
123
2
    } else {
124
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
0
    }
126
2
}
_ZNK5doris19PipelineXLocalStateINS_15SortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
200k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
200k
    if (_parent->nereids_id() == -1) {
122
24
        return fmt::format("(id={})", _parent->node_id());
123
200k
    } else {
124
200k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
200k
    }
126
200k
}
_ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
32
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
32
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
32
    } else {
124
32
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
32
    }
126
32
}
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
5.04k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
5.04k
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
5.04k
    } else {
124
5.04k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
5.04k
    }
126
5.04k
}
_ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
10.5k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
10.5k
    if (_parent->nereids_id() == -1) {
122
28
        return fmt::format("(id={})", _parent->node_id());
123
10.5k
    } else {
124
10.5k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
10.5k
    }
126
10.5k
}
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
88.9k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
88.9k
    if (_parent->nereids_id() == -1) {
122
58
        return fmt::format("(id={})", _parent->node_id());
123
88.9k
    } else {
124
88.9k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
88.9k
    }
126
88.9k
}
_ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
108k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
108k
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
108k
    } else {
124
108k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
108k
    }
126
108k
}
_ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
120
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
120
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
120
    } else {
124
120
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
120
    }
126
120
}
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
599k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
599k
    if (_parent->nereids_id() == -1) {
122
277k
        return fmt::format("(id={})", _parent->node_id());
123
321k
    } else {
124
321k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
321k
    }
126
599k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
54.5k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
54.5k
    if (_parent->nereids_id() == -1) {
122
4
        return fmt::format("(id={})", _parent->node_id());
123
54.5k
    } else {
124
54.5k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
54.5k
    }
126
54.5k
}
_ZNK5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
38
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
38
    if (_parent->nereids_id() == -1) {
122
38
        return fmt::format("(id={})", _parent->node_id());
123
38
    } else {
124
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
0
    }
126
38
}
_ZNK5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
5.23k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
5.23k
    if (_parent->nereids_id() == -1) {
122
5.22k
        return fmt::format("(id={})", _parent->node_id());
123
5.22k
    } else {
124
5
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
5
    }
126
5.23k
}
_ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
522
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
522
    if (_parent->nereids_id() == -1) {
122
204
        return fmt::format("(id={})", _parent->node_id());
123
318
    } else {
124
318
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
318
    }
126
522
}
_ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
5.24k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
5.24k
    if (_parent->nereids_id() == -1) {
122
26
        return fmt::format("(id={})", _parent->node_id());
123
5.21k
    } else {
124
5.21k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
5.21k
    }
126
5.24k
}
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
637k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
637k
    if (_parent->nereids_id() == -1) {
122
637k
        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
637k
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
_ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
169
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
169
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
169
    } else {
124
169
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
169
    }
126
169
}
127
128
template <typename SharedStateArg>
129
1.32M
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
1.32M
    if (_parent->nereids_id() == -1) {
131
713k
        return fmt::format("(id={})", _parent->node_id());
132
713k
    } else {
133
611k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
611k
    }
135
1.32M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
185k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
185k
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
185k
    } else {
133
185k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
185k
    }
135
185k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
4
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
4
    if (_parent->nereids_id() == -1) {
131
2
        return fmt::format("(id={})", _parent->node_id());
132
2
    } else {
133
2
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
2
    }
135
4
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
203k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
203k
    if (_parent->nereids_id() == -1) {
131
18
        return fmt::format("(id={})", _parent->node_id());
132
203k
    } else {
133
203k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
203k
    }
135
203k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE11name_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
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
5.05k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
5.05k
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
5.05k
    } else {
133
5.05k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
5.05k
    }
135
5.05k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
10.8k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
10.8k
    if (_parent->nereids_id() == -1) {
131
28
        return fmt::format("(id={})", _parent->node_id());
132
10.7k
    } else {
133
10.7k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
10.7k
    }
135
10.8k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
89.6k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
89.6k
    if (_parent->nereids_id() == -1) {
131
58
        return fmt::format("(id={})", _parent->node_id());
132
89.5k
    } else {
133
89.5k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
89.5k
    }
135
89.6k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
108k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
108k
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
108k
    } else {
133
108k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
108k
    }
135
108k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
140
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
140
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
140
    } else {
133
140
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
140
    }
135
140
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
9
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
9
    if (_parent->nereids_id() == -1) {
131
9
        return fmt::format("(id={})", _parent->node_id());
132
9
    } else {
133
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
0
    }
135
9
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
8.56k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
8.56k
    if (_parent->nereids_id() == -1) {
131
6
        return fmt::format("(id={})", _parent->node_id());
132
8.55k
    } else {
133
8.55k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
8.55k
    }
135
8.56k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
522
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
522
    if (_parent->nereids_id() == -1) {
131
204
        return fmt::format("(id={})", _parent->node_id());
132
318
    } else {
133
318
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
318
    }
135
522
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
12.8k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
12.9k
    if (_parent->nereids_id() == -1) {
131
12.9k
        return fmt::format("(id={})", _parent->node_id());
132
18.4E
    } else {
133
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
18.4E
    }
135
12.8k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
244k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
244k
    if (_parent->nereids_id() == -1) {
131
244k
        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
244k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
454k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
455k
    if (_parent->nereids_id() == -1) {
131
455k
        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
454k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
36
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
36
    if (_parent->nereids_id() == -1) {
131
36
        return fmt::format("(id={})", _parent->node_id());
132
36
    } else {
133
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
0
    }
135
36
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
338
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
338
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
338
    } else {
133
338
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
338
    }
135
338
}
136
137
template <typename SharedStateArg>
138
55.1k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
55.1k
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
55.1k
    _terminated = true;
143
55.1k
    return Status::OK();
144
55.1k
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
48.0k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
48.0k
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
48.0k
    _terminated = true;
143
48.0k
    return Status::OK();
144
48.0k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
3.05k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
3.05k
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
3.05k
    _terminated = true;
143
3.05k
    return Status::OK();
144
3.05k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_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_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
4
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
4
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
4
    _terminated = true;
143
4
    return Status::OK();
144
4
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
1.98k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
1.98k
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
1.98k
    _terminated = true;
143
1.98k
    return Status::OK();
144
1.98k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
790
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
790
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
790
    _terminated = true;
143
790
    return Status::OK();
144
790
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
417
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
417
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
417
    _terminated = true;
143
417
    return Status::OK();
144
417
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
152
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
152
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
152
    _terminated = true;
143
152
    return Status::OK();
144
152
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
3
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
3
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
3
    _terminated = true;
143
3
    return Status::OK();
144
3
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
250
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
250
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
250
    _terminated = true;
143
250
    return Status::OK();
144
250
}
_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
322
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
322
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
322
    _terminated = true;
143
322
    return Status::OK();
144
322
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
125
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
125
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
125
    _terminated = true;
143
125
    return Status::OK();
144
125
}
145
146
301k
DataDistribution OperatorBase::required_data_distribution(RuntimeState* /*state*/) const {
147
301k
    return _child && _child->is_serial_operator() && !is_source()
148
301k
                   ? DataDistribution(TLocalPartitionType::PASSTHROUGH)
149
301k
                   : DataDistribution(TLocalPartitionType::NOOP);
150
301k
}
151
152
26.3k
bool OperatorBase::child_breaks_local_key_distribution(RuntimeState* state) const {
153
26.3k
    if (!_child) {
154
25.1k
        return false;
155
25.1k
    }
156
1.20k
    if (_child->is_serial_operator()) {
157
137
        return true;
158
137
    }
159
1.06k
    const auto child_distribution = _child->required_data_distribution(state);
160
1.06k
    return child_distribution.need_local_exchange() &&
161
1.06k
           !is_shuffled_exchange(child_distribution.distribution_type);
162
1.20k
}
163
164
template <typename SharedStateArg>
165
31.4k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
166
31.4k
    fmt::memory_buffer debug_string_buffer;
167
31.4k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
168
31.4k
    return fmt::to_string(debug_string_buffer);
169
31.4k
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
165
6
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
166
6
    fmt::memory_buffer debug_string_buffer;
167
6
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
168
6
    return fmt::to_string(debug_string_buffer);
169
6
}
_ZNK5doris19PipelineXLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
165
14
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
166
14
    fmt::memory_buffer debug_string_buffer;
167
14
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
168
14
    return fmt::to_string(debug_string_buffer);
169
14
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
165
14
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
166
14
    fmt::memory_buffer debug_string_buffer;
167
14
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
168
14
    return fmt::to_string(debug_string_buffer);
169
14
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
165
31.4k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
166
31.4k
    fmt::memory_buffer debug_string_buffer;
167
31.4k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
168
31.4k
    return fmt::to_string(debug_string_buffer);
169
31.4k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
165
1
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
166
1
    fmt::memory_buffer debug_string_buffer;
167
1
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
168
1
    return fmt::to_string(debug_string_buffer);
169
1
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
165
28
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
166
28
    fmt::memory_buffer debug_string_buffer;
167
28
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
168
28
    return fmt::to_string(debug_string_buffer);
169
28
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
170
171
template <typename SharedStateArg>
172
31.4k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
31.4k
    fmt::memory_buffer debug_string_buffer;
174
31.4k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
31.4k
    return fmt::to_string(debug_string_buffer);
176
31.4k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
172
14
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
14
    fmt::memory_buffer debug_string_buffer;
174
14
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
14
    return fmt::to_string(debug_string_buffer);
176
14
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
172
14
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
14
    fmt::memory_buffer debug_string_buffer;
174
14
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
14
    return fmt::to_string(debug_string_buffer);
176
14
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
172
32
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
32
    fmt::memory_buffer debug_string_buffer;
174
32
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
32
    return fmt::to_string(debug_string_buffer);
176
32
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
172
21
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
21
    fmt::memory_buffer debug_string_buffer;
174
21
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
21
    return fmt::to_string(debug_string_buffer);
176
21
}
_ZNK5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
172
31.3k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
31.3k
    fmt::memory_buffer debug_string_buffer;
174
31.3k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
31.3k
    return fmt::to_string(debug_string_buffer);
176
31.3k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
177
178
31.5k
std::string OperatorXBase::debug_string(int indentation_level) const {
179
31.5k
    fmt::memory_buffer debug_string_buffer;
180
31.5k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, parallel_tasks={}, _is_serial_operator={}",
181
31.5k
                   std::string(indentation_level * 2, ' '), _op_name, node_id(), _parallel_tasks,
182
31.5k
                   _is_serial_operator);
183
31.5k
    return fmt::to_string(debug_string_buffer);
184
31.5k
}
185
186
31.4k
std::string OperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
187
31.4k
    return state->get_local_state(operator_id())->debug_string(indentation_level);
188
31.4k
}
189
190
673k
Status OperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
191
673k
    std::string node_name = print_plan_node_type(tnode.node_type);
192
673k
    _nereids_id = tnode.nereids_id;
193
673k
    if (!tnode.intermediate_output_tuple_id_list.empty()) {
194
3.90k
        if (!has_projection()) {
195
0
            return Status::InternalError("no final output tuple id");
196
0
        }
197
3.90k
        if (tnode.intermediate_output_tuple_id_list.size() !=
198
3.90k
            tnode.intermediate_projections_list.size()) {
199
0
            return Status::InternalError(
200
0
                    "intermediate_output_tuple_id_list size:{} not match "
201
0
                    "intermediate_projections_list size:{}",
202
0
                    tnode.intermediate_output_tuple_id_list.size(),
203
0
                    tnode.intermediate_projections_list.size());
204
0
        }
205
3.90k
    }
206
673k
    auto substr = node_name.substr(0, node_name.find("_NODE"));
207
673k
    _op_name = substr + "_OPERATOR";
208
209
673k
    if (tnode.__isset.vconjunct) {
210
0
        return Status::InternalError("vconjunct is not supported yet");
211
673k
    } else if (tnode.__isset.conjuncts) {
212
272k
        for (const auto& conjunct : tnode.conjuncts) {
213
272k
            VExprContextSPtr context;
214
272k
            RETURN_IF_ERROR(VExpr::create_expr_tree(conjunct, context));
215
272k
            _conjuncts.emplace_back(context);
216
272k
        }
217
99.2k
    }
218
219
    // create the projections expr
220
673k
    if (tnode.__isset.projections) {
221
284k
        RETURN_IF_ERROR(VExpr::create_expr_trees(tnode.projections, _projection->projections));
222
284k
    }
223
673k
    if (!tnode.intermediate_projections_list.empty()) {
224
3.90k
        DCHECK(has_projection()) << "no final projections";
225
3.90k
        _projection->intermediate_projections.reserve(tnode.intermediate_projections_list.size());
226
6.60k
        for (const auto& tnode_projections : tnode.intermediate_projections_list) {
227
6.60k
            VExprContextSPtrs projections;
228
6.60k
            RETURN_IF_ERROR(VExpr::create_expr_trees(tnode_projections, projections));
229
6.60k
            _projection->intermediate_projections.push_back(projections);
230
6.60k
        }
231
3.90k
    }
232
673k
    return Status::OK();
233
673k
}
234
235
724k
Status OperatorXBase::prepare(RuntimeState* state) {
236
724k
    for (auto& conjunct : _conjuncts) {
237
272k
        RETURN_IF_ERROR(conjunct->prepare(state, operator_row_desc_before_projection()));
238
272k
    }
239
724k
    if (state->enable_adjust_conjunct_order_by_cost()) {
240
625k
        std::ranges::stable_sort(_conjuncts, [](const auto& a, const auto& b) {
241
337k
            return a->execute_cost() < b->execute_cost();
242
337k
        });
243
625k
    };
244
245
724k
    if (has_projection()) {
246
284k
        auto& projection = *_projection;
247
291k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
248
6.61k
            const auto& input_row_desc =
249
6.61k
                    i == 0 ? operator_row_desc_before_projection()
250
6.61k
                           : projection.intermediate_output_row_descriptors[i - 1];
251
6.61k
            RETURN_IF_ERROR(
252
6.61k
                    VExpr::prepare(projection.intermediate_projections[i], state, input_row_desc));
253
6.61k
        }
254
284k
        const auto& final_projection_input_row_desc =
255
284k
                projection.intermediate_output_row_descriptors.empty()
256
284k
                        ? operator_row_desc_before_projection()
257
284k
                        : projection.intermediate_output_row_descriptors.back();
258
284k
        RETURN_IF_ERROR(
259
284k
                VExpr::prepare(projection.projections, state, final_projection_input_row_desc));
260
284k
        RETURN_IF_ERROR(VExpr::check_expr_output_type(projection.projections,
261
284k
                                                      projection.output_row_descriptor));
262
284k
    }
263
264
724k
    for (auto& conjunct : _conjuncts) {
265
272k
        RETURN_IF_ERROR(conjunct->open(state));
266
272k
    }
267
724k
    if (has_projection()) {
268
284k
        RETURN_IF_ERROR(VExpr::open(_projection->projections, state));
269
284k
        for (auto& projections : _projection->intermediate_projections) {
270
6.60k
            RETURN_IF_ERROR(VExpr::open(projections, state));
271
6.60k
        }
272
284k
    }
273
723k
    if (_child && !is_source()) {
274
115k
        RETURN_IF_ERROR(_child->prepare(state));
275
115k
    }
276
277
723k
    if (VExpr::contains_blockable_function(_conjuncts) ||
278
724k
        (has_projection() && VExpr::contains_blockable_function(_projection->projections))) {
279
0
        _blockable = true;
280
0
    }
281
282
723k
    return Status::OK();
283
723k
}
284
285
7.86k
Status OperatorXBase::terminate(RuntimeState* state) {
286
7.86k
    if (_child && !is_source()) {
287
715
        RETURN_IF_ERROR(_child->terminate(state));
288
715
    }
289
7.86k
    auto result = state->get_local_state_result(operator_id());
290
7.86k
    if (!result) {
291
0
        return result.error();
292
0
    }
293
7.86k
    return result.value()->terminate(state);
294
7.86k
}
295
296
4.83M
Status OperatorXBase::close(RuntimeState* state) {
297
4.83M
    if (_child && !is_source()) {
298
785k
        RETURN_IF_ERROR(_child->close(state));
299
785k
    }
300
4.83M
    auto result = state->get_local_state_result(operator_id());
301
4.83M
    if (!result) {
302
0
        return result.error();
303
0
    }
304
4.83M
    return result.value()->close(state);
305
4.83M
}
306
307
269k
void PipelineXLocalStateBase::clear_origin_block() {
308
269k
    _origin_block.clear_column_data(
309
269k
            _parent->operator_row_desc_before_projection().num_materialized_slots());
310
269k
}
311
312
1.03M
Status PipelineXLocalStateBase::filter_block(const VExprContextSPtrs& expr_contexts, Block* block) {
313
1.03M
    RETURN_IF_ERROR(VExprContext::filter_block(expr_contexts, block, block->columns()));
314
315
1.03M
    _estimate_memory_usage += VExprContext::get_memory_usage(expr_contexts);
316
1.03M
    return Status::OK();
317
1.03M
}
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
269k
                                     Block* output_block) const {
326
269k
    auto* local_state = state->get_local_state(operator_id());
327
269k
    SCOPED_TIMER(local_state->exec_time_counter());
328
269k
    SCOPED_TIMER(local_state->_projection_timer);
329
269k
    const size_t rows = origin_block->rows();
330
269k
    if (rows == 0) {
331
138k
        return Status::OK();
332
138k
    }
333
131k
    SCOPED_PEAK_MEM(&local_state->_estimate_memory_usage);
334
335
131k
    {
336
131k
        Block input_block = *origin_block;
337
338
131k
        ColumnsWithTypeAndName new_columns;
339
131k
        for (const auto& projections : local_state->_intermediate_projections) {
340
3.78k
            if (projections.empty()) {
341
0
                return Status::InternalError("meet empty intermediate projection, node id: {}",
342
0
                                             node_id());
343
0
            }
344
3.78k
            new_columns.resize(projections.size());
345
70.6k
            for (int i = 0; i < projections.size(); i++) {
346
66.8k
                RETURN_IF_ERROR(projections[i]->execute(&input_block, new_columns[i]));
347
66.8k
                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
66.8k
            }
355
3.77k
            Block tmp_block {new_columns};
356
3.77k
            input_block.swap(tmp_block);
357
3.77k
        }
358
359
131k
        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
131k
        auto scoped_mutable_block = VectorizedUtils::build_scoped_mutable_mem_reuse_block(
367
131k
                output_block, _projection->output_row_descriptor);
368
131k
        auto& mutable_columns = scoped_mutable_block.mutable_columns();
369
131k
        DCHECK_EQ(mutable_columns.size(), local_state->_projections.size()) << debug_string();
370
131k
        Columns shared_columns(mutable_columns.size());
371
372
757k
        for (int i = 0; i < mutable_columns.size(); ++i) {
373
626k
            ColumnPtr column_ptr;
374
626k
            RETURN_IF_ERROR(local_state->_projections[i]->execute(&input_block, column_ptr));
375
626k
            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
626k
            column_ptr = column_ptr->convert_to_full_column_if_const();
382
626k
            if (is_column_nullable(*mutable_columns[i]) && !is_column_nullable(*column_ptr)) {
383
0
                column_ptr = make_nullable(column_ptr, false);
384
0
            }
385
626k
            if (column_ptr->is_exclusive()) {
386
229k
                mutable_columns[i] = IColumn::mutate(std::move(column_ptr));
387
397k
            } else {
388
397k
                shared_columns[i] = std::move(column_ptr);
389
397k
            }
390
626k
        }
391
392
131k
        scoped_mutable_block.restore();
393
757k
        for (int i = 0; i < shared_columns.size(); ++i) {
394
626k
            if (shared_columns[i]) {
395
397k
                output_block->replace_by_position(i, std::move(shared_columns[i]));
396
397k
            }
397
626k
        }
398
131k
    }
399
400
0
    origin_block->clear_column_data(
401
131k
            local_state->_parent->operator_row_desc_before_projection().num_materialized_slots());
402
131k
    DCHECK_EQ(output_block->rows(), rows);
403
404
131k
    return Status::OK();
405
131k
}
406
407
5.64M
Status OperatorXBase::get_block_after_projects(RuntimeState* state, Block* block, bool* eos) {
408
5.64M
    DBUG_EXECUTE_IF("Pipeline::return_empty_block", {
409
5.64M
        if (this->_op_name == "AGGREGATION_OPERATOR" || this->_op_name == "HASH_JOIN_OPERATOR" ||
410
5.64M
            this->_op_name == "PARTITIONED_AGGREGATION_OPERATOR" ||
411
5.64M
            this->_op_name == "PARTITIONED_HASH_JOIN_OPERATOR" ||
412
5.64M
            this->_op_name == "CROSS_JOIN_OPERATOR" || this->_op_name == "SORT_OPERATOR") {
413
5.64M
            if (_debug_point_count++ % 2 == 0) {
414
5.64M
                return Status::OK();
415
5.64M
            }
416
5.64M
        }
417
5.64M
    });
418
419
5.64M
    Status status;
420
5.64M
    auto* local_state = state->get_local_state(operator_id());
421
5.64M
    Defer defer([&]() {
422
5.64M
        if (status.ok()) {
423
5.64M
            local_state->update_output_block_counters(*block);
424
5.64M
        }
425
5.64M
    });
426
5.64M
    if (has_projection()) {
427
269k
        local_state->clear_origin_block();
428
269k
        status = get_block(state, &local_state->_origin_block, eos);
429
269k
        if (UNLIKELY(!status.ok())) {
430
26
            return status;
431
26
        }
432
269k
        status = do_projections(state, &local_state->_origin_block, block);
433
269k
        return status;
434
269k
    }
435
5.37M
    status = get_block(state, block, eos);
436
5.37M
    RETURN_IF_ERROR(block->check_type_and_column());
437
5.37M
    return status;
438
5.37M
}
439
440
2.95M
void PipelineXLocalStateBase::reached_limit(Block* block, bool* eos) {
441
2.95M
    if (_parent->_limit != -1 and _num_rows_returned + block->rows() >= _parent->_limit) {
442
9.55k
        block->set_num_rows(_parent->_limit - _num_rows_returned);
443
9.55k
        *eos = true;
444
9.55k
    }
445
446
2.95M
    DBUG_EXECUTE_IF("Pipeline::reached_limit_early", {
447
2.95M
        auto op_name = to_lower(_parent->_op_name);
448
2.95M
        auto arg_op_name = dp->param<std::string>("op_name");
449
2.95M
        arg_op_name = to_lower(arg_op_name);
450
451
2.95M
        if (op_name == arg_op_name) {
452
2.95M
            *eos = true;
453
2.95M
        }
454
2.95M
    });
455
456
2.95M
    if (auto rows = block->rows()) {
457
726k
        _num_rows_returned += rows;
458
726k
        _state->get_query_ctx()->resource_ctx()->io_context()->update_process_rows(rows);
459
726k
    }
460
2.95M
}
461
462
55.1k
Status DataSinkOperatorXBase::terminate(RuntimeState* state) {
463
55.1k
    auto result = state->get_sink_local_state_result();
464
55.1k
    if (!result) {
465
0
        return result.error();
466
0
    }
467
55.1k
    return result.value()->terminate(state);
468
55.1k
}
469
470
31.4k
std::string DataSinkOperatorXBase::debug_string(int indentation_level) const {
471
31.4k
    fmt::memory_buffer debug_string_buffer;
472
473
31.4k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, _is_serial_operator={}",
474
31.4k
                   std::string(indentation_level * 2, ' '), _name, node_id(), _is_serial_operator);
475
31.4k
    return fmt::to_string(debug_string_buffer);
476
31.4k
}
477
478
31.4k
std::string DataSinkOperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
479
31.4k
    return state->get_sink_local_state()->debug_string(indentation_level);
480
31.4k
}
481
482
339k
Status DataSinkOperatorXBase::init(const TDataSink& tsink) {
483
339k
    std::string op_name = "UNKNOWN_SINK";
484
339k
    auto it = _TDataSinkType_VALUES_TO_NAMES.find(tsink.type);
485
486
339k
    if (it != _TDataSinkType_VALUES_TO_NAMES.end()) {
487
339k
        op_name = it->second;
488
339k
    }
489
339k
    _name = op_name + "_OPERATOR";
490
339k
    return Status::OK();
491
339k
}
492
493
364k
Status DataSinkOperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
494
364k
    std::string op_name = print_plan_node_type(tnode.node_type);
495
364k
    _nereids_id = tnode.nereids_id;
496
364k
    auto substr = op_name.substr(0, op_name.find("_NODE"));
497
364k
    _name = substr + "_SINK_OPERATOR";
498
364k
    return Status::OK();
499
364k
}
500
501
template <typename LocalStateType>
502
Status DataSinkOperatorX<LocalStateType>::setup_local_state(RuntimeState* state,
503
1.80M
                                                            LocalSinkStateInfo& info) {
504
1.80M
    auto local_state = LocalStateType::create_unique(this, state);
505
1.80M
    RETURN_IF_ERROR(local_state->init(state, info));
506
1.80M
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
1.80M
    return Status::OK();
508
1.80M
}
_ZN5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
186k
                                                            LocalSinkStateInfo& info) {
504
186k
    auto local_state = LocalStateType::create_unique(this, state);
505
186k
    RETURN_IF_ERROR(local_state->init(state, info));
506
186k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
186k
    return Status::OK();
508
186k
}
_ZN5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
408k
                                                            LocalSinkStateInfo& info) {
504
408k
    auto local_state = LocalStateType::create_unique(this, state);
505
408k
    RETURN_IF_ERROR(local_state->init(state, info));
506
408k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
408k
    return Status::OK();
508
408k
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
3
                                                            LocalSinkStateInfo& info) {
504
3
    auto local_state = LocalStateType::create_unique(this, state);
505
3
    RETURN_IF_ERROR(local_state->init(state, info));
506
3
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
3
    return Status::OK();
508
3
}
_ZN5doris17DataSinkOperatorXINS_24ResultFileSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
378
                                                            LocalSinkStateInfo& info) {
504
378
    auto local_state = LocalStateType::create_unique(this, state);
505
378
    RETURN_IF_ERROR(local_state->init(state, info));
506
378
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
378
    return Status::OK();
508
378
}
_ZN5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
47.2k
                                                            LocalSinkStateInfo& info) {
504
47.2k
    auto local_state = LocalStateType::create_unique(this, state);
505
47.2k
    RETURN_IF_ERROR(local_state->init(state, info));
506
47.2k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
47.2k
    return Status::OK();
508
47.2k
}
_ZN5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
16
                                                            LocalSinkStateInfo& info) {
504
16
    auto local_state = LocalStateType::create_unique(this, state);
505
16
    RETURN_IF_ERROR(local_state->init(state, info));
506
16
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
16
    return Status::OK();
508
16
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_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
10.8k
                                                            LocalSinkStateInfo& info) {
504
10.8k
    auto local_state = LocalStateType::create_unique(this, state);
505
10.8k
    RETURN_IF_ERROR(local_state->init(state, info));
506
10.8k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
10.8k
    return Status::OK();
508
10.8k
}
_ZN5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
6
                                                            LocalSinkStateInfo& info) {
504
6
    auto local_state = LocalStateType::create_unique(this, state);
505
6
    RETURN_IF_ERROR(local_state->init(state, info));
506
6
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
6
    return Status::OK();
508
6
}
_ZN5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
203k
                                                            LocalSinkStateInfo& info) {
504
203k
    auto local_state = LocalStateType::create_unique(this, state);
505
203k
    RETURN_IF_ERROR(local_state->init(state, info));
506
203k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
203k
    return Status::OK();
508
203k
}
_ZN5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE17setup_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_27LocalExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
244k
                                                            LocalSinkStateInfo& info) {
504
244k
    auto local_state = LocalStateType::create_unique(this, state);
505
244k
    RETURN_IF_ERROR(local_state->init(state, info));
506
244k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
244k
    return Status::OK();
508
244k
}
_ZN5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
89.5k
                                                            LocalSinkStateInfo& info) {
504
89.5k
    auto local_state = LocalStateType::create_unique(this, state);
505
89.5k
    RETURN_IF_ERROR(local_state->init(state, info));
506
89.5k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
89.5k
    return Status::OK();
508
89.5k
}
_ZN5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
108k
                                                            LocalSinkStateInfo& info) {
504
108k
    auto local_state = LocalStateType::create_unique(this, state);
505
108k
    RETURN_IF_ERROR(local_state->init(state, info));
506
108k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
108k
    return Status::OK();
508
108k
}
_ZN5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
140
                                                            LocalSinkStateInfo& info) {
504
140
    auto local_state = LocalStateType::create_unique(this, state);
505
140
    RETURN_IF_ERROR(local_state->init(state, info));
506
140
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
140
    return Status::OK();
508
140
}
_ZN5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
480k
                                                            LocalSinkStateInfo& info) {
504
480k
    auto local_state = LocalStateType::create_unique(this, state);
505
480k
    RETURN_IF_ERROR(local_state->init(state, info));
506
480k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
480k
    return Status::OK();
508
480k
}
_ZN5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
5.04k
                                                            LocalSinkStateInfo& info) {
504
5.04k
    auto local_state = LocalStateType::create_unique(this, state);
505
5.04k
    RETURN_IF_ERROR(local_state->init(state, info));
506
5.04k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
5.04k
    return Status::OK();
508
5.04k
}
_ZN5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
8.55k
                                                            LocalSinkStateInfo& info) {
504
8.55k
    auto local_state = LocalStateType::create_unique(this, state);
505
8.55k
    RETURN_IF_ERROR(local_state->init(state, info));
506
8.55k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
8.55k
    return Status::OK();
508
8.55k
}
_ZN5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.13k
                                                            LocalSinkStateInfo& info) {
504
2.13k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.13k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.13k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.13k
    return Status::OK();
508
2.13k
}
_ZN5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
319
                                                            LocalSinkStateInfo& info) {
504
319
    auto local_state = LocalStateType::create_unique(this, state);
505
319
    RETURN_IF_ERROR(local_state->init(state, info));
506
319
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
319
    return Status::OK();
508
319
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
4.90k
                                                            LocalSinkStateInfo& info) {
504
4.90k
    auto local_state = LocalStateType::create_unique(this, state);
505
4.90k
    RETURN_IF_ERROR(local_state->init(state, info));
506
4.90k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
4.90k
    return Status::OK();
508
4.90k
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.73k
                                                            LocalSinkStateInfo& info) {
504
2.73k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.73k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.73k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.73k
    return Status::OK();
508
2.73k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.62k
                                                            LocalSinkStateInfo& info) {
504
2.62k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.62k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.62k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.62k
    return Status::OK();
508
2.62k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.55k
                                                            LocalSinkStateInfo& info) {
504
2.55k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.55k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.55k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.55k
    return Status::OK();
508
2.55k
}
_ZN5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2
                                                            LocalSinkStateInfo& info) {
504
2
    auto local_state = LocalStateType::create_unique(this, state);
505
2
    RETURN_IF_ERROR(local_state->init(state, info));
506
2
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2
    return Status::OK();
508
2
}
_ZN5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
565
                                                            LocalSinkStateInfo& info) {
504
565
    auto local_state = LocalStateType::create_unique(this, state);
505
565
    RETURN_IF_ERROR(local_state->init(state, info));
506
565
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
565
    return Status::OK();
508
565
}
_ZN5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
14
                                                            LocalSinkStateInfo& info) {
504
14
    auto local_state = LocalStateType::create_unique(this, state);
505
14
    RETURN_IF_ERROR(local_state->init(state, info));
506
14
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
14
    return Status::OK();
508
14
}
_ZN5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
106
                                                            LocalSinkStateInfo& info) {
504
106
    auto local_state = LocalStateType::create_unique(this, state);
505
106
    RETURN_IF_ERROR(local_state->init(state, info));
506
106
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
106
    return Status::OK();
508
106
}
_ZN5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
169
                                                            LocalSinkStateInfo& info) {
504
169
    auto local_state = LocalStateType::create_unique(this, state);
505
169
    RETURN_IF_ERROR(local_state->init(state, info));
506
169
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
169
    return Status::OK();
508
169
}
_ZN5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
169
                                                            LocalSinkStateInfo& info) {
504
169
    auto local_state = LocalStateType::create_unique(this, state);
505
169
    RETURN_IF_ERROR(local_state->init(state, info));
506
169
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
169
    return Status::OK();
508
169
}
509
510
template <typename LocalStateType>
511
1.42M
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
0
                                 LocalExchangeSharedState>) {
514
0
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
0
                                        MultiCastSharedState>) {
517
0
        throw Exception(Status::FatalError("should not reach here!"));
518
1.42M
    } else {
519
1.42M
        auto ss = LocalStateType::SharedStateType::create_shared();
520
1.42M
        ss->id = operator_id();
521
1.42M
        for (auto& dest : dests_id()) {
522
1.41M
            ss->related_op_ids.insert(dest);
523
1.41M
        }
524
1.42M
        return ss;
525
1.42M
    }
526
1.42M
}
_ZNK5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
170k
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
170k
    } else {
519
170k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
170k
        ss->id = operator_id();
521
170k
        for (auto& dest : dests_id()) {
522
170k
            ss->related_op_ids.insert(dest);
523
170k
        }
524
170k
        return ss;
525
170k
    }
526
170k
}
_ZNK5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
408k
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
408k
    } else {
519
408k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
408k
        ss->id = operator_id();
521
408k
        for (auto& dest : dests_id()) {
522
407k
            ss->related_op_ids.insert(dest);
523
407k
        }
524
408k
        return ss;
525
408k
    }
526
408k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
3
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
3
    } else {
519
3
        auto ss = LocalStateType::SharedStateType::create_shared();
520
3
        ss->id = operator_id();
521
3
        for (auto& dest : dests_id()) {
522
3
            ss->related_op_ids.insert(dest);
523
3
        }
524
3
        return ss;
525
3
    }
526
3
}
_ZNK5doris17DataSinkOperatorXINS_24ResultFileSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
378
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
378
    } else {
519
378
        auto ss = LocalStateType::SharedStateType::create_shared();
520
378
        ss->id = operator_id();
521
378
        for (auto& dest : dests_id()) {
522
378
            ss->related_op_ids.insert(dest);
523
378
        }
524
378
        return ss;
525
378
    }
526
378
}
_ZNK5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
47.2k
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
47.2k
    } else {
519
47.2k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
47.2k
        ss->id = operator_id();
521
47.2k
        for (auto& dest : dests_id()) {
522
46.9k
            ss->related_op_ids.insert(dest);
523
46.9k
        }
524
47.2k
        return ss;
525
47.2k
    }
526
47.2k
}
_ZNK5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE19create_shared_stateEv
Line
Count
Source
511
16
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
16
    } else {
519
16
        auto ss = LocalStateType::SharedStateType::create_shared();
520
16
        ss->id = operator_id();
521
16
        for (auto& dest : dests_id()) {
522
16
            ss->related_op_ids.insert(dest);
523
16
        }
524
16
        return ss;
525
16
    }
526
16
}
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
10.8k
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
10.8k
    } else {
519
10.8k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
10.8k
        ss->id = operator_id();
521
10.9k
        for (auto& dest : dests_id()) {
522
10.9k
            ss->related_op_ids.insert(dest);
523
10.9k
        }
524
10.8k
        return ss;
525
10.8k
    }
526
10.8k
}
_ZNK5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
6
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
6
    } else {
519
6
        auto ss = LocalStateType::SharedStateType::create_shared();
520
6
        ss->id = operator_id();
521
6
        for (auto& dest : dests_id()) {
522
6
            ss->related_op_ids.insert(dest);
523
6
        }
524
6
        return ss;
525
6
    }
526
6
}
_ZNK5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
204k
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
204k
    } else {
519
204k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
204k
        ss->id = operator_id();
521
204k
        for (auto& dest : dests_id()) {
522
203k
            ss->related_op_ids.insert(dest);
523
203k
        }
524
204k
        return ss;
525
204k
    }
526
204k
}
_ZNK5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
50
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
50
    } else {
519
50
        auto ss = LocalStateType::SharedStateType::create_shared();
520
50
        ss->id = operator_id();
521
50
        for (auto& dest : dests_id()) {
522
50
            ss->related_op_ids.insert(dest);
523
50
        }
524
50
        return ss;
525
50
    }
526
50
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
89.8k
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
89.8k
    } else {
519
89.8k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
89.8k
        ss->id = operator_id();
521
89.8k
        for (auto& dest : dests_id()) {
522
89.8k
            ss->related_op_ids.insert(dest);
523
89.8k
        }
524
89.8k
        return ss;
525
89.8k
    }
526
89.8k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
138
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
138
    } else {
519
138
        auto ss = LocalStateType::SharedStateType::create_shared();
520
138
        ss->id = operator_id();
521
138
        for (auto& dest : dests_id()) {
522
138
            ss->related_op_ids.insert(dest);
523
138
        }
524
138
        return ss;
525
138
    }
526
138
}
_ZNK5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
481k
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
481k
    } else {
519
481k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
481k
        ss->id = operator_id();
521
481k
        for (auto& dest : dests_id()) {
522
474k
            ss->related_op_ids.insert(dest);
523
474k
        }
524
481k
        return ss;
525
481k
    }
526
481k
}
_ZNK5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
5.05k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
5.05k
    } else {
519
5.05k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
5.05k
        ss->id = operator_id();
521
5.05k
        for (auto& dest : dests_id()) {
522
5.05k
            ss->related_op_ids.insert(dest);
523
5.05k
        }
524
5.05k
        return ss;
525
5.05k
    }
526
5.05k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
523
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
523
    } else {
519
523
        auto ss = LocalStateType::SharedStateType::create_shared();
520
523
        ss->id = operator_id();
521
523
        for (auto& dest : dests_id()) {
522
523
            ss->related_op_ids.insert(dest);
523
523
        }
524
523
        return ss;
525
523
    }
526
523
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE19create_shared_stateEv
Line
Count
Source
511
2.62k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
2.62k
    } else {
519
2.62k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
2.62k
        ss->id = operator_id();
521
2.64k
        for (auto& dest : dests_id()) {
522
2.64k
            ss->related_op_ids.insert(dest);
523
2.64k
        }
524
2.62k
        return ss;
525
2.62k
    }
526
2.62k
}
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE19create_shared_stateEv
Line
Count
Source
511
2.55k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
2.55k
    } else {
519
2.55k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
2.55k
        ss->id = operator_id();
521
2.55k
        for (auto& dest : dests_id()) {
522
2.55k
            ss->related_op_ids.insert(dest);
523
2.55k
        }
524
2.55k
        return ss;
525
2.55k
    }
526
2.55k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
563
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
563
    } else {
519
563
        auto ss = LocalStateType::SharedStateType::create_shared();
520
563
        ss->id = operator_id();
521
563
        for (auto& dest : dests_id()) {
522
553
            ss->related_op_ids.insert(dest);
523
553
        }
524
563
        return ss;
525
563
    }
526
563
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
106
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
106
    } else {
519
106
        auto ss = LocalStateType::SharedStateType::create_shared();
520
106
        ss->id = operator_id();
521
106
        for (auto& dest : dests_id()) {
522
104
            ss->related_op_ids.insert(dest);
523
104
        }
524
106
        return ss;
525
106
    }
526
106
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE19create_shared_stateEv
527
528
template <typename LocalStateType>
529
2.07M
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.07M
    auto local_state = LocalStateType::create_unique(state, this);
531
2.07M
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.07M
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.07M
    return Status::OK();
534
2.07M
}
_ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
89.9k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
89.9k
    auto local_state = LocalStateType::create_unique(state, this);
531
89.9k
    RETURN_IF_ERROR(local_state->init(state, info));
532
89.9k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
89.9k
    return Status::OK();
534
89.9k
}
_ZN5doris9OperatorXINS_18OlapScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
247k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
247k
    auto local_state = LocalStateType::create_unique(state, this);
531
247k
    RETURN_IF_ERROR(local_state->init(state, info));
532
247k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
247k
    return Status::OK();
534
247k
}
_ZN5doris9OperatorXINS_21GroupCommitLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
117
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
117
    auto local_state = LocalStateType::create_unique(state, this);
531
117
    RETURN_IF_ERROR(local_state->init(state, info));
532
117
    state->emplace_local_state(operator_id(), std::move(local_state));
533
117
    return Status::OK();
534
117
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_18JDBCScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_18FileScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
3.09k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
3.09k
    auto local_state = LocalStateType::create_unique(state, this);
531
3.09k
    RETURN_IF_ERROR(local_state->init(state, info));
532
3.09k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
3.09k
    return Status::OK();
534
3.09k
}
_ZN5doris9OperatorXINS_18AnalyticLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
10.7k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
10.7k
    auto local_state = LocalStateType::create_unique(state, this);
531
10.7k
    RETURN_IF_ERROR(local_state->init(state, info));
532
10.7k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
10.7k
    return Status::OK();
534
10.7k
}
_ZN5doris9OperatorXINS_14SortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
10.6k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
10.6k
    auto local_state = LocalStateType::create_unique(state, this);
531
10.6k
    RETURN_IF_ERROR(local_state->init(state, info));
532
10.6k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
10.6k
    return Status::OK();
534
10.6k
}
_ZN5doris9OperatorXINS_19SpillSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
32
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
32
    auto local_state = LocalStateType::create_unique(state, this);
531
32
    RETURN_IF_ERROR(local_state->init(state, info));
532
32
    state->emplace_local_state(operator_id(), std::move(local_state));
533
32
    return Status::OK();
534
32
}
_ZN5doris9OperatorXINS_24LocalMergeSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
192k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
192k
    auto local_state = LocalStateType::create_unique(state, this);
531
192k
    RETURN_IF_ERROR(local_state->init(state, info));
532
192k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
192k
    return Status::OK();
534
192k
}
_ZN5doris9OperatorXINS_13AggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
89.4k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
89.4k
    auto local_state = LocalStateType::create_unique(state, this);
531
89.4k
    RETURN_IF_ERROR(local_state->init(state, info));
532
89.4k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
89.4k
    return Status::OK();
534
89.4k
}
_ZN5doris9OperatorXINS_21BucketedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
109k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
109k
    auto local_state = LocalStateType::create_unique(state, this);
531
109k
    RETURN_IF_ERROR(local_state->init(state, info));
532
109k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
109k
    return Status::OK();
534
109k
}
_ZN5doris9OperatorXINS_24PartitionedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
120
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
120
    auto local_state = LocalStateType::create_unique(state, this);
531
120
    RETURN_IF_ERROR(local_state->init(state, info));
532
120
    state->emplace_local_state(operator_id(), std::move(local_state));
533
120
    return Status::OK();
534
120
}
_ZN5doris9OperatorXINS_23TableFunctionLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
3.76k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
3.76k
    auto local_state = LocalStateType::create_unique(state, this);
531
3.76k
    RETURN_IF_ERROR(local_state->init(state, info));
532
3.76k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
3.76k
    return Status::OK();
534
3.76k
}
_ZN5doris9OperatorXINS_18ExchangeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
278k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
278k
    auto local_state = LocalStateType::create_unique(state, this);
531
278k
    RETURN_IF_ERROR(local_state->init(state, info));
532
278k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
278k
    return Status::OK();
534
278k
}
_ZN5doris9OperatorXINS_16RepeatLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.32k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.32k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.32k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.32k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.32k
    return Status::OK();
534
1.32k
}
_ZN5doris9OperatorXINS_29NestedLoopJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
5.05k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
5.05k
    auto local_state = LocalStateType::create_unique(state, this);
531
5.05k
    RETURN_IF_ERROR(local_state->init(state, info));
532
5.05k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
5.05k
    return Status::OK();
534
5.05k
}
_ZN5doris9OperatorXINS_23AssertNumRowsLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
30
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
30
    auto local_state = LocalStateType::create_unique(state, this);
531
30
    RETURN_IF_ERROR(local_state->init(state, info));
532
30
    state->emplace_local_state(operator_id(), std::move(local_state));
533
30
    return Status::OK();
534
30
}
_ZN5doris9OperatorXINS_18EmptySetLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.61k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.61k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.61k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.61k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.61k
    return Status::OK();
534
1.61k
}
_ZN5doris9OperatorXINS_21UnionSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
54.6k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
54.6k
    auto local_state = LocalStateType::create_unique(state, this);
531
54.6k
    RETURN_IF_ERROR(local_state->init(state, info));
532
54.6k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
54.6k
    return Status::OK();
534
54.6k
}
_ZN5doris9OperatorXINS_35MultiCastDataStreamSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
5.24k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
5.24k
    auto local_state = LocalStateType::create_unique(state, this);
531
5.24k
    RETURN_IF_ERROR(local_state->init(state, info));
532
5.24k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
5.24k
    return Status::OK();
534
5.24k
}
_ZN5doris9OperatorXINS_29PartitionSortSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
319
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
319
    auto local_state = LocalStateType::create_unique(state, this);
531
319
    RETURN_IF_ERROR(local_state->init(state, info));
532
319
    state->emplace_local_state(operator_id(), std::move(local_state));
533
319
    return Status::OK();
534
319
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.64k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.64k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.64k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.64k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.64k
    return Status::OK();
534
2.64k
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.57k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.57k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.57k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.57k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.57k
    return Status::OK();
534
2.57k
}
_ZN5doris9OperatorXINS_17DataGenLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
389
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
389
    auto local_state = LocalStateType::create_unique(state, this);
531
389
    RETURN_IF_ERROR(local_state->init(state, info));
532
389
    state->emplace_local_state(operator_id(), std::move(local_state));
533
389
    return Status::OK();
534
389
}
_ZN5doris9OperatorXINS_20SchemaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.68k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.68k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.68k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.68k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.68k
    return Status::OK();
534
1.68k
}
_ZN5doris9OperatorXINS_18MetaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
10.3k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
10.3k
    auto local_state = LocalStateType::create_unique(state, this);
531
10.3k
    RETURN_IF_ERROR(local_state->init(state, info));
532
10.3k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
10.3k
    return Status::OK();
534
10.3k
}
_ZN5doris9OperatorXINS_29LocalExchangeSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
644k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
644k
    auto local_state = LocalStateType::create_unique(state, this);
531
644k
    RETURN_IF_ERROR(local_state->init(state, info));
532
644k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
644k
    return Status::OK();
534
644k
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_34PartitionedHashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_21CacheSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
14
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
14
    auto local_state = LocalStateType::create_unique(state, this);
531
14
    RETURN_IF_ERROR(local_state->init(state, info));
532
14
    state->emplace_local_state(operator_id(), std::move(local_state));
533
14
    return Status::OK();
534
14
}
_ZN5doris9OperatorXINS_22RecCTESourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
169
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
169
    auto local_state = LocalStateType::create_unique(state, this);
531
169
    RETURN_IF_ERROR(local_state->init(state, info));
532
169
    state->emplace_local_state(operator_id(), std::move(local_state));
533
169
    return Status::OK();
534
169
}
_ZN5doris9OperatorXINS_20RecCTEScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.20k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.20k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.20k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.20k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.20k
    return Status::OK();
534
2.20k
}
_ZN5doris9OperatorXINS_25MaterializationLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
792
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
792
    auto local_state = LocalStateType::create_unique(state, this);
531
792
    RETURN_IF_ERROR(local_state->init(state, info));
532
792
    state->emplace_local_state(operator_id(), std::move(local_state));
533
792
    return Status::OK();
534
792
}
_ZN5doris9OperatorXINS_16SelectLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.07k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.07k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.07k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.07k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.07k
    return Status::OK();
534
1.07k
}
_ZN5doris9OperatorXINS_22StreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
5.59k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
5.59k
    auto local_state = LocalStateType::create_unique(state, this);
531
5.59k
    RETURN_IF_ERROR(local_state->init(state, info));
532
5.59k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
5.59k
    return Status::OK();
534
5.59k
}
_ZN5doris9OperatorXINS_30DistinctStreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
295k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
295k
    auto local_state = LocalStateType::create_unique(state, this);
531
295k
    RETURN_IF_ERROR(local_state->init(state, info));
532
295k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
295k
    return Status::OK();
534
295k
}
535
536
PipelineXSinkLocalStateBase::PipelineXSinkLocalStateBase(DataSinkOperatorXBase* parent,
537
                                                         RuntimeState* state)
538
1.80M
        : _parent(parent), _state(state) {}
539
540
PipelineXLocalStateBase::PipelineXLocalStateBase(RuntimeState* state, OperatorXBase* parent)
541
2.06M
        : _num_rows_returned(0),
542
2.06M
          _rows_returned_counter(nullptr),
543
2.06M
          _parent(parent),
544
2.06M
          _state(state),
545
2.06M
          _budget(state->batch_size(), state->preferred_block_size_bytes()) {}
546
547
template <typename SharedStateArg>
548
2.07M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
2.07M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
2.07M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
2.07M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
2.07M
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
2.07M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
2.07M
    _operator_profile->add_child(_common_profile.get(), true);
557
2.07M
    _operator_profile->add_child(_custom_profile.get(), true);
558
2.07M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
2.07M
    if constexpr (!is_fake_shared) {
560
1.22M
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
764k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
764k
                                    .first.get()
563
764k
                                    ->template cast<SharedStateArg>();
564
565
764k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
764k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
764k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
764k
        } else if (info.shared_state) {
569
388k
            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
388k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
388k
            _dependency = _shared_state->create_source_dependency(
576
388k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
388k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
388k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
388k
        } else {
580
68.9k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
7.28k
                DCHECK(false);
582
7.28k
            }
583
68.9k
        }
584
1.22M
    }
585
586
2.07M
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
2.07M
    _rows_returned_counter =
591
2.07M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
2.07M
    _blocks_returned_counter =
593
2.07M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
2.07M
    _output_block_bytes_counter =
595
2.07M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
2.07M
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
2.07M
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
2.07M
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
2.07M
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
2.07M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
2.07M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
2.07M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
2.07M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
2.07M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
2.07M
    _memory_used_counter =
606
2.07M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
2.07M
    _common_profile->add_info_string("IsColocate",
608
2.07M
                                     std::to_string(_parent->is_colocated_operator()));
609
2.07M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
2.07M
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
2.07M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
2.07M
    return Status::OK();
613
2.07M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
90.0k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
90.0k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
90.0k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
90.0k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
90.0k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
90.0k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
90.0k
    _operator_profile->add_child(_common_profile.get(), true);
557
90.0k
    _operator_profile->add_child(_custom_profile.get(), true);
558
90.0k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
90.0k
    if constexpr (!is_fake_shared) {
560
90.0k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
15.3k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
15.3k
                                    .first.get()
563
15.3k
                                    ->template cast<SharedStateArg>();
564
565
15.3k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
15.3k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
15.3k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
74.7k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
73.8k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
73.8k
            _dependency = _shared_state->create_source_dependency(
576
73.8k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
73.8k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
73.8k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
73.8k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
828
        }
584
90.0k
    }
585
586
90.0k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
90.0k
    _rows_returned_counter =
591
90.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
90.0k
    _blocks_returned_counter =
593
90.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
90.0k
    _output_block_bytes_counter =
595
90.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
90.0k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
90.0k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
90.0k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
90.0k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
90.0k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
90.0k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
90.0k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
90.0k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
90.0k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
90.0k
    _memory_used_counter =
606
90.0k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
90.0k
    _common_profile->add_info_string("IsColocate",
608
90.0k
                                     std::to_string(_parent->is_colocated_operator()));
609
90.0k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
90.0k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
90.0k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
90.0k
    return Status::OK();
613
90.0k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
2
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
2
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
2
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
2
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
2
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
2
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
2
    _operator_profile->add_child(_common_profile.get(), true);
557
2
    _operator_profile->add_child(_custom_profile.get(), true);
558
2
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
2
    if constexpr (!is_fake_shared) {
560
2
        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
2
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
2
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
2
            _dependency = _shared_state->create_source_dependency(
576
2
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
2
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
2
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
2
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
2
    }
585
586
2
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
2
    _rows_returned_counter =
591
2
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
2
    _blocks_returned_counter =
593
2
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
2
    _output_block_bytes_counter =
595
2
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
2
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
2
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
2
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
2
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
2
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
2
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
2
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
2
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
2
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
2
    _memory_used_counter =
606
2
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
2
    _common_profile->add_info_string("IsColocate",
608
2
                                     std::to_string(_parent->is_colocated_operator()));
609
2
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
2
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
2
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
2
    return Status::OK();
613
2
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
203k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
203k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
203k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
203k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
203k
    _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
203k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
203k
    _operator_profile->add_child(_common_profile.get(), true);
557
203k
    _operator_profile->add_child(_custom_profile.get(), true);
558
203k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
203k
    if constexpr (!is_fake_shared) {
560
203k
        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
203k
        } 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
195k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
195k
            _dependency = _shared_state->create_source_dependency(
576
195k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
195k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
195k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
195k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
7.98k
        }
584
203k
    }
585
586
203k
    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
203k
    _rows_returned_counter =
591
203k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
203k
    _blocks_returned_counter =
593
203k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
203k
    _output_block_bytes_counter =
595
203k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
203k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
203k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
203k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
203k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
203k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
203k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
203k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
203k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
203k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
203k
    _memory_used_counter =
606
203k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
203k
    _common_profile->add_info_string("IsColocate",
608
203k
                                     std::to_string(_parent->is_colocated_operator()));
609
203k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
203k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
203k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
203k
    return Status::OK();
613
203k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
32
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
32
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
32
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
32
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
32
    _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
32
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
32
    _operator_profile->add_child(_common_profile.get(), true);
557
32
    _operator_profile->add_child(_custom_profile.get(), true);
558
32
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
32
    if constexpr (!is_fake_shared) {
560
32
        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
32
        } 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
32
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
32
            _dependency = _shared_state->create_source_dependency(
576
32
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
32
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
32
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
32
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
32
    }
585
586
32
    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
32
    _rows_returned_counter =
591
32
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
32
    _blocks_returned_counter =
593
32
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
32
    _output_block_bytes_counter =
595
32
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
32
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
32
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
32
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
32
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
32
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
32
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
32
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
32
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
32
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
32
    _memory_used_counter =
606
32
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
32
    _common_profile->add_info_string("IsColocate",
608
32
                                     std::to_string(_parent->is_colocated_operator()));
609
32
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
32
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
32
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
32
    return Status::OK();
613
32
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
5.05k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
5.05k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
5.05k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
5.05k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
5.05k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
5.05k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
5.05k
    _operator_profile->add_child(_common_profile.get(), true);
557
5.05k
    _operator_profile->add_child(_custom_profile.get(), true);
558
5.05k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
5.05k
    if constexpr (!is_fake_shared) {
560
5.05k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
5.05k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
5.04k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
5.04k
            _dependency = _shared_state->create_source_dependency(
576
5.04k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
5.04k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
5.04k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
5.04k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
18
        }
584
5.05k
    }
585
586
5.05k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
5.05k
    _rows_returned_counter =
591
5.05k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
5.05k
    _blocks_returned_counter =
593
5.05k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
5.05k
    _output_block_bytes_counter =
595
5.05k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
5.05k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
5.05k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
5.05k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
5.05k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
5.05k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
5.05k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
5.05k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
5.05k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
5.05k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
5.05k
    _memory_used_counter =
606
5.05k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
5.05k
    _common_profile->add_info_string("IsColocate",
608
5.05k
                                     std::to_string(_parent->is_colocated_operator()));
609
5.05k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
5.05k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
5.05k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
5.05k
    return Status::OK();
613
5.05k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
10.7k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
10.7k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
10.7k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
10.7k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
10.7k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
10.7k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
10.7k
    _operator_profile->add_child(_common_profile.get(), true);
557
10.7k
    _operator_profile->add_child(_custom_profile.get(), true);
558
10.7k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
10.7k
    if constexpr (!is_fake_shared) {
560
10.7k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
10.7k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
10.3k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
10.3k
            _dependency = _shared_state->create_source_dependency(
576
10.3k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
10.3k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
10.3k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
10.3k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
401
        }
584
10.7k
    }
585
586
10.7k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
10.7k
    _rows_returned_counter =
591
10.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
10.7k
    _blocks_returned_counter =
593
10.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
10.7k
    _output_block_bytes_counter =
595
10.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
10.7k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
10.7k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
10.7k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
10.7k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
10.7k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
10.7k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
10.7k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
10.7k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
10.7k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
10.7k
    _memory_used_counter =
606
10.7k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
10.7k
    _common_profile->add_info_string("IsColocate",
608
10.7k
                                     std::to_string(_parent->is_colocated_operator()));
609
10.7k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
10.7k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
10.7k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
10.7k
    return Status::OK();
613
10.7k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
89.7k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
89.7k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
89.7k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
89.7k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
89.7k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
89.7k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
89.7k
    _operator_profile->add_child(_common_profile.get(), true);
557
89.7k
    _operator_profile->add_child(_custom_profile.get(), true);
558
89.7k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
89.7k
    if constexpr (!is_fake_shared) {
560
89.7k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
89.7k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
88.2k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
88.2k
            _dependency = _shared_state->create_source_dependency(
576
88.2k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
88.2k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
88.2k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
88.2k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
1.47k
        }
584
89.7k
    }
585
586
89.7k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
89.7k
    _rows_returned_counter =
591
89.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
89.7k
    _blocks_returned_counter =
593
89.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
89.7k
    _output_block_bytes_counter =
595
89.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
89.7k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
89.7k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
89.7k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
89.7k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
89.7k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
89.7k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
89.7k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
89.7k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
89.7k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
89.7k
    _memory_used_counter =
606
89.7k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
89.7k
    _common_profile->add_info_string("IsColocate",
608
89.7k
                                     std::to_string(_parent->is_colocated_operator()));
609
89.7k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
89.7k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
89.7k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
89.7k
    return Status::OK();
613
89.7k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
109k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
109k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
109k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
109k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
109k
    _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
109k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
109k
    _operator_profile->add_child(_common_profile.get(), true);
557
109k
    _operator_profile->add_child(_custom_profile.get(), true);
558
109k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
109k
    if constexpr (!is_fake_shared) {
560
109k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
109k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
109k
                                    .first.get()
563
109k
                                    ->template cast<SharedStateArg>();
564
565
109k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
109k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
109k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
18.4E
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
0
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
0
            _dependency = _shared_state->create_source_dependency(
576
0
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
18.4E
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
18.4E
        }
584
109k
    }
585
586
109k
    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
109k
    _rows_returned_counter =
591
109k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
109k
    _blocks_returned_counter =
593
109k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
109k
    _output_block_bytes_counter =
595
109k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
109k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
109k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
109k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
109k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
109k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
109k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
109k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
109k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
109k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
109k
    _memory_used_counter =
606
109k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
109k
    _common_profile->add_info_string("IsColocate",
608
109k
                                     std::to_string(_parent->is_colocated_operator()));
609
109k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
109k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
109k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
109k
    return Status::OK();
613
109k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
120
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
120
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
120
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
120
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
120
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
120
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
120
    _operator_profile->add_child(_common_profile.get(), true);
557
120
    _operator_profile->add_child(_custom_profile.get(), true);
558
120
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
120
    if constexpr (!is_fake_shared) {
560
120
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
120
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
120
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
120
            _dependency = _shared_state->create_source_dependency(
576
120
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
120
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
120
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
120
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
120
    }
585
586
120
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
120
    _rows_returned_counter =
591
120
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
120
    _blocks_returned_counter =
593
120
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
120
    _output_block_bytes_counter =
595
120
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
120
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
120
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
120
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
120
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
120
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
120
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
120
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
120
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
120
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
120
    _memory_used_counter =
606
120
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
120
    _common_profile->add_info_string("IsColocate",
608
120
                                     std::to_string(_parent->is_colocated_operator()));
609
120
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
120
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
120
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
120
    return Status::OK();
613
120
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
851k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
851k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
851k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
851k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
851k
    _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
851k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
851k
    _operator_profile->add_child(_common_profile.get(), true);
557
851k
    _operator_profile->add_child(_custom_profile.get(), true);
558
851k
    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
851k
    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
851k
    _rows_returned_counter =
591
851k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
851k
    _blocks_returned_counter =
593
851k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
851k
    _output_block_bytes_counter =
595
851k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
851k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
851k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
851k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
851k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
851k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
851k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
851k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
851k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
851k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
851k
    _memory_used_counter =
606
851k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
851k
    _common_profile->add_info_string("IsColocate",
608
851k
                                     std::to_string(_parent->is_colocated_operator()));
609
851k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
851k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
851k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
851k
    return Status::OK();
613
851k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
54.5k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
54.5k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
54.5k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
54.5k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
54.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
54.5k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
54.5k
    _operator_profile->add_child(_common_profile.get(), true);
557
54.5k
    _operator_profile->add_child(_custom_profile.get(), true);
558
54.5k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
54.5k
    if constexpr (!is_fake_shared) {
560
54.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
54.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
3.64k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
3.64k
            _dependency = _shared_state->create_source_dependency(
576
3.64k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
3.64k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
3.64k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
50.9k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
50.9k
        }
584
54.5k
    }
585
586
54.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
54.5k
    _rows_returned_counter =
591
54.5k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
54.5k
    _blocks_returned_counter =
593
54.5k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
54.5k
    _output_block_bytes_counter =
595
54.5k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
54.5k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
54.5k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
54.5k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
54.5k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
54.5k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
54.5k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
54.5k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
54.5k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
54.5k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
54.5k
    _memory_used_counter =
606
54.5k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
54.5k
    _common_profile->add_info_string("IsColocate",
608
54.5k
                                     std::to_string(_parent->is_colocated_operator()));
609
54.5k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
54.5k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
54.5k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
54.5k
    return Status::OK();
613
54.5k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
38
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
38
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
38
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
38
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
38
    _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
38
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
38
    _operator_profile->add_child(_common_profile.get(), true);
557
38
    _operator_profile->add_child(_custom_profile.get(), true);
558
38
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
38
    if constexpr (!is_fake_shared) {
560
38
        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
38
        } 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
38
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
38
            _dependency = _shared_state->create_source_dependency(
576
38
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
38
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
38
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
38
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
38
    }
585
586
38
    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
38
    _rows_returned_counter =
591
38
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
38
    _blocks_returned_counter =
593
38
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
38
    _output_block_bytes_counter =
595
38
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
38
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
38
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
38
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
38
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
38
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
38
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
38
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
38
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
38
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
38
    _memory_used_counter =
606
38
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
38
    _common_profile->add_info_string("IsColocate",
608
38
                                     std::to_string(_parent->is_colocated_operator()));
609
38
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
38
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
38
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
38
    return Status::OK();
613
38
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
5.24k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
5.24k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
5.24k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
5.24k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
5.24k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
5.24k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
5.24k
    _operator_profile->add_child(_common_profile.get(), true);
557
5.24k
    _operator_profile->add_child(_custom_profile.get(), true);
558
5.24k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
5.24k
    if constexpr (!is_fake_shared) {
560
5.24k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
5.24k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
5.21k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
5.21k
            _dependency = _shared_state->create_source_dependency(
576
5.21k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
5.21k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
5.21k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
5.21k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
35
        }
584
5.24k
    }
585
586
5.24k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
5.24k
    _rows_returned_counter =
591
5.24k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
5.24k
    _blocks_returned_counter =
593
5.24k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
5.24k
    _output_block_bytes_counter =
595
5.24k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
5.24k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
5.24k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
5.24k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
5.24k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
5.24k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
5.24k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
5.24k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
5.24k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
5.24k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
5.24k
    _memory_used_counter =
606
5.24k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
5.24k
    _common_profile->add_info_string("IsColocate",
608
5.24k
                                     std::to_string(_parent->is_colocated_operator()));
609
5.24k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
5.24k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
5.24k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
5.24k
    return Status::OK();
613
5.24k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
523
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
523
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
523
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
523
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
523
    _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
523
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
523
    _operator_profile->add_child(_common_profile.get(), true);
557
523
    _operator_profile->add_child(_custom_profile.get(), true);
558
523
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
523
    if constexpr (!is_fake_shared) {
560
523
        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
523
        } 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
523
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
523
            _dependency = _shared_state->create_source_dependency(
576
523
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
523
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
523
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
523
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
523
    }
585
586
523
    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
523
    _rows_returned_counter =
591
523
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
523
    _blocks_returned_counter =
593
523
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
523
    _output_block_bytes_counter =
595
523
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
523
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
523
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
523
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
523
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
523
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
523
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
523
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
523
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
523
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
523
    _memory_used_counter =
606
523
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
523
    _common_profile->add_info_string("IsColocate",
608
523
                                     std::to_string(_parent->is_colocated_operator()));
609
523
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
523
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
523
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
523
    return Status::OK();
613
523
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
5.25k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
5.25k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
5.25k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
5.25k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
5.25k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
5.25k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
5.25k
    _operator_profile->add_child(_common_profile.get(), true);
557
5.25k
    _operator_profile->add_child(_custom_profile.get(), true);
558
5.25k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
5.25k
    if constexpr (!is_fake_shared) {
560
5.25k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
5.25k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
5.21k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
5.21k
            _dependency = _shared_state->create_source_dependency(
576
5.21k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
5.21k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
5.21k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
5.21k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
43
        }
584
5.25k
    }
585
586
5.25k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
5.25k
    _rows_returned_counter =
591
5.25k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
5.25k
    _blocks_returned_counter =
593
5.25k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
5.25k
    _output_block_bytes_counter =
595
5.25k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
5.25k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
5.25k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
5.25k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
5.25k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
5.25k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
5.25k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
5.25k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
5.25k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
5.25k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
5.25k
    _memory_used_counter =
606
5.25k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
5.25k
    _common_profile->add_info_string("IsColocate",
608
5.25k
                                     std::to_string(_parent->is_colocated_operator()));
609
5.25k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
5.25k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
5.25k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
5.25k
    return Status::OK();
613
5.25k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
647k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
647k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
647k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
647k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
647k
    _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
647k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
647k
    _operator_profile->add_child(_common_profile.get(), true);
557
647k
    _operator_profile->add_child(_custom_profile.get(), true);
558
647k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
647k
    if constexpr (!is_fake_shared) {
560
647k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
640k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
640k
                                    .first.get()
563
640k
                                    ->template cast<SharedStateArg>();
564
565
640k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
640k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
640k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
640k
        } 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
7.28k
        } else {
580
7.28k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
7.28k
                DCHECK(false);
582
7.28k
            }
583
7.28k
        }
584
647k
    }
585
586
647k
    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
647k
    _rows_returned_counter =
591
647k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
647k
    _blocks_returned_counter =
593
647k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
647k
    _output_block_bytes_counter =
595
647k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
647k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
647k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
647k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
647k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
647k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
647k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
647k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
647k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
647k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
647k
    _memory_used_counter =
606
647k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
647k
    _common_profile->add_info_string("IsColocate",
608
647k
                                     std::to_string(_parent->is_colocated_operator()));
609
647k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
647k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
647k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
647k
    return Status::OK();
613
647k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
169
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
169
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
169
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
169
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
169
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
169
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
169
    _operator_profile->add_child(_common_profile.get(), true);
557
169
    _operator_profile->add_child(_custom_profile.get(), true);
558
169
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
169
    if constexpr (!is_fake_shared) {
560
169
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
169
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
169
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
169
            _dependency = _shared_state->create_source_dependency(
576
169
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
169
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
169
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
169
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
169
    }
585
586
169
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
169
    _rows_returned_counter =
591
169
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
169
    _blocks_returned_counter =
593
169
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
169
    _output_block_bytes_counter =
595
169
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
169
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
169
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
169
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
169
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
169
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
169
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
169
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
169
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
169
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
169
    _memory_used_counter =
606
169
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
169
    _common_profile->add_info_string("IsColocate",
608
169
                                     std::to_string(_parent->is_colocated_operator()));
609
169
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
169
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
169
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
169
    return Status::OK();
613
169
}
614
615
template <typename SharedStateArg>
616
2.08M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
2.08M
    _conjuncts.resize(_parent->_conjuncts.size());
618
2.38M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
304k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
304k
    }
621
2.08M
    if (_parent->has_projection()) {
622
404k
        const auto& projection = *_parent->_projection;
623
404k
        _projections.resize(projection.projections.size());
624
2.42M
        for (size_t i = 0; i < _projections.size(); i++) {
625
2.02M
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
2.02M
        }
627
404k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
420k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
15.9k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
212k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
196k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
196k
                        state, _intermediate_projections[i][j]));
633
196k
            }
634
15.9k
        }
635
404k
    }
636
2.08M
    return Status::OK();
637
2.08M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
90.2k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
90.2k
    _conjuncts.resize(_parent->_conjuncts.size());
618
91.4k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
1.20k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1.20k
    }
621
90.2k
    if (_parent->has_projection()) {
622
90.2k
        const auto& projection = *_parent->_projection;
623
90.2k
        _projections.resize(projection.projections.size());
624
440k
        for (size_t i = 0; i < _projections.size(); i++) {
625
349k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
349k
        }
627
90.2k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
96.8k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
6.60k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
154k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
148k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
148k
                        state, _intermediate_projections[i][j]));
633
148k
            }
634
6.60k
        }
635
90.2k
    }
636
90.2k
    return Status::OK();
637
90.2k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
6
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
6
    _conjuncts.resize(_parent->_conjuncts.size());
618
6
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
6
    if (_parent->has_projection()) {
622
0
        const auto& projection = *_parent->_projection;
623
0
        _projections.resize(projection.projections.size());
624
0
        for (size_t i = 0; i < _projections.size(); i++) {
625
0
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
0
        }
627
0
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
0
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
0
    }
636
6
    return Status::OK();
637
6
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
205k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
205k
    _conjuncts.resize(_parent->_conjuncts.size());
618
205k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
205k
    if (_parent->has_projection()) {
622
80
        const auto& projection = *_parent->_projection;
623
80
        _projections.resize(projection.projections.size());
624
402
        for (size_t i = 0; i < _projections.size(); i++) {
625
322
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
322
        }
627
80
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
80
        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
80
    }
636
205k
    return Status::OK();
637
205k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
32
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
32
    _conjuncts.resize(_parent->_conjuncts.size());
618
32
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
32
    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
32
    return Status::OK();
637
32
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
5.06k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
5.06k
    _conjuncts.resize(_parent->_conjuncts.size());
618
5.11k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
56
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
56
    }
621
5.06k
    if (_parent->has_projection()) {
622
5.06k
        const auto& projection = *_parent->_projection;
623
5.06k
        _projections.resize(projection.projections.size());
624
22.8k
        for (size_t i = 0; i < _projections.size(); i++) {
625
17.8k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
17.8k
        }
627
5.06k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
5.09k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
28
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
217
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
189
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
189
                        state, _intermediate_projections[i][j]));
633
189
            }
634
28
        }
635
5.06k
    }
636
5.06k
    return Status::OK();
637
5.06k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
11.0k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
11.0k
    _conjuncts.resize(_parent->_conjuncts.size());
618
11.8k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
836
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
836
    }
621
11.0k
    if (_parent->has_projection()) {
622
6.48k
        const auto& projection = *_parent->_projection;
623
6.48k
        _projections.resize(projection.projections.size());
624
26.3k
        for (size_t i = 0; i < _projections.size(); i++) {
625
19.8k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
19.8k
        }
627
6.48k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
6.56k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
82
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
621
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
539
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
539
                        state, _intermediate_projections[i][j]));
633
539
            }
634
82
        }
635
6.48k
    }
636
11.0k
    return Status::OK();
637
11.0k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
89.9k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
89.9k
    _conjuncts.resize(_parent->_conjuncts.size());
618
91.5k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
1.59k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1.59k
    }
621
89.9k
    if (_parent->has_projection()) {
622
30.3k
        const auto& projection = *_parent->_projection;
623
30.3k
        _projections.resize(projection.projections.size());
624
274k
        for (size_t i = 0; i < _projections.size(); i++) {
625
244k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
244k
        }
627
30.3k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
30.4k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
176
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
1.02k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
853
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
853
                        state, _intermediate_projections[i][j]));
633
853
            }
634
176
        }
635
30.3k
    }
636
89.9k
    return Status::OK();
637
89.9k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
109k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
109k
    _conjuncts.resize(_parent->_conjuncts.size());
618
109k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
13
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
13
    }
621
109k
    if (_parent->has_projection()) {
622
179
        const auto& projection = *_parent->_projection;
623
179
        _projections.resize(projection.projections.size());
624
750
        for (size_t i = 0; i < _projections.size(); i++) {
625
571
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
571
        }
627
179
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
181
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
2
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
15
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
13
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
13
                        state, _intermediate_projections[i][j]));
633
13
            }
634
2
        }
635
179
    }
636
109k
    return Status::OK();
637
109k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
128
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
128
    _conjuncts.resize(_parent->_conjuncts.size());
618
128
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
128
    if (_parent->has_projection()) {
622
96
        const auto& projection = *_parent->_projection;
623
96
        _projections.resize(projection.projections.size());
624
288
        for (size_t i = 0; i < _projections.size(); i++) {
625
192
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
192
        }
627
96
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
96
        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
96
    }
636
128
    return Status::OK();
637
128
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
855k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
855k
    _conjuncts.resize(_parent->_conjuncts.size());
618
1.15M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
299k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
299k
    }
621
855k
    if (_parent->has_projection()) {
622
260k
        const auto& projection = *_parent->_projection;
623
260k
        _projections.resize(projection.projections.size());
624
1.54M
        for (size_t i = 0; i < _projections.size(); i++) {
625
1.28M
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
1.28M
        }
627
260k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
269k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
8.89k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
53.5k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
44.6k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
44.6k
                        state, _intermediate_projections[i][j]));
633
44.6k
            }
634
8.89k
        }
635
260k
    }
636
855k
    return Status::OK();
637
855k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
54.7k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
54.7k
    _conjuncts.resize(_parent->_conjuncts.size());
618
54.7k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
54.7k
    if (_parent->has_projection()) {
622
11.4k
        const auto& projection = *_parent->_projection;
623
11.4k
        _projections.resize(projection.projections.size());
624
110k
        for (size_t i = 0; i < _projections.size(); i++) {
625
99.2k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
99.2k
        }
627
11.4k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
11.5k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
123
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
2.59k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
2.47k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
2.47k
                        state, _intermediate_projections[i][j]));
633
2.47k
            }
634
123
        }
635
11.4k
    }
636
54.7k
    return Status::OK();
637
54.7k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
36
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
36
    _conjuncts.resize(_parent->_conjuncts.size());
618
36
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
36
    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
36
    return Status::OK();
637
36
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
5.24k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
5.24k
    _conjuncts.resize(_parent->_conjuncts.size());
618
6.27k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
1.03k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1.03k
    }
621
5.24k
    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
5.24k
    return Status::OK();
637
5.24k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
522
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
522
    _conjuncts.resize(_parent->_conjuncts.size());
618
522
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
522
    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
522
    return Status::OK();
637
522
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
5.25k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
5.25k
    _conjuncts.resize(_parent->_conjuncts.size());
618
5.25k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
5.25k
    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
5.25k
    return Status::OK();
637
5.25k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
650k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
650k
    _conjuncts.resize(_parent->_conjuncts.size());
618
650k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
650k
    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
650k
    return Status::OK();
637
650k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4openEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
169
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
169
    _conjuncts.resize(_parent->_conjuncts.size());
618
176
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
7
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
7
    }
621
169
    if (_parent->has_projection()) {
622
166
        const auto& projection = *_parent->_projection;
623
166
        _projections.resize(projection.projections.size());
624
491
        for (size_t i = 0; i < _projections.size(); i++) {
625
325
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
325
        }
627
166
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
169
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
3
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
11
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
8
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
8
                        state, _intermediate_projections[i][j]));
633
8
            }
634
3
        }
635
166
    }
636
169
    return Status::OK();
637
169
}
638
639
template <typename SharedStateArg>
640
7.86k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
7.86k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
7.86k
    _terminated = true;
645
7.86k
    return Status::OK();
646
7.86k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
345
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
345
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
345
    _terminated = true;
645
345
    return Status::OK();
646
345
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
20
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
20
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
20
    _terminated = true;
645
20
    return Status::OK();
646
20
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
42
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
42
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
42
    _terminated = true;
645
42
    return Status::OK();
646
42
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
2
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
2
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
2
    _terminated = true;
645
2
    return Status::OK();
646
2
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
133
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
133
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
133
    _terminated = true;
645
133
    return Status::OK();
646
133
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
6.19k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
6.19k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
6.19k
    _terminated = true;
645
6.19k
    return Status::OK();
646
6.19k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
31
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
31
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
31
    _terminated = true;
645
31
    return Status::OK();
646
31
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
3
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
3
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
3
    _terminated = true;
645
3
    return Status::OK();
646
3
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
2
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
2
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
2
    _terminated = true;
645
2
    return Status::OK();
646
2
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
1.05k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
1.05k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
1.05k
    _terminated = true;
645
1.05k
    return Status::OK();
646
1.05k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
36
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
36
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
36
    _terminated = true;
645
36
    return Status::OK();
646
36
}
647
648
template <typename SharedStateArg>
649
2.31M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
2.31M
    if (_closed) {
651
235k
        return Status::OK();
652
235k
    }
653
2.08M
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
1.22M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
1.22M
    }
656
2.08M
    _closed = true;
657
2.08M
    return Status::OK();
658
2.31M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
90.1k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
90.1k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
90.1k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
90.1k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
90.1k
    }
656
90.1k
    _closed = true;
657
90.1k
    return Status::OK();
658
90.1k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
8
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
8
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
8
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
8
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
8
    }
656
8
    _closed = true;
657
8
    return Status::OK();
658
8
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
406k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
406k
    if (_closed) {
651
204k
        return Status::OK();
652
204k
    }
653
202k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
202k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
202k
    }
656
202k
    _closed = true;
657
202k
    return Status::OK();
658
406k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
32
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
32
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
32
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
32
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
32
    }
656
32
    _closed = true;
657
32
    return Status::OK();
658
32
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
5.05k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
5.05k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
5.05k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
5.05k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
5.05k
    }
656
5.05k
    _closed = true;
657
5.05k
    return Status::OK();
658
5.05k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
22.1k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
22.1k
    if (_closed) {
651
11.1k
        return Status::OK();
652
11.1k
    }
653
10.9k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
10.9k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
10.9k
    }
656
10.9k
    _closed = true;
657
10.9k
    return Status::OK();
658
22.1k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
89.8k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
89.8k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
89.8k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
89.8k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
89.8k
    }
656
89.8k
    _closed = true;
657
89.8k
    return Status::OK();
658
89.8k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
108k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
108k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
108k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
108k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
108k
    }
656
108k
    _closed = true;
657
108k
    return Status::OK();
658
108k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
118
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
118
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
118
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
118
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
118
    }
656
118
    _closed = true;
657
118
    return Status::OK();
658
118
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
871k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
871k
    if (_closed) {
651
14.6k
        return Status::OK();
652
14.6k
    }
653
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
    }
656
856k
    _closed = true;
657
856k
    return Status::OK();
658
871k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
54.7k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
54.7k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
54.7k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
54.7k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
54.7k
    }
656
54.7k
    _closed = true;
657
54.7k
    return Status::OK();
658
54.7k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
28
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
28
    if (_closed) {
651
14
        return Status::OK();
652
14
    }
653
14
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
14
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
14
    }
656
14
    _closed = true;
657
14
    return Status::OK();
658
28
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
5.20k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
5.20k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
5.20k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
5.20k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
5.20k
    }
656
5.20k
    _closed = true;
657
5.20k
    return Status::OK();
658
5.20k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
638
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
638
    if (_closed) {
651
319
        return Status::OK();
652
319
    }
653
319
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
319
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
319
    }
656
319
    _closed = true;
657
319
    return Status::OK();
658
638
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
10.8k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
10.8k
    if (_closed) {
651
5.57k
        return Status::OK();
652
5.57k
    }
653
5.23k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
5.23k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
5.23k
    }
656
5.23k
    _closed = true;
657
5.23k
    return Status::OK();
658
10.8k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
651k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
651k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
651k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
651k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
651k
    }
656
651k
    _closed = true;
657
651k
    return Status::OK();
658
651k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
330
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
330
    if (_closed) {
651
170
        return Status::OK();
652
170
    }
653
160
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
160
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
160
    }
656
160
    _closed = true;
657
160
    return Status::OK();
658
330
}
659
660
template <typename SharedState>
661
1.81M
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
1.81M
    _operator_profile =
664
1.81M
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
1.81M
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
1.81M
    _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.81M
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
1.81M
    _operator_profile->add_child(_common_profile, true);
673
1.81M
    _operator_profile->add_child(_custom_profile, true);
674
675
1.81M
    _operator_profile->set_metadata(_parent->node_id());
676
1.81M
    _wait_for_finish_dependency_timer =
677
1.81M
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
1.81M
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
1.81M
    if constexpr (!is_fake_shared) {
680
1.33M
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
1.33M
            info.shared_state_map.end()) {
682
369k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
244k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
244k
            }
685
369k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
369k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
369k
                                                  ? 0
688
369k
                                                  : info.task_idx]
689
369k
                                  .get();
690
369k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
962k
        } else {
692
18.4E
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
18.4E
                DCHECK(false);
694
18.4E
            }
695
962k
            _shared_state = info.shared_state->template cast<SharedState>();
696
962k
            _dependency = _shared_state->create_sink_dependency(
697
962k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
962k
        }
699
1.33M
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
1.33M
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
1.33M
    }
702
703
1.81M
    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.81M
    _rows_input_counter =
708
1.81M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
1.81M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
1.81M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
1.81M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
1.81M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
1.81M
    _memory_used_counter =
714
1.81M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
1.81M
    _common_profile->add_info_string("IsColocate",
716
1.81M
                                     std::to_string(_parent->is_colocated_operator()));
717
1.81M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
1.81M
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
1.81M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
1.81M
    return Status::OK();
721
1.81M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
186k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
186k
    _operator_profile =
664
186k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
186k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
186k
    _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
186k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
186k
    _operator_profile->add_child(_common_profile, true);
673
186k
    _operator_profile->add_child(_custom_profile, true);
674
675
186k
    _operator_profile->set_metadata(_parent->node_id());
676
186k
    _wait_for_finish_dependency_timer =
677
186k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
186k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
186k
    if constexpr (!is_fake_shared) {
680
186k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
186k
            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
15.7k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
15.7k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
15.7k
                                                  ? 0
688
15.7k
                                                  : info.task_idx]
689
15.7k
                                  .get();
690
15.7k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
170k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
170k
            _shared_state = info.shared_state->template cast<SharedState>();
696
170k
            _dependency = _shared_state->create_sink_dependency(
697
170k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
170k
        }
699
186k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
186k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
186k
    }
702
703
186k
    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
186k
    _rows_input_counter =
708
186k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
186k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
186k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
186k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
186k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
186k
    _memory_used_counter =
714
186k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
186k
    _common_profile->add_info_string("IsColocate",
716
186k
                                     std::to_string(_parent->is_colocated_operator()));
717
186k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
186k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
186k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
186k
    return Status::OK();
721
186k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
4
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
4
    _operator_profile =
664
4
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
4
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
4
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
4
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
4
    _operator_profile->add_child(_common_profile, true);
673
4
    _operator_profile->add_child(_custom_profile, true);
674
675
4
    _operator_profile->set_metadata(_parent->node_id());
676
4
    _wait_for_finish_dependency_timer =
677
4
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
4
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
4
    if constexpr (!is_fake_shared) {
680
4
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
4
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
4
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
4
            _shared_state = info.shared_state->template cast<SharedState>();
696
4
            _dependency = _shared_state->create_sink_dependency(
697
4
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
4
        }
699
4
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
4
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
4
    }
702
703
4
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
4
    _rows_input_counter =
708
4
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
4
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
4
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
4
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
4
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
4
    _memory_used_counter =
714
4
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
4
    _common_profile->add_info_string("IsColocate",
716
4
                                     std::to_string(_parent->is_colocated_operator()));
717
4
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
4
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
4
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
4
    return Status::OK();
721
4
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
203k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
203k
    _operator_profile =
664
203k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
203k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
203k
    _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
203k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
203k
    _operator_profile->add_child(_common_profile, true);
673
203k
    _operator_profile->add_child(_custom_profile, true);
674
675
203k
    _operator_profile->set_metadata(_parent->node_id());
676
203k
    _wait_for_finish_dependency_timer =
677
203k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
203k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
203k
    if constexpr (!is_fake_shared) {
680
203k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
203k
            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
203k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
203k
            _shared_state = info.shared_state->template cast<SharedState>();
696
203k
            _dependency = _shared_state->create_sink_dependency(
697
203k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
203k
        }
699
203k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
203k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
203k
    }
702
703
203k
    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
203k
    _rows_input_counter =
708
203k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
203k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
203k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
203k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
203k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
203k
    _memory_used_counter =
714
203k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
203k
    _common_profile->add_info_string("IsColocate",
716
203k
                                     std::to_string(_parent->is_colocated_operator()));
717
203k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
203k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
203k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
203k
    return Status::OK();
721
203k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE4initEPNS_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_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
5.05k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
5.05k
    _operator_profile =
664
5.05k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
5.05k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
5.05k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
5.05k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
5.05k
    _operator_profile->add_child(_common_profile, true);
673
5.05k
    _operator_profile->add_child(_custom_profile, true);
674
675
5.05k
    _operator_profile->set_metadata(_parent->node_id());
676
5.05k
    _wait_for_finish_dependency_timer =
677
5.05k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
5.05k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
5.05k
    if constexpr (!is_fake_shared) {
680
5.05k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
5.05k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
5.05k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
5.05k
            _shared_state = info.shared_state->template cast<SharedState>();
696
5.05k
            _dependency = _shared_state->create_sink_dependency(
697
5.05k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
5.05k
        }
699
5.05k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
5.05k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
5.05k
    }
702
703
5.05k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
5.05k
    _rows_input_counter =
708
5.05k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
5.05k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
5.05k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
5.05k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
5.05k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
5.05k
    _memory_used_counter =
714
5.05k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
5.05k
    _common_profile->add_info_string("IsColocate",
716
5.05k
                                     std::to_string(_parent->is_colocated_operator()));
717
5.05k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
5.05k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
5.05k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
5.05k
    return Status::OK();
721
5.05k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
10.9k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
10.9k
    _operator_profile =
664
10.9k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
10.9k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
10.9k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
10.9k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
10.9k
    _operator_profile->add_child(_common_profile, true);
673
10.9k
    _operator_profile->add_child(_custom_profile, true);
674
675
10.9k
    _operator_profile->set_metadata(_parent->node_id());
676
10.9k
    _wait_for_finish_dependency_timer =
677
10.9k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
10.9k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
10.9k
    if constexpr (!is_fake_shared) {
680
10.9k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
10.9k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
10.9k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
10.9k
            _shared_state = info.shared_state->template cast<SharedState>();
696
10.9k
            _dependency = _shared_state->create_sink_dependency(
697
10.9k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
10.9k
        }
699
10.9k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
10.9k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
10.9k
    }
702
703
10.9k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
10.9k
    _rows_input_counter =
708
10.9k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
10.9k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
10.9k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
10.9k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
10.9k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
10.9k
    _memory_used_counter =
714
10.9k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
10.9k
    _common_profile->add_info_string("IsColocate",
716
10.9k
                                     std::to_string(_parent->is_colocated_operator()));
717
10.9k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
10.9k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
10.9k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
10.9k
    return Status::OK();
721
10.9k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
89.7k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
89.7k
    _operator_profile =
664
89.7k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
89.7k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
89.7k
    _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
89.7k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
89.7k
    _operator_profile->add_child(_common_profile, true);
673
89.7k
    _operator_profile->add_child(_custom_profile, true);
674
675
89.7k
    _operator_profile->set_metadata(_parent->node_id());
676
89.7k
    _wait_for_finish_dependency_timer =
677
89.7k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
89.7k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
89.7k
    if constexpr (!is_fake_shared) {
680
89.7k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
89.7k
            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
89.7k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
89.7k
            _shared_state = info.shared_state->template cast<SharedState>();
696
89.7k
            _dependency = _shared_state->create_sink_dependency(
697
89.7k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
89.7k
        }
699
89.7k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
89.7k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
89.7k
    }
702
703
89.7k
    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
89.7k
    _rows_input_counter =
708
89.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
89.7k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
89.7k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
89.7k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
89.7k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
89.7k
    _memory_used_counter =
714
89.7k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
89.7k
    _common_profile->add_info_string("IsColocate",
716
89.7k
                                     std::to_string(_parent->is_colocated_operator()));
717
89.7k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
89.7k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
89.7k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
89.7k
    return Status::OK();
721
89.7k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
108k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
108k
    _operator_profile =
664
108k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
108k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
108k
    _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
108k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
108k
    _operator_profile->add_child(_common_profile, true);
673
108k
    _operator_profile->add_child(_custom_profile, true);
674
675
108k
    _operator_profile->set_metadata(_parent->node_id());
676
108k
    _wait_for_finish_dependency_timer =
677
108k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
108k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
108k
    if constexpr (!is_fake_shared) {
680
108k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
109k
            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
109k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
109k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
109k
                                                  ? 0
688
109k
                                                  : info.task_idx]
689
109k
                                  .get();
690
109k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
18.4E
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
18.4E
            _shared_state = info.shared_state->template cast<SharedState>();
696
18.4E
            _dependency = _shared_state->create_sink_dependency(
697
18.4E
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
18.4E
        }
699
108k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
108k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
108k
    }
702
703
108k
    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
108k
    _rows_input_counter =
708
108k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
108k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
108k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
108k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
108k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
108k
    _memory_used_counter =
714
108k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
108k
    _common_profile->add_info_string("IsColocate",
716
108k
                                     std::to_string(_parent->is_colocated_operator()));
717
108k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
108k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
108k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
108k
    return Status::OK();
721
108k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
140
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
140
    _operator_profile =
664
140
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
140
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
140
    _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
140
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
140
    _operator_profile->add_child(_common_profile, true);
673
140
    _operator_profile->add_child(_custom_profile, true);
674
675
140
    _operator_profile->set_metadata(_parent->node_id());
676
140
    _wait_for_finish_dependency_timer =
677
140
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
140
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
140
    if constexpr (!is_fake_shared) {
680
140
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
140
            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
140
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
140
            _shared_state = info.shared_state->template cast<SharedState>();
696
140
            _dependency = _shared_state->create_sink_dependency(
697
140
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
140
        }
699
140
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
140
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
140
    }
702
703
140
    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
140
    _rows_input_counter =
708
140
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
140
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
140
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
140
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
140
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
140
    _memory_used_counter =
714
140
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
140
    _common_profile->add_info_string("IsColocate",
716
140
                                     std::to_string(_parent->is_colocated_operator()));
717
140
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
140
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
140
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
140
    return Status::OK();
721
140
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
481k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
481k
    _operator_profile =
664
481k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
481k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
481k
    _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
481k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
481k
    _operator_profile->add_child(_common_profile, true);
673
481k
    _operator_profile->add_child(_custom_profile, true);
674
675
481k
    _operator_profile->set_metadata(_parent->node_id());
676
481k
    _wait_for_finish_dependency_timer =
677
481k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
481k
    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
481k
    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
481k
    _rows_input_counter =
708
481k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
481k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
481k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
481k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
481k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
481k
    _memory_used_counter =
714
481k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
481k
    _common_profile->add_info_string("IsColocate",
716
481k
                                     std::to_string(_parent->is_colocated_operator()));
717
481k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
481k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
481k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
481k
    return Status::OK();
721
481k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
8.58k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
8.58k
    _operator_profile =
664
8.58k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
8.58k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
8.58k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
8.58k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
8.58k
    _operator_profile->add_child(_common_profile, true);
673
8.58k
    _operator_profile->add_child(_custom_profile, true);
674
675
8.58k
    _operator_profile->set_metadata(_parent->node_id());
676
8.58k
    _wait_for_finish_dependency_timer =
677
8.58k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
8.58k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
8.58k
    if constexpr (!is_fake_shared) {
680
8.58k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
8.58k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
8.58k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
8.58k
            _shared_state = info.shared_state->template cast<SharedState>();
696
8.58k
            _dependency = _shared_state->create_sink_dependency(
697
8.58k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
8.58k
        }
699
8.58k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
8.58k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
8.58k
    }
702
703
8.58k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
8.58k
    _rows_input_counter =
708
8.58k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
8.58k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
8.58k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
8.58k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
8.58k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
8.58k
    _memory_used_counter =
714
8.58k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
8.58k
    _common_profile->add_info_string("IsColocate",
716
8.58k
                                     std::to_string(_parent->is_colocated_operator()));
717
8.58k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
8.58k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
8.58k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
8.58k
    return Status::OK();
721
8.58k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
521
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
521
    _operator_profile =
664
521
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
521
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
521
    _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
521
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
521
    _operator_profile->add_child(_common_profile, true);
673
521
    _operator_profile->add_child(_custom_profile, true);
674
675
521
    _operator_profile->set_metadata(_parent->node_id());
676
521
    _wait_for_finish_dependency_timer =
677
521
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
521
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
521
    if constexpr (!is_fake_shared) {
680
521
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
521
            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
521
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
521
            _shared_state = info.shared_state->template cast<SharedState>();
696
521
            _dependency = _shared_state->create_sink_dependency(
697
521
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
521
        }
699
521
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
521
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
521
    }
702
703
522
    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
521
    _rows_input_counter =
708
521
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
521
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
521
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
521
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
521
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
521
    _memory_used_counter =
714
521
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
521
    _common_profile->add_info_string("IsColocate",
716
521
                                     std::to_string(_parent->is_colocated_operator()));
717
521
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
521
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
521
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
521
    return Status::OK();
721
521
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
2.13k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
2.13k
    _operator_profile =
664
2.13k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
2.13k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
2.13k
    _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.13k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
2.13k
    _operator_profile->add_child(_common_profile, true);
673
2.13k
    _operator_profile->add_child(_custom_profile, true);
674
675
2.13k
    _operator_profile->set_metadata(_parent->node_id());
676
2.13k
    _wait_for_finish_dependency_timer =
677
2.13k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
2.13k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
2.13k
    if constexpr (!is_fake_shared) {
680
2.13k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
2.13k
            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.13k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
2.13k
            _shared_state = info.shared_state->template cast<SharedState>();
696
2.13k
            _dependency = _shared_state->create_sink_dependency(
697
2.13k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
2.13k
        }
699
2.13k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
2.13k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
2.13k
    }
702
703
2.13k
    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.13k
    _rows_input_counter =
708
2.13k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
2.13k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
2.13k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
2.13k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
2.13k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
2.13k
    _memory_used_counter =
714
2.13k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
2.13k
    _common_profile->add_info_string("IsColocate",
716
2.13k
                                     std::to_string(_parent->is_colocated_operator()));
717
2.13k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
2.13k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
2.13k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
2.13k
    return Status::OK();
721
2.13k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
12.9k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
12.9k
    _operator_profile =
664
12.9k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
12.9k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
12.9k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
12.9k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
12.9k
    _operator_profile->add_child(_common_profile, true);
673
12.9k
    _operator_profile->add_child(_custom_profile, true);
674
675
12.9k
    _operator_profile->set_metadata(_parent->node_id());
676
12.9k
    _wait_for_finish_dependency_timer =
677
12.9k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
12.9k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
12.9k
    if constexpr (!is_fake_shared) {
680
12.9k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
12.9k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
12.9k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
12.9k
            _shared_state = info.shared_state->template cast<SharedState>();
696
12.9k
            _dependency = _shared_state->create_sink_dependency(
697
12.9k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
12.9k
        }
699
12.9k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
12.9k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
12.9k
    }
702
703
12.9k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
12.9k
    _rows_input_counter =
708
12.9k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
12.9k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
12.9k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
12.9k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
12.9k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
12.9k
    _memory_used_counter =
714
12.9k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
12.9k
    _common_profile->add_info_string("IsColocate",
716
12.9k
                                     std::to_string(_parent->is_colocated_operator()));
717
12.9k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
12.9k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
12.9k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
12.9k
    return Status::OK();
721
12.9k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
244k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
244k
    _operator_profile =
664
244k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
244k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
244k
    _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
244k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
244k
    _operator_profile->add_child(_common_profile, true);
673
244k
    _operator_profile->add_child(_custom_profile, true);
674
675
244k
    _operator_profile->set_metadata(_parent->node_id());
676
244k
    _wait_for_finish_dependency_timer =
677
244k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
244k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
244k
    if constexpr (!is_fake_shared) {
680
244k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
244k
            info.shared_state_map.end()) {
682
244k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
244k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
244k
            }
685
244k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
244k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
244k
                                                  ? 0
688
244k
                                                  : info.task_idx]
689
244k
                                  .get();
690
244k
            _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
244k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
244k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
244k
    }
702
703
244k
    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
244k
    _rows_input_counter =
708
244k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
244k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
244k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
244k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
244k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
244k
    _memory_used_counter =
714
244k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
244k
    _common_profile->add_info_string("IsColocate",
716
244k
                                     std::to_string(_parent->is_colocated_operator()));
717
244k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
244k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
244k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
244k
    return Status::OK();
721
244k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
457k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
457k
    _operator_profile =
664
457k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
457k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
457k
    _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
457k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
457k
    _operator_profile->add_child(_common_profile, true);
673
457k
    _operator_profile->add_child(_custom_profile, true);
674
675
457k
    _operator_profile->set_metadata(_parent->node_id());
676
457k
    _wait_for_finish_dependency_timer =
677
457k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
457k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
457k
    if constexpr (!is_fake_shared) {
680
457k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
457k
            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
457k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
457k
            _shared_state = info.shared_state->template cast<SharedState>();
696
457k
            _dependency = _shared_state->create_sink_dependency(
697
457k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
457k
        }
699
457k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
457k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
457k
    }
702
703
457k
    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
457k
    _rows_input_counter =
708
457k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
457k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
457k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
457k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
457k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
457k
    _memory_used_counter =
714
457k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
457k
    _common_profile->add_info_string("IsColocate",
716
457k
                                     std::to_string(_parent->is_colocated_operator()));
717
457k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
457k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
457k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
457k
    return Status::OK();
721
457k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
36
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
36
    _operator_profile =
664
36
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
36
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
36
    _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
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
36
    _operator_profile->add_child(_common_profile, true);
673
36
    _operator_profile->add_child(_custom_profile, true);
674
675
36
    _operator_profile->set_metadata(_parent->node_id());
676
36
    _wait_for_finish_dependency_timer =
677
36
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
36
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
36
    if constexpr (!is_fake_shared) {
680
36
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
36
            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
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
36
            _shared_state = info.shared_state->template cast<SharedState>();
696
36
            _dependency = _shared_state->create_sink_dependency(
697
36
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
36
        }
699
36
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
36
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
36
    }
702
703
36
    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
    _rows_input_counter =
708
36
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
36
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
36
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
36
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
36
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
36
    _memory_used_counter =
714
36
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
36
    _common_profile->add_info_string("IsColocate",
716
36
                                     std::to_string(_parent->is_colocated_operator()));
717
36
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
36
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
36
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
36
    return Status::OK();
721
36
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
338
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
338
    _operator_profile =
664
338
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
338
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
338
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
338
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
338
    _operator_profile->add_child(_common_profile, true);
673
338
    _operator_profile->add_child(_custom_profile, true);
674
675
338
    _operator_profile->set_metadata(_parent->node_id());
676
338
    _wait_for_finish_dependency_timer =
677
338
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
338
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
338
    if constexpr (!is_fake_shared) {
680
338
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
338
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
338
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
338
            _shared_state = info.shared_state->template cast<SharedState>();
696
338
            _dependency = _shared_state->create_sink_dependency(
697
338
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
338
        }
699
338
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
338
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
338
    }
702
703
338
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
338
    _rows_input_counter =
708
338
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
338
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
338
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
338
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
338
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
338
    _memory_used_counter =
714
338
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
338
    _common_profile->add_info_string("IsColocate",
716
338
                                     std::to_string(_parent->is_colocated_operator()));
717
338
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
338
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
338
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
338
    return Status::OK();
721
338
}
722
723
template <typename SharedState>
724
1.81M
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
1.81M
    if (_closed) {
726
4
        return Status::OK();
727
4
    }
728
1.81M
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
1.33M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
1.33M
    }
731
1.81M
    _closed = true;
732
1.81M
    return Status::OK();
733
1.81M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
186k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
186k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
186k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
186k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
186k
    }
731
186k
    _closed = true;
732
186k
    return Status::OK();
733
186k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
2
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
2
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
2
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
2
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
2
    }
731
2
    _closed = true;
732
2
    return Status::OK();
733
2
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
203k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
203k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
203k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
203k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
203k
    }
731
203k
    _closed = true;
732
203k
    return Status::OK();
733
203k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
28
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
28
    if (_closed) {
726
4
        return Status::OK();
727
4
    }
728
24
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
24
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
24
    }
731
24
    _closed = true;
732
24
    return Status::OK();
733
28
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
5.03k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
5.03k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
5.03k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
5.03k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
5.03k
    }
731
5.03k
    _closed = true;
732
5.03k
    return Status::OK();
733
5.03k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
10.9k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
10.9k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
10.9k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
10.9k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
10.9k
    }
731
10.9k
    _closed = true;
732
10.9k
    return Status::OK();
733
10.9k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
89.5k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
89.5k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
89.5k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
89.5k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
89.5k
    }
731
89.5k
    _closed = true;
732
89.5k
    return Status::OK();
733
89.5k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
108k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
108k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
108k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
108k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
108k
    }
731
108k
    _closed = true;
732
108k
    return Status::OK();
733
108k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
118
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
118
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
118
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
118
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
118
    }
731
118
    _closed = true;
732
118
    return Status::OK();
733
118
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
484k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
484k
    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
484k
    _closed = true;
732
484k
    return Status::OK();
733
484k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
8.61k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
8.61k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
8.61k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
8.61k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
8.61k
    }
731
8.61k
    _closed = true;
732
8.61k
    return Status::OK();
733
8.61k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
315
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
315
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
315
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
315
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
315
    }
731
315
    _closed = true;
732
315
    return Status::OK();
733
315
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
2.15k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
2.15k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
2.15k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
2.15k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
2.15k
    }
731
2.15k
    _closed = true;
732
2.15k
    return Status::OK();
733
2.15k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
12.9k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
12.9k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
12.9k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
12.9k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
12.9k
    }
731
12.9k
    _closed = true;
732
12.9k
    return Status::OK();
733
12.9k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
245k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
245k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
245k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
245k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
245k
    }
731
245k
    _closed = true;
732
245k
    return Status::OK();
733
245k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
458k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
458k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
458k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
458k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
458k
    }
731
458k
    _closed = true;
732
458k
    return Status::OK();
733
458k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
14
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
14
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
14
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
14
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
14
    }
731
14
    _closed = true;
732
14
    return Status::OK();
733
14
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
338
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
338
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
338
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
338
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
338
    }
731
338
    _closed = true;
732
338
    return Status::OK();
733
338
}
734
735
template <typename LocalStateType>
736
Status StreamingOperatorX<LocalStateType>::get_block_impl(RuntimeState* state, Block* block,
737
7.16k
                                                          bool* eos) {
738
7.16k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
7.16k
    return pull(state, block, eos);
740
7.16k
}
_ZN5doris18StreamingOperatorXINS_23AssertNumRowsLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
41
                                                          bool* eos) {
738
41
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
41
    return pull(state, block, eos);
740
41
}
_ZN5doris18StreamingOperatorXINS_16SelectLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
7.12k
                                                          bool* eos) {
738
7.12k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
7.12k
    return pull(state, block, eos);
740
7.12k
}
741
742
template <typename LocalStateType>
743
Status StatefulOperatorX<LocalStateType>::get_block_impl(RuntimeState* state, Block* block,
744
534k
                                                         bool* eos) {
745
534k
    auto& local_state = get_local_state(state);
746
534k
    if (need_more_input_data(state)) {
747
503k
        local_state._child_block->clear_column_data(
748
503k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
503k
                        .num_materialized_slots());
750
503k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
503k
                state, local_state._child_block.get(), &local_state._child_eos));
752
503k
        *eos = local_state._child_eos;
753
503k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
75.9k
            return Status::OK();
755
75.9k
        }
756
427k
        {
757
427k
            SCOPED_TIMER(local_state.exec_time_counter());
758
427k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
427k
        }
760
427k
    }
761
762
458k
    if (!need_more_input_data(state)) {
763
433k
        SCOPED_TIMER(local_state.exec_time_counter());
764
433k
        bool new_eos = false;
765
433k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
433k
        if (new_eos) {
767
354k
            *eos = true;
768
354k
        } else if (!need_more_input_data(state)) {
769
25.5k
            *eos = false;
770
25.5k
        }
771
433k
    }
772
458k
    return Status::OK();
773
458k
}
_ZN5doris17StatefulOperatorXINS_23HashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
129k
                                                         bool* eos) {
745
129k
    auto& local_state = get_local_state(state);
746
129k
    if (need_more_input_data(state)) {
747
111k
        local_state._child_block->clear_column_data(
748
111k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
111k
                        .num_materialized_slots());
750
111k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
111k
                state, local_state._child_block.get(), &local_state._child_eos));
752
111k
        *eos = local_state._child_eos;
753
111k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
29.6k
            return Status::OK();
755
29.6k
        }
756
82.2k
        {
757
82.2k
            SCOPED_TIMER(local_state.exec_time_counter());
758
82.2k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
82.2k
        }
760
82.2k
    }
761
762
100k
    if (!need_more_input_data(state)) {
763
100k
        SCOPED_TIMER(local_state.exec_time_counter());
764
100k
        bool new_eos = false;
765
100k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
100k
        if (new_eos) {
767
41.9k
            *eos = true;
768
58.0k
        } else if (!need_more_input_data(state)) {
769
11.0k
            *eos = false;
770
11.0k
        }
771
100k
    }
772
100k
    return Status::OK();
773
100k
}
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_34PartitionedHashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
_ZN5doris17StatefulOperatorXINS_16RepeatLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
4.49k
                                                         bool* eos) {
745
4.49k
    auto& local_state = get_local_state(state);
746
4.49k
    if (need_more_input_data(state)) {
747
2.51k
        local_state._child_block->clear_column_data(
748
2.51k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
2.51k
                        .num_materialized_slots());
750
2.51k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
2.51k
                state, local_state._child_block.get(), &local_state._child_eos));
752
2.51k
        *eos = local_state._child_eos;
753
2.51k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
627
            return Status::OK();
755
627
        }
756
1.88k
        {
757
1.88k
            SCOPED_TIMER(local_state.exec_time_counter());
758
1.88k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
1.88k
        }
760
1.88k
    }
761
762
3.88k
    if (!need_more_input_data(state)) {
763
3.88k
        SCOPED_TIMER(local_state.exec_time_counter());
764
3.88k
        bool new_eos = false;
765
3.88k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
3.88k
        if (new_eos) {
767
1.32k
            *eos = true;
768
2.55k
        } else if (!need_more_input_data(state)) {
769
1.97k
            *eos = false;
770
1.97k
        }
771
3.88k
    }
772
3.87k
    return Status::OK();
773
3.87k
}
_ZN5doris17StatefulOperatorXINS_25MaterializationLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
1.90k
                                                         bool* eos) {
745
1.90k
    auto& local_state = get_local_state(state);
746
1.90k
    if (need_more_input_data(state)) {
747
1.90k
        local_state._child_block->clear_column_data(
748
1.90k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
1.90k
                        .num_materialized_slots());
750
1.90k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
1.90k
                state, local_state._child_block.get(), &local_state._child_eos));
752
1.90k
        *eos = local_state._child_eos;
753
1.90k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
785
            return Status::OK();
755
785
        }
756
1.12k
        {
757
1.12k
            SCOPED_TIMER(local_state.exec_time_counter());
758
1.12k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
1.12k
        }
760
1.12k
    }
761
762
1.12k
    if (!need_more_input_data(state)) {
763
1.12k
        SCOPED_TIMER(local_state.exec_time_counter());
764
1.12k
        bool new_eos = false;
765
1.12k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
1.12k
        if (new_eos) {
767
793
            *eos = true;
768
793
        } else if (!need_more_input_data(state)) {
769
0
            *eos = false;
770
0
        }
771
1.12k
    }
772
1.12k
    return Status::OK();
773
1.12k
}
_ZN5doris17StatefulOperatorXINS_22StreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
13.3k
                                                         bool* eos) {
745
13.3k
    auto& local_state = get_local_state(state);
746
13.3k
    if (need_more_input_data(state)) {
747
13.3k
        local_state._child_block->clear_column_data(
748
13.3k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
13.3k
                        .num_materialized_slots());
750
13.3k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
13.3k
                state, local_state._child_block.get(), &local_state._child_eos));
752
13.3k
        *eos = local_state._child_eos;
753
13.3k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
3.03k
            return Status::OK();
755
3.03k
        }
756
10.3k
        {
757
10.3k
            SCOPED_TIMER(local_state.exec_time_counter());
758
10.3k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
10.3k
        }
760
10.3k
    }
761
762
10.3k
    if (!need_more_input_data(state)) {
763
5.59k
        SCOPED_TIMER(local_state.exec_time_counter());
764
5.59k
        bool new_eos = false;
765
5.59k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
5.59k
        if (new_eos) {
767
5.55k
            *eos = true;
768
5.55k
        } else if (!need_more_input_data(state)) {
769
2
            *eos = false;
770
2
        }
771
5.59k
    }
772
10.3k
    return Status::OK();
773
10.3k
}
_ZN5doris17StatefulOperatorXINS_30DistinctStreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
356k
                                                         bool* eos) {
745
356k
    auto& local_state = get_local_state(state);
746
357k
    if (need_more_input_data(state)) {
747
357k
        local_state._child_block->clear_column_data(
748
357k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
357k
                        .num_materialized_slots());
750
357k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
357k
                state, local_state._child_block.get(), &local_state._child_eos));
752
357k
        *eos = local_state._child_eos;
753
357k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
40.3k
            return Status::OK();
755
40.3k
        }
756
317k
        {
757
317k
            SCOPED_TIMER(local_state.exec_time_counter());
758
317k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
317k
        }
760
317k
    }
761
762
316k
    if (!need_more_input_data(state)) {
763
296k
        SCOPED_TIMER(local_state.exec_time_counter());
764
296k
        bool new_eos = false;
765
296k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
296k
        if (new_eos) {
767
296k
            *eos = true;
768
296k
        } else if (!need_more_input_data(state)) {
769
0
            *eos = false;
770
0
        }
771
296k
    }
772
316k
    return Status::OK();
773
316k
}
_ZN5doris17StatefulOperatorXINS_29NestedLoopJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
21.8k
                                                         bool* eos) {
745
21.8k
    auto& local_state = get_local_state(state);
746
21.8k
    if (need_more_input_data(state)) {
747
9.62k
        local_state._child_block->clear_column_data(
748
9.62k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
9.62k
                        .num_materialized_slots());
750
9.62k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
9.62k
                state, local_state._child_block.get(), &local_state._child_eos));
752
9.62k
        *eos = local_state._child_eos;
753
9.62k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
688
            return Status::OK();
755
688
        }
756
8.93k
        {
757
8.93k
            SCOPED_TIMER(local_state.exec_time_counter());
758
8.93k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
8.93k
        }
760
8.93k
    }
761
762
21.1k
    if (!need_more_input_data(state)) {
763
20.5k
        SCOPED_TIMER(local_state.exec_time_counter());
764
20.5k
        bool new_eos = false;
765
20.5k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
20.5k
        if (new_eos) {
767
5.02k
            *eos = true;
768
15.5k
        } else if (!need_more_input_data(state)) {
769
12.2k
            *eos = false;
770
12.2k
        }
771
20.5k
    }
772
21.1k
    return Status::OK();
773
21.1k
}
_ZN5doris17StatefulOperatorXINS_23TableFunctionLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
6.71k
                                                         bool* eos) {
745
6.71k
    auto& local_state = get_local_state(state);
746
6.71k
    if (need_more_input_data(state)) {
747
6.35k
        local_state._child_block->clear_column_data(
748
6.35k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
6.35k
                        .num_materialized_slots());
750
6.35k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
6.35k
                state, local_state._child_block.get(), &local_state._child_eos));
752
6.35k
        *eos = local_state._child_eos;
753
6.35k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
882
            return Status::OK();
755
882
        }
756
5.47k
        {
757
5.47k
            SCOPED_TIMER(local_state.exec_time_counter());
758
5.47k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
5.47k
        }
760
5.47k
    }
761
762
5.83k
    if (!need_more_input_data(state)) {
763
5.83k
        SCOPED_TIMER(local_state.exec_time_counter());
764
5.83k
        bool new_eos = false;
765
5.83k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
5.83k
        if (new_eos) {
767
3.73k
            *eos = true;
768
3.73k
        } else if (!need_more_input_data(state)) {
769
366
            *eos = false;
770
366
        }
771
5.83k
    }
772
5.82k
    return Status::OK();
773
5.82k
}
774
775
template <typename Writer, typename Parent>
776
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
777
47.2k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
47.2k
    RETURN_IF_ERROR(Base::init(state, info));
779
47.2k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
47.2k
                                                         "AsyncWriterDependency", true);
781
47.2k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
47.2k
                             _finish_dependency));
783
784
47.2k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
47.2k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
47.2k
    return Status::OK();
787
47.2k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
378
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
378
    RETURN_IF_ERROR(Base::init(state, info));
779
378
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
378
                                                         "AsyncWriterDependency", true);
781
378
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
378
                             _finish_dependency));
783
784
378
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
378
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
378
    return Status::OK();
787
378
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
46.8k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
46.8k
    RETURN_IF_ERROR(Base::init(state, info));
779
46.8k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
46.8k
                                                         "AsyncWriterDependency", true);
781
46.8k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
46.8k
                             _finish_dependency));
783
784
46.8k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
46.8k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
46.8k
    return Status::OK();
787
46.8k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
16
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
16
    RETURN_IF_ERROR(Base::init(state, info));
779
16
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
16
                                                         "AsyncWriterDependency", true);
781
16
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
16
                             _finish_dependency));
783
784
16
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
16
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
16
    return Status::OK();
787
16
}
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
47.8k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
47.8k
    RETURN_IF_ERROR(Base::open(state));
793
47.8k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
377k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
329k
        RETURN_IF_ERROR(
796
329k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
329k
    }
798
47.8k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
47.8k
    return Status::OK();
800
47.8k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
379
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
379
    RETURN_IF_ERROR(Base::open(state));
793
379
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
1.91k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
1.53k
        RETURN_IF_ERROR(
796
1.53k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
1.53k
    }
798
379
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
379
    return Status::OK();
800
379
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
47.4k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
47.4k
    RETURN_IF_ERROR(Base::open(state));
793
47.4k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
375k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
327k
        RETURN_IF_ERROR(
796
327k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
327k
    }
798
47.4k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
47.4k
    return Status::OK();
800
47.4k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
16
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
16
    RETURN_IF_ERROR(Base::open(state));
793
16
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
288
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
272
        RETURN_IF_ERROR(
796
272
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
272
    }
798
16
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
16
    return Status::OK();
800
16
}
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
63.6k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
63.6k
    return _writer->sink(block, eos);
806
63.6k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
1.87k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
1.87k
    return _writer->sink(block, eos);
806
1.87k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
61.7k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
61.7k
    return _writer->sink(block, eos);
806
61.7k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
16
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
16
    return _writer->sink(block, eos);
806
16
}
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
47.9k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
47.9k
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
47.9k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
47.9k
    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
47.9k
    if (_writer) {
818
47.9k
        Status st = _writer->get_writer_status();
819
47.9k
        if (exec_status.ok()) {
820
47.8k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
47.8k
                                                       : Status::Cancelled("force close"));
822
47.8k
        } else {
823
86
            _writer->force_close(exec_status);
824
86
        }
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
47.9k
        RETURN_IF_ERROR(st);
829
47.9k
    }
830
47.8k
    return Base::close(state, exec_status);
831
47.9k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
367
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
367
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
367
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
367
    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
367
    if (_writer) {
818
367
        Status st = _writer->get_writer_status();
819
367
        if (exec_status.ok()) {
820
367
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
367
                                                       : Status::Cancelled("force close"));
822
367
        } 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
367
        RETURN_IF_ERROR(st);
829
367
    }
830
367
    return Base::close(state, exec_status);
831
367
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
47.5k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
47.5k
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
47.5k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
47.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
47.5k
    if (_writer) {
818
47.5k
        Status st = _writer->get_writer_status();
819
47.5k
        if (exec_status.ok()) {
820
47.5k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
47.5k
                                                       : Status::Cancelled("force close"));
822
47.5k
        } else {
823
86
            _writer->force_close(exec_status);
824
86
        }
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
47.5k
        RETURN_IF_ERROR(st);
829
47.5k
    }
830
47.4k
    return Base::close(state, exec_status);
831
47.5k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
16
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
16
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
16
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
16
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
816
    // if the init failed, the _writer may be nullptr. so here need check
817
16
    if (_writer) {
818
16
        Status st = _writer->get_writer_status();
819
16
        if (exec_status.ok()) {
820
16
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
16
                                                       : Status::Cancelled("force close"));
822
16
        } else {
823
0
            _writer->force_close(exec_status);
824
0
        }
825
        // If there is an error in process_block thread, then we should get the writer
826
        // status before call force_close. For example, the thread may failed in commit
827
        // transaction.
828
16
        RETURN_IF_ERROR(st);
829
16
    }
830
16
    return Base::close(state, exec_status);
831
16
}
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