Coverage Report

Created: 2026-07-28 07:52

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.95M
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
1.95M
    if (_parent->nereids_id() == -1) {
122
1.04M
        return fmt::format("(id={})", _parent->node_id());
123
1.04M
    } else {
124
911k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
911k
    }
126
1.95M
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
68.3k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
68.3k
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
68.3k
    } else {
124
68.3k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
68.3k
    }
126
68.3k
}
_ZNK5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
1
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
1
    if (_parent->nereids_id() == -1) {
122
1
        return fmt::format("(id={})", _parent->node_id());
123
1
    } else {
124
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
0
    }
126
1
}
_ZNK5doris19PipelineXLocalStateINS_15SortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
237k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
237k
    if (_parent->nereids_id() == -1) {
122
12
        return fmt::format("(id={})", _parent->node_id());
123
237k
    } else {
124
237k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
237k
    }
126
237k
}
_ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
23
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
23
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
23
    } else {
124
23
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
23
    }
126
23
}
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
8.19k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
8.19k
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
8.19k
    } else {
124
8.19k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
8.19k
    }
126
8.19k
}
_ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
7.88k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
7.88k
    if (_parent->nereids_id() == -1) {
122
11
        return fmt::format("(id={})", _parent->node_id());
123
7.87k
    } else {
124
7.87k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
7.87k
    }
126
7.88k
}
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
121k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
121k
    if (_parent->nereids_id() == -1) {
122
29
        return fmt::format("(id={})", _parent->node_id());
123
121k
    } else {
124
121k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
121k
    }
126
121k
}
_ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
291
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
291
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
291
    } else {
124
291
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
291
    }
126
291
}
_ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
260
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
260
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
260
    } else {
124
260
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
260
    }
126
260
}
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
747k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
747k
    if (_parent->nereids_id() == -1) {
122
339k
        return fmt::format("(id={})", _parent->node_id());
123
408k
    } else {
124
408k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
408k
    }
126
747k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
53.6k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
53.6k
    if (_parent->nereids_id() == -1) {
122
2
        return fmt::format("(id={})", _parent->node_id());
123
53.6k
    } else {
124
53.6k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
53.6k
    }
126
53.6k
}
_ZNK5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
26
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
26
    if (_parent->nereids_id() == -1) {
122
26
        return fmt::format("(id={})", _parent->node_id());
123
26
    } else {
124
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
0
    }
126
26
}
_ZNK5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
8.07k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
8.08k
    if (_parent->nereids_id() == -1) {
122
8.08k
        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
8.07k
}
_ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
434
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
434
    if (_parent->nereids_id() == -1) {
122
102
        return fmt::format("(id={})", _parent->node_id());
123
332
    } else {
124
332
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
332
    }
126
434
}
_ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
5.14k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
5.14k
    if (_parent->nereids_id() == -1) {
122
13
        return fmt::format("(id={})", _parent->node_id());
123
5.13k
    } else {
124
5.13k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
5.13k
    }
126
5.14k
}
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
693k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
693k
    if (_parent->nereids_id() == -1) {
122
693k
        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
693k
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
_ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
164
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
164
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
164
    } else {
124
164
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
164
    }
126
164
}
127
128
template <typename SharedStateArg>
129
1.23M
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
1.23M
    if (_parent->nereids_id() == -1) {
131
738k
        return fmt::format("(id={})", _parent->node_id());
132
738k
    } else {
133
499k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
499k
    }
135
1.23M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
116k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
116k
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
116k
    } else {
133
116k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
116k
    }
135
116k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
2
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
2
    if (_parent->nereids_id() == -1) {
131
1
        return fmt::format("(id={})", _parent->node_id());
132
1
    } else {
133
1
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
1
    }
135
2
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
239k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
239k
    if (_parent->nereids_id() == -1) {
131
9
        return fmt::format("(id={})", _parent->node_id());
132
239k
    } else {
133
239k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
239k
    }
135
239k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
30
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
30
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
30
    } else {
133
30
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
30
    }
135
30
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
8.23k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
8.23k
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
8.23k
    } else {
133
8.23k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
8.23k
    }
135
8.23k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
7.92k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
7.92k
    if (_parent->nereids_id() == -1) {
131
11
        return fmt::format("(id={})", _parent->node_id());
132
7.91k
    } else {
133
7.91k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
7.91k
    }
135
7.92k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
121k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
121k
    if (_parent->nereids_id() == -1) {
131
29
        return fmt::format("(id={})", _parent->node_id());
132
121k
    } else {
133
121k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
121k
    }
135
121k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
297
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
297
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
297
    } else {
133
297
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
297
    }
135
297
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
270
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
270
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
270
    } else {
133
270
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
270
    }
135
270
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
64
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
64
    if (_parent->nereids_id() == -1) {
131
64
        return fmt::format("(id={})", _parent->node_id());
132
64
    } else {
133
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
0
    }
135
64
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
5.16k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
5.16k
    if (_parent->nereids_id() == -1) {
131
3
        return fmt::format("(id={})", _parent->node_id());
132
5.16k
    } else {
133
5.16k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
5.16k
    }
135
5.16k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
435
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
435
    if (_parent->nereids_id() == -1) {
131
102
        return fmt::format("(id={})", _parent->node_id());
132
333
    } else {
133
333
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
333
    }
135
435
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
12.4k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
12.5k
    if (_parent->nereids_id() == -1) {
131
12.5k
        return fmt::format("(id={})", _parent->node_id());
132
18.4E
    } else {
133
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
18.4E
    }
135
12.4k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
290k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
290k
    if (_parent->nereids_id() == -1) {
131
290k
        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
290k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
434k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
434k
    if (_parent->nereids_id() == -1) {
131
434k
        return fmt::format("(id={})", _parent->node_id());
132
434k
    } else {
133
72
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
72
    }
135
434k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
25
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
25
    if (_parent->nereids_id() == -1) {
131
25
        return fmt::format("(id={})", _parent->node_id());
132
25
    } else {
133
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
0
    }
135
25
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
328
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
328
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
328
    } else {
133
328
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
328
    }
135
328
}
136
137
template <typename SharedStateArg>
138
28.8k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
28.8k
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
28.8k
    _terminated = true;
143
28.8k
    return Status::OK();
144
28.8k
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
24.0k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
24.0k
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
24.0k
    _terminated = true;
143
24.0k
    return Status::OK();
144
24.0k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
1.05k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
1.05k
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
1.05k
    _terminated = true;
143
1.05k
    return Status::OK();
144
1.05k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
1
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
1
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
1
    _terminated = true;
143
1
    return Status::OK();
144
1
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
2.49k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
2.49k
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
2.49k
    _terminated = true;
143
2.49k
    return Status::OK();
144
2.49k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_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_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
2
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
2
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
2
    _terminated = true;
143
2
    return Status::OK();
144
2
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
467
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
467
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
467
    _terminated = true;
143
467
    return Status::OK();
144
467
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
53
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
53
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
53
    _terminated = true;
143
53
    return Status::OK();
144
53
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_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_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
471
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
471
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
471
    _terminated = true;
143
471
    return Status::OK();
144
471
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
7
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
7
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
7
    _terminated = true;
143
7
    return Status::OK();
144
7
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
151
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
151
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
151
    _terminated = true;
143
151
    return Status::OK();
144
151
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
144
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
144
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
144
    _terminated = true;
143
144
    return Status::OK();
144
144
}
145
146
365k
DataDistribution OperatorBase::required_data_distribution(RuntimeState* /*state*/) const {
147
365k
    return _child && _child->is_serial_operator() && !is_source()
148
365k
                   ? DataDistribution(TLocalPartitionType::PASSTHROUGH)
149
365k
                   : DataDistribution(TLocalPartitionType::NOOP);
150
365k
}
151
152
30.6k
bool OperatorBase::child_breaks_local_key_distribution(RuntimeState* state) const {
153
30.6k
    if (!_child) {
154
27.0k
        return false;
155
27.0k
    }
156
3.56k
    if (_child->is_serial_operator()) {
157
217
        return true;
158
217
    }
159
3.35k
    const auto child_distribution = _child->required_data_distribution(state);
160
3.35k
    return child_distribution.need_local_exchange() &&
161
3.35k
           !is_shuffled_exchange(child_distribution.distribution_type);
162
3.56k
}
163
164
82.2k
const RowDescriptor& OperatorBase::row_desc() const {
165
82.2k
    return _child->row_desc();
166
82.2k
}
167
168
template <typename SharedStateArg>
169
20.4k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
170
20.4k
    fmt::memory_buffer debug_string_buffer;
171
20.4k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
172
20.4k
    return fmt::to_string(debug_string_buffer);
173
20.4k
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
169
42
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
170
42
    fmt::memory_buffer debug_string_buffer;
171
42
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
172
42
    return fmt::to_string(debug_string_buffer);
173
42
}
_ZNK5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
169
3
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
170
3
    fmt::memory_buffer debug_string_buffer;
171
3
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
172
3
    return fmt::to_string(debug_string_buffer);
173
3
}
_ZNK5doris19PipelineXLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
169
14
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
170
14
    fmt::memory_buffer debug_string_buffer;
171
14
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
172
14
    return fmt::to_string(debug_string_buffer);
173
14
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
169
14
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
170
14
    fmt::memory_buffer debug_string_buffer;
171
14
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
172
14
    return fmt::to_string(debug_string_buffer);
173
14
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
169
14
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
170
14
    fmt::memory_buffer debug_string_buffer;
171
14
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
172
14
    return fmt::to_string(debug_string_buffer);
173
14
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
169
20.3k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
170
20.3k
    fmt::memory_buffer debug_string_buffer;
171
20.3k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
172
20.3k
    return fmt::to_string(debug_string_buffer);
173
20.3k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
169
1
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
170
1
    fmt::memory_buffer debug_string_buffer;
171
1
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
172
1
    return fmt::to_string(debug_string_buffer);
173
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
169
70
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
170
70
    fmt::memory_buffer debug_string_buffer;
171
70
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
172
70
    return fmt::to_string(debug_string_buffer);
173
70
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
174
175
template <typename SharedStateArg>
176
20.3k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
177
20.3k
    fmt::memory_buffer debug_string_buffer;
178
20.3k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
179
20.3k
    return fmt::to_string(debug_string_buffer);
180
20.3k
}
_ZNK5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
176
7
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
177
7
    fmt::memory_buffer debug_string_buffer;
178
7
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
179
7
    return fmt::to_string(debug_string_buffer);
180
7
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
176
14
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
177
14
    fmt::memory_buffer debug_string_buffer;
178
14
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
179
14
    return fmt::to_string(debug_string_buffer);
180
14
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
176
7
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
177
7
    fmt::memory_buffer debug_string_buffer;
178
7
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
179
7
    return fmt::to_string(debug_string_buffer);
180
7
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
176
14
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
177
14
    fmt::memory_buffer debug_string_buffer;
178
14
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
179
14
    return fmt::to_string(debug_string_buffer);
180
14
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
176
56
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
177
56
    fmt::memory_buffer debug_string_buffer;
178
56
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
179
56
    return fmt::to_string(debug_string_buffer);
180
56
}
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
176
37
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
177
37
    fmt::memory_buffer debug_string_buffer;
178
37
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
179
37
    return fmt::to_string(debug_string_buffer);
180
37
}
_ZNK5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
176
20.2k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
177
20.2k
    fmt::memory_buffer debug_string_buffer;
178
20.2k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
179
20.2k
    return fmt::to_string(debug_string_buffer);
180
20.2k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
181
182
20.5k
std::string OperatorXBase::debug_string(int indentation_level) const {
183
20.5k
    fmt::memory_buffer debug_string_buffer;
184
20.5k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, parallel_tasks={}, _is_serial_operator={}",
185
20.5k
                   std::string(indentation_level * 2, ' '), _op_name, node_id(), _parallel_tasks,
186
20.5k
                   _is_serial_operator);
187
20.5k
    return fmt::to_string(debug_string_buffer);
188
20.5k
}
189
190
20.4k
std::string OperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
191
20.4k
    return state->get_local_state(operator_id())->debug_string(indentation_level);
192
20.4k
}
193
194
745k
Status OperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
195
745k
    std::string node_name = print_plan_node_type(tnode.node_type);
196
745k
    _nereids_id = tnode.nereids_id;
197
745k
    if (!tnode.intermediate_output_tuple_id_list.empty()) {
198
3.69k
        if (!tnode.__isset.output_tuple_id) {
199
0
            return Status::InternalError("no final output tuple id");
200
0
        }
201
3.69k
        if (tnode.intermediate_output_tuple_id_list.size() !=
202
3.69k
            tnode.intermediate_projections_list.size()) {
203
0
            return Status::InternalError(
204
0
                    "intermediate_output_tuple_id_list size:{} not match "
205
0
                    "intermediate_projections_list size:{}",
206
0
                    tnode.intermediate_output_tuple_id_list.size(),
207
0
                    tnode.intermediate_projections_list.size());
208
0
        }
209
3.69k
    }
210
745k
    auto substr = node_name.substr(0, node_name.find("_NODE"));
211
745k
    _op_name = substr + "_OPERATOR";
212
213
745k
    if (tnode.__isset.vconjunct) {
214
0
        return Status::InternalError("vconjunct is not supported yet");
215
745k
    } else if (tnode.__isset.conjuncts) {
216
368k
        for (const auto& conjunct : tnode.conjuncts) {
217
368k
            VExprContextSPtr context;
218
368k
            RETURN_IF_ERROR(VExpr::create_expr_tree(conjunct, context));
219
368k
            _conjuncts.emplace_back(context);
220
368k
        }
221
121k
    }
222
223
    // create the projections expr
224
745k
    if (tnode.__isset.projections) {
225
285k
        DCHECK(tnode.__isset.output_tuple_id);
226
285k
        RETURN_IF_ERROR(VExpr::create_expr_trees(tnode.projections, _projections));
227
285k
    }
228
745k
    if (!tnode.intermediate_projections_list.empty()) {
229
3.70k
        DCHECK(tnode.__isset.projections) << "no final projections";
230
3.70k
        _intermediate_projections.reserve(tnode.intermediate_projections_list.size());
231
6.50k
        for (const auto& tnode_projections : tnode.intermediate_projections_list) {
232
6.50k
            VExprContextSPtrs projections;
233
6.50k
            RETURN_IF_ERROR(VExpr::create_expr_trees(tnode_projections, projections));
234
6.50k
            _intermediate_projections.push_back(projections);
235
6.50k
        }
236
3.70k
    }
237
745k
    return Status::OK();
238
745k
}
239
240
775k
Status OperatorXBase::prepare(RuntimeState* state) {
241
775k
    for (auto& conjunct : _conjuncts) {
242
368k
        RETURN_IF_ERROR(conjunct->prepare(state, intermediate_row_desc()));
243
368k
    }
244
775k
    if (state->enable_adjust_conjunct_order_by_cost()) {
245
724k
        std::ranges::stable_sort(_conjuncts, [](const auto& a, const auto& b) {
246
485k
            return a->execute_cost() < b->execute_cost();
247
485k
        });
248
724k
    };
249
250
782k
    for (int i = 0; i < _intermediate_projections.size(); i++) {
251
6.50k
        RETURN_IF_ERROR(
252
6.50k
                VExpr::prepare(_intermediate_projections[i], state, intermediate_row_desc(i)));
253
6.50k
    }
254
775k
    RETURN_IF_ERROR(VExpr::prepare(_projections, state, projections_row_desc()));
255
256
775k
    if (has_output_row_desc()) {
257
285k
        RETURN_IF_ERROR(VExpr::check_expr_output_type(_projections, *_output_row_descriptor));
258
285k
    }
259
260
775k
    for (auto& conjunct : _conjuncts) {
261
368k
        RETURN_IF_ERROR(conjunct->open(state));
262
368k
    }
263
775k
    RETURN_IF_ERROR(VExpr::open(_projections, state));
264
775k
    for (auto& projections : _intermediate_projections) {
265
6.50k
        RETURN_IF_ERROR(VExpr::open(projections, state));
266
6.50k
    }
267
775k
    if (_child && !is_source()) {
268
124k
        RETURN_IF_ERROR(_child->prepare(state));
269
124k
    }
270
271
775k
    if (VExpr::contains_blockable_function(_conjuncts) ||
272
775k
        VExpr::contains_blockable_function(_projections)) {
273
0
        _blockable = true;
274
0
    }
275
276
775k
    return Status::OK();
277
775k
}
278
279
5.84k
Status OperatorXBase::terminate(RuntimeState* state) {
280
5.84k
    if (_child && !is_source()) {
281
955
        RETURN_IF_ERROR(_child->terminate(state));
282
955
    }
283
5.84k
    auto result = state->get_local_state_result(operator_id());
284
5.84k
    if (!result) {
285
0
        return result.error();
286
0
    }
287
5.84k
    return result.value()->terminate(state);
288
5.84k
}
289
290
5.45M
Status OperatorXBase::close(RuntimeState* state) {
291
5.45M
    if (_child && !is_source()) {
292
969k
        RETURN_IF_ERROR(_child->close(state));
293
969k
    }
294
5.45M
    auto result = state->get_local_state_result(operator_id());
295
5.45M
    if (!result) {
296
0
        return result.error();
297
0
    }
298
5.45M
    return result.value()->close(state);
299
5.45M
}
300
301
285k
void PipelineXLocalStateBase::clear_origin_block() {
302
285k
    _origin_block.clear_column_data(_parent->intermediate_row_desc().num_materialized_slots());
303
285k
}
304
305
571k
Status PipelineXLocalStateBase::filter_block(const VExprContextSPtrs& expr_contexts, Block* block) {
306
571k
    RETURN_IF_ERROR(VExprContext::filter_block(expr_contexts, block, block->columns()));
307
308
571k
    _estimate_memory_usage += VExprContext::get_memory_usage(expr_contexts);
309
571k
    return Status::OK();
310
571k
}
311
312
0
bool PipelineXLocalStateBase::is_blockable() const {
313
0
    return std::any_of(_projections.begin(), _projections.end(),
314
0
                       [&](VExprContextSPtr expr) -> bool { return expr->is_blockable(); });
315
0
}
316
317
Status OperatorXBase::do_projections(RuntimeState* state, Block* origin_block,
318
285k
                                     Block* output_block) const {
319
285k
    auto* local_state = state->get_local_state(operator_id());
320
285k
    SCOPED_TIMER(local_state->exec_time_counter());
321
285k
    SCOPED_TIMER(local_state->_projection_timer);
322
285k
    const size_t rows = origin_block->rows();
323
285k
    if (rows == 0) {
324
151k
        return Status::OK();
325
151k
    }
326
134k
    Block input_block = *origin_block;
327
328
134k
    size_t bytes_usage = 0;
329
134k
    ColumnsWithTypeAndName new_columns;
330
134k
    for (const auto& projections : local_state->_intermediate_projections) {
331
1.70k
        if (projections.empty()) {
332
0
            return Status::InternalError("meet empty intermediate projection, node id: {}",
333
0
                                         node_id());
334
0
        }
335
1.70k
        new_columns.resize(projections.size());
336
11.9k
        for (int i = 0; i < projections.size(); i++) {
337
10.2k
            RETURN_IF_ERROR(projections[i]->execute(&input_block, new_columns[i]));
338
10.2k
            if (new_columns[i].column->size() != rows) {
339
0
                return Status::InternalError(
340
0
                        "intermediate projection result column size {} not equal input rows {}, "
341
0
                        "expr: {}",
342
0
                        new_columns[i].column->size(), rows,
343
0
                        projections[i]->root()->debug_string());
344
0
            }
345
10.2k
        }
346
1.70k
        Block tmp_block {new_columns};
347
1.70k
        bytes_usage += tmp_block.allocated_bytes();
348
1.70k
        input_block.swap(tmp_block);
349
1.70k
    }
350
351
134k
    if (input_block.rows() != rows) {
352
0
        return Status::InternalError(
353
0
                "after intermediate projections input block rows {} not equal origin rows {}, "
354
0
                "input_block: {}",
355
0
                input_block.rows(), rows, input_block.dump_structure());
356
0
    }
357
616k
    auto insert_column_datas = [&](auto& to, ColumnPtr& from, size_t rows) {
358
616k
        if (is_column_nullable(*to) && !is_column_nullable(*from)) {
359
0
            if (_keep_origin || !from->is_exclusive()) {
360
0
                auto& null_column = reinterpret_cast<ColumnNullable&>(*to);
361
0
                null_column.get_nested_column().insert_range_from(*from, 0, rows);
362
0
                null_column.get_null_map_column().get_data().resize_fill(rows, 0);
363
0
                bytes_usage += null_column.allocated_bytes();
364
0
            } else {
365
0
                to = make_nullable(from, false)->assert_mutable();
366
0
            }
367
616k
        } else {
368
616k
            if (_keep_origin || !from->is_exclusive()) {
369
616k
                to->insert_range_from(*from, 0, rows);
370
616k
                bytes_usage += from->allocated_bytes();
371
18.4E
            } else {
372
18.4E
                to = from->assert_mutable();
373
18.4E
            }
374
616k
        }
375
616k
    };
376
377
134k
    auto scoped_mutable_block = VectorizedUtils::build_scoped_mutable_mem_reuse_block(
378
134k
            output_block, *_output_row_descriptor);
379
134k
    auto& mutable_block = scoped_mutable_block.mutable_block();
380
134k
    auto& mutable_columns = mutable_block.mutable_columns();
381
134k
    if (rows != 0) {
382
134k
        DCHECK_EQ(mutable_columns.size(), local_state->_projections.size()) << debug_string();
383
751k
        for (int i = 0; i < mutable_columns.size(); ++i) {
384
616k
            ColumnPtr column_ptr;
385
616k
            RETURN_IF_ERROR(local_state->_projections[i]->execute(&input_block, column_ptr));
386
616k
            if (column_ptr->size() != rows) {
387
0
                return Status::InternalError(
388
0
                        "projection result column size {} not equal input rows {}, expr: {}",
389
0
                        column_ptr->size(), rows,
390
0
                        local_state->_projections[i]->root()->debug_string());
391
0
            }
392
616k
            column_ptr = column_ptr->convert_to_full_column_if_const();
393
616k
            bytes_usage += column_ptr->allocated_bytes();
394
616k
            insert_column_datas(mutable_columns[i], column_ptr, rows);
395
616k
        }
396
134k
        DCHECK(mutable_block.rows() == rows);
397
134k
    }
398
134k
    local_state->_estimate_memory_usage += bytes_usage;
399
400
134k
    return Status::OK();
401
134k
}
402
403
4.40M
Status OperatorXBase::get_block_after_projects(RuntimeState* state, Block* block, bool* eos) {
404
4.40M
    DBUG_EXECUTE_IF("Pipeline::return_empty_block", {
405
4.40M
        if (this->_op_name == "AGGREGATION_OPERATOR" || this->_op_name == "HASH_JOIN_OPERATOR" ||
406
4.40M
            this->_op_name == "PARTITIONED_AGGREGATION_OPERATOR" ||
407
4.40M
            this->_op_name == "PARTITIONED_HASH_JOIN_OPERATOR" ||
408
4.40M
            this->_op_name == "CROSS_JOIN_OPERATOR" || this->_op_name == "SORT_OPERATOR") {
409
4.40M
            if (_debug_point_count++ % 2 == 0) {
410
4.40M
                return Status::OK();
411
4.40M
            }
412
4.40M
        }
413
4.40M
    });
414
415
4.40M
    Status status;
416
4.40M
    auto* local_state = state->get_local_state(operator_id());
417
4.40M
    Defer defer([&]() {
418
4.40M
        if (status.ok()) {
419
4.40M
            local_state->update_output_block_counters(*block);
420
4.40M
        }
421
4.40M
    });
422
4.40M
    if (_output_row_descriptor) {
423
285k
        local_state->clear_origin_block();
424
285k
        status = get_block(state, &local_state->_origin_block, eos);
425
285k
        if (UNLIKELY(!status.ok())) {
426
20
            return status;
427
20
        }
428
285k
        status = do_projections(state, &local_state->_origin_block, block);
429
285k
        return status;
430
285k
    }
431
4.11M
    status = get_block(state, block, eos);
432
4.11M
    RETURN_IF_ERROR(block->check_type_and_column());
433
4.11M
    return status;
434
4.11M
}
435
436
2.84M
void PipelineXLocalStateBase::reached_limit(Block* block, bool* eos) {
437
2.84M
    if (_parent->_limit != -1 and _num_rows_returned + block->rows() >= _parent->_limit) {
438
5.08k
        block->set_num_rows(_parent->_limit - _num_rows_returned);
439
5.08k
        *eos = true;
440
5.08k
    }
441
442
2.84M
    DBUG_EXECUTE_IF("Pipeline::reached_limit_early", {
443
2.84M
        auto op_name = to_lower(_parent->_op_name);
444
2.84M
        auto arg_op_name = dp->param<std::string>("op_name");
445
2.84M
        arg_op_name = to_lower(arg_op_name);
446
447
2.84M
        if (op_name == arg_op_name) {
448
2.84M
            *eos = true;
449
2.84M
        }
450
2.84M
    });
451
452
2.84M
    if (auto rows = block->rows()) {
453
813k
        _num_rows_returned += rows;
454
813k
        _state->get_query_ctx()->resource_ctx()->io_context()->update_process_rows(rows);
455
813k
    }
456
2.84M
}
457
458
28.8k
Status DataSinkOperatorXBase::terminate(RuntimeState* state) {
459
28.8k
    auto result = state->get_sink_local_state_result();
460
28.8k
    if (!result) {
461
0
        return result.error();
462
0
    }
463
28.8k
    return result.value()->terminate(state);
464
28.8k
}
465
466
20.4k
std::string DataSinkOperatorXBase::debug_string(int indentation_level) const {
467
20.4k
    fmt::memory_buffer debug_string_buffer;
468
469
20.4k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, _is_serial_operator={}",
470
20.4k
                   std::string(indentation_level * 2, ' '), _name, node_id(), _is_serial_operator);
471
20.4k
    return fmt::to_string(debug_string_buffer);
472
20.4k
}
473
474
20.3k
std::string DataSinkOperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
475
20.3k
    return state->get_sink_local_state()->debug_string(indentation_level);
476
20.3k
}
477
478
406k
Status DataSinkOperatorXBase::init(const TDataSink& tsink) {
479
406k
    std::string op_name = "UNKNOWN_SINK";
480
406k
    auto it = _TDataSinkType_VALUES_TO_NAMES.find(tsink.type);
481
482
407k
    if (it != _TDataSinkType_VALUES_TO_NAMES.end()) {
483
407k
        op_name = it->second;
484
407k
    }
485
406k
    _name = op_name + "_OPERATOR";
486
406k
    return Status::OK();
487
406k
}
488
489
290k
Status DataSinkOperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
490
290k
    std::string op_name = print_plan_node_type(tnode.node_type);
491
290k
    _nereids_id = tnode.nereids_id;
492
290k
    auto substr = op_name.substr(0, op_name.find("_NODE"));
493
290k
    _name = substr + "_SINK_OPERATOR";
494
290k
    return Status::OK();
495
290k
}
496
497
template <typename LocalStateType>
498
Status DataSinkOperatorX<LocalStateType>::setup_local_state(RuntimeState* state,
499
1.85M
                                                            LocalSinkStateInfo& info) {
500
1.85M
    auto local_state = LocalStateType::create_unique(this, state);
501
1.85M
    RETURN_IF_ERROR(local_state->init(state, info));
502
1.85M
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
1.85M
    return Status::OK();
504
1.85M
}
_ZN5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
116k
                                                            LocalSinkStateInfo& info) {
500
116k
    auto local_state = LocalStateType::create_unique(this, state);
501
116k
    RETURN_IF_ERROR(local_state->init(state, info));
502
116k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
116k
    return Status::OK();
504
116k
}
_ZN5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
380k
                                                            LocalSinkStateInfo& info) {
500
380k
    auto local_state = LocalStateType::create_unique(this, state);
501
380k
    RETURN_IF_ERROR(local_state->init(state, info));
502
380k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
380k
    return Status::OK();
504
380k
}
_ZN5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
43
                                                            LocalSinkStateInfo& info) {
500
43
    auto local_state = LocalStateType::create_unique(this, state);
501
43
    RETURN_IF_ERROR(local_state->init(state, info));
502
43
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
43
    return Status::OK();
504
43
}
_ZN5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
3
                                                            LocalSinkStateInfo& info) {
500
3
    auto local_state = LocalStateType::create_unique(this, state);
501
3
    RETURN_IF_ERROR(local_state->init(state, info));
502
3
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
3
    return Status::OK();
504
3
}
_ZN5doris17DataSinkOperatorXINS_24ResultFileSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
434
                                                            LocalSinkStateInfo& info) {
500
434
    auto local_state = LocalStateType::create_unique(this, state);
501
434
    RETURN_IF_ERROR(local_state->init(state, info));
502
434
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
434
    return Status::OK();
504
434
}
_ZN5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
45.9k
                                                            LocalSinkStateInfo& info) {
500
45.9k
    auto local_state = LocalStateType::create_unique(this, state);
501
45.9k
    RETURN_IF_ERROR(local_state->init(state, info));
502
45.9k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
45.9k
    return Status::OK();
504
45.9k
}
_ZN5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
4.91k
                                                            LocalSinkStateInfo& info) {
500
4.91k
    auto local_state = LocalStateType::create_unique(this, state);
501
4.91k
    RETURN_IF_ERROR(local_state->init(state, info));
502
4.91k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
4.91k
    return Status::OK();
504
4.91k
}
_ZN5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
2.58k
                                                            LocalSinkStateInfo& info) {
500
2.58k
    auto local_state = LocalStateType::create_unique(this, state);
501
2.58k
    RETURN_IF_ERROR(local_state->init(state, info));
502
2.58k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
2.58k
    return Status::OK();
504
2.58k
}
_ZN5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
78
                                                            LocalSinkStateInfo& info) {
500
78
    auto local_state = LocalStateType::create_unique(this, state);
501
78
    RETURN_IF_ERROR(local_state->init(state, info));
502
78
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
78
    return Status::OK();
504
78
}
_ZN5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
2.00k
                                                            LocalSinkStateInfo& info) {
500
2.00k
    auto local_state = LocalStateType::create_unique(this, state);
501
2.00k
    RETURN_IF_ERROR(local_state->init(state, info));
502
2.00k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
2.00k
    return Status::OK();
504
2.00k
}
_ZN5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
24
                                                            LocalSinkStateInfo& info) {
500
24
    auto local_state = LocalStateType::create_unique(this, state);
501
24
    RETURN_IF_ERROR(local_state->init(state, info));
502
24
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
24
    return Status::OK();
504
24
}
_ZN5doris17DataSinkOperatorXINS_27IcebergDeleteSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
352
                                                            LocalSinkStateInfo& info) {
500
352
    auto local_state = LocalStateType::create_unique(this, state);
501
352
    RETURN_IF_ERROR(local_state->init(state, info));
502
352
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
352
    return Status::OK();
504
352
}
_ZN5doris17DataSinkOperatorXINS_26IcebergMergeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
840
                                                            LocalSinkStateInfo& info) {
500
840
    auto local_state = LocalStateType::create_unique(this, state);
501
840
    RETURN_IF_ERROR(local_state->init(state, info));
502
840
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
840
    return Status::OK();
504
840
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_21MCTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
7.91k
                                                            LocalSinkStateInfo& info) {
500
7.91k
    auto local_state = LocalStateType::create_unique(this, state);
501
7.91k
    RETURN_IF_ERROR(local_state->init(state, info));
502
7.91k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
7.91k
    return Status::OK();
504
7.91k
}
_ZN5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
61
                                                            LocalSinkStateInfo& info) {
500
61
    auto local_state = LocalStateType::create_unique(this, state);
501
61
    RETURN_IF_ERROR(local_state->init(state, info));
502
61
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
61
    return Status::OK();
504
61
}
_ZN5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
239k
                                                            LocalSinkStateInfo& info) {
500
239k
    auto local_state = LocalStateType::create_unique(this, state);
501
239k
    RETURN_IF_ERROR(local_state->init(state, info));
502
239k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
239k
    return Status::OK();
504
239k
}
_ZN5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
30
                                                            LocalSinkStateInfo& info) {
500
30
    auto local_state = LocalStateType::create_unique(this, state);
501
30
    RETURN_IF_ERROR(local_state->init(state, info));
502
30
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
30
    return Status::OK();
504
30
}
_ZN5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
290k
                                                            LocalSinkStateInfo& info) {
500
290k
    auto local_state = LocalStateType::create_unique(this, state);
501
290k
    RETURN_IF_ERROR(local_state->init(state, info));
502
290k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
290k
    return Status::OK();
504
290k
}
_ZN5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
121k
                                                            LocalSinkStateInfo& info) {
500
121k
    auto local_state = LocalStateType::create_unique(this, state);
501
121k
    RETURN_IF_ERROR(local_state->init(state, info));
502
121k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
121k
    return Status::OK();
504
121k
}
_ZN5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
298
                                                            LocalSinkStateInfo& info) {
500
298
    auto local_state = LocalStateType::create_unique(this, state);
501
298
    RETURN_IF_ERROR(local_state->init(state, info));
502
298
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
298
    return Status::OK();
504
298
}
_ZN5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
270
                                                            LocalSinkStateInfo& info) {
500
270
    auto local_state = LocalStateType::create_unique(this, state);
501
270
    RETURN_IF_ERROR(local_state->init(state, info));
502
270
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
270
    return Status::OK();
504
270
}
_ZN5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
607k
                                                            LocalSinkStateInfo& info) {
500
607k
    auto local_state = LocalStateType::create_unique(this, state);
501
607k
    RETURN_IF_ERROR(local_state->init(state, info));
502
607k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
607k
    return Status::OK();
504
607k
}
_ZN5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
8.22k
                                                            LocalSinkStateInfo& info) {
500
8.22k
    auto local_state = LocalStateType::create_unique(this, state);
501
8.22k
    RETURN_IF_ERROR(local_state->init(state, info));
502
8.22k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
8.22k
    return Status::OK();
504
8.22k
}
_ZN5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
5.16k
                                                            LocalSinkStateInfo& info) {
500
5.16k
    auto local_state = LocalStateType::create_unique(this, state);
501
5.16k
    RETURN_IF_ERROR(local_state->init(state, info));
502
5.16k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
5.16k
    return Status::OK();
504
5.16k
}
_ZN5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
2.93k
                                                            LocalSinkStateInfo& info) {
500
2.93k
    auto local_state = LocalStateType::create_unique(this, state);
501
2.93k
    RETURN_IF_ERROR(local_state->init(state, info));
502
2.93k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
2.93k
    return Status::OK();
504
2.93k
}
_ZN5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
335
                                                            LocalSinkStateInfo& info) {
500
335
    auto local_state = LocalStateType::create_unique(this, state);
501
335
    RETURN_IF_ERROR(local_state->init(state, info));
502
335
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
335
    return Status::OK();
504
335
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
4.74k
                                                            LocalSinkStateInfo& info) {
500
4.74k
    auto local_state = LocalStateType::create_unique(this, state);
501
4.74k
    RETURN_IF_ERROR(local_state->init(state, info));
502
4.74k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
4.74k
    return Status::OK();
504
4.74k
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
2.56k
                                                            LocalSinkStateInfo& info) {
500
2.56k
    auto local_state = LocalStateType::create_unique(this, state);
501
2.56k
    RETURN_IF_ERROR(local_state->init(state, info));
502
2.56k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
2.56k
    return Status::OK();
504
2.56k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
2.58k
                                                            LocalSinkStateInfo& info) {
500
2.58k
    auto local_state = LocalStateType::create_unique(this, state);
501
2.58k
    RETURN_IF_ERROR(local_state->init(state, info));
502
2.58k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
2.58k
    return Status::OK();
504
2.58k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
2.50k
                                                            LocalSinkStateInfo& info) {
500
2.50k
    auto local_state = LocalStateType::create_unique(this, state);
501
2.50k
    RETURN_IF_ERROR(local_state->init(state, info));
502
2.50k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
2.50k
    return Status::OK();
504
2.50k
}
_ZN5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
1
                                                            LocalSinkStateInfo& info) {
500
1
    auto local_state = LocalStateType::create_unique(this, state);
501
1
    RETURN_IF_ERROR(local_state->init(state, info));
502
1
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
1
    return Status::OK();
504
1
}
_ZN5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
567
                                                            LocalSinkStateInfo& info) {
500
567
    auto local_state = LocalStateType::create_unique(this, state);
501
567
    RETURN_IF_ERROR(local_state->init(state, info));
502
567
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
567
    return Status::OK();
504
567
}
_ZN5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
14
                                                            LocalSinkStateInfo& info) {
500
14
    auto local_state = LocalStateType::create_unique(this, state);
501
14
    RETURN_IF_ERROR(local_state->init(state, info));
502
14
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
14
    return Status::OK();
504
14
}
_ZN5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
105
                                                            LocalSinkStateInfo& info) {
500
105
    auto local_state = LocalStateType::create_unique(this, state);
501
105
    RETURN_IF_ERROR(local_state->init(state, info));
502
105
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
105
    return Status::OK();
504
105
}
_ZN5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
164
                                                            LocalSinkStateInfo& info) {
500
164
    auto local_state = LocalStateType::create_unique(this, state);
501
164
    RETURN_IF_ERROR(local_state->init(state, info));
502
164
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
164
    return Status::OK();
504
164
}
_ZN5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
164
                                                            LocalSinkStateInfo& info) {
500
164
    auto local_state = LocalStateType::create_unique(this, state);
501
164
    RETURN_IF_ERROR(local_state->init(state, info));
502
164
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
164
    return Status::OK();
504
164
}
505
506
template <typename LocalStateType>
507
1.53M
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
0
                                 LocalExchangeSharedState>) {
510
0
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
0
                                        MultiCastSharedState>) {
513
0
        throw Exception(Status::FatalError("should not reach here!"));
514
1.53M
    } else {
515
1.53M
        auto ss = LocalStateType::SharedStateType::create_shared();
516
1.53M
        ss->id = operator_id();
517
1.53M
        for (auto& dest : dests_id()) {
518
1.52M
            ss->related_op_ids.insert(dest);
519
1.52M
        }
520
1.53M
        return ss;
521
1.53M
    }
522
1.53M
}
_ZNK5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
101k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
101k
    } else {
515
101k
        auto ss = LocalStateType::SharedStateType::create_shared();
516
101k
        ss->id = operator_id();
517
101k
        for (auto& dest : dests_id()) {
518
101k
            ss->related_op_ids.insert(dest);
519
101k
        }
520
101k
        return ss;
521
101k
    }
522
101k
}
_ZNK5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
381k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
381k
    } else {
515
381k
        auto ss = LocalStateType::SharedStateType::create_shared();
516
381k
        ss->id = operator_id();
517
381k
        for (auto& dest : dests_id()) {
518
379k
            ss->related_op_ids.insert(dest);
519
379k
        }
520
381k
        return ss;
521
381k
    }
522
381k
}
_ZNK5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
43
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
43
    } else {
515
43
        auto ss = LocalStateType::SharedStateType::create_shared();
516
43
        ss->id = operator_id();
517
43
        for (auto& dest : dests_id()) {
518
43
            ss->related_op_ids.insert(dest);
519
43
        }
520
43
        return ss;
521
43
    }
522
43
}
_ZNK5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
3
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
3
    } else {
515
3
        auto ss = LocalStateType::SharedStateType::create_shared();
516
3
        ss->id = operator_id();
517
3
        for (auto& dest : dests_id()) {
518
3
            ss->related_op_ids.insert(dest);
519
3
        }
520
3
        return ss;
521
3
    }
522
3
}
_ZNK5doris17DataSinkOperatorXINS_24ResultFileSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
433
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
433
    } else {
515
433
        auto ss = LocalStateType::SharedStateType::create_shared();
516
433
        ss->id = operator_id();
517
433
        for (auto& dest : dests_id()) {
518
433
            ss->related_op_ids.insert(dest);
519
433
        }
520
433
        return ss;
521
433
    }
522
433
}
_ZNK5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
46.0k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
46.0k
    } else {
515
46.0k
        auto ss = LocalStateType::SharedStateType::create_shared();
516
46.0k
        ss->id = operator_id();
517
46.0k
        for (auto& dest : dests_id()) {
518
45.8k
            ss->related_op_ids.insert(dest);
519
45.8k
        }
520
46.0k
        return ss;
521
46.0k
    }
522
46.0k
}
_ZNK5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE19create_shared_stateEv
Line
Count
Source
507
4.91k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
4.91k
    } else {
515
4.91k
        auto ss = LocalStateType::SharedStateType::create_shared();
516
4.91k
        ss->id = operator_id();
517
4.91k
        for (auto& dest : dests_id()) {
518
4.91k
            ss->related_op_ids.insert(dest);
519
4.91k
        }
520
4.91k
        return ss;
521
4.91k
    }
522
4.91k
}
_ZNK5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
2.58k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
2.58k
    } else {
515
2.58k
        auto ss = LocalStateType::SharedStateType::create_shared();
516
2.58k
        ss->id = operator_id();
517
2.58k
        for (auto& dest : dests_id()) {
518
2.58k
            ss->related_op_ids.insert(dest);
519
2.58k
        }
520
2.58k
        return ss;
521
2.58k
    }
522
2.58k
}
_ZNK5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
78
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
78
    } else {
515
78
        auto ss = LocalStateType::SharedStateType::create_shared();
516
78
        ss->id = operator_id();
517
78
        for (auto& dest : dests_id()) {
518
78
            ss->related_op_ids.insert(dest);
519
78
        }
520
78
        return ss;
521
78
    }
522
78
}
_ZNK5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
2.00k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
2.00k
    } else {
515
2.00k
        auto ss = LocalStateType::SharedStateType::create_shared();
516
2.00k
        ss->id = operator_id();
517
2.00k
        for (auto& dest : dests_id()) {
518
2.00k
            ss->related_op_ids.insert(dest);
519
2.00k
        }
520
2.00k
        return ss;
521
2.00k
    }
522
2.00k
}
_ZNK5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
24
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
24
    } else {
515
24
        auto ss = LocalStateType::SharedStateType::create_shared();
516
24
        ss->id = operator_id();
517
24
        for (auto& dest : dests_id()) {
518
24
            ss->related_op_ids.insert(dest);
519
24
        }
520
24
        return ss;
521
24
    }
522
24
}
_ZNK5doris17DataSinkOperatorXINS_27IcebergDeleteSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
352
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
352
    } else {
515
352
        auto ss = LocalStateType::SharedStateType::create_shared();
516
352
        ss->id = operator_id();
517
352
        for (auto& dest : dests_id()) {
518
352
            ss->related_op_ids.insert(dest);
519
352
        }
520
352
        return ss;
521
352
    }
522
352
}
_ZNK5doris17DataSinkOperatorXINS_26IcebergMergeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
840
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
840
    } else {
515
840
        auto ss = LocalStateType::SharedStateType::create_shared();
516
840
        ss->id = operator_id();
517
840
        for (auto& dest : dests_id()) {
518
840
            ss->related_op_ids.insert(dest);
519
840
        }
520
840
        return ss;
521
840
    }
522
840
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_21MCTableSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
7.95k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
7.95k
    } else {
515
7.95k
        auto ss = LocalStateType::SharedStateType::create_shared();
516
7.95k
        ss->id = operator_id();
517
7.95k
        for (auto& dest : dests_id()) {
518
7.94k
            ss->related_op_ids.insert(dest);
519
7.94k
        }
520
7.95k
        return ss;
521
7.95k
    }
522
7.95k
}
_ZNK5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
61
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
61
    } else {
515
61
        auto ss = LocalStateType::SharedStateType::create_shared();
516
61
        ss->id = operator_id();
517
61
        for (auto& dest : dests_id()) {
518
61
            ss->related_op_ids.insert(dest);
519
61
        }
520
61
        return ss;
521
61
    }
522
61
}
_ZNK5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
239k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
239k
    } else {
515
239k
        auto ss = LocalStateType::SharedStateType::create_shared();
516
239k
        ss->id = operator_id();
517
239k
        for (auto& dest : dests_id()) {
518
239k
            ss->related_op_ids.insert(dest);
519
239k
        }
520
239k
        return ss;
521
239k
    }
522
239k
}
_ZNK5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
32
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
32
    } else {
515
32
        auto ss = LocalStateType::SharedStateType::create_shared();
516
32
        ss->id = operator_id();
517
32
        for (auto& dest : dests_id()) {
518
32
            ss->related_op_ids.insert(dest);
519
32
        }
520
32
        return ss;
521
32
    }
522
32
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
121k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
121k
    } else {
515
121k
        auto ss = LocalStateType::SharedStateType::create_shared();
516
121k
        ss->id = operator_id();
517
121k
        for (auto& dest : dests_id()) {
518
121k
            ss->related_op_ids.insert(dest);
519
121k
        }
520
121k
        return ss;
521
121k
    }
522
121k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
269
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
269
    } else {
515
269
        auto ss = LocalStateType::SharedStateType::create_shared();
516
269
        ss->id = operator_id();
517
269
        for (auto& dest : dests_id()) {
518
269
            ss->related_op_ids.insert(dest);
519
269
        }
520
269
        return ss;
521
269
    }
522
269
}
_ZNK5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
609k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
609k
    } else {
515
609k
        auto ss = LocalStateType::SharedStateType::create_shared();
516
609k
        ss->id = operator_id();
517
609k
        for (auto& dest : dests_id()) {
518
606k
            ss->related_op_ids.insert(dest);
519
606k
        }
520
609k
        return ss;
521
609k
    }
522
609k
}
_ZNK5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
8.23k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
8.23k
    } else {
515
8.23k
        auto ss = LocalStateType::SharedStateType::create_shared();
516
8.23k
        ss->id = operator_id();
517
8.23k
        for (auto& dest : dests_id()) {
518
8.22k
            ss->related_op_ids.insert(dest);
519
8.22k
        }
520
8.23k
        return ss;
521
8.23k
    }
522
8.23k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
437
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
437
    } else {
515
437
        auto ss = LocalStateType::SharedStateType::create_shared();
516
437
        ss->id = operator_id();
517
437
        for (auto& dest : dests_id()) {
518
437
            ss->related_op_ids.insert(dest);
519
437
        }
520
437
        return ss;
521
437
    }
522
437
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE19create_shared_stateEv
Line
Count
Source
507
2.57k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
2.57k
    } else {
515
2.57k
        auto ss = LocalStateType::SharedStateType::create_shared();
516
2.57k
        ss->id = operator_id();
517
2.57k
        for (auto& dest : dests_id()) {
518
2.57k
            ss->related_op_ids.insert(dest);
519
2.57k
        }
520
2.57k
        return ss;
521
2.57k
    }
522
2.57k
}
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE19create_shared_stateEv
Line
Count
Source
507
2.49k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
2.49k
    } else {
515
2.49k
        auto ss = LocalStateType::SharedStateType::create_shared();
516
2.49k
        ss->id = operator_id();
517
2.50k
        for (auto& dest : dests_id()) {
518
2.50k
            ss->related_op_ids.insert(dest);
519
2.50k
        }
520
2.49k
        return ss;
521
2.49k
    }
522
2.49k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
566
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
566
    } else {
515
566
        auto ss = LocalStateType::SharedStateType::create_shared();
516
566
        ss->id = operator_id();
517
566
        for (auto& dest : dests_id()) {
518
562
            ss->related_op_ids.insert(dest);
519
562
        }
520
566
        return ss;
521
566
    }
522
566
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
105
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
105
    } else {
515
105
        auto ss = LocalStateType::SharedStateType::create_shared();
516
105
        ss->id = operator_id();
517
105
        for (auto& dest : dests_id()) {
518
105
            ss->related_op_ids.insert(dest);
519
105
        }
520
105
        return ss;
521
105
    }
522
105
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE19create_shared_stateEv
523
524
template <typename LocalStateType>
525
2.26M
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
2.26M
    auto local_state = LocalStateType::create_unique(state, this);
527
2.26M
    RETURN_IF_ERROR(local_state->init(state, info));
528
2.26M
    state->emplace_local_state(operator_id(), std::move(local_state));
529
2.26M
    return Status::OK();
530
2.26M
}
_ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
68.5k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
68.5k
    auto local_state = LocalStateType::create_unique(state, this);
527
68.5k
    RETURN_IF_ERROR(local_state->init(state, info));
528
68.5k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
68.5k
    return Status::OK();
530
68.5k
}
_ZN5doris9OperatorXINS_18OlapScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
272k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
272k
    auto local_state = LocalStateType::create_unique(state, this);
527
272k
    RETURN_IF_ERROR(local_state->init(state, info));
528
272k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
272k
    return Status::OK();
530
272k
}
_ZN5doris9OperatorXINS_21GroupCommitLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
142
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
142
    auto local_state = LocalStateType::create_unique(state, this);
527
142
    RETURN_IF_ERROR(local_state->init(state, info));
528
142
    state->emplace_local_state(operator_id(), std::move(local_state));
529
142
    return Status::OK();
530
142
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_18JDBCScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_18FileScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
20.5k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
20.5k
    auto local_state = LocalStateType::create_unique(state, this);
527
20.5k
    RETURN_IF_ERROR(local_state->init(state, info));
528
20.5k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
20.5k
    return Status::OK();
530
20.5k
}
_ZN5doris9OperatorXINS_18AnalyticLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
7.89k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
7.89k
    auto local_state = LocalStateType::create_unique(state, this);
527
7.89k
    RETURN_IF_ERROR(local_state->init(state, info));
528
7.89k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
7.89k
    return Status::OK();
530
7.89k
}
_ZN5doris9OperatorXINS_14SortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
7.95k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
7.95k
    auto local_state = LocalStateType::create_unique(state, this);
527
7.95k
    RETURN_IF_ERROR(local_state->init(state, info));
528
7.95k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
7.95k
    return Status::OK();
530
7.95k
}
_ZN5doris9OperatorXINS_19SpillSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
23
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
23
    auto local_state = LocalStateType::create_unique(state, this);
527
23
    RETURN_IF_ERROR(local_state->init(state, info));
528
23
    state->emplace_local_state(operator_id(), std::move(local_state));
529
23
    return Status::OK();
530
23
}
_ZN5doris9OperatorXINS_24LocalMergeSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
231k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
231k
    auto local_state = LocalStateType::create_unique(state, this);
527
231k
    RETURN_IF_ERROR(local_state->init(state, info));
528
231k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
231k
    return Status::OK();
530
231k
}
_ZN5doris9OperatorXINS_13AggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
121k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
121k
    auto local_state = LocalStateType::create_unique(state, this);
527
121k
    RETURN_IF_ERROR(local_state->init(state, info));
528
121k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
121k
    return Status::OK();
530
121k
}
_ZN5doris9OperatorXINS_21BucketedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
296
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
296
    auto local_state = LocalStateType::create_unique(state, this);
527
296
    RETURN_IF_ERROR(local_state->init(state, info));
528
296
    state->emplace_local_state(operator_id(), std::move(local_state));
529
296
    return Status::OK();
530
296
}
_ZN5doris9OperatorXINS_24PartitionedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
260
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
260
    auto local_state = LocalStateType::create_unique(state, this);
527
260
    RETURN_IF_ERROR(local_state->init(state, info));
528
260
    state->emplace_local_state(operator_id(), std::move(local_state));
529
260
    return Status::OK();
530
260
}
_ZN5doris9OperatorXINS_23TableFunctionLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
4.08k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
4.08k
    auto local_state = LocalStateType::create_unique(state, this);
527
4.08k
    RETURN_IF_ERROR(local_state->init(state, info));
528
4.08k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
4.08k
    return Status::OK();
530
4.08k
}
_ZN5doris9OperatorXINS_18ExchangeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
342k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
342k
    auto local_state = LocalStateType::create_unique(state, this);
527
342k
    RETURN_IF_ERROR(local_state->init(state, info));
528
342k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
342k
    return Status::OK();
530
342k
}
_ZN5doris9OperatorXINS_16RepeatLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
1.20k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
1.20k
    auto local_state = LocalStateType::create_unique(state, this);
527
1.20k
    RETURN_IF_ERROR(local_state->init(state, info));
528
1.20k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
1.20k
    return Status::OK();
530
1.20k
}
_ZN5doris9OperatorXINS_29NestedLoopJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
8.21k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
8.21k
    auto local_state = LocalStateType::create_unique(state, this);
527
8.21k
    RETURN_IF_ERROR(local_state->init(state, info));
528
8.21k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
8.21k
    return Status::OK();
530
8.21k
}
_ZN5doris9OperatorXINS_23AssertNumRowsLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
121
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
121
    auto local_state = LocalStateType::create_unique(state, this);
527
121
    RETURN_IF_ERROR(local_state->init(state, info));
528
121
    state->emplace_local_state(operator_id(), std::move(local_state));
529
121
    return Status::OK();
530
121
}
_ZN5doris9OperatorXINS_18EmptySetLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
1.73k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
1.73k
    auto local_state = LocalStateType::create_unique(state, this);
527
1.73k
    RETURN_IF_ERROR(local_state->init(state, info));
528
1.73k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
1.73k
    return Status::OK();
530
1.73k
}
_ZN5doris9OperatorXINS_21UnionSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
53.6k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
53.6k
    auto local_state = LocalStateType::create_unique(state, this);
527
53.6k
    RETURN_IF_ERROR(local_state->init(state, info));
528
53.6k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
53.6k
    return Status::OK();
530
53.6k
}
_ZN5doris9OperatorXINS_35MultiCastDataStreamSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
8.08k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
8.08k
    auto local_state = LocalStateType::create_unique(state, this);
527
8.08k
    RETURN_IF_ERROR(local_state->init(state, info));
528
8.08k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
8.08k
    return Status::OK();
530
8.08k
}
_ZN5doris9OperatorXINS_29PartitionSortSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
326
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
326
    auto local_state = LocalStateType::create_unique(state, this);
527
326
    RETURN_IF_ERROR(local_state->init(state, info));
528
326
    state->emplace_local_state(operator_id(), std::move(local_state));
529
326
    return Status::OK();
530
326
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
2.60k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
2.60k
    auto local_state = LocalStateType::create_unique(state, this);
527
2.60k
    RETURN_IF_ERROR(local_state->init(state, info));
528
2.60k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
2.60k
    return Status::OK();
530
2.60k
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
2.53k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
2.53k
    auto local_state = LocalStateType::create_unique(state, this);
527
2.53k
    RETURN_IF_ERROR(local_state->init(state, info));
528
2.53k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
2.53k
    return Status::OK();
530
2.53k
}
_ZN5doris9OperatorXINS_17DataGenLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
415
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
415
    auto local_state = LocalStateType::create_unique(state, this);
527
415
    RETURN_IF_ERROR(local_state->init(state, info));
528
415
    state->emplace_local_state(operator_id(), std::move(local_state));
529
415
    return Status::OK();
530
415
}
_ZN5doris9OperatorXINS_20SchemaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
1.89k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
1.89k
    auto local_state = LocalStateType::create_unique(state, this);
527
1.89k
    RETURN_IF_ERROR(local_state->init(state, info));
528
1.89k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
1.89k
    return Status::OK();
530
1.89k
}
_ZN5doris9OperatorXINS_18MetaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
5.33k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
5.33k
    auto local_state = LocalStateType::create_unique(state, this);
527
5.33k
    RETURN_IF_ERROR(local_state->init(state, info));
528
5.33k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
5.33k
    return Status::OK();
530
5.33k
}
_ZN5doris9OperatorXINS_29LocalExchangeSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
698k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
698k
    auto local_state = LocalStateType::create_unique(state, this);
527
698k
    RETURN_IF_ERROR(local_state->init(state, info));
528
698k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
698k
    return Status::OK();
530
698k
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_34PartitionedHashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_21CacheSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
14
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
14
    auto local_state = LocalStateType::create_unique(state, this);
527
14
    RETURN_IF_ERROR(local_state->init(state, info));
528
14
    state->emplace_local_state(operator_id(), std::move(local_state));
529
14
    return Status::OK();
530
14
}
_ZN5doris9OperatorXINS_22RecCTESourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
164
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
164
    auto local_state = LocalStateType::create_unique(state, this);
527
164
    RETURN_IF_ERROR(local_state->init(state, info));
528
164
    state->emplace_local_state(operator_id(), std::move(local_state));
529
164
    return Status::OK();
530
164
}
_ZN5doris9OperatorXINS_20RecCTEScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
2.18k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
2.18k
    auto local_state = LocalStateType::create_unique(state, this);
527
2.18k
    RETURN_IF_ERROR(local_state->init(state, info));
528
2.18k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
2.18k
    return Status::OK();
530
2.18k
}
_ZN5doris9OperatorXINS_25MaterializationLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
1.27k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
1.27k
    auto local_state = LocalStateType::create_unique(state, this);
527
1.27k
    RETURN_IF_ERROR(local_state->init(state, info));
528
1.27k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
1.27k
    return Status::OK();
530
1.27k
}
_ZN5doris9OperatorXINS_16SelectLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
2.02k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
2.02k
    auto local_state = LocalStateType::create_unique(state, this);
527
2.02k
    RETURN_IF_ERROR(local_state->init(state, info));
528
2.02k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
2.02k
    return Status::OK();
530
2.02k
}
_ZN5doris9OperatorXINS_22StreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
8.54k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
8.54k
    auto local_state = LocalStateType::create_unique(state, this);
527
8.54k
    RETURN_IF_ERROR(local_state->init(state, info));
528
8.54k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
8.54k
    return Status::OK();
530
8.54k
}
_ZN5doris9OperatorXINS_30DistinctStreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
384k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
384k
    auto local_state = LocalStateType::create_unique(state, this);
527
384k
    RETURN_IF_ERROR(local_state->init(state, info));
528
384k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
384k
    return Status::OK();
530
384k
}
531
532
PipelineXSinkLocalStateBase::PipelineXSinkLocalStateBase(DataSinkOperatorXBase* parent,
533
                                                         RuntimeState* state)
534
1.84M
        : _parent(parent), _state(state) {}
535
536
PipelineXLocalStateBase::PipelineXLocalStateBase(RuntimeState* state, OperatorXBase* parent)
537
2.25M
        : _num_rows_returned(0),
538
2.25M
          _rows_returned_counter(nullptr),
539
2.25M
          _parent(parent),
540
2.25M
          _state(state),
541
2.25M
          _budget(state->batch_size(), state->preferred_block_size_bytes()) {}
542
543
template <typename SharedStateArg>
544
2.26M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
545
2.26M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
546
2.26M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
547
2.26M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
548
2.26M
    _operator_profile->set_metadata(_parent->node_id());
549
    // indent is false so that source operator will have same
550
    // indentation_level with its parent operator.
551
2.26M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
552
2.26M
    _operator_profile->add_child(_common_profile.get(), true);
553
2.26M
    _operator_profile->add_child(_custom_profile.get(), true);
554
2.26M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
555
2.26M
    if constexpr (!is_fake_shared) {
556
1.21M
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
557
710k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
558
710k
                                    .first.get()
559
710k
                                    ->template cast<SharedStateArg>();
560
561
710k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
562
710k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
710k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
710k
        } else if (info.shared_state) {
565
441k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
0
                DCHECK(false);
567
0
            }
568
            // For UnionSourceOperator without children, there is no shared state.
569
441k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
570
571
441k
            _dependency = _shared_state->create_source_dependency(
572
441k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
573
441k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
574
441k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
575
441k
        } else {
576
64.1k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
577
5.75k
                DCHECK(false);
578
5.75k
            }
579
64.1k
        }
580
1.21M
    }
581
582
2.26M
    if (must_set_shared_state() && _shared_state == nullptr) {
583
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
584
0
    }
585
586
2.26M
    _rows_returned_counter =
587
2.26M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
588
2.26M
    _blocks_returned_counter =
589
2.26M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
590
2.26M
    _output_block_bytes_counter =
591
2.26M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
592
2.26M
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
593
2.26M
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
594
2.26M
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
595
2.26M
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
2.26M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
597
2.26M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
598
2.26M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
599
2.26M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
600
2.26M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
601
2.26M
    _memory_used_counter =
602
2.26M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
603
2.26M
    _common_profile->add_info_string("IsColocate",
604
2.26M
                                     std::to_string(_parent->is_colocated_operator()));
605
2.26M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
606
2.26M
    _common_profile->add_info_string("FollowedByShuffledOperator",
607
2.26M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
608
2.26M
    return Status::OK();
609
2.26M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
544
68.7k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
545
68.7k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
546
68.7k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
547
68.7k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
548
68.7k
    _operator_profile->set_metadata(_parent->node_id());
549
    // indent is false so that source operator will have same
550
    // indentation_level with its parent operator.
551
68.7k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
552
68.7k
    _operator_profile->add_child(_common_profile.get(), true);
553
68.7k
    _operator_profile->add_child(_custom_profile.get(), true);
554
68.7k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
555
68.7k
    if constexpr (!is_fake_shared) {
556
68.7k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
557
14.6k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
558
14.6k
                                    .first.get()
559
14.6k
                                    ->template cast<SharedStateArg>();
560
561
14.6k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
562
14.6k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
14.6k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
54.1k
        } else if (info.shared_state) {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
            // For UnionSourceOperator without children, there is no shared state.
569
53.4k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
570
571
53.4k
            _dependency = _shared_state->create_source_dependency(
572
53.4k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
573
53.4k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
574
53.4k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
575
53.4k
        } else {
576
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
577
                DCHECK(false);
578
            }
579
719
        }
580
68.7k
    }
581
582
68.7k
    if (must_set_shared_state() && _shared_state == nullptr) {
583
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
584
0
    }
585
586
68.7k
    _rows_returned_counter =
587
68.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
588
68.7k
    _blocks_returned_counter =
589
68.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
590
68.7k
    _output_block_bytes_counter =
591
68.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
592
68.7k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
593
68.7k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
594
68.7k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
595
68.7k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
68.7k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
597
68.7k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
598
68.7k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
599
68.7k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
600
68.7k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
601
68.7k
    _memory_used_counter =
602
68.7k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
603
68.7k
    _common_profile->add_info_string("IsColocate",
604
68.7k
                                     std::to_string(_parent->is_colocated_operator()));
605
68.7k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
606
68.7k
    _common_profile->add_info_string("FollowedByShuffledOperator",
607
68.7k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
608
68.7k
    return Status::OK();
609
68.7k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
544
1
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
545
1
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
546
1
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
547
1
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
548
1
    _operator_profile->set_metadata(_parent->node_id());
549
    // indent is false so that source operator will have same
550
    // indentation_level with its parent operator.
551
1
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
552
1
    _operator_profile->add_child(_common_profile.get(), true);
553
1
    _operator_profile->add_child(_custom_profile.get(), true);
554
1
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
555
1
    if constexpr (!is_fake_shared) {
556
1
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
557
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
558
0
                                    .first.get()
559
0
                                    ->template cast<SharedStateArg>();
560
561
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
562
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
1
        } else if (info.shared_state) {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
            // For UnionSourceOperator without children, there is no shared state.
569
1
            _shared_state = info.shared_state->template cast<SharedStateArg>();
570
571
1
            _dependency = _shared_state->create_source_dependency(
572
1
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
573
1
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
574
1
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
575
1
        } else {
576
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
577
                DCHECK(false);
578
            }
579
0
        }
580
1
    }
581
582
1
    if (must_set_shared_state() && _shared_state == nullptr) {
583
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
584
0
    }
585
586
1
    _rows_returned_counter =
587
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
588
1
    _blocks_returned_counter =
589
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
590
1
    _output_block_bytes_counter =
591
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
592
1
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
593
1
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
594
1
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
595
1
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
1
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
597
1
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
598
1
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
599
1
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
600
1
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
601
1
    _memory_used_counter =
602
1
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
603
1
    _common_profile->add_info_string("IsColocate",
604
1
                                     std::to_string(_parent->is_colocated_operator()));
605
1
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
606
1
    _common_profile->add_info_string("FollowedByShuffledOperator",
607
1
                                     std::to_string(_parent->followed_by_shuffled_operator()));
608
1
    return Status::OK();
609
1
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
544
239k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
545
239k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
546
239k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
547
239k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
548
239k
    _operator_profile->set_metadata(_parent->node_id());
549
    // indent is false so that source operator will have same
550
    // indentation_level with its parent operator.
551
239k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
552
239k
    _operator_profile->add_child(_common_profile.get(), true);
553
239k
    _operator_profile->add_child(_custom_profile.get(), true);
554
239k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
555
239k
    if constexpr (!is_fake_shared) {
556
239k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
557
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
558
0
                                    .first.get()
559
0
                                    ->template cast<SharedStateArg>();
560
561
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
562
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
239k
        } else if (info.shared_state) {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
            // For UnionSourceOperator without children, there is no shared state.
569
234k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
570
571
234k
            _dependency = _shared_state->create_source_dependency(
572
234k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
573
234k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
574
234k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
575
234k
        } else {
576
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
577
                DCHECK(false);
578
            }
579
4.85k
        }
580
239k
    }
581
582
239k
    if (must_set_shared_state() && _shared_state == nullptr) {
583
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
584
0
    }
585
586
239k
    _rows_returned_counter =
587
239k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
588
239k
    _blocks_returned_counter =
589
239k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
590
239k
    _output_block_bytes_counter =
591
239k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
592
239k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
593
239k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
594
239k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
595
239k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
239k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
597
239k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
598
239k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
599
239k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
600
239k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
601
239k
    _memory_used_counter =
602
239k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
603
239k
    _common_profile->add_info_string("IsColocate",
604
239k
                                     std::to_string(_parent->is_colocated_operator()));
605
239k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
606
239k
    _common_profile->add_info_string("FollowedByShuffledOperator",
607
239k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
608
239k
    return Status::OK();
609
239k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
544
23
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
545
23
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
546
23
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
547
23
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
548
23
    _operator_profile->set_metadata(_parent->node_id());
549
    // indent is false so that source operator will have same
550
    // indentation_level with its parent operator.
551
23
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
552
23
    _operator_profile->add_child(_common_profile.get(), true);
553
23
    _operator_profile->add_child(_custom_profile.get(), true);
554
23
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
555
23
    if constexpr (!is_fake_shared) {
556
23
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
557
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
558
0
                                    .first.get()
559
0
                                    ->template cast<SharedStateArg>();
560
561
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
562
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
23
        } else if (info.shared_state) {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
            // For UnionSourceOperator without children, there is no shared state.
569
23
            _shared_state = info.shared_state->template cast<SharedStateArg>();
570
571
23
            _dependency = _shared_state->create_source_dependency(
572
23
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
573
23
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
574
23
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
575
23
        } else {
576
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
577
                DCHECK(false);
578
            }
579
0
        }
580
23
    }
581
582
23
    if (must_set_shared_state() && _shared_state == nullptr) {
583
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
584
0
    }
585
586
23
    _rows_returned_counter =
587
23
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
588
23
    _blocks_returned_counter =
589
23
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
590
23
    _output_block_bytes_counter =
591
23
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
592
23
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
593
23
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
594
23
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
595
23
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
23
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
597
23
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
598
23
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
599
23
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
600
23
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
601
23
    _memory_used_counter =
602
23
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
603
23
    _common_profile->add_info_string("IsColocate",
604
23
                                     std::to_string(_parent->is_colocated_operator()));
605
23
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
606
23
    _common_profile->add_info_string("FollowedByShuffledOperator",
607
23
                                     std::to_string(_parent->followed_by_shuffled_operator()));
608
23
    return Status::OK();
609
23
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
544
8.22k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
545
8.22k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
546
8.22k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
547
8.22k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
548
8.22k
    _operator_profile->set_metadata(_parent->node_id());
549
    // indent is false so that source operator will have same
550
    // indentation_level with its parent operator.
551
8.22k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
552
8.22k
    _operator_profile->add_child(_common_profile.get(), true);
553
8.22k
    _operator_profile->add_child(_custom_profile.get(), true);
554
8.22k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
555
8.22k
    if constexpr (!is_fake_shared) {
556
8.22k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
557
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
558
0
                                    .first.get()
559
0
                                    ->template cast<SharedStateArg>();
560
561
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
562
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
8.22k
        } else if (info.shared_state) {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
            // For UnionSourceOperator without children, there is no shared state.
569
8.18k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
570
571
8.18k
            _dependency = _shared_state->create_source_dependency(
572
8.18k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
573
8.18k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
574
8.18k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
575
8.18k
        } else {
576
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
577
                DCHECK(false);
578
            }
579
41
        }
580
8.22k
    }
581
582
8.22k
    if (must_set_shared_state() && _shared_state == nullptr) {
583
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
584
0
    }
585
586
8.22k
    _rows_returned_counter =
587
8.22k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
588
8.22k
    _blocks_returned_counter =
589
8.22k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
590
8.22k
    _output_block_bytes_counter =
591
8.22k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
592
8.22k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
593
8.22k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
594
8.22k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
595
8.22k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
8.22k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
597
8.22k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
598
8.22k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
599
8.22k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
600
8.22k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
601
8.22k
    _memory_used_counter =
602
8.22k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
603
8.22k
    _common_profile->add_info_string("IsColocate",
604
8.22k
                                     std::to_string(_parent->is_colocated_operator()));
605
8.22k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
606
8.22k
    _common_profile->add_info_string("FollowedByShuffledOperator",
607
8.22k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
608
8.22k
    return Status::OK();
609
8.22k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
544
7.97k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
545
7.97k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
546
7.97k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
547
7.97k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
548
7.97k
    _operator_profile->set_metadata(_parent->node_id());
549
    // indent is false so that source operator will have same
550
    // indentation_level with its parent operator.
551
7.97k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
552
7.97k
    _operator_profile->add_child(_common_profile.get(), true);
553
7.97k
    _operator_profile->add_child(_custom_profile.get(), true);
554
7.97k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
555
7.97k
    if constexpr (!is_fake_shared) {
556
7.97k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
557
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
558
0
                                    .first.get()
559
0
                                    ->template cast<SharedStateArg>();
560
561
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
562
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
7.97k
        } else if (info.shared_state) {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
            // For UnionSourceOperator without children, there is no shared state.
569
7.84k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
570
571
7.84k
            _dependency = _shared_state->create_source_dependency(
572
7.84k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
573
7.84k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
574
7.84k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
575
7.84k
        } else {
576
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
577
                DCHECK(false);
578
            }
579
125
        }
580
7.97k
    }
581
582
7.97k
    if (must_set_shared_state() && _shared_state == nullptr) {
583
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
584
0
    }
585
586
7.97k
    _rows_returned_counter =
587
7.97k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
588
7.97k
    _blocks_returned_counter =
589
7.97k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
590
7.97k
    _output_block_bytes_counter =
591
7.97k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
592
7.97k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
593
7.97k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
594
7.97k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
595
7.97k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
7.97k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
597
7.97k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
598
7.97k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
599
7.97k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
600
7.97k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
601
7.97k
    _memory_used_counter =
602
7.97k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
603
7.97k
    _common_profile->add_info_string("IsColocate",
604
7.97k
                                     std::to_string(_parent->is_colocated_operator()));
605
7.97k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
606
7.97k
    _common_profile->add_info_string("FollowedByShuffledOperator",
607
7.97k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
608
7.97k
    return Status::OK();
609
7.97k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
544
121k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
545
121k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
546
121k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
547
121k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
548
121k
    _operator_profile->set_metadata(_parent->node_id());
549
    // indent is false so that source operator will have same
550
    // indentation_level with its parent operator.
551
121k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
552
121k
    _operator_profile->add_child(_common_profile.get(), true);
553
121k
    _operator_profile->add_child(_custom_profile.get(), true);
554
121k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
555
121k
    if constexpr (!is_fake_shared) {
556
121k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
557
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
558
0
                                    .first.get()
559
0
                                    ->template cast<SharedStateArg>();
560
561
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
562
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
121k
        } else if (info.shared_state) {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
            // For UnionSourceOperator without children, there is no shared state.
569
120k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
570
571
120k
            _dependency = _shared_state->create_source_dependency(
572
120k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
573
120k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
574
120k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
575
120k
        } else {
576
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
577
                DCHECK(false);
578
            }
579
1.39k
        }
580
121k
    }
581
582
121k
    if (must_set_shared_state() && _shared_state == nullptr) {
583
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
584
0
    }
585
586
121k
    _rows_returned_counter =
587
121k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
588
121k
    _blocks_returned_counter =
589
121k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
590
121k
    _output_block_bytes_counter =
591
121k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
592
121k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
593
121k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
594
121k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
595
121k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
121k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
597
121k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
598
121k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
599
121k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
600
121k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
601
121k
    _memory_used_counter =
602
121k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
603
121k
    _common_profile->add_info_string("IsColocate",
604
121k
                                     std::to_string(_parent->is_colocated_operator()));
605
121k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
606
121k
    _common_profile->add_info_string("FollowedByShuffledOperator",
607
121k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
608
121k
    return Status::OK();
609
121k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
544
298
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
545
298
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
546
298
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
547
298
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
548
298
    _operator_profile->set_metadata(_parent->node_id());
549
    // indent is false so that source operator will have same
550
    // indentation_level with its parent operator.
551
298
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
552
298
    _operator_profile->add_child(_common_profile.get(), true);
553
298
    _operator_profile->add_child(_custom_profile.get(), true);
554
298
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
555
298
    if constexpr (!is_fake_shared) {
556
299
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
557
299
            _shared_state = info.shared_state_map.at(_parent->operator_id())
558
299
                                    .first.get()
559
299
                                    ->template cast<SharedStateArg>();
560
561
299
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
562
299
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
299
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
18.4E
        } else if (info.shared_state) {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
            // For UnionSourceOperator without children, there is no shared state.
569
0
            _shared_state = info.shared_state->template cast<SharedStateArg>();
570
571
0
            _dependency = _shared_state->create_source_dependency(
572
0
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
573
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
574
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
575
18.4E
        } else {
576
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
577
                DCHECK(false);
578
            }
579
18.4E
        }
580
298
    }
581
582
298
    if (must_set_shared_state() && _shared_state == nullptr) {
583
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
584
0
    }
585
586
298
    _rows_returned_counter =
587
298
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
588
298
    _blocks_returned_counter =
589
298
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
590
298
    _output_block_bytes_counter =
591
298
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
592
298
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
593
298
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
594
298
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
595
298
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
298
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
597
298
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
598
298
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
599
298
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
600
298
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
601
298
    _memory_used_counter =
602
298
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
603
298
    _common_profile->add_info_string("IsColocate",
604
298
                                     std::to_string(_parent->is_colocated_operator()));
605
298
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
606
298
    _common_profile->add_info_string("FollowedByShuffledOperator",
607
298
                                     std::to_string(_parent->followed_by_shuffled_operator()));
608
298
    return Status::OK();
609
298
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
544
260
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
545
260
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
546
260
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
547
260
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
548
260
    _operator_profile->set_metadata(_parent->node_id());
549
    // indent is false so that source operator will have same
550
    // indentation_level with its parent operator.
551
260
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
552
260
    _operator_profile->add_child(_common_profile.get(), true);
553
260
    _operator_profile->add_child(_custom_profile.get(), true);
554
260
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
555
260
    if constexpr (!is_fake_shared) {
556
260
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
557
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
558
0
                                    .first.get()
559
0
                                    ->template cast<SharedStateArg>();
560
561
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
562
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
260
        } else if (info.shared_state) {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
            // For UnionSourceOperator without children, there is no shared state.
569
260
            _shared_state = info.shared_state->template cast<SharedStateArg>();
570
571
260
            _dependency = _shared_state->create_source_dependency(
572
260
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
573
260
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
574
260
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
575
260
        } else {
576
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
577
                DCHECK(false);
578
            }
579
0
        }
580
260
    }
581
582
260
    if (must_set_shared_state() && _shared_state == nullptr) {
583
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
584
0
    }
585
586
260
    _rows_returned_counter =
587
260
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
588
260
    _blocks_returned_counter =
589
260
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
590
260
    _output_block_bytes_counter =
591
260
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
592
260
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
593
260
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
594
260
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
595
260
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
260
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
597
260
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
598
260
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
599
260
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
600
260
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
601
260
    _memory_used_counter =
602
260
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
603
260
    _common_profile->add_info_string("IsColocate",
604
260
                                     std::to_string(_parent->is_colocated_operator()));
605
260
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
606
260
    _common_profile->add_info_string("FollowedByShuffledOperator",
607
260
                                     std::to_string(_parent->followed_by_shuffled_operator()));
608
260
    return Status::OK();
609
260
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
544
1.04M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
545
1.04M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
546
1.04M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
547
1.04M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
548
1.04M
    _operator_profile->set_metadata(_parent->node_id());
549
    // indent is false so that source operator will have same
550
    // indentation_level with its parent operator.
551
1.04M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
552
1.04M
    _operator_profile->add_child(_common_profile.get(), true);
553
1.04M
    _operator_profile->add_child(_custom_profile.get(), true);
554
1.04M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
555
    if constexpr (!is_fake_shared) {
556
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
557
            _shared_state = info.shared_state_map.at(_parent->operator_id())
558
                                    .first.get()
559
                                    ->template cast<SharedStateArg>();
560
561
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
562
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
        } else if (info.shared_state) {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
            // For UnionSourceOperator without children, there is no shared state.
569
            _shared_state = info.shared_state->template cast<SharedStateArg>();
570
571
            _dependency = _shared_state->create_source_dependency(
572
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
573
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
574
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
575
        } else {
576
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
577
                DCHECK(false);
578
            }
579
        }
580
    }
581
582
1.04M
    if (must_set_shared_state() && _shared_state == nullptr) {
583
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
584
0
    }
585
586
1.04M
    _rows_returned_counter =
587
1.04M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
588
1.04M
    _blocks_returned_counter =
589
1.04M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
590
1.04M
    _output_block_bytes_counter =
591
1.04M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
592
1.04M
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
593
1.04M
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
594
1.04M
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
595
1.04M
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
1.04M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
597
1.04M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
598
1.04M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
599
1.04M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
600
1.04M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
601
1.04M
    _memory_used_counter =
602
1.04M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
603
1.04M
    _common_profile->add_info_string("IsColocate",
604
1.04M
                                     std::to_string(_parent->is_colocated_operator()));
605
1.04M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
606
1.04M
    _common_profile->add_info_string("FollowedByShuffledOperator",
607
1.04M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
608
1.04M
    return Status::OK();
609
1.04M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
544
53.6k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
545
53.6k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
546
53.6k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
547
53.6k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
548
53.6k
    _operator_profile->set_metadata(_parent->node_id());
549
    // indent is false so that source operator will have same
550
    // indentation_level with its parent operator.
551
53.6k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
552
53.6k
    _operator_profile->add_child(_common_profile.get(), true);
553
53.6k
    _operator_profile->add_child(_custom_profile.get(), true);
554
53.6k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
555
53.6k
    if constexpr (!is_fake_shared) {
556
53.6k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
557
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
558
0
                                    .first.get()
559
0
                                    ->template cast<SharedStateArg>();
560
561
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
562
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
53.6k
        } else if (info.shared_state) {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
            // For UnionSourceOperator without children, there is no shared state.
569
2.43k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
570
571
2.43k
            _dependency = _shared_state->create_source_dependency(
572
2.43k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
573
2.43k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
574
2.43k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
575
51.1k
        } else {
576
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
577
                DCHECK(false);
578
            }
579
51.1k
        }
580
53.6k
    }
581
582
53.6k
    if (must_set_shared_state() && _shared_state == nullptr) {
583
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
584
0
    }
585
586
53.6k
    _rows_returned_counter =
587
53.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
588
53.6k
    _blocks_returned_counter =
589
53.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
590
53.6k
    _output_block_bytes_counter =
591
53.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
592
53.6k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
593
53.6k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
594
53.6k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
595
53.6k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
53.6k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
597
53.6k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
598
53.6k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
599
53.6k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
600
53.6k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
601
53.6k
    _memory_used_counter =
602
53.6k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
603
53.6k
    _common_profile->add_info_string("IsColocate",
604
53.6k
                                     std::to_string(_parent->is_colocated_operator()));
605
53.6k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
606
53.6k
    _common_profile->add_info_string("FollowedByShuffledOperator",
607
53.6k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
608
53.6k
    return Status::OK();
609
53.6k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
544
26
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
545
26
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
546
26
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
547
26
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
548
26
    _operator_profile->set_metadata(_parent->node_id());
549
    // indent is false so that source operator will have same
550
    // indentation_level with its parent operator.
551
26
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
552
26
    _operator_profile->add_child(_common_profile.get(), true);
553
26
    _operator_profile->add_child(_custom_profile.get(), true);
554
26
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
555
26
    if constexpr (!is_fake_shared) {
556
26
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
557
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
558
0
                                    .first.get()
559
0
                                    ->template cast<SharedStateArg>();
560
561
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
562
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
26
        } else if (info.shared_state) {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
            // For UnionSourceOperator without children, there is no shared state.
569
26
            _shared_state = info.shared_state->template cast<SharedStateArg>();
570
571
26
            _dependency = _shared_state->create_source_dependency(
572
26
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
573
26
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
574
26
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
575
26
        } else {
576
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
577
                DCHECK(false);
578
            }
579
0
        }
580
26
    }
581
582
26
    if (must_set_shared_state() && _shared_state == nullptr) {
583
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
584
0
    }
585
586
26
    _rows_returned_counter =
587
26
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
588
26
    _blocks_returned_counter =
589
26
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
590
26
    _output_block_bytes_counter =
591
26
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
592
26
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
593
26
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
594
26
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
595
26
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
26
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
597
26
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
598
26
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
599
26
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
600
26
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
601
26
    _memory_used_counter =
602
26
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
603
26
    _common_profile->add_info_string("IsColocate",
604
26
                                     std::to_string(_parent->is_colocated_operator()));
605
26
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
606
26
    _common_profile->add_info_string("FollowedByShuffledOperator",
607
26
                                     std::to_string(_parent->followed_by_shuffled_operator()));
608
26
    return Status::OK();
609
26
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
544
8.09k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
545
8.09k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
546
8.09k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
547
8.09k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
548
8.09k
    _operator_profile->set_metadata(_parent->node_id());
549
    // indent is false so that source operator will have same
550
    // indentation_level with its parent operator.
551
8.09k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
552
8.09k
    _operator_profile->add_child(_common_profile.get(), true);
553
8.09k
    _operator_profile->add_child(_custom_profile.get(), true);
554
8.09k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
555
8.09k
    if constexpr (!is_fake_shared) {
556
8.09k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
557
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
558
0
                                    .first.get()
559
0
                                    ->template cast<SharedStateArg>();
560
561
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
562
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
8.09k
        } else if (info.shared_state) {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
            // For UnionSourceOperator without children, there is no shared state.
569
8.05k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
570
571
8.05k
            _dependency = _shared_state->create_source_dependency(
572
8.05k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
573
8.05k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
574
8.05k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
575
8.05k
        } else {
576
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
577
                DCHECK(false);
578
            }
579
42
        }
580
8.09k
    }
581
582
8.09k
    if (must_set_shared_state() && _shared_state == nullptr) {
583
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
584
0
    }
585
586
8.09k
    _rows_returned_counter =
587
8.09k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
588
8.09k
    _blocks_returned_counter =
589
8.09k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
590
8.09k
    _output_block_bytes_counter =
591
8.09k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
592
8.09k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
593
8.09k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
594
8.09k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
595
8.09k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
8.09k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
597
8.09k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
598
8.09k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
599
8.09k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
600
8.09k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
601
8.09k
    _memory_used_counter =
602
8.09k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
603
8.09k
    _common_profile->add_info_string("IsColocate",
604
8.09k
                                     std::to_string(_parent->is_colocated_operator()));
605
8.09k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
606
8.09k
    _common_profile->add_info_string("FollowedByShuffledOperator",
607
8.09k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
608
8.09k
    return Status::OK();
609
8.09k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
544
436
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
545
436
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
546
436
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
547
436
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
548
436
    _operator_profile->set_metadata(_parent->node_id());
549
    // indent is false so that source operator will have same
550
    // indentation_level with its parent operator.
551
436
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
552
436
    _operator_profile->add_child(_common_profile.get(), true);
553
436
    _operator_profile->add_child(_custom_profile.get(), true);
554
436
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
555
436
    if constexpr (!is_fake_shared) {
556
436
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
557
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
558
0
                                    .first.get()
559
0
                                    ->template cast<SharedStateArg>();
560
561
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
562
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
436
        } else if (info.shared_state) {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
            // For UnionSourceOperator without children, there is no shared state.
569
432
            _shared_state = info.shared_state->template cast<SharedStateArg>();
570
571
432
            _dependency = _shared_state->create_source_dependency(
572
432
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
573
432
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
574
432
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
575
432
        } else {
576
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
577
                DCHECK(false);
578
            }
579
4
        }
580
436
    }
581
582
436
    if (must_set_shared_state() && _shared_state == nullptr) {
583
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
584
0
    }
585
586
436
    _rows_returned_counter =
587
436
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
588
436
    _blocks_returned_counter =
589
436
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
590
436
    _output_block_bytes_counter =
591
436
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
592
436
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
593
436
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
594
436
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
595
436
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
436
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
597
436
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
598
436
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
599
436
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
600
436
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
601
436
    _memory_used_counter =
602
436
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
603
436
    _common_profile->add_info_string("IsColocate",
604
436
                                     std::to_string(_parent->is_colocated_operator()));
605
436
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
606
436
    _common_profile->add_info_string("FollowedByShuffledOperator",
607
436
                                     std::to_string(_parent->followed_by_shuffled_operator()));
608
436
    return Status::OK();
609
436
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
544
5.15k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
545
5.15k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
546
5.15k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
547
5.15k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
548
5.15k
    _operator_profile->set_metadata(_parent->node_id());
549
    // indent is false so that source operator will have same
550
    // indentation_level with its parent operator.
551
5.15k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
552
5.15k
    _operator_profile->add_child(_common_profile.get(), true);
553
5.15k
    _operator_profile->add_child(_custom_profile.get(), true);
554
5.15k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
555
5.15k
    if constexpr (!is_fake_shared) {
556
5.15k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
557
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
558
0
                                    .first.get()
559
0
                                    ->template cast<SharedStateArg>();
560
561
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
562
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
5.15k
        } else if (info.shared_state) {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
            // For UnionSourceOperator without children, there is no shared state.
569
5.10k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
570
571
5.10k
            _dependency = _shared_state->create_source_dependency(
572
5.10k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
573
5.10k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
574
5.10k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
575
5.10k
        } else {
576
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
577
                DCHECK(false);
578
            }
579
55
        }
580
5.15k
    }
581
582
5.15k
    if (must_set_shared_state() && _shared_state == nullptr) {
583
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
584
0
    }
585
586
5.15k
    _rows_returned_counter =
587
5.15k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
588
5.15k
    _blocks_returned_counter =
589
5.15k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
590
5.15k
    _output_block_bytes_counter =
591
5.15k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
592
5.15k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
593
5.15k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
594
5.15k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
595
5.15k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
5.15k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
597
5.15k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
598
5.15k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
599
5.15k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
600
5.15k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
601
5.15k
    _memory_used_counter =
602
5.15k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
603
5.15k
    _common_profile->add_info_string("IsColocate",
604
5.15k
                                     std::to_string(_parent->is_colocated_operator()));
605
5.15k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
606
5.15k
    _common_profile->add_info_string("FollowedByShuffledOperator",
607
5.15k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
608
5.15k
    return Status::OK();
609
5.15k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
544
701k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
545
701k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
546
701k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
547
701k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
548
701k
    _operator_profile->set_metadata(_parent->node_id());
549
    // indent is false so that source operator will have same
550
    // indentation_level with its parent operator.
551
701k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
552
701k
    _operator_profile->add_child(_common_profile.get(), true);
553
701k
    _operator_profile->add_child(_custom_profile.get(), true);
554
701k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
555
701k
    if constexpr (!is_fake_shared) {
556
701k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
557
695k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
558
695k
                                    .first.get()
559
695k
                                    ->template cast<SharedStateArg>();
560
561
695k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
562
695k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
695k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
695k
        } else if (info.shared_state) {
565
0
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
0
                DCHECK(false);
567
0
            }
568
            // For UnionSourceOperator without children, there is no shared state.
569
0
            _shared_state = info.shared_state->template cast<SharedStateArg>();
570
571
0
            _dependency = _shared_state->create_source_dependency(
572
0
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
573
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
574
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
575
5.75k
        } else {
576
5.75k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
577
5.75k
                DCHECK(false);
578
5.75k
            }
579
5.75k
        }
580
701k
    }
581
582
701k
    if (must_set_shared_state() && _shared_state == nullptr) {
583
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
584
0
    }
585
586
701k
    _rows_returned_counter =
587
701k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
588
701k
    _blocks_returned_counter =
589
701k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
590
701k
    _output_block_bytes_counter =
591
701k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
592
701k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
593
701k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
594
701k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
595
701k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
701k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
597
701k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
598
701k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
599
701k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
600
701k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
601
701k
    _memory_used_counter =
602
701k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
603
701k
    _common_profile->add_info_string("IsColocate",
604
701k
                                     std::to_string(_parent->is_colocated_operator()));
605
701k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
606
701k
    _common_profile->add_info_string("FollowedByShuffledOperator",
607
701k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
608
701k
    return Status::OK();
609
701k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
544
164
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
545
164
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
546
164
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
547
164
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
548
164
    _operator_profile->set_metadata(_parent->node_id());
549
    // indent is false so that source operator will have same
550
    // indentation_level with its parent operator.
551
164
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
552
164
    _operator_profile->add_child(_common_profile.get(), true);
553
164
    _operator_profile->add_child(_custom_profile.get(), true);
554
164
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
555
164
    if constexpr (!is_fake_shared) {
556
164
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
557
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
558
0
                                    .first.get()
559
0
                                    ->template cast<SharedStateArg>();
560
561
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
562
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
164
        } else if (info.shared_state) {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
            // For UnionSourceOperator without children, there is no shared state.
569
164
            _shared_state = info.shared_state->template cast<SharedStateArg>();
570
571
164
            _dependency = _shared_state->create_source_dependency(
572
164
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
573
164
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
574
164
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
575
164
        } else {
576
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
577
                DCHECK(false);
578
            }
579
0
        }
580
164
    }
581
582
164
    if (must_set_shared_state() && _shared_state == nullptr) {
583
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
584
0
    }
585
586
164
    _rows_returned_counter =
587
164
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
588
164
    _blocks_returned_counter =
589
164
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
590
164
    _output_block_bytes_counter =
591
164
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
592
164
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
593
164
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
594
164
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
595
164
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
164
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
597
164
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
598
164
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
599
164
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
600
164
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
601
164
    _memory_used_counter =
602
164
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
603
164
    _common_profile->add_info_string("IsColocate",
604
164
                                     std::to_string(_parent->is_colocated_operator()));
605
164
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
606
164
    _common_profile->add_info_string("FollowedByShuffledOperator",
607
164
                                     std::to_string(_parent->followed_by_shuffled_operator()));
608
164
    return Status::OK();
609
164
}
610
611
template <typename SharedStateArg>
612
2.27M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
613
2.27M
    _conjuncts.resize(_parent->_conjuncts.size());
614
2.27M
    _projections.resize(_parent->_projections.size());
615
2.68M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
616
410k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
617
410k
    }
618
4.57M
    for (size_t i = 0; i < _projections.size(); i++) {
619
2.30M
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
620
2.30M
    }
621
2.27M
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
622
2.28M
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
623
9.40k
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
624
70.6k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
625
61.2k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
626
61.2k
                    state, _intermediate_projections[i][j]));
627
61.2k
        }
628
9.40k
    }
629
2.27M
    return Status::OK();
630
2.27M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
612
68.8k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
613
68.8k
    _conjuncts.resize(_parent->_conjuncts.size());
614
68.8k
    _projections.resize(_parent->_projections.size());
615
69.7k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
616
831
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
617
831
    }
618
346k
    for (size_t i = 0; i < _projections.size(); i++) {
619
277k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
620
277k
    }
621
68.8k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
622
71.1k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
623
2.25k
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
624
27.1k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
625
24.9k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
626
24.9k
                    state, _intermediate_projections[i][j]));
627
24.9k
        }
628
2.25k
    }
629
68.8k
    return Status::OK();
630
68.8k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
612
3
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
613
3
    _conjuncts.resize(_parent->_conjuncts.size());
614
3
    _projections.resize(_parent->_projections.size());
615
3
    for (size_t i = 0; i < _conjuncts.size(); i++) {
616
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
617
0
    }
618
3
    for (size_t i = 0; i < _projections.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
620
0
    }
621
3
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
622
3
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
623
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
624
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
625
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
626
0
                    state, _intermediate_projections[i][j]));
627
0
        }
628
0
    }
629
3
    return Status::OK();
630
3
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
612
240k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
613
240k
    _conjuncts.resize(_parent->_conjuncts.size());
614
240k
    _projections.resize(_parent->_projections.size());
615
240k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
616
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
617
0
    }
618
240k
    for (size_t i = 0; i < _projections.size(); i++) {
619
329
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
620
329
    }
621
240k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
622
240k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
623
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
624
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
625
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
626
0
                    state, _intermediate_projections[i][j]));
627
0
        }
628
0
    }
629
240k
    return Status::OK();
630
240k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
612
23
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
613
23
    _conjuncts.resize(_parent->_conjuncts.size());
614
23
    _projections.resize(_parent->_projections.size());
615
23
    for (size_t i = 0; i < _conjuncts.size(); i++) {
616
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
617
0
    }
618
23
    for (size_t i = 0; i < _projections.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
620
0
    }
621
23
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
622
23
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
623
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
624
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
625
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
626
0
                    state, _intermediate_projections[i][j]));
627
0
        }
628
0
    }
629
23
    return Status::OK();
630
23
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
612
8.23k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
613
8.23k
    _conjuncts.resize(_parent->_conjuncts.size());
614
8.23k
    _projections.resize(_parent->_projections.size());
615
8.31k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
616
77
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
617
77
    }
618
48.2k
    for (size_t i = 0; i < _projections.size(); i++) {
619
40.0k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
620
40.0k
    }
621
8.23k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
622
8.33k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
623
98
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
624
731
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
625
633
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
626
633
                    state, _intermediate_projections[i][j]));
627
633
        }
628
98
    }
629
8.23k
    return Status::OK();
630
8.23k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
612
7.97k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
613
7.97k
    _conjuncts.resize(_parent->_conjuncts.size());
614
7.97k
    _projections.resize(_parent->_projections.size());
615
8.80k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
616
825
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
617
825
    }
618
22.1k
    for (size_t i = 0; i < _projections.size(); i++) {
619
14.1k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
620
14.1k
    }
621
7.97k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
622
8.06k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
623
85
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
624
642
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
625
557
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
626
557
                    state, _intermediate_projections[i][j]));
627
557
        }
628
85
    }
629
7.97k
    return Status::OK();
630
7.97k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
612
121k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
613
121k
    _conjuncts.resize(_parent->_conjuncts.size());
614
121k
    _projections.resize(_parent->_projections.size());
615
125k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
616
3.48k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
617
3.48k
    }
618
361k
    for (size_t i = 0; i < _projections.size(); i++) {
619
240k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
620
240k
    }
621
121k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
622
121k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
623
187
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
624
1.25k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
625
1.06k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
626
1.06k
                    state, _intermediate_projections[i][j]));
627
1.06k
        }
628
187
    }
629
121k
    return Status::OK();
630
121k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
612
299
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
613
299
    _conjuncts.resize(_parent->_conjuncts.size());
614
299
    _projections.resize(_parent->_projections.size());
615
306
    for (size_t i = 0; i < _conjuncts.size(); i++) {
616
7
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
617
7
    }
618
1.53k
    for (size_t i = 0; i < _projections.size(); i++) {
619
1.23k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
620
1.23k
    }
621
299
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
622
299
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
623
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
624
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
625
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
626
0
                    state, _intermediate_projections[i][j]));
627
0
        }
628
0
    }
629
299
    return Status::OK();
630
299
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
612
264
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
613
264
    _conjuncts.resize(_parent->_conjuncts.size());
614
264
    _projections.resize(_parent->_projections.size());
615
264
    for (size_t i = 0; i < _conjuncts.size(); i++) {
616
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
617
0
    }
618
760
    for (size_t i = 0; i < _projections.size(); i++) {
619
496
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
620
496
    }
621
264
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
622
264
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
623
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
624
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
625
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
626
0
                    state, _intermediate_projections[i][j]));
627
0
        }
628
0
    }
629
264
    return Status::OK();
630
264
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
612
1.05M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
613
1.05M
    _conjuncts.resize(_parent->_conjuncts.size());
614
1.05M
    _projections.resize(_parent->_projections.size());
615
1.45M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
616
402k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
617
402k
    }
618
2.69M
    for (size_t i = 0; i < _projections.size(); i++) {
619
1.63M
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
620
1.63M
    }
621
1.05M
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
622
1.06M
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
623
6.77k
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
624
40.8k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
625
34.0k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
626
34.0k
                    state, _intermediate_projections[i][j]));
627
34.0k
        }
628
6.77k
    }
629
1.05M
    return Status::OK();
630
1.05M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
612
53.8k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
613
53.8k
    _conjuncts.resize(_parent->_conjuncts.size());
614
53.8k
    _projections.resize(_parent->_projections.size());
615
53.8k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
616
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
617
0
    }
618
144k
    for (size_t i = 0; i < _projections.size(); i++) {
619
91.1k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
620
91.1k
    }
621
53.8k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
622
53.8k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
623
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
624
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
625
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
626
0
                    state, _intermediate_projections[i][j]));
627
0
        }
628
0
    }
629
53.8k
    return Status::OK();
630
53.8k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
612
25
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
613
25
    _conjuncts.resize(_parent->_conjuncts.size());
614
25
    _projections.resize(_parent->_projections.size());
615
25
    for (size_t i = 0; i < _conjuncts.size(); i++) {
616
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
617
0
    }
618
25
    for (size_t i = 0; i < _projections.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
620
0
    }
621
25
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
622
25
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
623
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
624
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
625
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
626
0
                    state, _intermediate_projections[i][j]));
627
0
        }
628
0
    }
629
25
    return Status::OK();
630
25
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
612
8.07k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
613
8.07k
    _conjuncts.resize(_parent->_conjuncts.size());
614
8.07k
    _projections.resize(_parent->_projections.size());
615
10.4k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
616
2.41k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
617
2.41k
    }
618
8.07k
    for (size_t i = 0; i < _projections.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
620
0
    }
621
8.07k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
622
8.07k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
623
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
624
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
625
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
626
0
                    state, _intermediate_projections[i][j]));
627
0
        }
628
0
    }
629
8.07k
    return Status::OK();
630
8.07k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
612
438
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
613
438
    _conjuncts.resize(_parent->_conjuncts.size());
614
438
    _projections.resize(_parent->_projections.size());
615
438
    for (size_t i = 0; i < _conjuncts.size(); i++) {
616
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
617
0
    }
618
438
    for (size_t i = 0; i < _projections.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
620
0
    }
621
438
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
622
438
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
623
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
624
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
625
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
626
0
                    state, _intermediate_projections[i][j]));
627
0
        }
628
0
    }
629
438
    return Status::OK();
630
438
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
612
5.16k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
613
5.16k
    _conjuncts.resize(_parent->_conjuncts.size());
614
5.16k
    _projections.resize(_parent->_projections.size());
615
5.16k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
616
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
617
0
    }
618
5.33k
    for (size_t i = 0; i < _projections.size(); i++) {
619
167
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
620
167
    }
621
5.16k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
622
5.16k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
623
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
624
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
625
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
626
0
                    state, _intermediate_projections[i][j]));
627
0
        }
628
0
    }
629
5.16k
    return Status::OK();
630
5.16k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
612
706k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
613
706k
    _conjuncts.resize(_parent->_conjuncts.size());
614
706k
    _projections.resize(_parent->_projections.size());
615
706k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
616
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
617
0
    }
618
706k
    for (size_t i = 0; i < _projections.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
620
0
    }
621
706k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
622
706k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
623
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
624
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
625
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
626
0
                    state, _intermediate_projections[i][j]));
627
0
        }
628
0
    }
629
706k
    return Status::OK();
630
706k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4openEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
612
164
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
613
164
    _conjuncts.resize(_parent->_conjuncts.size());
614
164
    _projections.resize(_parent->_projections.size());
615
171
    for (size_t i = 0; i < _conjuncts.size(); i++) {
616
7
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
617
7
    }
618
483
    for (size_t i = 0; i < _projections.size(); i++) {
619
319
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
620
319
    }
621
164
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
622
167
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
623
3
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
624
11
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
625
8
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
626
8
                    state, _intermediate_projections[i][j]));
627
8
        }
628
3
    }
629
164
    return Status::OK();
630
164
}
631
632
template <typename SharedStateArg>
633
5.85k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
634
5.85k
    if (_terminated) {
635
0
        return Status::OK();
636
0
    }
637
5.85k
    _terminated = true;
638
5.85k
    return Status::OK();
639
5.85k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
633
303
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
634
303
    if (_terminated) {
635
0
        return Status::OK();
636
0
    }
637
303
    _terminated = true;
638
303
    return Status::OK();
639
303
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
633
38
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
634
38
    if (_terminated) {
635
0
        return Status::OK();
636
0
    }
637
38
    _terminated = true;
638
38
    return Status::OK();
639
38
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
633
44
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
634
44
    if (_terminated) {
635
0
        return Status::OK();
636
0
    }
637
44
    _terminated = true;
638
44
    return Status::OK();
639
44
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
633
78
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
634
78
    if (_terminated) {
635
0
        return Status::OK();
636
0
    }
637
78
    _terminated = true;
638
78
    return Status::OK();
639
78
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
633
4.83k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
634
4.83k
    if (_terminated) {
635
0
        return Status::OK();
636
0
    }
637
4.83k
    _terminated = true;
638
4.83k
    return Status::OK();
639
4.83k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
633
1
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
634
1
    if (_terminated) {
635
0
        return Status::OK();
636
0
    }
637
1
    _terminated = true;
638
1
    return Status::OK();
639
1
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
633
2
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
634
2
    if (_terminated) {
635
0
        return Status::OK();
636
0
    }
637
2
    _terminated = true;
638
2
    return Status::OK();
639
2
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
633
3
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
634
3
    if (_terminated) {
635
0
        return Status::OK();
636
0
    }
637
3
    _terminated = true;
638
3
    return Status::OK();
639
3
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
633
539
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
634
539
    if (_terminated) {
635
0
        return Status::OK();
636
0
    }
637
539
    _terminated = true;
638
539
    return Status::OK();
639
539
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
633
12
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
634
12
    if (_terminated) {
635
0
        return Status::OK();
636
0
    }
637
12
    _terminated = true;
638
12
    return Status::OK();
639
12
}
640
641
template <typename SharedStateArg>
642
2.54M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
643
2.54M
    if (_closed) {
644
269k
        return Status::OK();
645
269k
    }
646
2.27M
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
647
1.21M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
648
1.21M
    }
649
2.27M
    _closed = true;
650
2.27M
    return Status::OK();
651
2.54M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
642
68.7k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
643
68.7k
    if (_closed) {
644
0
        return Status::OK();
645
0
    }
646
68.7k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
647
68.7k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
648
68.7k
    }
649
68.7k
    _closed = true;
650
68.7k
    return Status::OK();
651
68.7k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
642
4
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
643
4
    if (_closed) {
644
0
        return Status::OK();
645
0
    }
646
4
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
647
4
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
648
4
    }
649
4
    _closed = true;
650
4
    return Status::OK();
651
4
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
642
475k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
643
475k
    if (_closed) {
644
238k
        return Status::OK();
645
238k
    }
646
237k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
647
237k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
648
237k
    }
649
237k
    _closed = true;
650
237k
    return Status::OK();
651
475k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
642
23
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
643
23
    if (_closed) {
644
0
        return Status::OK();
645
0
    }
646
23
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
647
23
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
648
23
    }
649
23
    _closed = true;
650
23
    return Status::OK();
651
23
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
642
8.23k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
643
8.23k
    if (_closed) {
644
0
        return Status::OK();
645
0
    }
646
8.23k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
647
8.23k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
648
8.23k
    }
649
8.23k
    _closed = true;
650
8.23k
    return Status::OK();
651
8.23k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
642
16.0k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
643
16.0k
    if (_closed) {
644
8.08k
        return Status::OK();
645
8.08k
    }
646
7.95k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
647
7.95k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
648
7.95k
    }
649
7.95k
    _closed = true;
650
7.95k
    return Status::OK();
651
16.0k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
642
121k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
643
121k
    if (_closed) {
644
0
        return Status::OK();
645
0
    }
646
121k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
647
121k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
648
121k
    }
649
121k
    _closed = true;
650
121k
    return Status::OK();
651
121k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
642
299
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
643
299
    if (_closed) {
644
0
        return Status::OK();
645
0
    }
646
299
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
647
299
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
648
299
    }
649
299
    _closed = true;
650
299
    return Status::OK();
651
299
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
642
259
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
643
259
    if (_closed) {
644
0
        return Status::OK();
645
0
    }
646
259
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
647
259
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
648
259
    }
649
259
    _closed = true;
650
259
    return Status::OK();
651
259
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
642
1.07M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
643
1.07M
    if (_closed) {
644
17.5k
        return Status::OK();
645
17.5k
    }
646
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
647
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
648
    }
649
1.05M
    _closed = true;
650
1.05M
    return Status::OK();
651
1.07M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
642
53.8k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
643
53.8k
    if (_closed) {
644
0
        return Status::OK();
645
0
    }
646
53.8k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
647
53.8k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
648
53.8k
    }
649
53.8k
    _closed = true;
650
53.8k
    return Status::OK();
651
53.8k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
642
28
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
643
28
    if (_closed) {
644
14
        return Status::OK();
645
14
    }
646
14
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
647
14
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
648
14
    }
649
14
    _closed = true;
650
14
    return Status::OK();
651
28
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
642
8.06k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
643
8.06k
    if (_closed) {
644
0
        return Status::OK();
645
0
    }
646
8.06k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
647
8.06k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
648
8.06k
    }
649
8.06k
    _closed = true;
650
8.06k
    return Status::OK();
651
8.06k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
642
671
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
643
671
    if (_closed) {
644
336
        return Status::OK();
645
336
    }
646
335
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
647
335
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
648
335
    }
649
335
    _closed = true;
650
335
    return Status::OK();
651
671
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
642
10.5k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
643
10.5k
    if (_closed) {
644
5.36k
        return Status::OK();
645
5.36k
    }
646
5.15k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
647
5.15k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
648
5.15k
    }
649
5.15k
    _closed = true;
650
5.15k
    return Status::OK();
651
10.5k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
642
707k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
643
707k
    if (_closed) {
644
0
        return Status::OK();
645
0
    }
646
707k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
647
707k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
648
707k
    }
649
707k
    _closed = true;
650
707k
    return Status::OK();
651
707k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
642
333
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
643
333
    if (_closed) {
644
178
        return Status::OK();
645
178
    }
646
155
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
647
155
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
648
155
    }
649
155
    _closed = true;
650
155
    return Status::OK();
651
333
}
652
653
template <typename SharedState>
654
1.85M
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
1.85M
    _operator_profile =
657
1.85M
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
1.85M
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
1.85M
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
660
661
    // indentation is true
662
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
663
    // So we should set the indentation to true.
664
1.85M
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
1.85M
    _operator_profile->add_child(_common_profile, true);
666
1.85M
    _operator_profile->add_child(_custom_profile, true);
667
668
1.85M
    _operator_profile->set_metadata(_parent->node_id());
669
1.85M
    _wait_for_finish_dependency_timer =
670
1.85M
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
1.85M
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
1.85M
    if constexpr (!is_fake_shared) {
673
1.24M
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
1.24M
            info.shared_state_map.end()) {
675
307k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
292k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
677
292k
            }
678
307k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
679
307k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
680
307k
                                                  ? 0
681
307k
                                                  : info.task_idx]
682
307k
                                  .get();
683
307k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
684
937k
        } else {
685
18.4E
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
18.4E
                DCHECK(false);
687
18.4E
            }
688
937k
            _shared_state = info.shared_state->template cast<SharedState>();
689
937k
            _dependency = _shared_state->create_sink_dependency(
690
937k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
937k
        }
692
1.24M
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
1.24M
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
1.24M
    }
695
696
1.85M
    if (must_set_shared_state() && _shared_state == nullptr) {
697
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
698
0
    }
699
700
1.85M
    _rows_input_counter =
701
1.85M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
1.85M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
1.85M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
1.85M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
1.85M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
1.85M
    _memory_used_counter =
707
1.85M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
1.85M
    _common_profile->add_info_string("IsColocate",
709
1.85M
                                     std::to_string(_parent->is_colocated_operator()));
710
1.85M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
1.85M
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
1.85M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
1.85M
    return Status::OK();
714
1.85M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
654
116k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
116k
    _operator_profile =
657
116k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
116k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
116k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
660
661
    // indentation is true
662
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
663
    // So we should set the indentation to true.
664
116k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
116k
    _operator_profile->add_child(_common_profile, true);
666
116k
    _operator_profile->add_child(_custom_profile, true);
667
668
116k
    _operator_profile->set_metadata(_parent->node_id());
669
116k
    _wait_for_finish_dependency_timer =
670
116k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
116k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
116k
    if constexpr (!is_fake_shared) {
673
116k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
116k
            info.shared_state_map.end()) {
675
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
677
            }
678
14.8k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
679
14.8k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
680
14.8k
                                                  ? 0
681
14.8k
                                                  : info.task_idx]
682
14.8k
                                  .get();
683
14.8k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
684
101k
        } else {
685
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
                DCHECK(false);
687
            }
688
101k
            _shared_state = info.shared_state->template cast<SharedState>();
689
101k
            _dependency = _shared_state->create_sink_dependency(
690
101k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
101k
        }
692
116k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
116k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
116k
    }
695
696
116k
    if (must_set_shared_state() && _shared_state == nullptr) {
697
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
698
0
    }
699
700
116k
    _rows_input_counter =
701
116k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
116k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
116k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
116k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
116k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
116k
    _memory_used_counter =
707
116k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
116k
    _common_profile->add_info_string("IsColocate",
709
116k
                                     std::to_string(_parent->is_colocated_operator()));
710
116k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
116k
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
116k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
116k
    return Status::OK();
714
116k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
654
2
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
2
    _operator_profile =
657
2
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
2
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
2
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
660
661
    // indentation is true
662
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
663
    // So we should set the indentation to true.
664
2
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
2
    _operator_profile->add_child(_common_profile, true);
666
2
    _operator_profile->add_child(_custom_profile, true);
667
668
2
    _operator_profile->set_metadata(_parent->node_id());
669
2
    _wait_for_finish_dependency_timer =
670
2
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
2
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
2
    if constexpr (!is_fake_shared) {
673
2
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
2
            info.shared_state_map.end()) {
675
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
677
            }
678
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
679
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
680
0
                                                  ? 0
681
0
                                                  : info.task_idx]
682
0
                                  .get();
683
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
684
2
        } else {
685
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
                DCHECK(false);
687
            }
688
2
            _shared_state = info.shared_state->template cast<SharedState>();
689
2
            _dependency = _shared_state->create_sink_dependency(
690
2
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
2
        }
692
2
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
2
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
2
    }
695
696
2
    if (must_set_shared_state() && _shared_state == nullptr) {
697
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
698
0
    }
699
700
2
    _rows_input_counter =
701
2
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
2
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
2
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
2
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
2
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
2
    _memory_used_counter =
707
2
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
2
    _common_profile->add_info_string("IsColocate",
709
2
                                     std::to_string(_parent->is_colocated_operator()));
710
2
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
2
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
2
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
2
    return Status::OK();
714
2
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
654
239k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
239k
    _operator_profile =
657
239k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
239k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
239k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
660
661
    // indentation is true
662
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
663
    // So we should set the indentation to true.
664
239k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
239k
    _operator_profile->add_child(_common_profile, true);
666
239k
    _operator_profile->add_child(_custom_profile, true);
667
668
239k
    _operator_profile->set_metadata(_parent->node_id());
669
239k
    _wait_for_finish_dependency_timer =
670
239k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
239k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
239k
    if constexpr (!is_fake_shared) {
673
239k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
239k
            info.shared_state_map.end()) {
675
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
677
            }
678
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
679
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
680
0
                                                  ? 0
681
0
                                                  : info.task_idx]
682
0
                                  .get();
683
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
684
239k
        } else {
685
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
                DCHECK(false);
687
            }
688
239k
            _shared_state = info.shared_state->template cast<SharedState>();
689
239k
            _dependency = _shared_state->create_sink_dependency(
690
239k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
239k
        }
692
239k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
239k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
239k
    }
695
696
239k
    if (must_set_shared_state() && _shared_state == nullptr) {
697
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
698
0
    }
699
700
239k
    _rows_input_counter =
701
239k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
239k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
239k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
239k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
239k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
239k
    _memory_used_counter =
707
239k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
239k
    _common_profile->add_info_string("IsColocate",
709
239k
                                     std::to_string(_parent->is_colocated_operator()));
710
239k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
239k
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
239k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
239k
    return Status::OK();
714
239k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
654
30
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
30
    _operator_profile =
657
30
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
30
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
30
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
660
661
    // indentation is true
662
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
663
    // So we should set the indentation to true.
664
30
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
30
    _operator_profile->add_child(_common_profile, true);
666
30
    _operator_profile->add_child(_custom_profile, true);
667
668
30
    _operator_profile->set_metadata(_parent->node_id());
669
30
    _wait_for_finish_dependency_timer =
670
30
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
30
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
30
    if constexpr (!is_fake_shared) {
673
30
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
30
            info.shared_state_map.end()) {
675
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
677
            }
678
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
679
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
680
0
                                                  ? 0
681
0
                                                  : info.task_idx]
682
0
                                  .get();
683
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
684
30
        } else {
685
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
                DCHECK(false);
687
            }
688
30
            _shared_state = info.shared_state->template cast<SharedState>();
689
30
            _dependency = _shared_state->create_sink_dependency(
690
30
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
30
        }
692
30
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
30
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
30
    }
695
696
30
    if (must_set_shared_state() && _shared_state == nullptr) {
697
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
698
0
    }
699
700
30
    _rows_input_counter =
701
30
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
30
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
30
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
30
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
30
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
30
    _memory_used_counter =
707
30
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
30
    _common_profile->add_info_string("IsColocate",
709
30
                                     std::to_string(_parent->is_colocated_operator()));
710
30
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
30
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
30
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
30
    return Status::OK();
714
30
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
654
8.22k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
8.22k
    _operator_profile =
657
8.22k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
8.22k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
8.22k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
660
661
    // indentation is true
662
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
663
    // So we should set the indentation to true.
664
8.22k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
8.22k
    _operator_profile->add_child(_common_profile, true);
666
8.22k
    _operator_profile->add_child(_custom_profile, true);
667
668
8.22k
    _operator_profile->set_metadata(_parent->node_id());
669
8.22k
    _wait_for_finish_dependency_timer =
670
8.22k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
8.22k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
8.22k
    if constexpr (!is_fake_shared) {
673
8.22k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
8.22k
            info.shared_state_map.end()) {
675
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
677
            }
678
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
679
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
680
0
                                                  ? 0
681
0
                                                  : info.task_idx]
682
0
                                  .get();
683
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
684
8.22k
        } else {
685
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
                DCHECK(false);
687
            }
688
8.22k
            _shared_state = info.shared_state->template cast<SharedState>();
689
8.22k
            _dependency = _shared_state->create_sink_dependency(
690
8.22k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
8.22k
        }
692
8.22k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
8.22k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
8.22k
    }
695
696
8.22k
    if (must_set_shared_state() && _shared_state == nullptr) {
697
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
698
0
    }
699
700
8.22k
    _rows_input_counter =
701
8.22k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
8.22k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
8.22k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
8.22k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
8.22k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
8.22k
    _memory_used_counter =
707
8.22k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
8.22k
    _common_profile->add_info_string("IsColocate",
709
8.22k
                                     std::to_string(_parent->is_colocated_operator()));
710
8.22k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
8.22k
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
8.22k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
8.22k
    return Status::OK();
714
8.22k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
654
7.95k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
7.95k
    _operator_profile =
657
7.95k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
7.95k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
7.95k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
660
661
    // indentation is true
662
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
663
    // So we should set the indentation to true.
664
7.95k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
7.95k
    _operator_profile->add_child(_common_profile, true);
666
7.95k
    _operator_profile->add_child(_custom_profile, true);
667
668
7.95k
    _operator_profile->set_metadata(_parent->node_id());
669
7.95k
    _wait_for_finish_dependency_timer =
670
7.95k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
7.95k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
7.95k
    if constexpr (!is_fake_shared) {
673
7.95k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
7.95k
            info.shared_state_map.end()) {
675
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
677
            }
678
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
679
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
680
0
                                                  ? 0
681
0
                                                  : info.task_idx]
682
0
                                  .get();
683
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
684
7.95k
        } else {
685
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
                DCHECK(false);
687
            }
688
7.95k
            _shared_state = info.shared_state->template cast<SharedState>();
689
7.95k
            _dependency = _shared_state->create_sink_dependency(
690
7.95k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
7.95k
        }
692
7.95k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
7.95k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
7.95k
    }
695
696
7.95k
    if (must_set_shared_state() && _shared_state == nullptr) {
697
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
698
0
    }
699
700
7.95k
    _rows_input_counter =
701
7.95k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
7.95k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
7.95k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
7.95k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
7.95k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
7.95k
    _memory_used_counter =
707
7.95k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
7.95k
    _common_profile->add_info_string("IsColocate",
709
7.95k
                                     std::to_string(_parent->is_colocated_operator()));
710
7.95k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
7.95k
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
7.95k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
7.95k
    return Status::OK();
714
7.95k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
654
121k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
121k
    _operator_profile =
657
121k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
121k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
121k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
660
661
    // indentation is true
662
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
663
    // So we should set the indentation to true.
664
121k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
121k
    _operator_profile->add_child(_common_profile, true);
666
121k
    _operator_profile->add_child(_custom_profile, true);
667
668
121k
    _operator_profile->set_metadata(_parent->node_id());
669
121k
    _wait_for_finish_dependency_timer =
670
121k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
121k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
121k
    if constexpr (!is_fake_shared) {
673
121k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
121k
            info.shared_state_map.end()) {
675
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
677
            }
678
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
679
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
680
0
                                                  ? 0
681
0
                                                  : info.task_idx]
682
0
                                  .get();
683
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
684
121k
        } else {
685
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
                DCHECK(false);
687
            }
688
121k
            _shared_state = info.shared_state->template cast<SharedState>();
689
121k
            _dependency = _shared_state->create_sink_dependency(
690
121k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
121k
        }
692
121k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
121k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
121k
    }
695
696
121k
    if (must_set_shared_state() && _shared_state == nullptr) {
697
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
698
0
    }
699
700
121k
    _rows_input_counter =
701
121k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
121k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
121k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
121k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
121k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
121k
    _memory_used_counter =
707
121k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
121k
    _common_profile->add_info_string("IsColocate",
709
121k
                                     std::to_string(_parent->is_colocated_operator()));
710
121k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
121k
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
121k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
121k
    return Status::OK();
714
121k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
654
300
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
300
    _operator_profile =
657
300
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
300
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
300
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
660
661
    // indentation is true
662
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
663
    // So we should set the indentation to true.
664
300
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
300
    _operator_profile->add_child(_common_profile, true);
666
300
    _operator_profile->add_child(_custom_profile, true);
667
668
300
    _operator_profile->set_metadata(_parent->node_id());
669
300
    _wait_for_finish_dependency_timer =
670
300
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
300
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
300
    if constexpr (!is_fake_shared) {
673
300
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
300
            info.shared_state_map.end()) {
675
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
677
            }
678
299
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
679
299
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
680
299
                                                  ? 0
681
299
                                                  : info.task_idx]
682
299
                                  .get();
683
299
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
684
299
        } else {
685
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
                DCHECK(false);
687
            }
688
1
            _shared_state = info.shared_state->template cast<SharedState>();
689
1
            _dependency = _shared_state->create_sink_dependency(
690
1
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
1
        }
692
300
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
300
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
300
    }
695
696
300
    if (must_set_shared_state() && _shared_state == nullptr) {
697
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
698
0
    }
699
700
300
    _rows_input_counter =
701
300
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
300
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
300
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
300
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
300
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
300
    _memory_used_counter =
707
300
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
300
    _common_profile->add_info_string("IsColocate",
709
300
                                     std::to_string(_parent->is_colocated_operator()));
710
300
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
300
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
300
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
300
    return Status::OK();
714
300
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
654
270
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
270
    _operator_profile =
657
270
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
270
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
270
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
660
661
    // indentation is true
662
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
663
    // So we should set the indentation to true.
664
270
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
270
    _operator_profile->add_child(_common_profile, true);
666
270
    _operator_profile->add_child(_custom_profile, true);
667
668
270
    _operator_profile->set_metadata(_parent->node_id());
669
270
    _wait_for_finish_dependency_timer =
670
270
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
270
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
270
    if constexpr (!is_fake_shared) {
673
270
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
270
            info.shared_state_map.end()) {
675
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
677
            }
678
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
679
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
680
0
                                                  ? 0
681
0
                                                  : info.task_idx]
682
0
                                  .get();
683
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
684
270
        } else {
685
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
                DCHECK(false);
687
            }
688
270
            _shared_state = info.shared_state->template cast<SharedState>();
689
270
            _dependency = _shared_state->create_sink_dependency(
690
270
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
270
        }
692
270
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
270
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
270
    }
695
696
270
    if (must_set_shared_state() && _shared_state == nullptr) {
697
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
698
0
    }
699
700
270
    _rows_input_counter =
701
270
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
270
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
270
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
270
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
270
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
270
    _memory_used_counter =
707
270
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
270
    _common_profile->add_info_string("IsColocate",
709
270
                                     std::to_string(_parent->is_colocated_operator()));
710
270
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
270
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
270
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
270
    return Status::OK();
714
270
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
654
611k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
611k
    _operator_profile =
657
611k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
611k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
611k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
660
661
    // indentation is true
662
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
663
    // So we should set the indentation to true.
664
611k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
611k
    _operator_profile->add_child(_common_profile, true);
666
611k
    _operator_profile->add_child(_custom_profile, true);
667
668
611k
    _operator_profile->set_metadata(_parent->node_id());
669
611k
    _wait_for_finish_dependency_timer =
670
611k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
611k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
    if constexpr (!is_fake_shared) {
673
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
            info.shared_state_map.end()) {
675
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
677
            }
678
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
679
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
680
                                                  ? 0
681
                                                  : info.task_idx]
682
                                  .get();
683
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
684
        } else {
685
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
                DCHECK(false);
687
            }
688
            _shared_state = info.shared_state->template cast<SharedState>();
689
            _dependency = _shared_state->create_sink_dependency(
690
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
        }
692
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
    }
695
696
611k
    if (must_set_shared_state() && _shared_state == nullptr) {
697
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
698
0
    }
699
700
611k
    _rows_input_counter =
701
611k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
611k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
611k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
611k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
611k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
611k
    _memory_used_counter =
707
611k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
611k
    _common_profile->add_info_string("IsColocate",
709
611k
                                     std::to_string(_parent->is_colocated_operator()));
710
611k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
611k
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
611k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
611k
    return Status::OK();
714
611k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
654
5.18k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
5.18k
    _operator_profile =
657
5.18k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
5.18k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
5.18k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
660
661
    // indentation is true
662
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
663
    // So we should set the indentation to true.
664
5.18k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
5.18k
    _operator_profile->add_child(_common_profile, true);
666
5.18k
    _operator_profile->add_child(_custom_profile, true);
667
668
5.18k
    _operator_profile->set_metadata(_parent->node_id());
669
5.18k
    _wait_for_finish_dependency_timer =
670
5.18k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
5.18k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
5.18k
    if constexpr (!is_fake_shared) {
673
5.18k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
5.18k
            info.shared_state_map.end()) {
675
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
677
            }
678
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
679
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
680
0
                                                  ? 0
681
0
                                                  : info.task_idx]
682
0
                                  .get();
683
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
684
5.18k
        } else {
685
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
                DCHECK(false);
687
            }
688
5.18k
            _shared_state = info.shared_state->template cast<SharedState>();
689
5.18k
            _dependency = _shared_state->create_sink_dependency(
690
5.18k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
5.18k
        }
692
5.18k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
5.18k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
5.18k
    }
695
696
5.18k
    if (must_set_shared_state() && _shared_state == nullptr) {
697
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
698
0
    }
699
700
5.18k
    _rows_input_counter =
701
5.18k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
5.18k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
5.18k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
5.18k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
5.18k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
5.18k
    _memory_used_counter =
707
5.18k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
5.18k
    _common_profile->add_info_string("IsColocate",
709
5.18k
                                     std::to_string(_parent->is_colocated_operator()));
710
5.18k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
5.18k
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
5.18k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
5.18k
    return Status::OK();
714
5.18k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
654
436
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
436
    _operator_profile =
657
436
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
436
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
436
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
660
661
    // indentation is true
662
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
663
    // So we should set the indentation to true.
664
436
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
436
    _operator_profile->add_child(_common_profile, true);
666
436
    _operator_profile->add_child(_custom_profile, true);
667
668
436
    _operator_profile->set_metadata(_parent->node_id());
669
436
    _wait_for_finish_dependency_timer =
670
436
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
436
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
436
    if constexpr (!is_fake_shared) {
673
436
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
436
            info.shared_state_map.end()) {
675
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
677
            }
678
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
679
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
680
0
                                                  ? 0
681
0
                                                  : info.task_idx]
682
0
                                  .get();
683
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
684
436
        } else {
685
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
                DCHECK(false);
687
            }
688
436
            _shared_state = info.shared_state->template cast<SharedState>();
689
436
            _dependency = _shared_state->create_sink_dependency(
690
436
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
436
        }
692
436
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
436
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
436
    }
695
696
436
    if (must_set_shared_state() && _shared_state == nullptr) {
697
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
698
0
    }
699
700
436
    _rows_input_counter =
701
436
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
436
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
436
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
436
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
436
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
436
    _memory_used_counter =
707
436
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
436
    _common_profile->add_info_string("IsColocate",
709
436
                                     std::to_string(_parent->is_colocated_operator()));
710
436
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
436
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
436
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
436
    return Status::OK();
714
436
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
654
2.94k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
2.94k
    _operator_profile =
657
2.94k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
2.94k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
2.94k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
660
661
    // indentation is true
662
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
663
    // So we should set the indentation to true.
664
2.94k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
2.94k
    _operator_profile->add_child(_common_profile, true);
666
2.94k
    _operator_profile->add_child(_custom_profile, true);
667
668
2.94k
    _operator_profile->set_metadata(_parent->node_id());
669
2.94k
    _wait_for_finish_dependency_timer =
670
2.94k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
2.94k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
2.94k
    if constexpr (!is_fake_shared) {
673
2.94k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
2.94k
            info.shared_state_map.end()) {
675
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
677
            }
678
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
679
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
680
0
                                                  ? 0
681
0
                                                  : info.task_idx]
682
0
                                  .get();
683
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
684
2.94k
        } else {
685
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
                DCHECK(false);
687
            }
688
2.94k
            _shared_state = info.shared_state->template cast<SharedState>();
689
2.94k
            _dependency = _shared_state->create_sink_dependency(
690
2.94k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
2.94k
        }
692
2.94k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
2.94k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
2.94k
    }
695
696
2.94k
    if (must_set_shared_state() && _shared_state == nullptr) {
697
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
698
0
    }
699
700
2.94k
    _rows_input_counter =
701
2.94k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
2.94k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
2.94k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
2.94k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
2.94k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
2.94k
    _memory_used_counter =
707
2.94k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
2.94k
    _common_profile->add_info_string("IsColocate",
709
2.94k
                                     std::to_string(_parent->is_colocated_operator()));
710
2.94k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
2.94k
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
2.94k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
2.94k
    return Status::OK();
714
2.94k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
654
12.4k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
12.4k
    _operator_profile =
657
12.4k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
12.4k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
12.4k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
660
661
    // indentation is true
662
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
663
    // So we should set the indentation to true.
664
12.4k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
12.4k
    _operator_profile->add_child(_common_profile, true);
666
12.4k
    _operator_profile->add_child(_custom_profile, true);
667
668
12.4k
    _operator_profile->set_metadata(_parent->node_id());
669
12.4k
    _wait_for_finish_dependency_timer =
670
12.4k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
12.4k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
12.4k
    if constexpr (!is_fake_shared) {
673
12.4k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
12.4k
            info.shared_state_map.end()) {
675
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
677
            }
678
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
679
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
680
0
                                                  ? 0
681
0
                                                  : info.task_idx]
682
0
                                  .get();
683
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
684
12.4k
        } else {
685
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
                DCHECK(false);
687
            }
688
12.4k
            _shared_state = info.shared_state->template cast<SharedState>();
689
12.4k
            _dependency = _shared_state->create_sink_dependency(
690
12.4k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
12.4k
        }
692
12.4k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
12.4k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
12.4k
    }
695
696
12.4k
    if (must_set_shared_state() && _shared_state == nullptr) {
697
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
698
0
    }
699
700
12.4k
    _rows_input_counter =
701
12.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
12.4k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
12.4k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
12.4k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
12.4k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
12.4k
    _memory_used_counter =
707
12.4k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
12.4k
    _common_profile->add_info_string("IsColocate",
709
12.4k
                                     std::to_string(_parent->is_colocated_operator()));
710
12.4k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
12.4k
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
12.4k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
12.4k
    return Status::OK();
714
12.4k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
654
291k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
291k
    _operator_profile =
657
291k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
291k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
291k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
660
661
    // indentation is true
662
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
663
    // So we should set the indentation to true.
664
291k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
291k
    _operator_profile->add_child(_common_profile, true);
666
291k
    _operator_profile->add_child(_custom_profile, true);
667
668
291k
    _operator_profile->set_metadata(_parent->node_id());
669
291k
    _wait_for_finish_dependency_timer =
670
291k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
291k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
291k
    if constexpr (!is_fake_shared) {
673
291k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
292k
            info.shared_state_map.end()) {
675
292k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
292k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
677
292k
            }
678
292k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
679
292k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
680
292k
                                                  ? 0
681
292k
                                                  : info.task_idx]
682
292k
                                  .get();
683
292k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
684
18.4E
        } else {
685
18.4E
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
18.4E
                DCHECK(false);
687
18.4E
            }
688
18.4E
            _shared_state = info.shared_state->template cast<SharedState>();
689
18.4E
            _dependency = _shared_state->create_sink_dependency(
690
18.4E
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
18.4E
        }
692
291k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
291k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
291k
    }
695
696
291k
    if (must_set_shared_state() && _shared_state == nullptr) {
697
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
698
0
    }
699
700
291k
    _rows_input_counter =
701
291k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
291k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
291k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
291k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
291k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
291k
    _memory_used_counter =
707
291k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
291k
    _common_profile->add_info_string("IsColocate",
709
291k
                                     std::to_string(_parent->is_colocated_operator()));
710
291k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
291k
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
291k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
291k
    return Status::OK();
714
291k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
654
437k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
437k
    _operator_profile =
657
437k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
437k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
437k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
660
661
    // indentation is true
662
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
663
    // So we should set the indentation to true.
664
437k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
437k
    _operator_profile->add_child(_common_profile, true);
666
437k
    _operator_profile->add_child(_custom_profile, true);
667
668
437k
    _operator_profile->set_metadata(_parent->node_id());
669
437k
    _wait_for_finish_dependency_timer =
670
437k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
437k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
437k
    if constexpr (!is_fake_shared) {
673
437k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
437k
            info.shared_state_map.end()) {
675
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
677
            }
678
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
679
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
680
0
                                                  ? 0
681
0
                                                  : info.task_idx]
682
0
                                  .get();
683
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
684
437k
        } else {
685
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
                DCHECK(false);
687
            }
688
437k
            _shared_state = info.shared_state->template cast<SharedState>();
689
437k
            _dependency = _shared_state->create_sink_dependency(
690
437k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
437k
        }
692
437k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
437k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
437k
    }
695
696
437k
    if (must_set_shared_state() && _shared_state == nullptr) {
697
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
698
0
    }
699
700
437k
    _rows_input_counter =
701
437k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
437k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
437k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
437k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
437k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
437k
    _memory_used_counter =
707
437k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
437k
    _common_profile->add_info_string("IsColocate",
709
437k
                                     std::to_string(_parent->is_colocated_operator()));
710
437k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
437k
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
437k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
437k
    return Status::OK();
714
437k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
654
25
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
25
    _operator_profile =
657
25
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
25
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
25
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
660
661
    // indentation is true
662
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
663
    // So we should set the indentation to true.
664
25
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
25
    _operator_profile->add_child(_common_profile, true);
666
25
    _operator_profile->add_child(_custom_profile, true);
667
668
25
    _operator_profile->set_metadata(_parent->node_id());
669
25
    _wait_for_finish_dependency_timer =
670
25
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
25
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
25
    if constexpr (!is_fake_shared) {
673
25
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
25
            info.shared_state_map.end()) {
675
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
677
            }
678
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
679
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
680
0
                                                  ? 0
681
0
                                                  : info.task_idx]
682
0
                                  .get();
683
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
684
25
        } else {
685
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
                DCHECK(false);
687
            }
688
25
            _shared_state = info.shared_state->template cast<SharedState>();
689
25
            _dependency = _shared_state->create_sink_dependency(
690
25
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
25
        }
692
25
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
25
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
25
    }
695
696
25
    if (must_set_shared_state() && _shared_state == nullptr) {
697
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
698
0
    }
699
700
25
    _rows_input_counter =
701
25
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
25
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
25
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
25
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
25
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
25
    _memory_used_counter =
707
25
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
25
    _common_profile->add_info_string("IsColocate",
709
25
                                     std::to_string(_parent->is_colocated_operator()));
710
25
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
25
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
25
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
25
    return Status::OK();
714
25
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
654
328
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
328
    _operator_profile =
657
328
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
328
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
328
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
660
661
    // indentation is true
662
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
663
    // So we should set the indentation to true.
664
328
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
328
    _operator_profile->add_child(_common_profile, true);
666
328
    _operator_profile->add_child(_custom_profile, true);
667
668
328
    _operator_profile->set_metadata(_parent->node_id());
669
328
    _wait_for_finish_dependency_timer =
670
328
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
328
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
328
    if constexpr (!is_fake_shared) {
673
328
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
328
            info.shared_state_map.end()) {
675
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
677
            }
678
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
679
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
680
0
                                                  ? 0
681
0
                                                  : info.task_idx]
682
0
                                  .get();
683
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
684
328
        } else {
685
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
                DCHECK(false);
687
            }
688
328
            _shared_state = info.shared_state->template cast<SharedState>();
689
328
            _dependency = _shared_state->create_sink_dependency(
690
328
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
328
        }
692
328
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
328
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
328
    }
695
696
328
    if (must_set_shared_state() && _shared_state == nullptr) {
697
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
698
0
    }
699
700
328
    _rows_input_counter =
701
328
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
328
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
328
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
328
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
328
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
328
    _memory_used_counter =
707
328
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
328
    _common_profile->add_info_string("IsColocate",
709
328
                                     std::to_string(_parent->is_colocated_operator()));
710
328
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
328
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
328
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
328
    return Status::OK();
714
328
}
715
716
template <typename SharedState>
717
1.86M
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
718
1.86M
    if (_closed) {
719
2
        return Status::OK();
720
2
    }
721
1.86M
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
722
1.25M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
723
1.25M
    }
724
1.86M
    _closed = true;
725
1.86M
    return Status::OK();
726
1.86M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
717
116k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
718
116k
    if (_closed) {
719
0
        return Status::OK();
720
0
    }
721
116k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
722
116k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
723
116k
    }
724
116k
    _closed = true;
725
116k
    return Status::OK();
726
116k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
717
1
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
718
1
    if (_closed) {
719
0
        return Status::OK();
720
0
    }
721
1
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
722
1
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
723
1
    }
724
1
    _closed = true;
725
1
    return Status::OK();
726
1
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
717
238k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
718
238k
    if (_closed) {
719
0
        return Status::OK();
720
0
    }
721
238k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
722
238k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
723
238k
    }
724
238k
    _closed = true;
725
238k
    return Status::OK();
726
238k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
717
21
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
718
21
    if (_closed) {
719
2
        return Status::OK();
720
2
    }
721
19
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
722
19
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
723
19
    }
724
19
    _closed = true;
725
19
    return Status::OK();
726
21
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
717
8.22k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
718
8.22k
    if (_closed) {
719
0
        return Status::OK();
720
0
    }
721
8.22k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
722
8.22k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
723
8.22k
    }
724
8.22k
    _closed = true;
725
8.22k
    return Status::OK();
726
8.22k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
717
7.94k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
718
7.94k
    if (_closed) {
719
0
        return Status::OK();
720
0
    }
721
7.94k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
722
7.94k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
723
7.94k
    }
724
7.94k
    _closed = true;
725
7.94k
    return Status::OK();
726
7.94k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
717
120k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
718
120k
    if (_closed) {
719
0
        return Status::OK();
720
0
    }
721
120k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
722
120k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
723
120k
    }
724
120k
    _closed = true;
725
120k
    return Status::OK();
726
120k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
717
297
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
718
297
    if (_closed) {
719
0
        return Status::OK();
720
0
    }
721
297
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
722
297
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
723
297
    }
724
297
    _closed = true;
725
297
    return Status::OK();
726
297
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
717
259
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
718
259
    if (_closed) {
719
0
        return Status::OK();
720
0
    }
721
259
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
722
259
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
723
259
    }
724
259
    _closed = true;
725
259
    return Status::OK();
726
259
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
717
612k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
718
612k
    if (_closed) {
719
0
        return Status::OK();
720
0
    }
721
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
722
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
723
    }
724
612k
    _closed = true;
725
612k
    return Status::OK();
726
612k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
717
5.18k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
718
5.18k
    if (_closed) {
719
0
        return Status::OK();
720
0
    }
721
5.18k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
722
5.18k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
723
5.18k
    }
724
5.18k
    _closed = true;
725
5.18k
    return Status::OK();
726
5.18k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
717
335
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
718
335
    if (_closed) {
719
0
        return Status::OK();
720
0
    }
721
335
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
722
335
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
723
335
    }
724
335
    _closed = true;
725
335
    return Status::OK();
726
335
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
717
2.96k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
718
2.96k
    if (_closed) {
719
0
        return Status::OK();
720
0
    }
721
2.96k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
722
2.96k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
723
2.96k
    }
724
2.96k
    _closed = true;
725
2.96k
    return Status::OK();
726
2.96k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
717
12.5k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
718
12.5k
    if (_closed) {
719
0
        return Status::OK();
720
0
    }
721
12.5k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
722
12.5k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
723
12.5k
    }
724
12.5k
    _closed = true;
725
12.5k
    return Status::OK();
726
12.5k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
717
293k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
718
293k
    if (_closed) {
719
0
        return Status::OK();
720
0
    }
721
293k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
722
293k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
723
293k
    }
724
293k
    _closed = true;
725
293k
    return Status::OK();
726
293k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
717
442k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
718
442k
    if (_closed) {
719
0
        return Status::OK();
720
0
    }
721
442k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
722
442k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
723
442k
    }
724
442k
    _closed = true;
725
442k
    return Status::OK();
726
442k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
717
14
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
718
14
    if (_closed) {
719
0
        return Status::OK();
720
0
    }
721
14
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
722
14
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
723
14
    }
724
14
    _closed = true;
725
14
    return Status::OK();
726
14
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
717
328
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
718
328
    if (_closed) {
719
0
        return Status::OK();
720
0
    }
721
328
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
722
328
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
723
328
    }
724
328
    _closed = true;
725
328
    return Status::OK();
726
328
}
727
728
template <typename LocalStateType>
729
Status StreamingOperatorX<LocalStateType>::get_block_impl(RuntimeState* state, Block* block,
730
12.5k
                                                          bool* eos) {
731
12.5k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
732
12.5k
    return pull(state, block, eos);
733
12.5k
}
_ZN5doris18StreamingOperatorXINS_23AssertNumRowsLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
730
232
                                                          bool* eos) {
731
232
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
732
232
    return pull(state, block, eos);
733
232
}
_ZN5doris18StreamingOperatorXINS_16SelectLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
730
12.3k
                                                          bool* eos) {
731
12.3k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
732
12.2k
    return pull(state, block, eos);
733
12.3k
}
734
735
template <typename LocalStateType>
736
Status StatefulOperatorX<LocalStateType>::get_block_impl(RuntimeState* state, Block* block,
737
646k
                                                         bool* eos) {
738
646k
    auto& local_state = get_local_state(state);
739
646k
    if (need_more_input_data(state)) {
740
618k
        local_state._child_block->clear_column_data(
741
618k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
742
618k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
743
618k
                state, local_state._child_block.get(), &local_state._child_eos));
744
618k
        *eos = local_state._child_eos;
745
618k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
746
70.5k
            return Status::OK();
747
70.5k
        }
748
548k
        {
749
548k
            SCOPED_TIMER(local_state.exec_time_counter());
750
548k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
751
548k
        }
752
548k
    }
753
754
575k
    if (!need_more_input_data(state)) {
755
533k
        SCOPED_TIMER(local_state.exec_time_counter());
756
533k
        bool new_eos = false;
757
533k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
758
533k
        if (new_eos) {
759
454k
            *eos = true;
760
454k
        } else if (!need_more_input_data(state)) {
761
21.8k
            *eos = false;
762
21.8k
        }
763
533k
    }
764
575k
    return Status::OK();
765
575k
}
_ZN5doris17StatefulOperatorXINS_23HashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
142k
                                                         bool* eos) {
738
142k
    auto& local_state = get_local_state(state);
739
142k
    if (need_more_input_data(state)) {
740
126k
        local_state._child_block->clear_column_data(
741
126k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
742
126k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
743
126k
                state, local_state._child_block.get(), &local_state._child_eos));
744
126k
        *eos = local_state._child_eos;
745
126k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
746
40.6k
            return Status::OK();
747
40.6k
        }
748
86.2k
        {
749
86.2k
            SCOPED_TIMER(local_state.exec_time_counter());
750
86.2k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
751
86.2k
        }
752
86.2k
    }
753
754
101k
    if (!need_more_input_data(state)) {
755
101k
        SCOPED_TIMER(local_state.exec_time_counter());
756
101k
        bool new_eos = false;
757
101k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
758
101k
        if (new_eos) {
759
44.5k
            *eos = true;
760
57.4k
        } else if (!need_more_input_data(state)) {
761
8.99k
            *eos = false;
762
8.99k
        }
763
101k
    }
764
101k
    return Status::OK();
765
101k
}
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_34PartitionedHashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
_ZN5doris17StatefulOperatorXINS_16RepeatLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
4.04k
                                                         bool* eos) {
738
4.04k
    auto& local_state = get_local_state(state);
739
4.04k
    if (need_more_input_data(state)) {
740
2.27k
        local_state._child_block->clear_column_data(
741
2.27k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
742
2.27k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
743
2.27k
                state, local_state._child_block.get(), &local_state._child_eos));
744
2.27k
        *eos = local_state._child_eos;
745
2.27k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
746
471
            return Status::OK();
747
471
        }
748
1.80k
        {
749
1.80k
            SCOPED_TIMER(local_state.exec_time_counter());
750
1.80k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
751
1.80k
        }
752
1.80k
    }
753
754
3.58k
    if (!need_more_input_data(state)) {
755
3.58k
        SCOPED_TIMER(local_state.exec_time_counter());
756
3.58k
        bool new_eos = false;
757
3.58k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
758
3.58k
        if (new_eos) {
759
1.21k
            *eos = true;
760
2.37k
        } else if (!need_more_input_data(state)) {
761
1.77k
            *eos = false;
762
1.77k
        }
763
3.58k
    }
764
3.57k
    return Status::OK();
765
3.57k
}
_ZN5doris17StatefulOperatorXINS_25MaterializationLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
3.43k
                                                         bool* eos) {
738
3.43k
    auto& local_state = get_local_state(state);
739
3.43k
    if (need_more_input_data(state)) {
740
3.43k
        local_state._child_block->clear_column_data(
741
3.43k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
742
3.43k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
743
3.43k
                state, local_state._child_block.get(), &local_state._child_eos));
744
3.43k
        *eos = local_state._child_eos;
745
3.43k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
746
1.25k
            return Status::OK();
747
1.25k
        }
748
2.17k
        {
749
2.17k
            SCOPED_TIMER(local_state.exec_time_counter());
750
2.17k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
751
2.17k
        }
752
2.17k
    }
753
754
2.17k
    if (!need_more_input_data(state)) {
755
2.17k
        SCOPED_TIMER(local_state.exec_time_counter());
756
2.17k
        bool new_eos = false;
757
2.17k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
758
2.17k
        if (new_eos) {
759
1.27k
            *eos = true;
760
1.27k
        } else if (!need_more_input_data(state)) {
761
0
            *eos = false;
762
0
        }
763
2.17k
    }
764
2.17k
    return Status::OK();
765
2.17k
}
_ZN5doris17StatefulOperatorXINS_22StreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
25.8k
                                                         bool* eos) {
738
25.8k
    auto& local_state = get_local_state(state);
739
25.9k
    if (need_more_input_data(state)) {
740
25.9k
        local_state._child_block->clear_column_data(
741
25.9k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
742
25.9k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
743
25.9k
                state, local_state._child_block.get(), &local_state._child_eos));
744
25.9k
        *eos = local_state._child_eos;
745
25.9k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
746
4.88k
            return Status::OK();
747
4.88k
        }
748
21.0k
        {
749
21.0k
            SCOPED_TIMER(local_state.exec_time_counter());
750
21.0k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
751
21.0k
        }
752
21.0k
    }
753
754
20.9k
    if (!need_more_input_data(state)) {
755
8.56k
        SCOPED_TIMER(local_state.exec_time_counter());
756
8.56k
        bool new_eos = false;
757
8.56k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
758
8.56k
        if (new_eos) {
759
8.46k
            *eos = true;
760
8.46k
        } else if (!need_more_input_data(state)) {
761
7
            *eos = false;
762
7
        }
763
8.56k
    }
764
20.9k
    return Status::OK();
765
20.9k
}
_ZN5doris17StatefulOperatorXINS_30DistinctStreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
437k
                                                         bool* eos) {
738
437k
    auto& local_state = get_local_state(state);
739
438k
    if (need_more_input_data(state)) {
740
438k
        local_state._child_block->clear_column_data(
741
438k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
742
438k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
743
438k
                state, local_state._child_block.get(), &local_state._child_eos));
744
438k
        *eos = local_state._child_eos;
745
438k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
746
20.9k
            return Status::OK();
747
20.9k
        }
748
418k
        {
749
418k
            SCOPED_TIMER(local_state.exec_time_counter());
750
418k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
751
418k
        }
752
418k
    }
753
754
417k
    if (!need_more_input_data(state)) {
755
387k
        SCOPED_TIMER(local_state.exec_time_counter());
756
387k
        bool new_eos = false;
757
387k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
758
387k
        if (new_eos) {
759
387k
            *eos = true;
760
387k
        } else if (!need_more_input_data(state)) {
761
0
            *eos = false;
762
0
        }
763
387k
    }
764
417k
    return Status::OK();
765
417k
}
_ZN5doris17StatefulOperatorXINS_29NestedLoopJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
25.6k
                                                         bool* eos) {
738
25.6k
    auto& local_state = get_local_state(state);
739
25.6k
    if (need_more_input_data(state)) {
740
14.9k
        local_state._child_block->clear_column_data(
741
14.9k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
742
14.9k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
743
14.9k
                state, local_state._child_block.get(), &local_state._child_eos));
744
14.9k
        *eos = local_state._child_eos;
745
14.9k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
746
1.92k
            return Status::OK();
747
1.92k
        }
748
12.9k
        {
749
12.9k
            SCOPED_TIMER(local_state.exec_time_counter());
750
12.9k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
751
12.9k
        }
752
12.9k
    }
753
754
23.7k
    if (!need_more_input_data(state)) {
755
23.1k
        SCOPED_TIMER(local_state.exec_time_counter());
756
23.1k
        bool new_eos = false;
757
23.1k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
758
23.1k
        if (new_eos) {
759
8.20k
            *eos = true;
760
14.9k
        } else if (!need_more_input_data(state)) {
761
10.7k
            *eos = false;
762
10.7k
        }
763
23.1k
    }
764
23.7k
    return Status::OK();
765
23.7k
}
_ZN5doris17StatefulOperatorXINS_23TableFunctionLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
6.60k
                                                         bool* eos) {
738
6.60k
    auto& local_state = get_local_state(state);
739
6.60k
    if (need_more_input_data(state)) {
740
6.23k
        local_state._child_block->clear_column_data(
741
6.23k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
742
6.23k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
743
6.23k
                state, local_state._child_block.get(), &local_state._child_eos));
744
6.23k
        *eos = local_state._child_eos;
745
6.23k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
746
471
            return Status::OK();
747
471
        }
748
5.76k
        {
749
5.76k
            SCOPED_TIMER(local_state.exec_time_counter());
750
5.76k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
751
5.76k
        }
752
5.76k
    }
753
754
6.13k
    if (!need_more_input_data(state)) {
755
6.13k
        SCOPED_TIMER(local_state.exec_time_counter());
756
6.13k
        bool new_eos = false;
757
6.13k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
758
6.13k
        if (new_eos) {
759
4.03k
            *eos = true;
760
4.03k
        } else if (!need_more_input_data(state)) {
761
366
            *eos = false;
762
366
        }
763
6.13k
    }
764
6.12k
    return Status::OK();
765
6.12k
}
766
767
template <typename Writer, typename Parent>
768
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
769
57.0k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
770
57.0k
    RETURN_IF_ERROR(Base::init(state, info));
771
57.0k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
772
57.0k
                                                         "AsyncWriterDependency", true);
773
57.0k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
774
57.0k
                             _finish_dependency));
775
776
57.0k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
777
57.0k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
778
57.0k
    return Status::OK();
779
57.0k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
769
434
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
770
434
    RETURN_IF_ERROR(Base::init(state, info));
771
434
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
772
434
                                                         "AsyncWriterDependency", true);
773
434
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
774
434
                             _finish_dependency));
775
776
434
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
777
434
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
778
434
    return Status::OK();
779
434
}
_ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
769
43
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
770
43
    RETURN_IF_ERROR(Base::init(state, info));
771
43
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
772
43
                                                         "AsyncWriterDependency", true);
773
43
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
774
43
                             _finish_dependency));
775
776
43
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
777
43
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
778
43
    return Status::OK();
779
43
}
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
769
45.7k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
770
45.7k
    RETURN_IF_ERROR(Base::init(state, info));
771
45.7k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
772
45.7k
                                                         "AsyncWriterDependency", true);
773
45.7k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
774
45.7k
                             _finish_dependency));
775
776
45.7k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
777
45.7k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
778
45.7k
    return Status::OK();
779
45.7k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
769
4.91k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
770
4.91k
    RETURN_IF_ERROR(Base::init(state, info));
771
4.91k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
772
4.91k
                                                         "AsyncWriterDependency", true);
773
4.91k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
774
4.91k
                             _finish_dependency));
775
776
4.91k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
777
4.91k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
778
4.91k
    return Status::OK();
779
4.91k
}
_ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
769
2.58k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
770
2.58k
    RETURN_IF_ERROR(Base::init(state, info));
771
2.58k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
772
2.58k
                                                         "AsyncWriterDependency", true);
773
2.58k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
774
2.58k
                             _finish_dependency));
775
776
2.58k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
777
2.58k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
778
2.58k
    return Status::OK();
779
2.58k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
769
2.00k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
770
2.00k
    RETURN_IF_ERROR(Base::init(state, info));
771
2.00k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
772
2.00k
                                                         "AsyncWriterDependency", true);
773
2.00k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
774
2.00k
                             _finish_dependency));
775
776
2.00k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
777
2.00k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
778
2.00k
    return Status::OK();
779
2.00k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
769
24
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
770
24
    RETURN_IF_ERROR(Base::init(state, info));
771
24
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
772
24
                                                         "AsyncWriterDependency", true);
773
24
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
774
24
                             _finish_dependency));
775
776
24
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
777
24
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
778
24
    return Status::OK();
779
24
}
_ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
769
352
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
770
352
    RETURN_IF_ERROR(Base::init(state, info));
771
352
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
772
352
                                                         "AsyncWriterDependency", true);
773
352
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
774
352
                             _finish_dependency));
775
776
352
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
777
352
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
778
352
    return Status::OK();
779
352
}
_ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
769
840
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
770
840
    RETURN_IF_ERROR(Base::init(state, info));
771
840
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
772
840
                                                         "AsyncWriterDependency", true);
773
840
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
774
840
                             _finish_dependency));
775
776
840
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
777
840
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
778
840
    return Status::OK();
779
840
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
769
78
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
770
78
    RETURN_IF_ERROR(Base::init(state, info));
771
78
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
772
78
                                                         "AsyncWriterDependency", true);
773
78
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
774
78
                             _finish_dependency));
775
776
78
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
777
78
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
778
78
    return Status::OK();
779
78
}
780
781
template <typename Writer, typename Parent>
782
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
783
57.2k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
784
57.2k
    RETURN_IF_ERROR(Base::open(state));
785
57.2k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
786
476k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
787
418k
        RETURN_IF_ERROR(
788
418k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
789
418k
    }
790
57.2k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
791
57.2k
    return Status::OK();
792
57.2k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
783
434
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
784
434
    RETURN_IF_ERROR(Base::open(state));
785
434
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
786
2.30k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
787
1.87k
        RETURN_IF_ERROR(
788
1.87k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
789
1.87k
    }
790
434
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
791
434
    return Status::OK();
792
434
}
_ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
783
43
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
784
43
    RETURN_IF_ERROR(Base::open(state));
785
43
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
786
201
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
787
158
        RETURN_IF_ERROR(
788
158
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
789
158
    }
790
43
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
791
43
    return Status::OK();
792
43
}
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
783
46.1k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
784
46.1k
    RETURN_IF_ERROR(Base::open(state));
785
46.1k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
786
345k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
787
298k
        RETURN_IF_ERROR(
788
298k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
789
298k
    }
790
46.1k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
791
46.1k
    return Status::OK();
792
46.1k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
783
4.80k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
784
4.80k
    RETURN_IF_ERROR(Base::open(state));
785
4.80k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
786
30.6k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
787
25.8k
        RETURN_IF_ERROR(
788
25.8k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
789
25.8k
    }
790
4.80k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
791
4.80k
    return Status::OK();
792
4.80k
}
_ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
783
2.58k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
784
2.58k
    RETURN_IF_ERROR(Base::open(state));
785
2.58k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
786
67.5k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
787
64.9k
        RETURN_IF_ERROR(
788
64.9k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
789
64.9k
    }
790
2.58k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
791
2.58k
    return Status::OK();
792
2.58k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
783
1.99k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
784
1.99k
    RETURN_IF_ERROR(Base::open(state));
785
1.99k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
786
22.2k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
787
20.2k
        RETURN_IF_ERROR(
788
20.2k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
789
20.2k
    }
790
1.99k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
791
1.99k
    return Status::OK();
792
1.99k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
783
24
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
784
24
    RETURN_IF_ERROR(Base::open(state));
785
24
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
786
103
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
787
79
        RETURN_IF_ERROR(
788
79
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
789
79
    }
790
24
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
791
24
    return Status::OK();
792
24
}
_ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
783
351
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
784
351
    RETURN_IF_ERROR(Base::open(state));
785
351
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
786
1.04k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
787
698
        RETURN_IF_ERROR(
788
698
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
789
698
    }
790
351
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
791
351
    return Status::OK();
792
351
}
_ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
783
838
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
784
838
    RETURN_IF_ERROR(Base::open(state));
785
838
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
786
6.56k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
787
5.72k
        RETURN_IF_ERROR(
788
5.72k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
789
5.72k
    }
790
838
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
791
838
    return Status::OK();
792
838
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
783
78
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
784
78
    RETURN_IF_ERROR(Base::open(state));
785
78
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
786
393
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
787
315
        RETURN_IF_ERROR(
788
315
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
789
315
    }
790
78
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
791
78
    return Status::OK();
792
78
}
793
794
template <typename Writer, typename Parent>
795
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
796
77.8k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
797
77.8k
    return _writer->sink(block, eos);
798
77.8k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
796
2.05k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
797
2.05k
    return _writer->sink(block, eos);
798
2.05k
}
_ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
796
55
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
797
55
    return _writer->sink(block, eos);
798
55
}
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
796
61.5k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
797
61.5k
    return _writer->sink(block, eos);
798
61.5k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
796
5.61k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
797
5.61k
    return _writer->sink(block, eos);
798
5.61k
}
_ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
796
3.77k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
797
3.77k
    return _writer->sink(block, eos);
798
3.77k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
796
3.17k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
797
3.17k
    return _writer->sink(block, eos);
798
3.17k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
796
30
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
797
30
    return _writer->sink(block, eos);
798
30
}
_ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
796
397
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
797
397
    return _writer->sink(block, eos);
798
397
}
_ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
796
1.06k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
797
1.06k
    return _writer->sink(block, eos);
798
1.06k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
796
155
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
797
155
    return _writer->sink(block, eos);
798
155
}
799
800
template <typename Writer, typename Parent>
801
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
802
57.4k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
803
57.4k
    if (_closed) {
804
0
        return Status::OK();
805
0
    }
806
57.4k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
807
57.4k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
808
    // if the init failed, the _writer may be nullptr. so here need check
809
57.4k
    if (_writer) {
810
57.4k
        Status st = _writer->get_writer_status();
811
57.4k
        if (exec_status.ok()) {
812
57.3k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
813
57.3k
                                                       : Status::Cancelled("force close"));
814
57.3k
        } else {
815
108
            _writer->force_close(exec_status);
816
108
        }
817
        // If there is an error in process_block thread, then we should get the writer
818
        // status before call force_close. For example, the thread may failed in commit
819
        // transaction.
820
57.4k
        RETURN_IF_ERROR(st);
821
57.4k
    }
822
57.3k
    return Base::close(state, exec_status);
823
57.4k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
802
422
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
803
422
    if (_closed) {
804
0
        return Status::OK();
805
0
    }
806
422
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
807
422
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
808
    // if the init failed, the _writer may be nullptr. so here need check
809
422
    if (_writer) {
810
422
        Status st = _writer->get_writer_status();
811
422
        if (exec_status.ok()) {
812
422
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
813
422
                                                       : Status::Cancelled("force close"));
814
422
        } else {
815
0
            _writer->force_close(exec_status);
816
0
        }
817
        // If there is an error in process_block thread, then we should get the writer
818
        // status before call force_close. For example, the thread may failed in commit
819
        // transaction.
820
422
        RETURN_IF_ERROR(st);
821
422
    }
822
422
    return Base::close(state, exec_status);
823
422
}
_ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
802
43
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
803
43
    if (_closed) {
804
0
        return Status::OK();
805
0
    }
806
43
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
807
43
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
808
    // if the init failed, the _writer may be nullptr. so here need check
809
43
    if (_writer) {
810
43
        Status st = _writer->get_writer_status();
811
43
        if (exec_status.ok()) {
812
43
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
813
43
                                                       : Status::Cancelled("force close"));
814
43
        } else {
815
0
            _writer->force_close(exec_status);
816
0
        }
817
        // If there is an error in process_block thread, then we should get the writer
818
        // status before call force_close. For example, the thread may failed in commit
819
        // transaction.
820
43
        RETURN_IF_ERROR(st);
821
43
    }
822
39
    return Base::close(state, exec_status);
823
43
}
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
802
46.1k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
803
46.1k
    if (_closed) {
804
0
        return Status::OK();
805
0
    }
806
46.1k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
807
46.1k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
808
    // if the init failed, the _writer may be nullptr. so here need check
809
46.2k
    if (_writer) {
810
46.2k
        Status st = _writer->get_writer_status();
811
46.2k
        if (exec_status.ok()) {
812
46.1k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
813
46.1k
                                                       : Status::Cancelled("force close"));
814
46.1k
        } else {
815
50
            _writer->force_close(exec_status);
816
50
        }
817
        // If there is an error in process_block thread, then we should get the writer
818
        // status before call force_close. For example, the thread may failed in commit
819
        // transaction.
820
46.2k
        RETURN_IF_ERROR(st);
821
46.2k
    }
822
46.1k
    return Base::close(state, exec_status);
823
46.1k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
802
4.88k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
803
4.88k
    if (_closed) {
804
0
        return Status::OK();
805
0
    }
806
4.88k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
807
4.88k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
808
    // if the init failed, the _writer may be nullptr. so here need check
809
4.91k
    if (_writer) {
810
4.91k
        Status st = _writer->get_writer_status();
811
4.91k
        if (exec_status.ok()) {
812
4.85k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
813
4.85k
                                                       : Status::Cancelled("force close"));
814
4.85k
        } else {
815
57
            _writer->force_close(exec_status);
816
57
        }
817
        // If there is an error in process_block thread, then we should get the writer
818
        // status before call force_close. For example, the thread may failed in commit
819
        // transaction.
820
4.91k
        RETURN_IF_ERROR(st);
821
4.91k
    }
822
4.88k
    return Base::close(state, exec_status);
823
4.88k
}
_ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
802
2.58k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
803
2.58k
    if (_closed) {
804
0
        return Status::OK();
805
0
    }
806
2.58k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
807
2.58k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
808
    // if the init failed, the _writer may be nullptr. so here need check
809
2.58k
    if (_writer) {
810
2.58k
        Status st = _writer->get_writer_status();
811
2.58k
        if (exec_status.ok()) {
812
2.58k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
813
2.58k
                                                       : Status::Cancelled("force close"));
814
2.58k
        } else {
815
0
            _writer->force_close(exec_status);
816
0
        }
817
        // If there is an error in process_block thread, then we should get the writer
818
        // status before call force_close. For example, the thread may failed in commit
819
        // transaction.
820
2.58k
        RETURN_IF_ERROR(st);
821
2.58k
    }
822
2.58k
    return Base::close(state, exec_status);
823
2.58k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
802
1.99k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
803
1.99k
    if (_closed) {
804
0
        return Status::OK();
805
0
    }
806
1.99k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
807
1.99k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
808
    // if the init failed, the _writer may be nullptr. so here need check
809
2.00k
    if (_writer) {
810
2.00k
        Status st = _writer->get_writer_status();
811
2.00k
        if (exec_status.ok()) {
812
2.00k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
813
2.00k
                                                       : Status::Cancelled("force close"));
814
2.00k
        } else {
815
1
            _writer->force_close(exec_status);
816
1
        }
817
        // If there is an error in process_block thread, then we should get the writer
818
        // status before call force_close. For example, the thread may failed in commit
819
        // transaction.
820
2.00k
        RETURN_IF_ERROR(st);
821
2.00k
    }
822
1.99k
    return Base::close(state, exec_status);
823
1.99k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
802
24
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
803
24
    if (_closed) {
804
0
        return Status::OK();
805
0
    }
806
24
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
807
24
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
808
    // if the init failed, the _writer may be nullptr. so here need check
809
24
    if (_writer) {
810
24
        Status st = _writer->get_writer_status();
811
24
        if (exec_status.ok()) {
812
24
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
813
24
                                                       : Status::Cancelled("force close"));
814
24
        } else {
815
0
            _writer->force_close(exec_status);
816
0
        }
817
        // If there is an error in process_block thread, then we should get the writer
818
        // status before call force_close. For example, the thread may failed in commit
819
        // transaction.
820
24
        RETURN_IF_ERROR(st);
821
24
    }
822
24
    return Base::close(state, exec_status);
823
24
}
_ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
802
352
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
803
352
    if (_closed) {
804
0
        return Status::OK();
805
0
    }
806
352
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
807
352
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
808
    // if the init failed, the _writer may be nullptr. so here need check
809
352
    if (_writer) {
810
352
        Status st = _writer->get_writer_status();
811
352
        if (exec_status.ok()) {
812
352
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
813
352
                                                       : Status::Cancelled("force close"));
814
352
        } else {
815
0
            _writer->force_close(exec_status);
816
0
        }
817
        // If there is an error in process_block thread, then we should get the writer
818
        // status before call force_close. For example, the thread may failed in commit
819
        // transaction.
820
352
        RETURN_IF_ERROR(st);
821
352
    }
822
352
    return Base::close(state, exec_status);
823
352
}
_ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
802
839
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
803
839
    if (_closed) {
804
0
        return Status::OK();
805
0
    }
806
839
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
807
839
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
808
    // if the init failed, the _writer may be nullptr. so here need check
809
840
    if (_writer) {
810
840
        Status st = _writer->get_writer_status();
811
840
        if (exec_status.ok()) {
812
840
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
813
840
                                                       : Status::Cancelled("force close"));
814
840
        } else {
815
0
            _writer->force_close(exec_status);
816
0
        }
817
        // If there is an error in process_block thread, then we should get the writer
818
        // status before call force_close. For example, the thread may failed in commit
819
        // transaction.
820
840
        RETURN_IF_ERROR(st);
821
840
    }
822
839
    return Base::close(state, exec_status);
823
839
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
802
78
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
803
78
    if (_closed) {
804
0
        return Status::OK();
805
0
    }
806
78
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
807
78
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
808
    // if the init failed, the _writer may be nullptr. so here need check
809
78
    if (_writer) {
810
78
        Status st = _writer->get_writer_status();
811
78
        if (exec_status.ok()) {
812
78
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
813
78
                                                       : Status::Cancelled("force close"));
814
78
        } else {
815
0
            _writer->force_close(exec_status);
816
0
        }
817
        // If there is an error in process_block thread, then we should get the writer
818
        // status before call force_close. For example, the thread may failed in commit
819
        // transaction.
820
78
        RETURN_IF_ERROR(st);
821
78
    }
822
78
    return Base::close(state, exec_status);
823
78
}
824
825
#define DECLARE_OPERATOR(LOCAL_STATE) template class DataSinkOperatorX<LOCAL_STATE>;
826
DECLARE_OPERATOR(HashJoinBuildSinkLocalState)
827
DECLARE_OPERATOR(ResultSinkLocalState)
828
DECLARE_OPERATOR(JdbcTableSinkLocalState)
829
DECLARE_OPERATOR(MemoryScratchSinkLocalState)
830
DECLARE_OPERATOR(ResultFileSinkLocalState)
831
DECLARE_OPERATOR(OlapTableSinkLocalState)
832
DECLARE_OPERATOR(OlapTableSinkV2LocalState)
833
DECLARE_OPERATOR(HiveTableSinkLocalState)
834
DECLARE_OPERATOR(TVFTableSinkLocalState)
835
DECLARE_OPERATOR(IcebergTableSinkLocalState)
836
DECLARE_OPERATOR(SpillIcebergTableSinkLocalState)
837
DECLARE_OPERATOR(IcebergDeleteSinkLocalState)
838
DECLARE_OPERATOR(IcebergMergeSinkLocalState)
839
DECLARE_OPERATOR(MCTableSinkLocalState)
840
DECLARE_OPERATOR(AnalyticSinkLocalState)
841
DECLARE_OPERATOR(BlackholeSinkLocalState)
842
DECLARE_OPERATOR(SortSinkLocalState)
843
DECLARE_OPERATOR(SpillSortSinkLocalState)
844
DECLARE_OPERATOR(LocalExchangeSinkLocalState)
845
DECLARE_OPERATOR(AggSinkLocalState)
846
DECLARE_OPERATOR(BucketedAggSinkLocalState)
847
DECLARE_OPERATOR(PartitionedAggSinkLocalState)
848
DECLARE_OPERATOR(ExchangeSinkLocalState)
849
DECLARE_OPERATOR(NestedLoopJoinBuildSinkLocalState)
850
DECLARE_OPERATOR(UnionSinkLocalState)
851
DECLARE_OPERATOR(MultiCastDataStreamSinkLocalState)
852
DECLARE_OPERATOR(PartitionSortSinkLocalState)
853
DECLARE_OPERATOR(SetProbeSinkLocalState<true>)
854
DECLARE_OPERATOR(SetProbeSinkLocalState<false>)
855
DECLARE_OPERATOR(SetSinkLocalState<true>)
856
DECLARE_OPERATOR(SetSinkLocalState<false>)
857
DECLARE_OPERATOR(PartitionedHashJoinSinkLocalState)
858
DECLARE_OPERATOR(GroupCommitBlockSinkLocalState)
859
DECLARE_OPERATOR(CacheSinkLocalState)
860
DECLARE_OPERATOR(DictSinkLocalState)
861
DECLARE_OPERATOR(RecCTESinkLocalState)
862
DECLARE_OPERATOR(RecCTEAnchorSinkLocalState)
863
864
#undef DECLARE_OPERATOR
865
866
#define DECLARE_OPERATOR(LOCAL_STATE) template class OperatorX<LOCAL_STATE>;
867
DECLARE_OPERATOR(HashJoinProbeLocalState)
868
DECLARE_OPERATOR(OlapScanLocalState)
869
DECLARE_OPERATOR(GroupCommitLocalState)
870
DECLARE_OPERATOR(JDBCScanLocalState)
871
DECLARE_OPERATOR(FileScanLocalState)
872
DECLARE_OPERATOR(AnalyticLocalState)
873
DECLARE_OPERATOR(SortLocalState)
874
DECLARE_OPERATOR(SpillSortLocalState)
875
DECLARE_OPERATOR(LocalMergeSortLocalState)
876
DECLARE_OPERATOR(AggLocalState)
877
DECLARE_OPERATOR(BucketedAggLocalState)
878
DECLARE_OPERATOR(PartitionedAggLocalState)
879
DECLARE_OPERATOR(TableFunctionLocalState)
880
DECLARE_OPERATOR(ExchangeLocalState)
881
DECLARE_OPERATOR(RepeatLocalState)
882
DECLARE_OPERATOR(NestedLoopJoinProbeLocalState)
883
DECLARE_OPERATOR(AssertNumRowsLocalState)
884
DECLARE_OPERATOR(EmptySetLocalState)
885
DECLARE_OPERATOR(UnionSourceLocalState)
886
DECLARE_OPERATOR(MultiCastDataStreamSourceLocalState)
887
DECLARE_OPERATOR(PartitionSortSourceLocalState)
888
DECLARE_OPERATOR(SetSourceLocalState<true>)
889
DECLARE_OPERATOR(SetSourceLocalState<false>)
890
DECLARE_OPERATOR(DataGenLocalState)
891
DECLARE_OPERATOR(SchemaScanLocalState)
892
DECLARE_OPERATOR(MetaScanLocalState)
893
DECLARE_OPERATOR(LocalExchangeSourceLocalState)
894
DECLARE_OPERATOR(PartitionedHashJoinProbeLocalState)
895
DECLARE_OPERATOR(CacheSourceLocalState)
896
DECLARE_OPERATOR(RecCTESourceLocalState)
897
DECLARE_OPERATOR(RecCTEScanLocalState)
898
899
#ifdef BE_TEST
900
DECLARE_OPERATOR(MockLocalState)
901
DECLARE_OPERATOR(MockScanLocalState)
902
#endif
903
#undef DECLARE_OPERATOR
904
905
template class StreamingOperatorX<AssertNumRowsLocalState>;
906
template class StreamingOperatorX<SelectLocalState>;
907
908
template class StatefulOperatorX<HashJoinProbeLocalState>;
909
template class StatefulOperatorX<PartitionedHashJoinProbeLocalState>;
910
template class StatefulOperatorX<RepeatLocalState>;
911
template class StatefulOperatorX<MaterializationLocalState>;
912
template class StatefulOperatorX<StreamingAggLocalState>;
913
template class StatefulOperatorX<DistinctStreamingAggLocalState>;
914
template class StatefulOperatorX<NestedLoopJoinProbeLocalState>;
915
template class StatefulOperatorX<TableFunctionLocalState>;
916
917
template class PipelineXSinkLocalState<HashJoinSharedState>;
918
template class PipelineXSinkLocalState<PartitionedHashJoinSharedState>;
919
template class PipelineXSinkLocalState<SortSharedState>;
920
template class PipelineXSinkLocalState<SpillSortSharedState>;
921
template class PipelineXSinkLocalState<NestedLoopJoinSharedState>;
922
template class PipelineXSinkLocalState<AnalyticSharedState>;
923
template class PipelineXSinkLocalState<AggSharedState>;
924
template class PipelineXSinkLocalState<BucketedAggSharedState>;
925
template class PipelineXSinkLocalState<PartitionedAggSharedState>;
926
template class PipelineXSinkLocalState<FakeSharedState>;
927
template class PipelineXSinkLocalState<UnionSharedState>;
928
template class PipelineXSinkLocalState<PartitionSortNodeSharedState>;
929
template class PipelineXSinkLocalState<MultiCastSharedState>;
930
template class PipelineXSinkLocalState<SetSharedState>;
931
template class PipelineXSinkLocalState<LocalExchangeSharedState>;
932
template class PipelineXSinkLocalState<BasicSharedState>;
933
template class PipelineXSinkLocalState<DataQueueSharedState>;
934
template class PipelineXSinkLocalState<RecCTESharedState>;
935
936
template class PipelineXLocalState<HashJoinSharedState>;
937
template class PipelineXLocalState<PartitionedHashJoinSharedState>;
938
template class PipelineXLocalState<SortSharedState>;
939
template class PipelineXLocalState<SpillSortSharedState>;
940
template class PipelineXLocalState<NestedLoopJoinSharedState>;
941
template class PipelineXLocalState<AnalyticSharedState>;
942
template class PipelineXLocalState<AggSharedState>;
943
template class PipelineXLocalState<BucketedAggSharedState>;
944
template class PipelineXLocalState<PartitionedAggSharedState>;
945
template class PipelineXLocalState<FakeSharedState>;
946
template class PipelineXLocalState<UnionSharedState>;
947
template class PipelineXLocalState<DataQueueSharedState>;
948
template class PipelineXLocalState<MultiCastSharedState>;
949
template class PipelineXLocalState<PartitionSortNodeSharedState>;
950
template class PipelineXLocalState<SetSharedState>;
951
template class PipelineXLocalState<LocalExchangeSharedState>;
952
template class PipelineXLocalState<BasicSharedState>;
953
template class PipelineXLocalState<RecCTESharedState>;
954
955
template class AsyncWriterSink<doris::VFileResultWriter, ResultFileSinkOperatorX>;
956
template class AsyncWriterSink<doris::VJdbcTableWriter, JdbcTableSinkOperatorX>;
957
template class AsyncWriterSink<doris::VTabletWriter, OlapTableSinkOperatorX>;
958
template class AsyncWriterSink<doris::VTabletWriterV2, OlapTableSinkV2OperatorX>;
959
template class AsyncWriterSink<doris::VHiveTableWriter, HiveTableSinkOperatorX>;
960
template class AsyncWriterSink<doris::VIcebergTableWriter, IcebergTableSinkOperatorX>;
961
template class AsyncWriterSink<doris::VIcebergTableWriter, SpillIcebergTableSinkOperatorX>;
962
template class AsyncWriterSink<doris::VIcebergDeleteSink, IcebergDeleteSinkOperatorX>;
963
template class AsyncWriterSink<doris::VIcebergMergeSink, IcebergMergeSinkOperatorX>;
964
template class AsyncWriterSink<doris::VMCTableWriter, MCTableSinkOperatorX>;
965
template class AsyncWriterSink<doris::VTVFTableWriter, TVFTableSinkOperatorX>;
966
967
#ifdef BE_TEST
968
template class OperatorX<DummyOperatorLocalState>;
969
template class DataSinkOperatorX<DummySinkLocalState>;
970
#endif
971
972
} // namespace doris