Coverage Report

Created: 2026-06-05 19:14

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 "common/status.h"
21
#include "exec/common/util.hpp"
22
#include "exec/exchange/local_exchange_sink_operator.h"
23
#include "exec/exchange/local_exchange_source_operator.h"
24
#include "exec/operator/aggregation_sink_operator.h"
25
#include "exec/operator/aggregation_source_operator.h"
26
#include "exec/operator/analytic_sink_operator.h"
27
#include "exec/operator/analytic_source_operator.h"
28
#include "exec/operator/assert_num_rows_operator.h"
29
#include "exec/operator/blackhole_sink_operator.h"
30
#include "exec/operator/bucketed_aggregation_sink_operator.h"
31
#include "exec/operator/bucketed_aggregation_source_operator.h"
32
#include "exec/operator/cache_sink_operator.h"
33
#include "exec/operator/cache_source_operator.h"
34
#include "exec/operator/datagen_operator.h"
35
#include "exec/operator/dict_sink_operator.h"
36
#include "exec/operator/distinct_streaming_aggregation_operator.h"
37
#include "exec/operator/empty_set_operator.h"
38
#include "exec/operator/exchange_sink_operator.h"
39
#include "exec/operator/exchange_source_operator.h"
40
#include "exec/operator/file_scan_operator.h"
41
#include "exec/operator/group_commit_block_sink_operator.h"
42
#include "exec/operator/group_commit_scan_operator.h"
43
#include "exec/operator/hashjoin_build_sink.h"
44
#include "exec/operator/hashjoin_probe_operator.h"
45
#include "exec/operator/hive_table_sink_operator.h"
46
#include "exec/operator/iceberg_delete_sink_operator.h"
47
#include "exec/operator/iceberg_merge_sink_operator.h"
48
#include "exec/operator/iceberg_table_sink_operator.h"
49
#include "exec/operator/jdbc_scan_operator.h"
50
#include "exec/operator/jdbc_table_sink_operator.h"
51
#include "exec/operator/local_merge_sort_source_operator.h"
52
#include "exec/operator/materialization_opertor.h"
53
#include "exec/operator/maxcompute_table_sink_operator.h"
54
#include "exec/operator/memory_scratch_sink_operator.h"
55
#include "exec/operator/meta_scan_operator.h"
56
#include "exec/operator/mock_operator.h"
57
#include "exec/operator/mock_scan_operator.h"
58
#include "exec/operator/multi_cast_data_stream_sink.h"
59
#include "exec/operator/multi_cast_data_stream_source.h"
60
#include "exec/operator/nested_loop_join_build_operator.h"
61
#include "exec/operator/nested_loop_join_probe_operator.h"
62
#include "exec/operator/olap_scan_operator.h"
63
#include "exec/operator/olap_table_sink_operator.h"
64
#include "exec/operator/olap_table_sink_v2_operator.h"
65
#include "exec/operator/partition_sort_sink_operator.h"
66
#include "exec/operator/partition_sort_source_operator.h"
67
#include "exec/operator/partitioned_aggregation_sink_operator.h"
68
#include "exec/operator/partitioned_aggregation_source_operator.h"
69
#include "exec/operator/partitioned_hash_join_probe_operator.h"
70
#include "exec/operator/partitioned_hash_join_sink_operator.h"
71
#include "exec/operator/rec_cte_anchor_sink_operator.h"
72
#include "exec/operator/rec_cte_scan_operator.h"
73
#include "exec/operator/rec_cte_sink_operator.h"
74
#include "exec/operator/rec_cte_source_operator.h"
75
#include "exec/operator/repeat_operator.h"
76
#include "exec/operator/result_file_sink_operator.h"
77
#include "exec/operator/result_sink_operator.h"
78
#include "exec/operator/schema_scan_operator.h"
79
#include "exec/operator/select_operator.h"
80
#include "exec/operator/set_probe_sink_operator.h"
81
#include "exec/operator/set_sink_operator.h"
82
#include "exec/operator/set_source_operator.h"
83
#include "exec/operator/sort_sink_operator.h"
84
#include "exec/operator/sort_source_operator.h"
85
#include "exec/operator/spill_iceberg_table_sink_operator.h"
86
#include "exec/operator/spill_sort_sink_operator.h"
87
#include "exec/operator/spill_sort_source_operator.h"
88
#include "exec/operator/streaming_aggregation_operator.h"
89
#include "exec/operator/table_function_operator.h"
90
#include "exec/operator/tvf_table_sink_operator.h"
91
#include "exec/operator/union_sink_operator.h"
92
#include "exec/operator/union_source_operator.h"
93
#include "exec/pipeline/dependency.h"
94
#include "exec/pipeline/pipeline.h"
95
#include "exprs/vexpr.h"
96
#include "exprs/vexpr_context.h"
97
#include "runtime/runtime_profile.h"
98
#include "runtime/runtime_profile_counter_names.h"
99
#include "util/debug_util.h"
100
#include "util/string_util.h"
101
102
namespace doris {
103
class RowDescriptor;
104
class RuntimeState;
105
} // namespace doris
106
107
namespace doris {
108
109
0
Status OperatorBase::close(RuntimeState* state) {
110
0
    if (_is_closed) {
111
0
        return Status::OK();
112
0
    }
113
0
    _is_closed = true;
114
0
    return Status::OK();
115
0
}
116
117
template <typename SharedStateArg>
118
1.95M
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
1.95M
    if (_parent->nereids_id() == -1) {
120
1.03M
        return fmt::format("(id={})", _parent->node_id());
121
1.03M
    } else {
122
918k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
918k
    }
124
1.95M
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
63.1k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
63.1k
    if (_parent->nereids_id() == -1) {
120
0
        return fmt::format("(id={})", _parent->node_id());
121
63.1k
    } else {
122
63.1k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
63.1k
    }
124
63.1k
}
_ZNK5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
1
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
1
    if (_parent->nereids_id() == -1) {
120
1
        return fmt::format("(id={})", _parent->node_id());
121
1
    } else {
122
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
0
    }
124
1
}
_ZNK5doris19PipelineXLocalStateINS_15SortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
207k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
207k
    if (_parent->nereids_id() == -1) {
120
12
        return fmt::format("(id={})", _parent->node_id());
121
207k
    } else {
122
207k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
207k
    }
124
207k
}
_ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
24
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
24
    if (_parent->nereids_id() == -1) {
120
0
        return fmt::format("(id={})", _parent->node_id());
121
24
    } else {
122
24
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
24
    }
124
24
}
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
8.46k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
8.46k
    if (_parent->nereids_id() == -1) {
120
0
        return fmt::format("(id={})", _parent->node_id());
121
8.46k
    } else {
122
8.46k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
8.46k
    }
124
8.46k
}
_ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
5.78k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
5.78k
    if (_parent->nereids_id() == -1) {
120
9
        return fmt::format("(id={})", _parent->node_id());
121
5.77k
    } else {
122
5.77k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
5.77k
    }
124
5.78k
}
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
110k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
110k
    if (_parent->nereids_id() == -1) {
120
29
        return fmt::format("(id={})", _parent->node_id());
121
110k
    } else {
122
110k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
110k
    }
124
110k
}
_ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
310
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
310
    if (_parent->nereids_id() == -1) {
120
0
        return fmt::format("(id={})", _parent->node_id());
121
310
    } else {
122
310
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
310
    }
124
310
}
_ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
54
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
54
    if (_parent->nereids_id() == -1) {
120
0
        return fmt::format("(id={})", _parent->node_id());
121
54
    } else {
122
54
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
54
    }
124
54
}
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
806k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
806k
    if (_parent->nereids_id() == -1) {
120
341k
        return fmt::format("(id={})", _parent->node_id());
121
465k
    } else {
122
465k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
465k
    }
124
806k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
51.9k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
51.9k
    if (_parent->nereids_id() == -1) {
120
2
        return fmt::format("(id={})", _parent->node_id());
121
51.9k
    } else {
122
51.9k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
51.9k
    }
124
51.9k
}
_ZNK5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
17
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
17
    if (_parent->nereids_id() == -1) {
120
17
        return fmt::format("(id={})", _parent->node_id());
121
17
    } else {
122
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
0
    }
124
17
}
_ZNK5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
6.58k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
6.58k
    if (_parent->nereids_id() == -1) {
120
6.58k
        return fmt::format("(id={})", _parent->node_id());
121
6.58k
    } else {
122
5
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
5
    }
124
6.58k
}
_ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
403
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
403
    if (_parent->nereids_id() == -1) {
120
102
        return fmt::format("(id={})", _parent->node_id());
121
301
    } else {
122
301
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
301
    }
124
403
}
_ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
4.46k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
4.46k
    if (_parent->nereids_id() == -1) {
120
13
        return fmt::format("(id={})", _parent->node_id());
121
4.45k
    } else {
122
4.45k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
4.45k
    }
124
4.46k
}
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
684k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
684k
    if (_parent->nereids_id() == -1) {
120
683k
        return fmt::format("(id={})", _parent->node_id());
121
683k
    } else {
122
561
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
561
    }
124
684k
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
_ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
151
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
151
    if (_parent->nereids_id() == -1) {
120
0
        return fmt::format("(id={})", _parent->node_id());
121
151
    } else {
122
151
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
151
    }
124
151
}
125
126
template <typename SharedStateArg>
127
1.19M
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
1.19M
    if (_parent->nereids_id() == -1) {
129
736k
        return fmt::format("(id={})", _parent->node_id());
130
736k
    } else {
131
454k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
454k
    }
133
1.19M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
111k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
111k
    if (_parent->nereids_id() == -1) {
129
0
        return fmt::format("(id={})", _parent->node_id());
130
111k
    } else {
131
111k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
111k
    }
133
111k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
2
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
2
    if (_parent->nereids_id() == -1) {
129
1
        return fmt::format("(id={})", _parent->node_id());
130
1
    } else {
131
1
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
1
    }
133
2
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
211k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
211k
    if (_parent->nereids_id() == -1) {
129
9
        return fmt::format("(id={})", _parent->node_id());
130
211k
    } else {
131
211k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
211k
    }
133
211k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
30
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
30
    if (_parent->nereids_id() == -1) {
129
0
        return fmt::format("(id={})", _parent->node_id());
130
30
    } else {
131
30
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
30
    }
133
30
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
8.54k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
8.54k
    if (_parent->nereids_id() == -1) {
129
0
        return fmt::format("(id={})", _parent->node_id());
130
8.54k
    } else {
131
8.54k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
8.54k
    }
133
8.54k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
5.82k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
5.82k
    if (_parent->nereids_id() == -1) {
129
9
        return fmt::format("(id={})", _parent->node_id());
130
5.81k
    } else {
131
5.81k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
5.81k
    }
133
5.82k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
111k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
111k
    if (_parent->nereids_id() == -1) {
129
29
        return fmt::format("(id={})", _parent->node_id());
130
111k
    } else {
131
111k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
111k
    }
133
111k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
282
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
282
    if (_parent->nereids_id() == -1) {
129
0
        return fmt::format("(id={})", _parent->node_id());
130
282
    } else {
131
282
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
282
    }
133
282
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
64
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
64
    if (_parent->nereids_id() == -1) {
129
0
        return fmt::format("(id={})", _parent->node_id());
130
64
    } else {
131
64
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
64
    }
133
64
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
64
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
64
    if (_parent->nereids_id() == -1) {
129
64
        return fmt::format("(id={})", _parent->node_id());
130
64
    } else {
131
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
0
    }
133
64
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
5.18k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
5.18k
    if (_parent->nereids_id() == -1) {
129
3
        return fmt::format("(id={})", _parent->node_id());
130
5.17k
    } else {
131
5.17k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
5.17k
    }
133
5.18k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
404
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
404
    if (_parent->nereids_id() == -1) {
129
102
        return fmt::format("(id={})", _parent->node_id());
130
302
    } else {
131
302
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
302
    }
133
404
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
12.3k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
12.3k
    if (_parent->nereids_id() == -1) {
129
12.3k
        return fmt::format("(id={})", _parent->node_id());
130
12.3k
    } else {
131
3
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
3
    }
133
12.3k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
275k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
275k
    if (_parent->nereids_id() == -1) {
129
275k
        return fmt::format("(id={})", _parent->node_id());
130
275k
    } else {
131
129
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
129
    }
133
275k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
448k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
448k
    if (_parent->nereids_id() == -1) {
129
448k
        return fmt::format("(id={})", _parent->node_id());
130
448k
    } else {
131
195
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
195
    }
133
448k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
17
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
17
    if (_parent->nereids_id() == -1) {
129
17
        return fmt::format("(id={})", _parent->node_id());
130
17
    } else {
131
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
0
    }
133
17
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
302
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
302
    if (_parent->nereids_id() == -1) {
129
0
        return fmt::format("(id={})", _parent->node_id());
130
302
    } else {
131
302
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
302
    }
133
302
}
134
135
template <typename SharedStateArg>
136
29.0k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
29.0k
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
29.0k
    _terminated = true;
141
29.0k
    return Status::OK();
142
29.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
24.0k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
24.0k
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
24.0k
    _terminated = true;
141
24.0k
    return Status::OK();
142
24.0k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
1.67k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
1.67k
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
1.67k
    _terminated = true;
141
1.67k
    return Status::OK();
142
1.67k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
3
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
3
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
3
    _terminated = true;
141
3
    return Status::OK();
142
3
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
1
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
1
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
1
    _terminated = true;
141
1
    return Status::OK();
142
1
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
2.06k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
2.06k
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
2.06k
    _terminated = true;
141
2.06k
    return Status::OK();
142
2.06k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
5
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
5
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
5
    _terminated = true;
141
5
    return Status::OK();
142
5
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
592
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
592
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
592
    _terminated = true;
141
592
    return Status::OK();
142
592
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
10
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
10
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
10
    _terminated = true;
141
10
    return Status::OK();
142
10
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
1
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
1
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
1
    _terminated = true;
141
1
    return Status::OK();
142
1
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
352
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
352
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
352
    _terminated = true;
141
352
    return Status::OK();
142
352
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
5
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
5
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
5
    _terminated = true;
141
5
    return Status::OK();
142
5
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
190
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
190
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
190
    _terminated = true;
141
190
    return Status::OK();
142
190
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
142
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
142
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
142
    _terminated = true;
141
142
    return Status::OK();
142
142
}
143
144
681k
DataDistribution OperatorBase::required_data_distribution(RuntimeState* /*state*/) const {
145
681k
    return _child && _child->is_serial_operator() && !is_source()
146
681k
                   ? DataDistribution(ExchangeType::PASSTHROUGH)
147
681k
                   : DataDistribution(ExchangeType::NOOP);
148
681k
}
149
150
10.7k
bool OperatorBase::is_hash_shuffle(ExchangeType exchange_type) {
151
10.7k
    return exchange_type == ExchangeType::HASH_SHUFFLE ||
152
10.7k
           exchange_type == ExchangeType::BUCKET_HASH_SHUFFLE;
153
10.7k
}
154
155
87.3k
bool OperatorBase::child_breaks_local_key_distribution(RuntimeState* state) const {
156
87.3k
    if (!_child) {
157
29.4k
        return false;
158
29.4k
    }
159
57.9k
    if (_child->is_serial_operator()) {
160
46.3k
        return true;
161
46.3k
    }
162
11.5k
    const auto child_distribution = _child->required_data_distribution(state);
163
11.5k
    return child_distribution.need_local_exchange() &&
164
11.5k
           !is_hash_shuffle(child_distribution.distribution_type);
165
57.9k
}
166
167
81.3k
const RowDescriptor& OperatorBase::row_desc() const {
168
81.3k
    return _child->row_desc();
169
81.3k
}
170
171
template <typename SharedStateArg>
172
20.0k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
20.0k
    fmt::memory_buffer debug_string_buffer;
174
20.0k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
20.0k
    return fmt::to_string(debug_string_buffer);
176
20.0k
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
172
56
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
56
    fmt::memory_buffer debug_string_buffer;
174
56
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
56
    return fmt::to_string(debug_string_buffer);
176
56
}
_ZNK5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
172
3
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
3
    fmt::memory_buffer debug_string_buffer;
174
3
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
3
    return fmt::to_string(debug_string_buffer);
176
3
}
_ZNK5doris19PipelineXLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
172
14
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
14
    fmt::memory_buffer debug_string_buffer;
174
14
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
14
    return fmt::to_string(debug_string_buffer);
176
14
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
172
14
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
14
    fmt::memory_buffer debug_string_buffer;
174
14
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
14
    return fmt::to_string(debug_string_buffer);
176
14
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
172
28
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
28
    fmt::memory_buffer debug_string_buffer;
174
28
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
28
    return fmt::to_string(debug_string_buffer);
176
28
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
172
19.7k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
19.7k
    fmt::memory_buffer debug_string_buffer;
174
19.7k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
19.7k
    return fmt::to_string(debug_string_buffer);
176
19.7k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
172
1
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
1
    fmt::memory_buffer debug_string_buffer;
174
1
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
1
    return fmt::to_string(debug_string_buffer);
176
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
172
198
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
198
    fmt::memory_buffer debug_string_buffer;
174
198
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
198
    return fmt::to_string(debug_string_buffer);
176
198
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
177
178
template <typename SharedStateArg>
179
19.9k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
180
19.9k
    fmt::memory_buffer debug_string_buffer;
181
19.9k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
182
19.9k
    return fmt::to_string(debug_string_buffer);
183
19.9k
}
_ZNK5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
179
14
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
180
14
    fmt::memory_buffer debug_string_buffer;
181
14
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
182
14
    return fmt::to_string(debug_string_buffer);
183
14
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
179
14
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
180
14
    fmt::memory_buffer debug_string_buffer;
181
14
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
182
14
    return fmt::to_string(debug_string_buffer);
183
14
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
179
14
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
180
14
    fmt::memory_buffer debug_string_buffer;
181
14
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
182
14
    return fmt::to_string(debug_string_buffer);
183
14
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
179
28
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
180
28
    fmt::memory_buffer debug_string_buffer;
181
28
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
182
28
    return fmt::to_string(debug_string_buffer);
183
28
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
179
142
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
180
142
    fmt::memory_buffer debug_string_buffer;
181
142
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
182
142
    return fmt::to_string(debug_string_buffer);
183
142
}
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
179
74
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
180
74
    fmt::memory_buffer debug_string_buffer;
181
74
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
182
74
    return fmt::to_string(debug_string_buffer);
183
74
}
_ZNK5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
179
19.6k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
180
19.6k
    fmt::memory_buffer debug_string_buffer;
181
19.6k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
182
19.6k
    return fmt::to_string(debug_string_buffer);
183
19.6k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
184
185
20.0k
std::string OperatorXBase::debug_string(int indentation_level) const {
186
20.0k
    fmt::memory_buffer debug_string_buffer;
187
20.0k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, parallel_tasks={}, _is_serial_operator={}",
188
20.0k
                   std::string(indentation_level * 2, ' '), _op_name, node_id(), _parallel_tasks,
189
20.0k
                   _is_serial_operator);
190
20.0k
    return fmt::to_string(debug_string_buffer);
191
20.0k
}
192
193
20.0k
std::string OperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
194
20.0k
    return state->get_local_state(operator_id())->debug_string(indentation_level);
195
20.0k
}
196
197
609k
Status OperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
198
609k
    std::string node_name = print_plan_node_type(tnode.node_type);
199
609k
    _nereids_id = tnode.nereids_id;
200
609k
    if (!tnode.intermediate_output_tuple_id_list.empty()) {
201
3.36k
        if (!tnode.__isset.output_tuple_id) {
202
0
            return Status::InternalError("no final output tuple id");
203
0
        }
204
3.36k
        if (tnode.intermediate_output_tuple_id_list.size() !=
205
3.36k
            tnode.intermediate_projections_list.size()) {
206
0
            return Status::InternalError(
207
0
                    "intermediate_output_tuple_id_list size:{} not match "
208
0
                    "intermediate_projections_list size:{}",
209
0
                    tnode.intermediate_output_tuple_id_list.size(),
210
0
                    tnode.intermediate_projections_list.size());
211
0
        }
212
3.36k
    }
213
609k
    auto substr = node_name.substr(0, node_name.find("_NODE"));
214
609k
    _op_name = substr + "_OPERATOR";
215
216
609k
    if (tnode.__isset.vconjunct) {
217
0
        return Status::InternalError("vconjunct is not supported yet");
218
609k
    } else if (tnode.__isset.conjuncts) {
219
348k
        for (const auto& conjunct : tnode.conjuncts) {
220
348k
            VExprContextSPtr context;
221
348k
            RETURN_IF_ERROR(VExpr::create_expr_tree(conjunct, context));
222
348k
            _conjuncts.emplace_back(context);
223
348k
        }
224
116k
    }
225
226
    // create the projections expr
227
609k
    if (tnode.__isset.projections) {
228
273k
        DCHECK(tnode.__isset.output_tuple_id);
229
273k
        RETURN_IF_ERROR(VExpr::create_expr_trees(tnode.projections, _projections));
230
273k
    }
231
609k
    if (!tnode.intermediate_projections_list.empty()) {
232
3.36k
        DCHECK(tnode.__isset.projections) << "no final projections";
233
3.36k
        _intermediate_projections.reserve(tnode.intermediate_projections_list.size());
234
5.92k
        for (const auto& tnode_projections : tnode.intermediate_projections_list) {
235
5.92k
            VExprContextSPtrs projections;
236
5.92k
            RETURN_IF_ERROR(VExpr::create_expr_trees(tnode_projections, projections));
237
5.92k
            _intermediate_projections.push_back(projections);
238
5.92k
        }
239
3.36k
    }
240
609k
    return Status::OK();
241
609k
}
242
243
639k
Status OperatorXBase::prepare(RuntimeState* state) {
244
639k
    for (auto& conjunct : _conjuncts) {
245
348k
        RETURN_IF_ERROR(conjunct->prepare(state, intermediate_row_desc()));
246
348k
    }
247
639k
    if (state->enable_adjust_conjunct_order_by_cost()) {
248
588k
        std::ranges::sort(_conjuncts, [](const auto& a, const auto& b) {
249
463k
            return a->execute_cost() < b->execute_cost();
250
463k
        });
251
588k
    };
252
253
644k
    for (int i = 0; i < _intermediate_projections.size(); i++) {
254
5.93k
        RETURN_IF_ERROR(
255
5.93k
                VExpr::prepare(_intermediate_projections[i], state, intermediate_row_desc(i)));
256
5.93k
    }
257
639k
    RETURN_IF_ERROR(VExpr::prepare(_projections, state, projections_row_desc()));
258
259
639k
    if (has_output_row_desc()) {
260
273k
        RETURN_IF_ERROR(VExpr::check_expr_output_type(_projections, *_output_row_descriptor));
261
273k
    }
262
263
639k
    for (auto& conjunct : _conjuncts) {
264
348k
        RETURN_IF_ERROR(conjunct->open(state));
265
348k
    }
266
639k
    RETURN_IF_ERROR(VExpr::open(_projections, state));
267
639k
    for (auto& projections : _intermediate_projections) {
268
5.93k
        RETURN_IF_ERROR(VExpr::open(projections, state));
269
5.93k
    }
270
639k
    if (_child && !is_source()) {
271
126k
        RETURN_IF_ERROR(_child->prepare(state));
272
126k
    }
273
274
639k
    if (VExpr::contains_blockable_function(_conjuncts) ||
275
639k
        VExpr::contains_blockable_function(_projections)) {
276
0
        _blockable = true;
277
0
    }
278
279
639k
    return Status::OK();
280
639k
}
281
282
5.97k
Status OperatorXBase::terminate(RuntimeState* state) {
283
5.97k
    if (_child && !is_source()) {
284
911
        RETURN_IF_ERROR(_child->terminate(state));
285
911
    }
286
5.97k
    auto result = state->get_local_state_result(operator_id());
287
5.97k
    if (!result) {
288
0
        return result.error();
289
0
    }
290
5.97k
    return result.value()->terminate(state);
291
5.97k
}
292
293
5.52M
Status OperatorXBase::close(RuntimeState* state) {
294
5.52M
    if (_child && !is_source()) {
295
1.06M
        RETURN_IF_ERROR(_child->close(state));
296
1.06M
    }
297
5.52M
    auto result = state->get_local_state_result(operator_id());
298
5.52M
    if (!result) {
299
0
        return result.error();
300
0
    }
301
5.52M
    return result.value()->close(state);
302
5.52M
}
303
304
270k
void PipelineXLocalStateBase::clear_origin_block() {
305
270k
    _origin_block.clear_column_data(_parent->intermediate_row_desc().num_materialized_slots());
306
270k
}
307
308
546k
Status PipelineXLocalStateBase::filter_block(const VExprContextSPtrs& expr_contexts, Block* block) {
309
546k
    RETURN_IF_ERROR(VExprContext::filter_block(expr_contexts, block, block->columns()));
310
311
546k
    _estimate_memory_usage += VExprContext::get_memory_usage(expr_contexts);
312
546k
    return Status::OK();
313
546k
}
314
315
0
bool PipelineXLocalStateBase::is_blockable() const {
316
0
    return std::any_of(_projections.begin(), _projections.end(),
317
0
                       [&](VExprContextSPtr expr) -> bool { return expr->is_blockable(); });
318
0
}
319
320
Status OperatorXBase::do_projections(RuntimeState* state, Block* origin_block,
321
270k
                                     Block* output_block) const {
322
270k
    auto* local_state = state->get_local_state(operator_id());
323
270k
    SCOPED_TIMER(local_state->exec_time_counter());
324
270k
    SCOPED_TIMER(local_state->_projection_timer);
325
270k
    const size_t rows = origin_block->rows();
326
270k
    if (rows == 0) {
327
146k
        return Status::OK();
328
146k
    }
329
124k
    Block input_block = *origin_block;
330
331
124k
    size_t bytes_usage = 0;
332
124k
    ColumnsWithTypeAndName new_columns;
333
124k
    for (const auto& projections : local_state->_intermediate_projections) {
334
1.04k
        if (projections.empty()) {
335
0
            return Status::InternalError("meet empty intermediate projection, node id: {}",
336
0
                                         node_id());
337
0
        }
338
1.04k
        new_columns.resize(projections.size());
339
7.66k
        for (int i = 0; i < projections.size(); i++) {
340
6.62k
            RETURN_IF_ERROR(projections[i]->execute(&input_block, new_columns[i]));
341
6.62k
            if (new_columns[i].column->size() != rows) {
342
0
                return Status::InternalError(
343
0
                        "intermediate projection result column size {} not equal input rows {}, "
344
0
                        "expr: {}",
345
0
                        new_columns[i].column->size(), rows,
346
0
                        projections[i]->root()->debug_string());
347
0
            }
348
6.62k
        }
349
1.04k
        Block tmp_block {new_columns};
350
1.04k
        bytes_usage += tmp_block.allocated_bytes();
351
1.04k
        input_block.swap(tmp_block);
352
1.04k
    }
353
354
124k
    if (input_block.rows() != rows) {
355
0
        return Status::InternalError(
356
0
                "after intermediate projections input block rows {} not equal origin rows {}, "
357
0
                "input_block: {}",
358
0
                input_block.rows(), rows, input_block.dump_structure());
359
0
    }
360
593k
    auto insert_column_datas = [&](auto& to, ColumnPtr& from, size_t rows) {
361
593k
        if (to->is_nullable() && !from->is_nullable()) {
362
0
            if (_keep_origin || !from->is_exclusive()) {
363
0
                auto& null_column = reinterpret_cast<ColumnNullable&>(*to);
364
0
                null_column.get_nested_column().insert_range_from(*from, 0, rows);
365
0
                null_column.get_null_map_column().get_data().resize_fill(rows, 0);
366
0
                bytes_usage += null_column.allocated_bytes();
367
0
            } else {
368
0
                to = make_nullable(from, false)->assert_mutable();
369
0
            }
370
593k
        } else {
371
593k
            if (_keep_origin || !from->is_exclusive()) {
372
580k
                to->insert_range_from(*from, 0, rows);
373
580k
                bytes_usage += from->allocated_bytes();
374
580k
            } else {
375
12.6k
                to = from->assert_mutable();
376
12.6k
            }
377
593k
        }
378
593k
    };
379
380
124k
    auto scoped_mutable_block = VectorizedUtils::build_scoped_mutable_mem_reuse_block(
381
124k
            output_block, *_output_row_descriptor);
382
124k
    auto& mutable_block = scoped_mutable_block.mutable_block();
383
124k
    auto& mutable_columns = mutable_block.mutable_columns();
384
124k
    if (rows != 0) {
385
124k
        DCHECK_EQ(mutable_columns.size(), local_state->_projections.size()) << debug_string();
386
718k
        for (int i = 0; i < mutable_columns.size(); ++i) {
387
593k
            ColumnPtr column_ptr;
388
593k
            RETURN_IF_ERROR(local_state->_projections[i]->execute(&input_block, column_ptr));
389
593k
            if (column_ptr->size() != rows) {
390
0
                return Status::InternalError(
391
0
                        "projection result column size {} not equal input rows {}, expr: {}",
392
0
                        column_ptr->size(), rows,
393
0
                        local_state->_projections[i]->root()->debug_string());
394
0
            }
395
593k
            column_ptr = column_ptr->convert_to_full_column_if_const();
396
593k
            bytes_usage += column_ptr->allocated_bytes();
397
593k
            insert_column_datas(mutable_columns[i], column_ptr, rows);
398
593k
        }
399
124k
        DCHECK(mutable_block.rows() == rows);
400
124k
    }
401
124k
    local_state->_estimate_memory_usage += bytes_usage;
402
403
124k
    return Status::OK();
404
124k
}
405
406
4.47M
Status OperatorXBase::get_block_after_projects(RuntimeState* state, Block* block, bool* eos) {
407
4.47M
    DBUG_EXECUTE_IF("Pipeline::return_empty_block", {
408
4.47M
        if (this->_op_name == "AGGREGATION_OPERATOR" || this->_op_name == "HASH_JOIN_OPERATOR" ||
409
4.47M
            this->_op_name == "PARTITIONED_AGGREGATION_OPERATOR" ||
410
4.47M
            this->_op_name == "PARTITIONED_HASH_JOIN_OPERATOR" ||
411
4.47M
            this->_op_name == "CROSS_JOIN_OPERATOR" || this->_op_name == "SORT_OPERATOR") {
412
4.47M
            if (_debug_point_count++ % 2 == 0) {
413
4.47M
                return Status::OK();
414
4.47M
            }
415
4.47M
        }
416
4.47M
    });
417
418
4.47M
    Status status;
419
4.47M
    auto* local_state = state->get_local_state(operator_id());
420
4.47M
    Defer defer([&]() {
421
4.47M
        if (status.ok()) {
422
4.47M
            local_state->update_output_block_counters(*block);
423
4.47M
        }
424
4.47M
    });
425
4.47M
    if (_output_row_descriptor) {
426
270k
        local_state->clear_origin_block();
427
270k
        status = get_block(state, &local_state->_origin_block, eos);
428
270k
        if (UNLIKELY(!status.ok())) {
429
20
            return status;
430
20
        }
431
270k
        status = do_projections(state, &local_state->_origin_block, block);
432
270k
        return status;
433
270k
    }
434
4.20M
    status = get_block(state, block, eos);
435
4.20M
    RETURN_IF_ERROR(block->check_type_and_column());
436
4.20M
    return status;
437
4.20M
}
438
439
2.70M
void PipelineXLocalStateBase::reached_limit(Block* block, bool* eos) {
440
2.70M
    if (_parent->_limit != -1 and _num_rows_returned + block->rows() >= _parent->_limit) {
441
5.60k
        block->set_num_rows(_parent->_limit - _num_rows_returned);
442
5.60k
        *eos = true;
443
5.60k
    }
444
445
2.70M
    DBUG_EXECUTE_IF("Pipeline::reached_limit_early", {
446
2.70M
        auto op_name = to_lower(_parent->_op_name);
447
2.70M
        auto arg_op_name = dp->param<std::string>("op_name");
448
2.70M
        arg_op_name = to_lower(arg_op_name);
449
450
2.70M
        if (op_name == arg_op_name) {
451
2.70M
            *eos = true;
452
2.70M
        }
453
2.70M
    });
454
455
2.70M
    if (auto rows = block->rows()) {
456
765k
        _num_rows_returned += rows;
457
765k
        _state->get_query_ctx()->resource_ctx()->io_context()->update_process_rows(rows);
458
765k
    }
459
2.70M
}
460
461
29.0k
Status DataSinkOperatorXBase::terminate(RuntimeState* state) {
462
29.0k
    auto result = state->get_sink_local_state_result();
463
29.0k
    if (!result) {
464
0
        return result.error();
465
0
    }
466
29.0k
    return result.value()->terminate(state);
467
29.0k
}
468
469
19.9k
std::string DataSinkOperatorXBase::debug_string(int indentation_level) const {
470
19.9k
    fmt::memory_buffer debug_string_buffer;
471
472
19.9k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, _is_serial_operator={}",
473
19.9k
                   std::string(indentation_level * 2, ' '), _name, node_id(), _is_serial_operator);
474
19.9k
    return fmt::to_string(debug_string_buffer);
475
19.9k
}
476
477
19.9k
std::string DataSinkOperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
478
19.9k
    return state->get_sink_local_state()->debug_string(indentation_level);
479
19.9k
}
480
481
387k
Status DataSinkOperatorXBase::init(const TDataSink& tsink) {
482
387k
    std::string op_name = "UNKNOWN_SINK";
483
387k
    auto it = _TDataSinkType_VALUES_TO_NAMES.find(tsink.type);
484
485
388k
    if (it != _TDataSinkType_VALUES_TO_NAMES.end()) {
486
388k
        op_name = it->second;
487
388k
    }
488
387k
    _name = op_name + "_OPERATOR";
489
387k
    return Status::OK();
490
387k
}
491
492
169k
Status DataSinkOperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
493
169k
    std::string op_name = print_plan_node_type(tnode.node_type);
494
169k
    _nereids_id = tnode.nereids_id;
495
169k
    auto substr = op_name.substr(0, op_name.find("_NODE"));
496
169k
    _name = substr + "_SINK_OPERATOR";
497
169k
    return Status::OK();
498
169k
}
499
500
template <typename LocalStateType>
501
Status DataSinkOperatorX<LocalStateType>::setup_local_state(RuntimeState* state,
502
1.78M
                                                            LocalSinkStateInfo& info) {
503
1.78M
    auto local_state = LocalStateType::create_unique(this, state);
504
1.78M
    RETURN_IF_ERROR(local_state->init(state, info));
505
1.78M
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
1.78M
    return Status::OK();
507
1.78M
}
_ZN5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
111k
                                                            LocalSinkStateInfo& info) {
503
111k
    auto local_state = LocalStateType::create_unique(this, state);
504
111k
    RETURN_IF_ERROR(local_state->init(state, info));
505
111k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
111k
    return Status::OK();
507
111k
}
_ZN5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
396k
                                                            LocalSinkStateInfo& info) {
503
396k
    auto local_state = LocalStateType::create_unique(this, state);
504
396k
    RETURN_IF_ERROR(local_state->init(state, info));
505
396k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
396k
    return Status::OK();
507
396k
}
_ZN5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
44
                                                            LocalSinkStateInfo& info) {
503
44
    auto local_state = LocalStateType::create_unique(this, state);
504
44
    RETURN_IF_ERROR(local_state->init(state, info));
505
44
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
44
    return Status::OK();
507
44
}
_ZN5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
3
                                                            LocalSinkStateInfo& info) {
503
3
    auto local_state = LocalStateType::create_unique(this, state);
504
3
    RETURN_IF_ERROR(local_state->init(state, info));
505
3
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
3
    return Status::OK();
507
3
}
_ZN5doris17DataSinkOperatorXINS_24ResultFileSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
430
                                                            LocalSinkStateInfo& info) {
503
430
    auto local_state = LocalStateType::create_unique(this, state);
504
430
    RETURN_IF_ERROR(local_state->init(state, info));
505
430
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
430
    return Status::OK();
507
430
}
_ZN5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
43.6k
                                                            LocalSinkStateInfo& info) {
503
43.6k
    auto local_state = LocalStateType::create_unique(this, state);
504
43.6k
    RETURN_IF_ERROR(local_state->init(state, info));
505
43.6k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
43.6k
    return Status::OK();
507
43.6k
}
_ZN5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
4.50k
                                                            LocalSinkStateInfo& info) {
503
4.50k
    auto local_state = LocalStateType::create_unique(this, state);
504
4.50k
    RETURN_IF_ERROR(local_state->init(state, info));
505
4.50k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
4.50k
    return Status::OK();
507
4.50k
}
_ZN5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
2.57k
                                                            LocalSinkStateInfo& info) {
503
2.57k
    auto local_state = LocalStateType::create_unique(this, state);
504
2.57k
    RETURN_IF_ERROR(local_state->init(state, info));
505
2.57k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
2.57k
    return Status::OK();
507
2.57k
}
_ZN5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
78
                                                            LocalSinkStateInfo& info) {
503
78
    auto local_state = LocalStateType::create_unique(this, state);
504
78
    RETURN_IF_ERROR(local_state->init(state, info));
505
78
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
78
    return Status::OK();
507
78
}
_ZN5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
1.69k
                                                            LocalSinkStateInfo& info) {
503
1.69k
    auto local_state = LocalStateType::create_unique(this, state);
504
1.69k
    RETURN_IF_ERROR(local_state->init(state, info));
505
1.69k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
1.69k
    return Status::OK();
507
1.69k
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_27IcebergDeleteSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
80
                                                            LocalSinkStateInfo& info) {
503
80
    auto local_state = LocalStateType::create_unique(this, state);
504
80
    RETURN_IF_ERROR(local_state->init(state, info));
505
80
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
80
    return Status::OK();
507
80
}
_ZN5doris17DataSinkOperatorXINS_26IcebergMergeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
320
                                                            LocalSinkStateInfo& info) {
503
320
    auto local_state = LocalStateType::create_unique(this, state);
504
320
    RETURN_IF_ERROR(local_state->init(state, info));
505
320
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
320
    return Status::OK();
507
320
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_21MCTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
5.82k
                                                            LocalSinkStateInfo& info) {
503
5.82k
    auto local_state = LocalStateType::create_unique(this, state);
504
5.82k
    RETURN_IF_ERROR(local_state->init(state, info));
505
5.82k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
5.82k
    return Status::OK();
507
5.82k
}
_ZN5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
61
                                                            LocalSinkStateInfo& info) {
503
61
    auto local_state = LocalStateType::create_unique(this, state);
504
61
    RETURN_IF_ERROR(local_state->init(state, info));
505
61
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
61
    return Status::OK();
507
61
}
_ZN5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
211k
                                                            LocalSinkStateInfo& info) {
503
211k
    auto local_state = LocalStateType::create_unique(this, state);
504
211k
    RETURN_IF_ERROR(local_state->init(state, info));
505
211k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
211k
    return Status::OK();
507
211k
}
_ZN5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
30
                                                            LocalSinkStateInfo& info) {
503
30
    auto local_state = LocalStateType::create_unique(this, state);
504
30
    RETURN_IF_ERROR(local_state->init(state, info));
505
30
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
30
    return Status::OK();
507
30
}
_ZN5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
275k
                                                            LocalSinkStateInfo& info) {
503
275k
    auto local_state = LocalStateType::create_unique(this, state);
504
275k
    RETURN_IF_ERROR(local_state->init(state, info));
505
275k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
275k
    return Status::OK();
507
275k
}
_ZN5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
111k
                                                            LocalSinkStateInfo& info) {
503
111k
    auto local_state = LocalStateType::create_unique(this, state);
504
111k
    RETURN_IF_ERROR(local_state->init(state, info));
505
111k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
111k
    return Status::OK();
507
111k
}
_ZN5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
282
                                                            LocalSinkStateInfo& info) {
503
282
    auto local_state = LocalStateType::create_unique(this, state);
504
282
    RETURN_IF_ERROR(local_state->init(state, info));
505
282
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
282
    return Status::OK();
507
282
}
_ZN5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
64
                                                            LocalSinkStateInfo& info) {
503
64
    auto local_state = LocalStateType::create_unique(this, state);
504
64
    RETURN_IF_ERROR(local_state->init(state, info));
505
64
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
64
    return Status::OK();
507
64
}
_ZN5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
586k
                                                            LocalSinkStateInfo& info) {
503
586k
    auto local_state = LocalStateType::create_unique(this, state);
504
586k
    RETURN_IF_ERROR(local_state->init(state, info));
505
586k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
586k
    return Status::OK();
507
586k
}
_ZN5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
8.54k
                                                            LocalSinkStateInfo& info) {
503
8.54k
    auto local_state = LocalStateType::create_unique(this, state);
504
8.54k
    RETURN_IF_ERROR(local_state->init(state, info));
505
8.54k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
8.54k
    return Status::OK();
507
8.54k
}
_ZN5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
5.17k
                                                            LocalSinkStateInfo& info) {
503
5.17k
    auto local_state = LocalStateType::create_unique(this, state);
504
5.17k
    RETURN_IF_ERROR(local_state->init(state, info));
505
5.17k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
5.17k
    return Status::OK();
507
5.17k
}
_ZN5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
2.56k
                                                            LocalSinkStateInfo& info) {
503
2.56k
    auto local_state = LocalStateType::create_unique(this, state);
504
2.56k
    RETURN_IF_ERROR(local_state->init(state, info));
505
2.56k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
2.56k
    return Status::OK();
507
2.56k
}
_ZN5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
302
                                                            LocalSinkStateInfo& info) {
503
302
    auto local_state = LocalStateType::create_unique(this, state);
504
302
    RETURN_IF_ERROR(local_state->init(state, info));
505
302
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
302
    return Status::OK();
507
302
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
4.74k
                                                            LocalSinkStateInfo& info) {
503
4.74k
    auto local_state = LocalStateType::create_unique(this, state);
504
4.74k
    RETURN_IF_ERROR(local_state->init(state, info));
505
4.74k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
4.74k
    return Status::OK();
507
4.74k
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
2.69k
                                                            LocalSinkStateInfo& info) {
503
2.69k
    auto local_state = LocalStateType::create_unique(this, state);
504
2.69k
    RETURN_IF_ERROR(local_state->init(state, info));
505
2.69k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
2.69k
    return Status::OK();
507
2.69k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
2.40k
                                                            LocalSinkStateInfo& info) {
503
2.40k
    auto local_state = LocalStateType::create_unique(this, state);
504
2.40k
    RETURN_IF_ERROR(local_state->init(state, info));
505
2.40k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
2.40k
    return Status::OK();
507
2.40k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
2.47k
                                                            LocalSinkStateInfo& info) {
503
2.47k
    auto local_state = LocalStateType::create_unique(this, state);
504
2.47k
    RETURN_IF_ERROR(local_state->init(state, info));
505
2.47k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
2.47k
    return Status::OK();
507
2.47k
}
_ZN5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
1
                                                            LocalSinkStateInfo& info) {
503
1
    auto local_state = LocalStateType::create_unique(this, state);
504
1
    RETURN_IF_ERROR(local_state->init(state, info));
505
1
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
1
    return Status::OK();
507
1
}
_ZN5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
167
                                                            LocalSinkStateInfo& info) {
503
167
    auto local_state = LocalStateType::create_unique(this, state);
504
167
    RETURN_IF_ERROR(local_state->init(state, info));
505
167
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
167
    return Status::OK();
507
167
}
_ZN5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
14
                                                            LocalSinkStateInfo& info) {
503
14
    auto local_state = LocalStateType::create_unique(this, state);
504
14
    RETURN_IF_ERROR(local_state->init(state, info));
505
14
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
14
    return Status::OK();
507
14
}
_ZN5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
104
                                                            LocalSinkStateInfo& info) {
503
104
    auto local_state = LocalStateType::create_unique(this, state);
504
104
    RETURN_IF_ERROR(local_state->init(state, info));
505
104
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
104
    return Status::OK();
507
104
}
_ZN5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
151
                                                            LocalSinkStateInfo& info) {
503
151
    auto local_state = LocalStateType::create_unique(this, state);
504
151
    RETURN_IF_ERROR(local_state->init(state, info));
505
151
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
151
    return Status::OK();
507
151
}
_ZN5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
151
                                                            LocalSinkStateInfo& info) {
503
151
    auto local_state = LocalStateType::create_unique(this, state);
504
151
    RETURN_IF_ERROR(local_state->init(state, info));
505
151
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
151
    return Status::OK();
507
151
}
508
509
template <typename LocalStateType>
510
1.48M
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
511
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
0
                                 LocalExchangeSharedState>) {
513
0
        return nullptr;
514
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
515
0
                                        MultiCastSharedState>) {
516
0
        throw Exception(Status::FatalError("should not reach here!"));
517
1.48M
    } else {
518
1.48M
        auto ss = LocalStateType::SharedStateType::create_shared();
519
1.48M
        ss->id = operator_id();
520
1.48M
        for (auto& dest : dests_id()) {
521
1.47M
            ss->related_op_ids.insert(dest);
522
1.47M
        }
523
1.48M
        return ss;
524
1.48M
    }
525
1.48M
}
_ZNK5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
97.4k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
511
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                 LocalExchangeSharedState>) {
513
        return nullptr;
514
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
515
                                        MultiCastSharedState>) {
516
        throw Exception(Status::FatalError("should not reach here!"));
517
97.4k
    } else {
518
97.4k
        auto ss = LocalStateType::SharedStateType::create_shared();
519
97.4k
        ss->id = operator_id();
520
97.4k
        for (auto& dest : dests_id()) {
521
97.1k
            ss->related_op_ids.insert(dest);
522
97.1k
        }
523
97.4k
        return ss;
524
97.4k
    }
525
97.4k
}
_ZNK5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
398k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
511
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                 LocalExchangeSharedState>) {
513
        return nullptr;
514
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
515
                                        MultiCastSharedState>) {
516
        throw Exception(Status::FatalError("should not reach here!"));
517
398k
    } else {
518
398k
        auto ss = LocalStateType::SharedStateType::create_shared();
519
398k
        ss->id = operator_id();
520
398k
        for (auto& dest : dests_id()) {
521
395k
            ss->related_op_ids.insert(dest);
522
395k
        }
523
398k
        return ss;
524
398k
    }
525
398k
}
_ZNK5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
44
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
511
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                 LocalExchangeSharedState>) {
513
        return nullptr;
514
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
515
                                        MultiCastSharedState>) {
516
        throw Exception(Status::FatalError("should not reach here!"));
517
44
    } else {
518
44
        auto ss = LocalStateType::SharedStateType::create_shared();
519
44
        ss->id = operator_id();
520
44
        for (auto& dest : dests_id()) {
521
44
            ss->related_op_ids.insert(dest);
522
44
        }
523
44
        return ss;
524
44
    }
525
44
}
_ZNK5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
3
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
511
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                 LocalExchangeSharedState>) {
513
        return nullptr;
514
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
515
                                        MultiCastSharedState>) {
516
        throw Exception(Status::FatalError("should not reach here!"));
517
3
    } else {
518
3
        auto ss = LocalStateType::SharedStateType::create_shared();
519
3
        ss->id = operator_id();
520
3
        for (auto& dest : dests_id()) {
521
3
            ss->related_op_ids.insert(dest);
522
3
        }
523
3
        return ss;
524
3
    }
525
3
}
_ZNK5doris17DataSinkOperatorXINS_24ResultFileSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
430
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
511
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                 LocalExchangeSharedState>) {
513
        return nullptr;
514
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
515
                                        MultiCastSharedState>) {
516
        throw Exception(Status::FatalError("should not reach here!"));
517
430
    } else {
518
430
        auto ss = LocalStateType::SharedStateType::create_shared();
519
430
        ss->id = operator_id();
520
430
        for (auto& dest : dests_id()) {
521
430
            ss->related_op_ids.insert(dest);
522
430
        }
523
430
        return ss;
524
430
    }
525
430
}
_ZNK5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
43.7k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
511
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                 LocalExchangeSharedState>) {
513
        return nullptr;
514
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
515
                                        MultiCastSharedState>) {
516
        throw Exception(Status::FatalError("should not reach here!"));
517
43.7k
    } else {
518
43.7k
        auto ss = LocalStateType::SharedStateType::create_shared();
519
43.7k
        ss->id = operator_id();
520
43.7k
        for (auto& dest : dests_id()) {
521
43.4k
            ss->related_op_ids.insert(dest);
522
43.4k
        }
523
43.7k
        return ss;
524
43.7k
    }
525
43.7k
}
_ZNK5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE19create_shared_stateEv
Line
Count
Source
510
4.50k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
511
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                 LocalExchangeSharedState>) {
513
        return nullptr;
514
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
515
                                        MultiCastSharedState>) {
516
        throw Exception(Status::FatalError("should not reach here!"));
517
4.50k
    } else {
518
4.50k
        auto ss = LocalStateType::SharedStateType::create_shared();
519
4.50k
        ss->id = operator_id();
520
4.50k
        for (auto& dest : dests_id()) {
521
4.50k
            ss->related_op_ids.insert(dest);
522
4.50k
        }
523
4.50k
        return ss;
524
4.50k
    }
525
4.50k
}
_ZNK5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
2.57k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
511
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                 LocalExchangeSharedState>) {
513
        return nullptr;
514
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
515
                                        MultiCastSharedState>) {
516
        throw Exception(Status::FatalError("should not reach here!"));
517
2.57k
    } else {
518
2.57k
        auto ss = LocalStateType::SharedStateType::create_shared();
519
2.57k
        ss->id = operator_id();
520
2.57k
        for (auto& dest : dests_id()) {
521
2.57k
            ss->related_op_ids.insert(dest);
522
2.57k
        }
523
2.57k
        return ss;
524
2.57k
    }
525
2.57k
}
_ZNK5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
78
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
511
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                 LocalExchangeSharedState>) {
513
        return nullptr;
514
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
515
                                        MultiCastSharedState>) {
516
        throw Exception(Status::FatalError("should not reach here!"));
517
78
    } else {
518
78
        auto ss = LocalStateType::SharedStateType::create_shared();
519
78
        ss->id = operator_id();
520
78
        for (auto& dest : dests_id()) {
521
78
            ss->related_op_ids.insert(dest);
522
78
        }
523
78
        return ss;
524
78
    }
525
78
}
_ZNK5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
1.69k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
511
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                 LocalExchangeSharedState>) {
513
        return nullptr;
514
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
515
                                        MultiCastSharedState>) {
516
        throw Exception(Status::FatalError("should not reach here!"));
517
1.69k
    } else {
518
1.69k
        auto ss = LocalStateType::SharedStateType::create_shared();
519
1.69k
        ss->id = operator_id();
520
1.69k
        for (auto& dest : dests_id()) {
521
1.68k
            ss->related_op_ids.insert(dest);
522
1.68k
        }
523
1.69k
        return ss;
524
1.69k
    }
525
1.69k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27IcebergDeleteSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
80
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
511
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                 LocalExchangeSharedState>) {
513
        return nullptr;
514
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
515
                                        MultiCastSharedState>) {
516
        throw Exception(Status::FatalError("should not reach here!"));
517
80
    } else {
518
80
        auto ss = LocalStateType::SharedStateType::create_shared();
519
80
        ss->id = operator_id();
520
80
        for (auto& dest : dests_id()) {
521
80
            ss->related_op_ids.insert(dest);
522
80
        }
523
80
        return ss;
524
80
    }
525
80
}
_ZNK5doris17DataSinkOperatorXINS_26IcebergMergeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
320
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
511
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                 LocalExchangeSharedState>) {
513
        return nullptr;
514
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
515
                                        MultiCastSharedState>) {
516
        throw Exception(Status::FatalError("should not reach here!"));
517
320
    } else {
518
320
        auto ss = LocalStateType::SharedStateType::create_shared();
519
320
        ss->id = operator_id();
520
320
        for (auto& dest : dests_id()) {
521
320
            ss->related_op_ids.insert(dest);
522
320
        }
523
320
        return ss;
524
320
    }
525
320
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_21MCTableSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
5.82k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
511
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                 LocalExchangeSharedState>) {
513
        return nullptr;
514
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
515
                                        MultiCastSharedState>) {
516
        throw Exception(Status::FatalError("should not reach here!"));
517
5.82k
    } else {
518
5.82k
        auto ss = LocalStateType::SharedStateType::create_shared();
519
5.82k
        ss->id = operator_id();
520
5.82k
        for (auto& dest : dests_id()) {
521
5.81k
            ss->related_op_ids.insert(dest);
522
5.81k
        }
523
5.82k
        return ss;
524
5.82k
    }
525
5.82k
}
_ZNK5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
61
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
511
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                 LocalExchangeSharedState>) {
513
        return nullptr;
514
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
515
                                        MultiCastSharedState>) {
516
        throw Exception(Status::FatalError("should not reach here!"));
517
61
    } else {
518
61
        auto ss = LocalStateType::SharedStateType::create_shared();
519
61
        ss->id = operator_id();
520
61
        for (auto& dest : dests_id()) {
521
61
            ss->related_op_ids.insert(dest);
522
61
        }
523
61
        return ss;
524
61
    }
525
61
}
_ZNK5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
212k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
511
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                 LocalExchangeSharedState>) {
513
        return nullptr;
514
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
515
                                        MultiCastSharedState>) {
516
        throw Exception(Status::FatalError("should not reach here!"));
517
212k
    } else {
518
212k
        auto ss = LocalStateType::SharedStateType::create_shared();
519
212k
        ss->id = operator_id();
520
212k
        for (auto& dest : dests_id()) {
521
211k
            ss->related_op_ids.insert(dest);
522
211k
        }
523
212k
        return ss;
524
212k
    }
525
212k
}
_ZNK5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
32
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
511
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                 LocalExchangeSharedState>) {
513
        return nullptr;
514
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
515
                                        MultiCastSharedState>) {
516
        throw Exception(Status::FatalError("should not reach here!"));
517
32
    } else {
518
32
        auto ss = LocalStateType::SharedStateType::create_shared();
519
32
        ss->id = operator_id();
520
32
        for (auto& dest : dests_id()) {
521
32
            ss->related_op_ids.insert(dest);
522
32
        }
523
32
        return ss;
524
32
    }
525
32
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
111k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
511
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                 LocalExchangeSharedState>) {
513
        return nullptr;
514
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
515
                                        MultiCastSharedState>) {
516
        throw Exception(Status::FatalError("should not reach here!"));
517
111k
    } else {
518
111k
        auto ss = LocalStateType::SharedStateType::create_shared();
519
111k
        ss->id = operator_id();
520
111k
        for (auto& dest : dests_id()) {
521
111k
            ss->related_op_ids.insert(dest);
522
111k
        }
523
111k
        return ss;
524
111k
    }
525
111k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
63
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
511
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                 LocalExchangeSharedState>) {
513
        return nullptr;
514
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
515
                                        MultiCastSharedState>) {
516
        throw Exception(Status::FatalError("should not reach here!"));
517
63
    } else {
518
63
        auto ss = LocalStateType::SharedStateType::create_shared();
519
63
        ss->id = operator_id();
520
63
        for (auto& dest : dests_id()) {
521
63
            ss->related_op_ids.insert(dest);
522
63
        }
523
63
        return ss;
524
63
    }
525
63
}
_ZNK5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
587k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
511
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                 LocalExchangeSharedState>) {
513
        return nullptr;
514
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
515
                                        MultiCastSharedState>) {
516
        throw Exception(Status::FatalError("should not reach here!"));
517
587k
    } else {
518
587k
        auto ss = LocalStateType::SharedStateType::create_shared();
519
587k
        ss->id = operator_id();
520
587k
        for (auto& dest : dests_id()) {
521
583k
            ss->related_op_ids.insert(dest);
522
583k
        }
523
587k
        return ss;
524
587k
    }
525
587k
}
_ZNK5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
8.55k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
511
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                 LocalExchangeSharedState>) {
513
        return nullptr;
514
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
515
                                        MultiCastSharedState>) {
516
        throw Exception(Status::FatalError("should not reach here!"));
517
8.55k
    } else {
518
8.55k
        auto ss = LocalStateType::SharedStateType::create_shared();
519
8.55k
        ss->id = operator_id();
520
8.55k
        for (auto& dest : dests_id()) {
521
8.55k
            ss->related_op_ids.insert(dest);
522
8.55k
        }
523
8.55k
        return ss;
524
8.55k
    }
525
8.55k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
402
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
511
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                 LocalExchangeSharedState>) {
513
        return nullptr;
514
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
515
                                        MultiCastSharedState>) {
516
        throw Exception(Status::FatalError("should not reach here!"));
517
402
    } else {
518
402
        auto ss = LocalStateType::SharedStateType::create_shared();
519
402
        ss->id = operator_id();
520
402
        for (auto& dest : dests_id()) {
521
401
            ss->related_op_ids.insert(dest);
522
401
        }
523
402
        return ss;
524
402
    }
525
402
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE19create_shared_stateEv
Line
Count
Source
510
2.40k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
511
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                 LocalExchangeSharedState>) {
513
        return nullptr;
514
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
515
                                        MultiCastSharedState>) {
516
        throw Exception(Status::FatalError("should not reach here!"));
517
2.40k
    } else {
518
2.40k
        auto ss = LocalStateType::SharedStateType::create_shared();
519
2.40k
        ss->id = operator_id();
520
2.40k
        for (auto& dest : dests_id()) {
521
2.39k
            ss->related_op_ids.insert(dest);
522
2.39k
        }
523
2.40k
        return ss;
524
2.40k
    }
525
2.40k
}
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE19create_shared_stateEv
Line
Count
Source
510
2.49k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
511
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                 LocalExchangeSharedState>) {
513
        return nullptr;
514
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
515
                                        MultiCastSharedState>) {
516
        throw Exception(Status::FatalError("should not reach here!"));
517
2.49k
    } else {
518
2.49k
        auto ss = LocalStateType::SharedStateType::create_shared();
519
2.49k
        ss->id = operator_id();
520
2.49k
        for (auto& dest : dests_id()) {
521
2.45k
            ss->related_op_ids.insert(dest);
522
2.45k
        }
523
2.49k
        return ss;
524
2.49k
    }
525
2.49k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
167
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
511
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                 LocalExchangeSharedState>) {
513
        return nullptr;
514
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
515
                                        MultiCastSharedState>) {
516
        throw Exception(Status::FatalError("should not reach here!"));
517
167
    } else {
518
167
        auto ss = LocalStateType::SharedStateType::create_shared();
519
167
        ss->id = operator_id();
520
167
        for (auto& dest : dests_id()) {
521
167
            ss->related_op_ids.insert(dest);
522
167
        }
523
167
        return ss;
524
167
    }
525
167
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
104
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
511
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                 LocalExchangeSharedState>) {
513
        return nullptr;
514
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
515
                                        MultiCastSharedState>) {
516
        throw Exception(Status::FatalError("should not reach here!"));
517
104
    } else {
518
104
        auto ss = LocalStateType::SharedStateType::create_shared();
519
104
        ss->id = operator_id();
520
104
        for (auto& dest : dests_id()) {
521
104
            ss->related_op_ids.insert(dest);
522
104
        }
523
104
        return ss;
524
104
    }
525
104
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE19create_shared_stateEv
526
527
template <typename LocalStateType>
528
2.24M
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
2.24M
    auto local_state = LocalStateType::create_unique(state, this);
530
2.24M
    RETURN_IF_ERROR(local_state->init(state, info));
531
2.24M
    state->emplace_local_state(operator_id(), std::move(local_state));
532
2.24M
    return Status::OK();
533
2.24M
}
_ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
63.3k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
63.3k
    auto local_state = LocalStateType::create_unique(state, this);
530
63.3k
    RETURN_IF_ERROR(local_state->init(state, info));
531
63.3k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
63.3k
    return Status::OK();
533
63.3k
}
_ZN5doris9OperatorXINS_18OlapScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
258k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
258k
    auto local_state = LocalStateType::create_unique(state, this);
530
258k
    RETURN_IF_ERROR(local_state->init(state, info));
531
258k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
258k
    return Status::OK();
533
258k
}
_ZN5doris9OperatorXINS_21GroupCommitLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
79
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
79
    auto local_state = LocalStateType::create_unique(state, this);
530
79
    RETURN_IF_ERROR(local_state->init(state, info));
531
79
    state->emplace_local_state(operator_id(), std::move(local_state));
532
79
    return Status::OK();
533
79
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_18JDBCScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_18FileScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
18.3k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
18.3k
    auto local_state = LocalStateType::create_unique(state, this);
530
18.3k
    RETURN_IF_ERROR(local_state->init(state, info));
531
18.3k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
18.3k
    return Status::OK();
533
18.3k
}
_ZN5doris9OperatorXINS_18AnalyticLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
5.77k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
5.77k
    auto local_state = LocalStateType::create_unique(state, this);
530
5.77k
    RETURN_IF_ERROR(local_state->init(state, info));
531
5.77k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
5.77k
    return Status::OK();
533
5.77k
}
_ZN5doris9OperatorXINS_14SortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
6.11k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
6.11k
    auto local_state = LocalStateType::create_unique(state, this);
530
6.11k
    RETURN_IF_ERROR(local_state->init(state, info));
531
6.11k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
6.11k
    return Status::OK();
533
6.11k
}
_ZN5doris9OperatorXINS_19SpillSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
24
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
24
    auto local_state = LocalStateType::create_unique(state, this);
530
24
    RETURN_IF_ERROR(local_state->init(state, info));
531
24
    state->emplace_local_state(operator_id(), std::move(local_state));
532
24
    return Status::OK();
533
24
}
_ZN5doris9OperatorXINS_24LocalMergeSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
204k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
204k
    auto local_state = LocalStateType::create_unique(state, this);
530
204k
    RETURN_IF_ERROR(local_state->init(state, info));
531
204k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
204k
    return Status::OK();
533
204k
}
_ZN5doris9OperatorXINS_13AggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
111k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
111k
    auto local_state = LocalStateType::create_unique(state, this);
530
111k
    RETURN_IF_ERROR(local_state->init(state, info));
531
111k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
111k
    return Status::OK();
533
111k
}
_ZN5doris9OperatorXINS_21BucketedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
323
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
323
    auto local_state = LocalStateType::create_unique(state, this);
530
323
    RETURN_IF_ERROR(local_state->init(state, info));
531
323
    state->emplace_local_state(operator_id(), std::move(local_state));
532
323
    return Status::OK();
533
323
}
_ZN5doris9OperatorXINS_24PartitionedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
54
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
54
    auto local_state = LocalStateType::create_unique(state, this);
530
54
    RETURN_IF_ERROR(local_state->init(state, info));
531
54
    state->emplace_local_state(operator_id(), std::move(local_state));
532
54
    return Status::OK();
533
54
}
_ZN5doris9OperatorXINS_23TableFunctionLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
3.71k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
3.71k
    auto local_state = LocalStateType::create_unique(state, this);
530
3.71k
    RETURN_IF_ERROR(local_state->init(state, info));
531
3.71k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
3.71k
    return Status::OK();
533
3.71k
}
_ZN5doris9OperatorXINS_18ExchangeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
344k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
344k
    auto local_state = LocalStateType::create_unique(state, this);
530
344k
    RETURN_IF_ERROR(local_state->init(state, info));
531
344k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
344k
    return Status::OK();
533
344k
}
_ZN5doris9OperatorXINS_16RepeatLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
1.27k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
1.27k
    auto local_state = LocalStateType::create_unique(state, this);
530
1.27k
    RETURN_IF_ERROR(local_state->init(state, info));
531
1.27k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
1.27k
    return Status::OK();
533
1.27k
}
_ZN5doris9OperatorXINS_29NestedLoopJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
8.50k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
8.50k
    auto local_state = LocalStateType::create_unique(state, this);
530
8.50k
    RETURN_IF_ERROR(local_state->init(state, info));
531
8.50k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
8.50k
    return Status::OK();
533
8.50k
}
_ZN5doris9OperatorXINS_23AssertNumRowsLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
121
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
121
    auto local_state = LocalStateType::create_unique(state, this);
530
121
    RETURN_IF_ERROR(local_state->init(state, info));
531
121
    state->emplace_local_state(operator_id(), std::move(local_state));
532
121
    return Status::OK();
533
121
}
_ZN5doris9OperatorXINS_18EmptySetLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
1.54k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
1.54k
    auto local_state = LocalStateType::create_unique(state, this);
530
1.54k
    RETURN_IF_ERROR(local_state->init(state, info));
531
1.54k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
1.54k
    return Status::OK();
533
1.54k
}
_ZN5doris9OperatorXINS_21UnionSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
52.4k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
52.4k
    auto local_state = LocalStateType::create_unique(state, this);
530
52.4k
    RETURN_IF_ERROR(local_state->init(state, info));
531
52.4k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
52.4k
    return Status::OK();
533
52.4k
}
_ZN5doris9OperatorXINS_35MultiCastDataStreamSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
6.59k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
6.59k
    auto local_state = LocalStateType::create_unique(state, this);
530
6.59k
    RETURN_IF_ERROR(local_state->init(state, info));
531
6.59k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
6.59k
    return Status::OK();
533
6.59k
}
_ZN5doris9OperatorXINS_29PartitionSortSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
300
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
300
    auto local_state = LocalStateType::create_unique(state, this);
530
300
    RETURN_IF_ERROR(local_state->init(state, info));
531
300
    state->emplace_local_state(operator_id(), std::move(local_state));
532
300
    return Status::OK();
533
300
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
2.29k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
2.29k
    auto local_state = LocalStateType::create_unique(state, this);
530
2.29k
    RETURN_IF_ERROR(local_state->init(state, info));
531
2.29k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
2.29k
    return Status::OK();
533
2.29k
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
2.38k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
2.38k
    auto local_state = LocalStateType::create_unique(state, this);
530
2.38k
    RETURN_IF_ERROR(local_state->init(state, info));
531
2.38k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
2.38k
    return Status::OK();
533
2.38k
}
_ZN5doris9OperatorXINS_17DataGenLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
372
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
372
    auto local_state = LocalStateType::create_unique(state, this);
530
372
    RETURN_IF_ERROR(local_state->init(state, info));
531
372
    state->emplace_local_state(operator_id(), std::move(local_state));
532
372
    return Status::OK();
533
372
}
_ZN5doris9OperatorXINS_20SchemaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
1.81k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
1.81k
    auto local_state = LocalStateType::create_unique(state, this);
530
1.81k
    RETURN_IF_ERROR(local_state->init(state, info));
531
1.81k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
1.81k
    return Status::OK();
533
1.81k
}
_ZN5doris9OperatorXINS_18MetaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
6.02k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
6.02k
    auto local_state = LocalStateType::create_unique(state, this);
530
6.02k
    RETURN_IF_ERROR(local_state->init(state, info));
531
6.02k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
6.02k
    return Status::OK();
533
6.02k
}
_ZN5doris9OperatorXINS_29LocalExchangeSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
691k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
691k
    auto local_state = LocalStateType::create_unique(state, this);
530
691k
    RETURN_IF_ERROR(local_state->init(state, info));
531
691k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
691k
    return Status::OK();
533
691k
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_34PartitionedHashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_21CacheSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
14
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
14
    auto local_state = LocalStateType::create_unique(state, this);
530
14
    RETURN_IF_ERROR(local_state->init(state, info));
531
14
    state->emplace_local_state(operator_id(), std::move(local_state));
532
14
    return Status::OK();
533
14
}
_ZN5doris9OperatorXINS_22RecCTESourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
151
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
151
    auto local_state = LocalStateType::create_unique(state, this);
530
151
    RETURN_IF_ERROR(local_state->init(state, info));
531
151
    state->emplace_local_state(operator_id(), std::move(local_state));
532
151
    return Status::OK();
533
151
}
_ZN5doris9OperatorXINS_20RecCTEScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
1.95k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
1.95k
    auto local_state = LocalStateType::create_unique(state, this);
530
1.95k
    RETURN_IF_ERROR(local_state->init(state, info));
531
1.95k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
1.95k
    return Status::OK();
533
1.95k
}
_ZN5doris9OperatorXINS_25MaterializationLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
1.12k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
1.12k
    auto local_state = LocalStateType::create_unique(state, this);
530
1.12k
    RETURN_IF_ERROR(local_state->init(state, info));
531
1.12k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
1.12k
    return Status::OK();
533
1.12k
}
_ZN5doris9OperatorXINS_16SelectLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
1.91k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
1.91k
    auto local_state = LocalStateType::create_unique(state, this);
530
1.91k
    RETURN_IF_ERROR(local_state->init(state, info));
531
1.91k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
1.91k
    return Status::OK();
533
1.91k
}
_ZN5doris9OperatorXINS_22StreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
7.46k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
7.46k
    auto local_state = LocalStateType::create_unique(state, this);
530
7.46k
    RETURN_IF_ERROR(local_state->init(state, info));
531
7.46k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
7.46k
    return Status::OK();
533
7.46k
}
_ZN5doris9OperatorXINS_30DistinctStreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
445k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
445k
    auto local_state = LocalStateType::create_unique(state, this);
530
445k
    RETURN_IF_ERROR(local_state->init(state, info));
531
445k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
445k
    return Status::OK();
533
445k
}
534
535
PipelineXSinkLocalStateBase::PipelineXSinkLocalStateBase(DataSinkOperatorXBase* parent,
536
                                                         RuntimeState* state)
537
1.78M
        : _parent(parent), _state(state) {}
538
539
PipelineXLocalStateBase::PipelineXLocalStateBase(RuntimeState* state, OperatorXBase* parent)
540
2.24M
        : _num_rows_returned(0),
541
2.24M
          _rows_returned_counter(nullptr),
542
2.24M
          _parent(parent),
543
2.24M
          _state(state),
544
2.24M
          _budget(state->batch_size(), state->preferred_block_size_bytes()) {}
545
546
template <typename SharedStateArg>
547
2.25M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
2.25M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
2.25M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
2.25M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
2.25M
    _operator_profile->set_metadata(_parent->node_id());
552
    // indent is false so that source operator will have same
553
    // indentation_level with its parent operator.
554
2.25M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
2.25M
    _operator_profile->add_child(_common_profile.get(), true);
556
2.25M
    _operator_profile->add_child(_custom_profile.get(), true);
557
2.25M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
2.25M
    if constexpr (!is_fake_shared) {
559
1.16M
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
560
697k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
561
697k
                                    .first.get()
562
697k
                                    ->template cast<SharedStateArg>();
563
564
697k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
565
697k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
566
697k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
567
697k
        } else if (info.shared_state) {
568
387k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
569
0
                DCHECK(false);
570
0
            }
571
            // For UnionSourceOperator without children, there is no shared state.
572
387k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
387k
            _dependency = _shared_state->create_source_dependency(
575
387k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
387k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
387k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
387k
        } else {
579
78.1k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
13.4k
                DCHECK(false);
581
13.4k
            }
582
78.1k
        }
583
1.16M
    }
584
585
2.25M
    if (must_set_shared_state() && _shared_state == nullptr) {
586
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
587
0
    }
588
589
2.25M
    _rows_returned_counter =
590
2.25M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
2.25M
    _blocks_returned_counter =
592
2.25M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
2.25M
    _output_block_bytes_counter =
594
2.25M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
2.25M
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
2.25M
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
2.25M
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
2.25M
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
2.25M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
2.25M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
2.25M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
2.25M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
2.25M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
2.25M
    _memory_used_counter =
605
2.25M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
2.25M
    _common_profile->add_info_string("IsColocate",
607
2.25M
                                     std::to_string(_parent->is_colocated_operator()));
608
2.25M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
2.25M
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
2.25M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
2.25M
    return Status::OK();
612
2.25M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
63.5k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
63.5k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
63.5k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
63.5k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
63.5k
    _operator_profile->set_metadata(_parent->node_id());
552
    // indent is false so that source operator will have same
553
    // indentation_level with its parent operator.
554
63.5k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
63.5k
    _operator_profile->add_child(_common_profile.get(), true);
556
63.5k
    _operator_profile->add_child(_custom_profile.get(), true);
557
63.5k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
63.5k
    if constexpr (!is_fake_shared) {
559
63.5k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
560
13.9k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
561
13.9k
                                    .first.get()
562
13.9k
                                    ->template cast<SharedStateArg>();
563
564
13.9k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
565
13.9k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
566
13.9k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
567
49.5k
        } else if (info.shared_state) {
568
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
569
                DCHECK(false);
570
            }
571
            // For UnionSourceOperator without children, there is no shared state.
572
48.7k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
48.7k
            _dependency = _shared_state->create_source_dependency(
575
48.7k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
48.7k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
48.7k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
48.7k
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
809
        }
583
63.5k
    }
584
585
63.5k
    if (must_set_shared_state() && _shared_state == nullptr) {
586
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
587
0
    }
588
589
63.5k
    _rows_returned_counter =
590
63.5k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
63.5k
    _blocks_returned_counter =
592
63.5k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
63.5k
    _output_block_bytes_counter =
594
63.5k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
63.5k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
63.5k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
63.5k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
63.5k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
63.5k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
63.5k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
63.5k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
63.5k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
63.5k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
63.5k
    _memory_used_counter =
605
63.5k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
63.5k
    _common_profile->add_info_string("IsColocate",
607
63.5k
                                     std::to_string(_parent->is_colocated_operator()));
608
63.5k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
63.5k
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
63.5k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
63.5k
    return Status::OK();
612
63.5k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
1
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
1
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
1
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
1
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
1
    _operator_profile->set_metadata(_parent->node_id());
552
    // indent is false so that source operator will have same
553
    // indentation_level with its parent operator.
554
1
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
1
    _operator_profile->add_child(_common_profile.get(), true);
556
1
    _operator_profile->add_child(_custom_profile.get(), true);
557
1
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
1
    if constexpr (!is_fake_shared) {
559
1
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
560
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
561
0
                                    .first.get()
562
0
                                    ->template cast<SharedStateArg>();
563
564
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
565
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
566
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
567
1
        } else if (info.shared_state) {
568
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
569
                DCHECK(false);
570
            }
571
            // For UnionSourceOperator without children, there is no shared state.
572
1
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
1
            _dependency = _shared_state->create_source_dependency(
575
1
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
1
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
1
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
1
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
0
        }
583
1
    }
584
585
1
    if (must_set_shared_state() && _shared_state == nullptr) {
586
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
587
0
    }
588
589
1
    _rows_returned_counter =
590
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
1
    _blocks_returned_counter =
592
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
1
    _output_block_bytes_counter =
594
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
1
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
1
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
1
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
1
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
1
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
1
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
1
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
1
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
1
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
1
    _memory_used_counter =
605
1
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
1
    _common_profile->add_info_string("IsColocate",
607
1
                                     std::to_string(_parent->is_colocated_operator()));
608
1
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
1
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
1
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
1
    return Status::OK();
612
1
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
212k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
212k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
212k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
212k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
212k
    _operator_profile->set_metadata(_parent->node_id());
552
    // indent is false so that source operator will have same
553
    // indentation_level with its parent operator.
554
212k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
212k
    _operator_profile->add_child(_common_profile.get(), true);
556
212k
    _operator_profile->add_child(_custom_profile.get(), true);
557
212k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
212k
    if constexpr (!is_fake_shared) {
559
212k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
560
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
561
0
                                    .first.get()
562
0
                                    ->template cast<SharedStateArg>();
563
564
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
565
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
566
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
567
212k
        } else if (info.shared_state) {
568
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
569
                DCHECK(false);
570
            }
571
            // For UnionSourceOperator without children, there is no shared state.
572
200k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
200k
            _dependency = _shared_state->create_source_dependency(
575
200k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
200k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
200k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
200k
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
11.5k
        }
583
212k
    }
584
585
212k
    if (must_set_shared_state() && _shared_state == nullptr) {
586
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
587
0
    }
588
589
212k
    _rows_returned_counter =
590
212k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
212k
    _blocks_returned_counter =
592
212k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
212k
    _output_block_bytes_counter =
594
212k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
212k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
212k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
212k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
212k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
212k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
212k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
212k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
212k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
212k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
212k
    _memory_used_counter =
605
212k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
212k
    _common_profile->add_info_string("IsColocate",
607
212k
                                     std::to_string(_parent->is_colocated_operator()));
608
212k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
212k
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
212k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
212k
    return Status::OK();
612
212k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
24
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
24
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
24
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
24
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
24
    _operator_profile->set_metadata(_parent->node_id());
552
    // indent is false so that source operator will have same
553
    // indentation_level with its parent operator.
554
24
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
24
    _operator_profile->add_child(_common_profile.get(), true);
556
24
    _operator_profile->add_child(_custom_profile.get(), true);
557
24
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
24
    if constexpr (!is_fake_shared) {
559
24
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
560
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
561
0
                                    .first.get()
562
0
                                    ->template cast<SharedStateArg>();
563
564
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
565
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
566
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
567
24
        } else if (info.shared_state) {
568
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
569
                DCHECK(false);
570
            }
571
            // For UnionSourceOperator without children, there is no shared state.
572
24
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
24
            _dependency = _shared_state->create_source_dependency(
575
24
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
24
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
24
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
24
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
0
        }
583
24
    }
584
585
24
    if (must_set_shared_state() && _shared_state == nullptr) {
586
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
587
0
    }
588
589
24
    _rows_returned_counter =
590
24
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
24
    _blocks_returned_counter =
592
24
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
24
    _output_block_bytes_counter =
594
24
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
24
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
24
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
24
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
24
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
24
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
24
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
24
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
24
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
24
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
24
    _memory_used_counter =
605
24
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
24
    _common_profile->add_info_string("IsColocate",
607
24
                                     std::to_string(_parent->is_colocated_operator()));
608
24
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
24
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
24
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
24
    return Status::OK();
612
24
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
8.52k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
8.52k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
8.52k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
8.52k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
8.52k
    _operator_profile->set_metadata(_parent->node_id());
552
    // indent is false so that source operator will have same
553
    // indentation_level with its parent operator.
554
8.52k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
8.52k
    _operator_profile->add_child(_common_profile.get(), true);
556
8.52k
    _operator_profile->add_child(_custom_profile.get(), true);
557
8.52k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
8.52k
    if constexpr (!is_fake_shared) {
559
8.52k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
560
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
561
0
                                    .first.get()
562
0
                                    ->template cast<SharedStateArg>();
563
564
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
565
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
566
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
567
8.52k
        } else if (info.shared_state) {
568
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
569
                DCHECK(false);
570
            }
571
            // For UnionSourceOperator without children, there is no shared state.
572
8.39k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
8.39k
            _dependency = _shared_state->create_source_dependency(
575
8.39k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
8.39k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
8.39k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
8.39k
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
137
        }
583
8.52k
    }
584
585
8.52k
    if (must_set_shared_state() && _shared_state == nullptr) {
586
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
587
0
    }
588
589
8.52k
    _rows_returned_counter =
590
8.52k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
8.52k
    _blocks_returned_counter =
592
8.52k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
8.52k
    _output_block_bytes_counter =
594
8.52k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
8.52k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
8.52k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
8.52k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
8.52k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
8.52k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
8.52k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
8.52k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
8.52k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
8.52k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
8.52k
    _memory_used_counter =
605
8.52k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
8.52k
    _common_profile->add_info_string("IsColocate",
607
8.52k
                                     std::to_string(_parent->is_colocated_operator()));
608
8.52k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
8.52k
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
8.52k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
8.52k
    return Status::OK();
612
8.52k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
5.82k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
5.82k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
5.82k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
5.82k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
5.82k
    _operator_profile->set_metadata(_parent->node_id());
552
    // indent is false so that source operator will have same
553
    // indentation_level with its parent operator.
554
5.82k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
5.82k
    _operator_profile->add_child(_common_profile.get(), true);
556
5.82k
    _operator_profile->add_child(_custom_profile.get(), true);
557
5.82k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
5.82k
    if constexpr (!is_fake_shared) {
559
5.82k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
560
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
561
0
                                    .first.get()
562
0
                                    ->template cast<SharedStateArg>();
563
564
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
565
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
566
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
567
5.82k
        } else if (info.shared_state) {
568
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
569
                DCHECK(false);
570
            }
571
            // For UnionSourceOperator without children, there is no shared state.
572
5.69k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
5.69k
            _dependency = _shared_state->create_source_dependency(
575
5.69k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
5.69k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
5.69k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
5.69k
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
130
        }
583
5.82k
    }
584
585
5.82k
    if (must_set_shared_state() && _shared_state == nullptr) {
586
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
587
0
    }
588
589
5.82k
    _rows_returned_counter =
590
5.82k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
5.82k
    _blocks_returned_counter =
592
5.82k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
5.82k
    _output_block_bytes_counter =
594
5.82k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
5.82k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
5.82k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
5.82k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
5.82k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
5.82k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
5.82k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
5.82k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
5.82k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
5.82k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
5.82k
    _memory_used_counter =
605
5.82k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
5.82k
    _common_profile->add_info_string("IsColocate",
607
5.82k
                                     std::to_string(_parent->is_colocated_operator()));
608
5.82k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
5.82k
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
5.82k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
5.82k
    return Status::OK();
612
5.82k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
111k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
111k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
111k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
111k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
111k
    _operator_profile->set_metadata(_parent->node_id());
552
    // indent is false so that source operator will have same
553
    // indentation_level with its parent operator.
554
111k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
111k
    _operator_profile->add_child(_common_profile.get(), true);
556
111k
    _operator_profile->add_child(_custom_profile.get(), true);
557
111k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
111k
    if constexpr (!is_fake_shared) {
559
111k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
560
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
561
0
                                    .first.get()
562
0
                                    ->template cast<SharedStateArg>();
563
564
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
565
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
566
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
567
111k
        } else if (info.shared_state) {
568
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
569
                DCHECK(false);
570
            }
571
            // For UnionSourceOperator without children, there is no shared state.
572
110k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
110k
            _dependency = _shared_state->create_source_dependency(
575
110k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
110k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
110k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
110k
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
1.37k
        }
583
111k
    }
584
585
111k
    if (must_set_shared_state() && _shared_state == nullptr) {
586
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
587
0
    }
588
589
111k
    _rows_returned_counter =
590
111k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
111k
    _blocks_returned_counter =
592
111k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
111k
    _output_block_bytes_counter =
594
111k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
111k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
111k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
111k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
111k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
111k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
111k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
111k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
111k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
111k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
111k
    _memory_used_counter =
605
111k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
111k
    _common_profile->add_info_string("IsColocate",
607
111k
                                     std::to_string(_parent->is_colocated_operator()));
608
111k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
111k
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
111k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
111k
    return Status::OK();
612
111k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
327
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
327
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
327
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
327
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
327
    _operator_profile->set_metadata(_parent->node_id());
552
    // indent is false so that source operator will have same
553
    // indentation_level with its parent operator.
554
327
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
327
    _operator_profile->add_child(_common_profile.get(), true);
556
327
    _operator_profile->add_child(_custom_profile.get(), true);
557
327
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
327
    if constexpr (!is_fake_shared) {
559
327
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
560
312
            _shared_state = info.shared_state_map.at(_parent->operator_id())
561
312
                                    .first.get()
562
312
                                    ->template cast<SharedStateArg>();
563
564
312
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
565
312
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
566
312
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
567
312
        } else if (info.shared_state) {
568
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
569
                DCHECK(false);
570
            }
571
            // For UnionSourceOperator without children, there is no shared state.
572
0
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
0
            _dependency = _shared_state->create_source_dependency(
575
0
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
15
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
15
        }
583
327
    }
584
585
327
    if (must_set_shared_state() && _shared_state == nullptr) {
586
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
587
0
    }
588
589
327
    _rows_returned_counter =
590
327
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
327
    _blocks_returned_counter =
592
327
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
327
    _output_block_bytes_counter =
594
327
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
327
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
327
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
327
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
327
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
327
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
327
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
327
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
327
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
327
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
327
    _memory_used_counter =
605
327
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
327
    _common_profile->add_info_string("IsColocate",
607
327
                                     std::to_string(_parent->is_colocated_operator()));
608
327
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
327
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
327
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
327
    return Status::OK();
612
327
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
54
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
54
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
54
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
54
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
54
    _operator_profile->set_metadata(_parent->node_id());
552
    // indent is false so that source operator will have same
553
    // indentation_level with its parent operator.
554
54
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
54
    _operator_profile->add_child(_common_profile.get(), true);
556
54
    _operator_profile->add_child(_custom_profile.get(), true);
557
54
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
54
    if constexpr (!is_fake_shared) {
559
54
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
560
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
561
0
                                    .first.get()
562
0
                                    ->template cast<SharedStateArg>();
563
564
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
565
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
566
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
567
54
        } else if (info.shared_state) {
568
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
569
                DCHECK(false);
570
            }
571
            // For UnionSourceOperator without children, there is no shared state.
572
54
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
54
            _dependency = _shared_state->create_source_dependency(
575
54
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
54
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
54
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
54
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
0
        }
583
54
    }
584
585
54
    if (must_set_shared_state() && _shared_state == nullptr) {
586
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
587
0
    }
588
589
54
    _rows_returned_counter =
590
54
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
54
    _blocks_returned_counter =
592
54
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
54
    _output_block_bytes_counter =
594
54
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
54
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
54
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
54
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
54
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
54
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
54
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
54
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
54
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
54
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
54
    _memory_used_counter =
605
54
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
54
    _common_profile->add_info_string("IsColocate",
607
54
                                     std::to_string(_parent->is_colocated_operator()));
608
54
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
54
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
54
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
54
    return Status::OK();
612
54
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
1.09M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
1.09M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
1.09M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
1.09M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
1.09M
    _operator_profile->set_metadata(_parent->node_id());
552
    // indent is false so that source operator will have same
553
    // indentation_level with its parent operator.
554
1.09M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
1.09M
    _operator_profile->add_child(_common_profile.get(), true);
556
1.09M
    _operator_profile->add_child(_custom_profile.get(), true);
557
1.09M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
    if constexpr (!is_fake_shared) {
559
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
560
            _shared_state = info.shared_state_map.at(_parent->operator_id())
561
                                    .first.get()
562
                                    ->template cast<SharedStateArg>();
563
564
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
565
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
566
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
567
        } else if (info.shared_state) {
568
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
569
                DCHECK(false);
570
            }
571
            // For UnionSourceOperator without children, there is no shared state.
572
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
            _dependency = _shared_state->create_source_dependency(
575
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
        }
583
    }
584
585
1.09M
    if (must_set_shared_state() && _shared_state == nullptr) {
586
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
587
0
    }
588
589
1.09M
    _rows_returned_counter =
590
1.09M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
1.09M
    _blocks_returned_counter =
592
1.09M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
1.09M
    _output_block_bytes_counter =
594
1.09M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
1.09M
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
1.09M
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
1.09M
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
1.09M
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
1.09M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
1.09M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
1.09M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
1.09M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
1.09M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
1.09M
    _memory_used_counter =
605
1.09M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
1.09M
    _common_profile->add_info_string("IsColocate",
607
1.09M
                                     std::to_string(_parent->is_colocated_operator()));
608
1.09M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
1.09M
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
1.09M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
1.09M
    return Status::OK();
612
1.09M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
52.2k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
52.2k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
52.2k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
52.2k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
52.2k
    _operator_profile->set_metadata(_parent->node_id());
552
    // indent is false so that source operator will have same
553
    // indentation_level with its parent operator.
554
52.2k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
52.2k
    _operator_profile->add_child(_common_profile.get(), true);
556
52.2k
    _operator_profile->add_child(_custom_profile.get(), true);
557
52.2k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
52.2k
    if constexpr (!is_fake_shared) {
559
52.2k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
560
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
561
0
                                    .first.get()
562
0
                                    ->template cast<SharedStateArg>();
563
564
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
565
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
566
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
567
52.2k
        } else if (info.shared_state) {
568
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
569
                DCHECK(false);
570
            }
571
            // For UnionSourceOperator without children, there is no shared state.
572
2.39k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
2.39k
            _dependency = _shared_state->create_source_dependency(
575
2.39k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
2.39k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
2.39k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
49.8k
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
49.8k
        }
583
52.2k
    }
584
585
52.2k
    if (must_set_shared_state() && _shared_state == nullptr) {
586
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
587
0
    }
588
589
52.2k
    _rows_returned_counter =
590
52.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
52.2k
    _blocks_returned_counter =
592
52.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
52.2k
    _output_block_bytes_counter =
594
52.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
52.2k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
52.2k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
52.2k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
52.2k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
52.2k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
52.2k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
52.2k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
52.2k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
52.2k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
52.2k
    _memory_used_counter =
605
52.2k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
52.2k
    _common_profile->add_info_string("IsColocate",
607
52.2k
                                     std::to_string(_parent->is_colocated_operator()));
608
52.2k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
52.2k
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
52.2k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
52.2k
    return Status::OK();
612
52.2k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
17
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
17
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
17
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
17
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
17
    _operator_profile->set_metadata(_parent->node_id());
552
    // indent is false so that source operator will have same
553
    // indentation_level with its parent operator.
554
17
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
17
    _operator_profile->add_child(_common_profile.get(), true);
556
17
    _operator_profile->add_child(_custom_profile.get(), true);
557
17
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
17
    if constexpr (!is_fake_shared) {
559
17
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
560
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
561
0
                                    .first.get()
562
0
                                    ->template cast<SharedStateArg>();
563
564
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
565
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
566
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
567
17
        } else if (info.shared_state) {
568
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
569
                DCHECK(false);
570
            }
571
            // For UnionSourceOperator without children, there is no shared state.
572
17
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
17
            _dependency = _shared_state->create_source_dependency(
575
17
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
17
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
17
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
17
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
0
        }
583
17
    }
584
585
17
    if (must_set_shared_state() && _shared_state == nullptr) {
586
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
587
0
    }
588
589
17
    _rows_returned_counter =
590
17
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
17
    _blocks_returned_counter =
592
17
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
17
    _output_block_bytes_counter =
594
17
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
17
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
17
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
17
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
17
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
17
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
17
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
17
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
17
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
17
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
17
    _memory_used_counter =
605
17
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
17
    _common_profile->add_info_string("IsColocate",
607
17
                                     std::to_string(_parent->is_colocated_operator()));
608
17
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
17
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
17
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
17
    return Status::OK();
612
17
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
6.59k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
6.59k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
6.59k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
6.59k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
6.59k
    _operator_profile->set_metadata(_parent->node_id());
552
    // indent is false so that source operator will have same
553
    // indentation_level with its parent operator.
554
6.59k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
6.59k
    _operator_profile->add_child(_common_profile.get(), true);
556
6.59k
    _operator_profile->add_child(_custom_profile.get(), true);
557
6.59k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
6.59k
    if constexpr (!is_fake_shared) {
559
6.59k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
560
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
561
0
                                    .first.get()
562
0
                                    ->template cast<SharedStateArg>();
563
564
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
565
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
566
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
567
6.59k
        } else if (info.shared_state) {
568
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
569
                DCHECK(false);
570
            }
571
            // For UnionSourceOperator without children, there is no shared state.
572
6.55k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
6.55k
            _dependency = _shared_state->create_source_dependency(
575
6.55k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
6.55k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
6.55k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
6.55k
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
43
        }
583
6.59k
    }
584
585
6.59k
    if (must_set_shared_state() && _shared_state == nullptr) {
586
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
587
0
    }
588
589
6.59k
    _rows_returned_counter =
590
6.59k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
6.59k
    _blocks_returned_counter =
592
6.59k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
6.59k
    _output_block_bytes_counter =
594
6.59k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
6.59k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
6.59k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
6.59k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
6.59k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
6.59k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
6.59k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
6.59k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
6.59k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
6.59k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
6.59k
    _memory_used_counter =
605
6.59k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
6.59k
    _common_profile->add_info_string("IsColocate",
607
6.59k
                                     std::to_string(_parent->is_colocated_operator()));
608
6.59k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
6.59k
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
6.59k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
6.59k
    return Status::OK();
612
6.59k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
403
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
403
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
403
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
403
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
403
    _operator_profile->set_metadata(_parent->node_id());
552
    // indent is false so that source operator will have same
553
    // indentation_level with its parent operator.
554
403
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
403
    _operator_profile->add_child(_common_profile.get(), true);
556
403
    _operator_profile->add_child(_custom_profile.get(), true);
557
403
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
403
    if constexpr (!is_fake_shared) {
559
403
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
560
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
561
0
                                    .first.get()
562
0
                                    ->template cast<SharedStateArg>();
563
564
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
565
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
566
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
567
403
        } else if (info.shared_state) {
568
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
569
                DCHECK(false);
570
            }
571
            // For UnionSourceOperator without children, there is no shared state.
572
402
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
402
            _dependency = _shared_state->create_source_dependency(
575
402
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
402
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
402
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
402
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
1
        }
583
403
    }
584
585
403
    if (must_set_shared_state() && _shared_state == nullptr) {
586
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
587
0
    }
588
589
403
    _rows_returned_counter =
590
403
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
403
    _blocks_returned_counter =
592
403
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
403
    _output_block_bytes_counter =
594
403
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
403
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
403
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
403
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
403
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
403
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
403
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
403
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
403
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
403
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
403
    _memory_used_counter =
605
403
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
403
    _common_profile->add_info_string("IsColocate",
607
403
                                     std::to_string(_parent->is_colocated_operator()));
608
403
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
403
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
403
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
403
    return Status::OK();
612
403
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
4.81k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
4.81k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
4.81k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
4.81k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
4.81k
    _operator_profile->set_metadata(_parent->node_id());
552
    // indent is false so that source operator will have same
553
    // indentation_level with its parent operator.
554
4.81k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
4.81k
    _operator_profile->add_child(_common_profile.get(), true);
556
4.81k
    _operator_profile->add_child(_custom_profile.get(), true);
557
4.81k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
4.81k
    if constexpr (!is_fake_shared) {
559
4.81k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
560
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
561
0
                                    .first.get()
562
0
                                    ->template cast<SharedStateArg>();
563
564
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
565
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
566
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
567
4.81k
        } else if (info.shared_state) {
568
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
569
                DCHECK(false);
570
            }
571
            // For UnionSourceOperator without children, there is no shared state.
572
4.04k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
4.04k
            _dependency = _shared_state->create_source_dependency(
575
4.04k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
4.04k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
4.04k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
4.04k
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
769
        }
583
4.81k
    }
584
585
4.81k
    if (must_set_shared_state() && _shared_state == nullptr) {
586
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
587
0
    }
588
589
4.81k
    _rows_returned_counter =
590
4.81k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
4.81k
    _blocks_returned_counter =
592
4.81k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
4.81k
    _output_block_bytes_counter =
594
4.81k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
4.81k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
4.81k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
4.81k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
4.81k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
4.81k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
4.81k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
4.81k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
4.81k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
4.81k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
4.81k
    _memory_used_counter =
605
4.81k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
4.81k
    _common_profile->add_info_string("IsColocate",
607
4.81k
                                     std::to_string(_parent->is_colocated_operator()));
608
4.81k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
4.81k
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
4.81k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
4.81k
    return Status::OK();
612
4.81k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
696k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
696k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
696k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
696k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
696k
    _operator_profile->set_metadata(_parent->node_id());
552
    // indent is false so that source operator will have same
553
    // indentation_level with its parent operator.
554
696k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
696k
    _operator_profile->add_child(_common_profile.get(), true);
556
696k
    _operator_profile->add_child(_custom_profile.get(), true);
557
696k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
696k
    if constexpr (!is_fake_shared) {
559
696k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
560
682k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
561
682k
                                    .first.get()
562
682k
                                    ->template cast<SharedStateArg>();
563
564
682k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
565
682k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
566
682k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
567
682k
        } else if (info.shared_state) {
568
0
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
569
0
                DCHECK(false);
570
0
            }
571
            // For UnionSourceOperator without children, there is no shared state.
572
0
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
0
            _dependency = _shared_state->create_source_dependency(
575
0
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
13.4k
        } else {
579
13.4k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
13.4k
                DCHECK(false);
581
13.4k
            }
582
13.4k
        }
583
696k
    }
584
585
696k
    if (must_set_shared_state() && _shared_state == nullptr) {
586
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
587
0
    }
588
589
696k
    _rows_returned_counter =
590
696k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
696k
    _blocks_returned_counter =
592
696k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
696k
    _output_block_bytes_counter =
594
696k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
696k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
696k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
696k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
696k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
696k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
696k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
696k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
696k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
696k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
696k
    _memory_used_counter =
605
696k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
696k
    _common_profile->add_info_string("IsColocate",
607
696k
                                     std::to_string(_parent->is_colocated_operator()));
608
696k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
696k
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
696k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
696k
    return Status::OK();
612
696k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
151
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
151
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
151
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
151
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
151
    _operator_profile->set_metadata(_parent->node_id());
552
    // indent is false so that source operator will have same
553
    // indentation_level with its parent operator.
554
151
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
151
    _operator_profile->add_child(_common_profile.get(), true);
556
151
    _operator_profile->add_child(_custom_profile.get(), true);
557
151
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
151
    if constexpr (!is_fake_shared) {
559
151
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
560
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
561
0
                                    .first.get()
562
0
                                    ->template cast<SharedStateArg>();
563
564
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
565
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
566
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
567
151
        } else if (info.shared_state) {
568
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
569
                DCHECK(false);
570
            }
571
            // For UnionSourceOperator without children, there is no shared state.
572
151
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
151
            _dependency = _shared_state->create_source_dependency(
575
151
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
151
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
151
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
151
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
0
        }
583
151
    }
584
585
151
    if (must_set_shared_state() && _shared_state == nullptr) {
586
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
587
0
    }
588
589
151
    _rows_returned_counter =
590
151
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
151
    _blocks_returned_counter =
592
151
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
151
    _output_block_bytes_counter =
594
151
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
151
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
151
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
151
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
151
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
151
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
151
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
151
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
151
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
151
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
151
    _memory_used_counter =
605
151
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
151
    _common_profile->add_info_string("IsColocate",
607
151
                                     std::to_string(_parent->is_colocated_operator()));
608
151
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
151
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
151
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
151
    return Status::OK();
612
151
}
613
614
template <typename SharedStateArg>
615
2.26M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
2.26M
    _conjuncts.resize(_parent->_conjuncts.size());
617
2.26M
    _projections.resize(_parent->_projections.size());
618
2.65M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
388k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
388k
    }
621
4.45M
    for (size_t i = 0; i < _projections.size(); i++) {
622
2.18M
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
2.18M
    }
624
2.26M
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
2.27M
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
626
7.78k
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
627
51.9k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
628
44.1k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
629
44.1k
                    state, _intermediate_projections[i][j]));
630
44.1k
        }
631
7.78k
    }
632
2.26M
    return Status::OK();
633
2.26M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
63.6k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
63.6k
    _conjuncts.resize(_parent->_conjuncts.size());
617
63.6k
    _projections.resize(_parent->_projections.size());
618
64.9k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
1.30k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1.30k
    }
621
318k
    for (size_t i = 0; i < _projections.size(); i++) {
622
254k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
254k
    }
624
63.6k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
64.5k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
626
906
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
627
9.37k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
628
8.46k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
629
8.46k
                    state, _intermediate_projections[i][j]));
630
8.46k
        }
631
906
    }
632
63.6k
    return Status::OK();
633
63.6k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
3
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
3
    _conjuncts.resize(_parent->_conjuncts.size());
617
3
    _projections.resize(_parent->_projections.size());
618
3
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
3
    for (size_t i = 0; i < _projections.size(); i++) {
622
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
0
    }
624
3
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
3
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
626
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
627
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
628
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
629
0
                    state, _intermediate_projections[i][j]));
630
0
        }
631
0
    }
632
3
    return Status::OK();
633
3
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
213k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
213k
    _conjuncts.resize(_parent->_conjuncts.size());
617
213k
    _projections.resize(_parent->_projections.size());
618
213k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
213k
    for (size_t i = 0; i < _projections.size(); i++) {
622
319
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
319
    }
624
213k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
213k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
626
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
627
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
628
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
629
0
                    state, _intermediate_projections[i][j]));
630
0
        }
631
0
    }
632
213k
    return Status::OK();
633
213k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
24
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
24
    _conjuncts.resize(_parent->_conjuncts.size());
617
24
    _projections.resize(_parent->_projections.size());
618
24
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
24
    for (size_t i = 0; i < _projections.size(); i++) {
622
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
0
    }
624
24
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
24
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
626
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
627
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
628
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
629
0
                    state, _intermediate_projections[i][j]));
630
0
        }
631
0
    }
632
24
    return Status::OK();
633
24
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
8.56k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
8.56k
    _conjuncts.resize(_parent->_conjuncts.size());
617
8.56k
    _projections.resize(_parent->_projections.size());
618
8.76k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
191
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
191
    }
621
47.5k
    for (size_t i = 0; i < _projections.size(); i++) {
622
39.0k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
39.0k
    }
624
8.56k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
8.66k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
626
99
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
627
612
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
628
513
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
629
513
                    state, _intermediate_projections[i][j]));
630
513
        }
631
99
    }
632
8.56k
    return Status::OK();
633
8.56k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
5.85k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
5.85k
    _conjuncts.resize(_parent->_conjuncts.size());
617
5.85k
    _projections.resize(_parent->_projections.size());
618
6.45k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
602
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
602
    }
621
15.8k
    for (size_t i = 0; i < _projections.size(); i++) {
622
10.0k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
10.0k
    }
624
5.85k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
5.94k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
626
89
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
627
675
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
628
586
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
629
586
                    state, _intermediate_projections[i][j]));
630
586
        }
631
89
    }
632
5.85k
    return Status::OK();
633
5.85k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
111k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
111k
    _conjuncts.resize(_parent->_conjuncts.size());
617
111k
    _projections.resize(_parent->_projections.size());
618
114k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
2.46k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
2.46k
    }
621
340k
    for (size_t i = 0; i < _projections.size(); i++) {
622
229k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
229k
    }
624
111k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
111k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
626
321
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
627
2.70k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
628
2.38k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
629
2.38k
                    state, _intermediate_projections[i][j]));
630
2.38k
        }
631
321
    }
632
111k
    return Status::OK();
633
111k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
336
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
336
    _conjuncts.resize(_parent->_conjuncts.size());
617
336
    _projections.resize(_parent->_projections.size());
618
336
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
1.23k
    for (size_t i = 0; i < _projections.size(); i++) {
622
900
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
900
    }
624
336
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
336
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
626
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
627
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
628
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
629
0
                    state, _intermediate_projections[i][j]));
630
0
        }
631
0
    }
632
336
    return Status::OK();
633
336
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
58
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
58
    _conjuncts.resize(_parent->_conjuncts.size());
617
58
    _projections.resize(_parent->_projections.size());
618
58
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
126
    for (size_t i = 0; i < _projections.size(); i++) {
622
68
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
68
    }
624
58
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
58
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
626
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
627
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
628
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
629
0
                    state, _intermediate_projections[i][j]));
630
0
        }
631
0
    }
632
58
    return Status::OK();
633
58
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
1.09M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
1.09M
    _conjuncts.resize(_parent->_conjuncts.size());
617
1.09M
    _projections.resize(_parent->_projections.size());
618
1.48M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
381k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
381k
    }
621
2.66M
    for (size_t i = 0; i < _projections.size(); i++) {
622
1.56M
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
1.56M
    }
624
1.09M
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
1.10M
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
626
6.36k
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
627
38.5k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
628
32.2k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
629
32.2k
                    state, _intermediate_projections[i][j]));
630
32.2k
        }
631
6.36k
    }
632
1.09M
    return Status::OK();
633
1.09M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
52.7k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
52.7k
    _conjuncts.resize(_parent->_conjuncts.size());
617
52.7k
    _projections.resize(_parent->_projections.size());
618
52.7k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
141k
    for (size_t i = 0; i < _projections.size(); i++) {
622
89.1k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
89.1k
    }
624
52.7k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
52.7k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
626
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
627
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
628
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
629
0
                    state, _intermediate_projections[i][j]));
630
0
        }
631
0
    }
632
52.7k
    return Status::OK();
633
52.7k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
17
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
17
    _conjuncts.resize(_parent->_conjuncts.size());
617
17
    _projections.resize(_parent->_projections.size());
618
17
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
17
    for (size_t i = 0; i < _projections.size(); i++) {
622
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
0
    }
624
17
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
17
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
626
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
627
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
628
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
629
0
                    state, _intermediate_projections[i][j]));
630
0
        }
631
0
    }
632
17
    return Status::OK();
633
17
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
6.60k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
6.60k
    _conjuncts.resize(_parent->_conjuncts.size());
617
6.60k
    _projections.resize(_parent->_projections.size());
618
8.61k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
2.01k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
2.01k
    }
621
6.60k
    for (size_t i = 0; i < _projections.size(); i++) {
622
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
0
    }
624
6.60k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
6.60k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
626
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
627
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
628
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
629
0
                    state, _intermediate_projections[i][j]));
630
0
        }
631
0
    }
632
6.60k
    return Status::OK();
633
6.60k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
404
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
404
    _conjuncts.resize(_parent->_conjuncts.size());
617
404
    _projections.resize(_parent->_projections.size());
618
404
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
404
    for (size_t i = 0; i < _projections.size(); i++) {
622
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
0
    }
624
404
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
404
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
626
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
627
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
628
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
629
0
                    state, _intermediate_projections[i][j]));
630
0
        }
631
0
    }
632
404
    return Status::OK();
633
404
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
4.99k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
4.99k
    _conjuncts.resize(_parent->_conjuncts.size());
617
4.99k
    _projections.resize(_parent->_projections.size());
618
4.99k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
4.99k
    for (size_t i = 0; i < _projections.size(); i++) {
622
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
0
    }
624
4.99k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
4.99k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
626
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
627
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
628
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
629
0
                    state, _intermediate_projections[i][j]));
630
0
        }
631
0
    }
632
4.99k
    return Status::OK();
633
4.99k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
699k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
699k
    _conjuncts.resize(_parent->_conjuncts.size());
617
699k
    _projections.resize(_parent->_projections.size());
618
699k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
699k
    for (size_t i = 0; i < _projections.size(); i++) {
622
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
0
    }
624
699k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
699k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
626
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
627
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
628
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
629
0
                    state, _intermediate_projections[i][j]));
630
0
        }
631
0
    }
632
699k
    return Status::OK();
633
699k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4openEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
151
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
151
    _conjuncts.resize(_parent->_conjuncts.size());
617
151
    _projections.resize(_parent->_projections.size());
618
158
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
7
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
7
    }
621
447
    for (size_t i = 0; i < _projections.size(); i++) {
622
296
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
296
    }
624
151
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
152
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
626
1
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
627
3
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
628
2
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
629
2
                    state, _intermediate_projections[i][j]));
630
2
        }
631
1
    }
632
151
    return Status::OK();
633
151
}
634
635
template <typename SharedStateArg>
636
5.97k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
637
5.97k
    if (_terminated) {
638
0
        return Status::OK();
639
0
    }
640
5.97k
    _terminated = true;
641
5.97k
    return Status::OK();
642
5.97k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
636
335
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
637
335
    if (_terminated) {
638
0
        return Status::OK();
639
0
    }
640
335
    _terminated = true;
641
335
    return Status::OK();
642
335
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
636
93
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
637
93
    if (_terminated) {
638
0
        return Status::OK();
639
0
    }
640
93
    _terminated = true;
641
93
    return Status::OK();
642
93
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
636
72
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
637
72
    if (_terminated) {
638
0
        return Status::OK();
639
0
    }
640
72
    _terminated = true;
641
72
    return Status::OK();
642
72
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
636
60
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
637
60
    if (_terminated) {
638
0
        return Status::OK();
639
0
    }
640
60
    _terminated = true;
641
60
    return Status::OK();
642
60
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
636
4.57k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
637
4.57k
    if (_terminated) {
638
0
        return Status::OK();
639
0
    }
640
4.57k
    _terminated = true;
641
4.57k
    return Status::OK();
642
4.57k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
636
18
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
637
18
    if (_terminated) {
638
0
        return Status::OK();
639
0
    }
640
18
    _terminated = true;
641
18
    return Status::OK();
642
18
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
636
3
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
637
3
    if (_terminated) {
638
0
        return Status::OK();
639
0
    }
640
3
    _terminated = true;
641
3
    return Status::OK();
642
3
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
636
147
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
637
147
    if (_terminated) {
638
0
        return Status::OK();
639
0
    }
640
147
    _terminated = true;
641
147
    return Status::OK();
642
147
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
636
663
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
637
663
    if (_terminated) {
638
0
        return Status::OK();
639
0
    }
640
663
    _terminated = true;
641
663
    return Status::OK();
642
663
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
636
12
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
637
12
    if (_terminated) {
638
0
        return Status::OK();
639
0
    }
640
12
    _terminated = true;
641
12
    return Status::OK();
642
12
}
643
644
template <typename SharedStateArg>
645
2.50M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
2.50M
    if (_closed) {
647
239k
        return Status::OK();
648
239k
    }
649
2.26M
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
1.16M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
1.16M
    }
652
2.26M
    _closed = true;
653
2.26M
    return Status::OK();
654
2.50M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
63.5k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
63.5k
    if (_closed) {
647
0
        return Status::OK();
648
0
    }
649
63.5k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
63.5k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
63.5k
    }
652
63.5k
    _closed = true;
653
63.5k
    return Status::OK();
654
63.5k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
4
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
4
    if (_closed) {
647
0
        return Status::OK();
648
0
    }
649
4
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
4
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
4
    }
652
4
    _closed = true;
653
4
    return Status::OK();
654
4
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
423k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
423k
    if (_closed) {
647
212k
        return Status::OK();
648
212k
    }
649
211k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
211k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
211k
    }
652
211k
    _closed = true;
653
211k
    return Status::OK();
654
423k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
24
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
24
    if (_closed) {
647
0
        return Status::OK();
648
0
    }
649
24
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
24
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
24
    }
652
24
    _closed = true;
653
24
    return Status::OK();
654
24
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
8.55k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
8.55k
    if (_closed) {
647
0
        return Status::OK();
648
0
    }
649
8.55k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
8.55k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
8.55k
    }
652
8.55k
    _closed = true;
653
8.55k
    return Status::OK();
654
8.55k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
11.7k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
11.7k
    if (_closed) {
647
5.89k
        return Status::OK();
648
5.89k
    }
649
5.83k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
5.83k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
5.83k
    }
652
5.83k
    _closed = true;
653
5.83k
    return Status::OK();
654
11.7k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
111k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
111k
    if (_closed) {
647
0
        return Status::OK();
648
0
    }
649
111k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
111k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
111k
    }
652
111k
    _closed = true;
653
111k
    return Status::OK();
654
111k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
335
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
335
    if (_closed) {
647
0
        return Status::OK();
648
0
    }
649
335
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
335
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
335
    }
652
335
    _closed = true;
653
335
    return Status::OK();
654
335
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
53
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
53
    if (_closed) {
647
0
        return Status::OK();
648
0
    }
649
53
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
53
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
53
    }
652
53
    _closed = true;
653
53
    return Status::OK();
654
53
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
1.11M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
1.11M
    if (_closed) {
647
15.5k
        return Status::OK();
648
15.5k
    }
649
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
    }
652
1.09M
    _closed = true;
653
1.09M
    return Status::OK();
654
1.11M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
52.7k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
52.7k
    if (_closed) {
647
0
        return Status::OK();
648
0
    }
649
52.7k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
52.7k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
52.7k
    }
652
52.7k
    _closed = true;
653
52.7k
    return Status::OK();
654
52.7k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
28
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
28
    if (_closed) {
647
14
        return Status::OK();
648
14
    }
649
14
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
14
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
14
    }
652
14
    _closed = true;
653
14
    return Status::OK();
654
28
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
6.58k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
6.58k
    if (_closed) {
647
0
        return Status::OK();
648
0
    }
649
6.58k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
6.58k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
6.58k
    }
652
6.58k
    _closed = true;
653
6.58k
    return Status::OK();
654
6.58k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
604
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
604
    if (_closed) {
647
302
        return Status::OK();
648
302
    }
649
302
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
302
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
302
    }
652
302
    _closed = true;
653
302
    return Status::OK();
654
604
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
10.0k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
10.0k
    if (_closed) {
647
5.04k
        return Status::OK();
648
5.04k
    }
649
4.98k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
4.98k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
4.98k
    }
652
4.98k
    _closed = true;
653
4.98k
    return Status::OK();
654
10.0k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
701k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
701k
    if (_closed) {
647
0
        return Status::OK();
648
0
    }
649
701k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
701k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
701k
    }
652
701k
    _closed = true;
653
701k
    return Status::OK();
654
701k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
304
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
304
    if (_closed) {
647
162
        return Status::OK();
648
162
    }
649
142
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
142
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
142
    }
652
142
    _closed = true;
653
142
    return Status::OK();
654
304
}
655
656
template <typename SharedState>
657
1.79M
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
1.79M
    _operator_profile =
660
1.79M
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
1.79M
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
1.79M
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
663
664
    // indentation is true
665
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
666
    // So we should set the indentation to true.
667
1.79M
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
1.79M
    _operator_profile->add_child(_common_profile, true);
669
1.79M
    _operator_profile->add_child(_custom_profile, true);
670
671
1.79M
    _operator_profile->set_metadata(_parent->node_id());
672
1.79M
    _wait_for_finish_dependency_timer =
673
1.79M
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
1.79M
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
1.79M
    if constexpr (!is_fake_shared) {
676
1.19M
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
1.19M
            info.shared_state_map.end()) {
678
289k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
679
275k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
680
275k
            }
681
289k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
682
289k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
683
289k
                                                  ? 0
684
289k
                                                  : info.task_idx]
685
289k
                                  .get();
686
289k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
687
906k
        } else {
688
906k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
257
                DCHECK(false);
690
257
            }
691
906k
            _shared_state = info.shared_state->template cast<SharedState>();
692
906k
            _dependency = _shared_state->create_sink_dependency(
693
906k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
906k
        }
695
1.19M
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
1.19M
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
1.19M
    }
698
699
1.79M
    if (must_set_shared_state() && _shared_state == nullptr) {
700
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
701
0
    }
702
703
1.79M
    _rows_input_counter =
704
1.79M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
1.79M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
1.79M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
1.79M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
1.79M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
1.79M
    _memory_used_counter =
710
1.79M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
1.79M
    _common_profile->add_info_string("IsColocate",
712
1.79M
                                     std::to_string(_parent->is_colocated_operator()));
713
1.79M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
1.79M
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
1.79M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
1.79M
    return Status::OK();
717
1.79M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
111k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
111k
    _operator_profile =
660
111k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
111k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
111k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
663
664
    // indentation is true
665
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
666
    // So we should set the indentation to true.
667
111k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
111k
    _operator_profile->add_child(_common_profile, true);
669
111k
    _operator_profile->add_child(_custom_profile, true);
670
671
111k
    _operator_profile->set_metadata(_parent->node_id());
672
111k
    _wait_for_finish_dependency_timer =
673
111k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
111k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
111k
    if constexpr (!is_fake_shared) {
676
111k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
111k
            info.shared_state_map.end()) {
678
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
679
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
680
            }
681
14.0k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
682
14.0k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
683
14.0k
                                                  ? 0
684
14.0k
                                                  : info.task_idx]
685
14.0k
                                  .get();
686
14.0k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
687
97.4k
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
97.4k
            _shared_state = info.shared_state->template cast<SharedState>();
692
97.4k
            _dependency = _shared_state->create_sink_dependency(
693
97.4k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
97.4k
        }
695
111k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
111k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
111k
    }
698
699
111k
    if (must_set_shared_state() && _shared_state == nullptr) {
700
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
701
0
    }
702
703
111k
    _rows_input_counter =
704
111k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
111k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
111k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
111k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
111k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
111k
    _memory_used_counter =
710
111k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
111k
    _common_profile->add_info_string("IsColocate",
712
111k
                                     std::to_string(_parent->is_colocated_operator()));
713
111k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
111k
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
111k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
111k
    return Status::OK();
717
111k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
2
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
2
    _operator_profile =
660
2
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
2
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
2
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
663
664
    // indentation is true
665
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
666
    // So we should set the indentation to true.
667
2
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
2
    _operator_profile->add_child(_common_profile, true);
669
2
    _operator_profile->add_child(_custom_profile, true);
670
671
2
    _operator_profile->set_metadata(_parent->node_id());
672
2
    _wait_for_finish_dependency_timer =
673
2
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
2
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
2
    if constexpr (!is_fake_shared) {
676
2
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
2
            info.shared_state_map.end()) {
678
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
679
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
680
            }
681
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
682
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
683
0
                                                  ? 0
684
0
                                                  : info.task_idx]
685
0
                                  .get();
686
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
687
2
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
2
            _shared_state = info.shared_state->template cast<SharedState>();
692
2
            _dependency = _shared_state->create_sink_dependency(
693
2
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
2
        }
695
2
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
2
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
2
    }
698
699
2
    if (must_set_shared_state() && _shared_state == nullptr) {
700
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
701
0
    }
702
703
2
    _rows_input_counter =
704
2
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
2
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
2
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
2
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
2
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
2
    _memory_used_counter =
710
2
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
2
    _common_profile->add_info_string("IsColocate",
712
2
                                     std::to_string(_parent->is_colocated_operator()));
713
2
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
2
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
2
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
2
    return Status::OK();
717
2
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
211k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
211k
    _operator_profile =
660
211k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
211k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
211k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
663
664
    // indentation is true
665
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
666
    // So we should set the indentation to true.
667
211k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
211k
    _operator_profile->add_child(_common_profile, true);
669
211k
    _operator_profile->add_child(_custom_profile, true);
670
671
211k
    _operator_profile->set_metadata(_parent->node_id());
672
211k
    _wait_for_finish_dependency_timer =
673
211k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
211k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
211k
    if constexpr (!is_fake_shared) {
676
211k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
211k
            info.shared_state_map.end()) {
678
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
679
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
680
            }
681
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
682
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
683
0
                                                  ? 0
684
0
                                                  : info.task_idx]
685
0
                                  .get();
686
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
687
211k
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
211k
            _shared_state = info.shared_state->template cast<SharedState>();
692
211k
            _dependency = _shared_state->create_sink_dependency(
693
211k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
211k
        }
695
211k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
211k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
211k
    }
698
699
211k
    if (must_set_shared_state() && _shared_state == nullptr) {
700
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
701
0
    }
702
703
211k
    _rows_input_counter =
704
211k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
211k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
211k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
211k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
211k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
211k
    _memory_used_counter =
710
211k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
211k
    _common_profile->add_info_string("IsColocate",
712
211k
                                     std::to_string(_parent->is_colocated_operator()));
713
211k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
211k
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
211k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
211k
    return Status::OK();
717
211k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
30
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
30
    _operator_profile =
660
30
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
30
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
30
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
663
664
    // indentation is true
665
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
666
    // So we should set the indentation to true.
667
30
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
30
    _operator_profile->add_child(_common_profile, true);
669
30
    _operator_profile->add_child(_custom_profile, true);
670
671
30
    _operator_profile->set_metadata(_parent->node_id());
672
30
    _wait_for_finish_dependency_timer =
673
30
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
30
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
30
    if constexpr (!is_fake_shared) {
676
30
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
30
            info.shared_state_map.end()) {
678
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
679
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
680
            }
681
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
682
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
683
0
                                                  ? 0
684
0
                                                  : info.task_idx]
685
0
                                  .get();
686
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
687
30
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
30
            _shared_state = info.shared_state->template cast<SharedState>();
692
30
            _dependency = _shared_state->create_sink_dependency(
693
30
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
30
        }
695
30
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
30
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
30
    }
698
699
30
    if (must_set_shared_state() && _shared_state == nullptr) {
700
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
701
0
    }
702
703
30
    _rows_input_counter =
704
30
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
30
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
30
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
30
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
30
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
30
    _memory_used_counter =
710
30
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
30
    _common_profile->add_info_string("IsColocate",
712
30
                                     std::to_string(_parent->is_colocated_operator()));
713
30
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
30
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
30
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
30
    return Status::OK();
717
30
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
8.54k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
8.54k
    _operator_profile =
660
8.54k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
8.54k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
8.54k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
663
664
    // indentation is true
665
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
666
    // So we should set the indentation to true.
667
8.54k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
8.54k
    _operator_profile->add_child(_common_profile, true);
669
8.54k
    _operator_profile->add_child(_custom_profile, true);
670
671
8.54k
    _operator_profile->set_metadata(_parent->node_id());
672
8.54k
    _wait_for_finish_dependency_timer =
673
8.54k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
8.54k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
8.54k
    if constexpr (!is_fake_shared) {
676
8.54k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
8.54k
            info.shared_state_map.end()) {
678
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
679
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
680
            }
681
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
682
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
683
0
                                                  ? 0
684
0
                                                  : info.task_idx]
685
0
                                  .get();
686
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
687
8.54k
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
8.54k
            _shared_state = info.shared_state->template cast<SharedState>();
692
8.54k
            _dependency = _shared_state->create_sink_dependency(
693
8.54k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
8.54k
        }
695
8.54k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
8.54k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
8.54k
    }
698
699
8.54k
    if (must_set_shared_state() && _shared_state == nullptr) {
700
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
701
0
    }
702
703
8.54k
    _rows_input_counter =
704
8.54k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
8.54k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
8.54k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
8.54k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
8.54k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
8.54k
    _memory_used_counter =
710
8.54k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
8.54k
    _common_profile->add_info_string("IsColocate",
712
8.54k
                                     std::to_string(_parent->is_colocated_operator()));
713
8.54k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
8.54k
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
8.54k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
8.54k
    return Status::OK();
717
8.54k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
5.83k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
5.83k
    _operator_profile =
660
5.83k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
5.83k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
5.83k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
663
664
    // indentation is true
665
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
666
    // So we should set the indentation to true.
667
5.83k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
5.83k
    _operator_profile->add_child(_common_profile, true);
669
5.83k
    _operator_profile->add_child(_custom_profile, true);
670
671
5.83k
    _operator_profile->set_metadata(_parent->node_id());
672
5.83k
    _wait_for_finish_dependency_timer =
673
5.83k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
5.83k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
5.83k
    if constexpr (!is_fake_shared) {
676
5.83k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
5.83k
            info.shared_state_map.end()) {
678
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
679
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
680
            }
681
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
682
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
683
0
                                                  ? 0
684
0
                                                  : info.task_idx]
685
0
                                  .get();
686
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
687
5.83k
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
5.83k
            _shared_state = info.shared_state->template cast<SharedState>();
692
5.83k
            _dependency = _shared_state->create_sink_dependency(
693
5.83k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
5.83k
        }
695
5.83k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
5.83k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
5.83k
    }
698
699
5.83k
    if (must_set_shared_state() && _shared_state == nullptr) {
700
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
701
0
    }
702
703
5.83k
    _rows_input_counter =
704
5.83k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
5.83k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
5.83k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
5.83k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
5.83k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
5.83k
    _memory_used_counter =
710
5.83k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
5.83k
    _common_profile->add_info_string("IsColocate",
712
5.83k
                                     std::to_string(_parent->is_colocated_operator()));
713
5.83k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
5.83k
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
5.83k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
5.83k
    return Status::OK();
717
5.83k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
111k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
111k
    _operator_profile =
660
111k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
111k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
111k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
663
664
    // indentation is true
665
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
666
    // So we should set the indentation to true.
667
111k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
111k
    _operator_profile->add_child(_common_profile, true);
669
111k
    _operator_profile->add_child(_custom_profile, true);
670
671
111k
    _operator_profile->set_metadata(_parent->node_id());
672
111k
    _wait_for_finish_dependency_timer =
673
111k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
111k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
111k
    if constexpr (!is_fake_shared) {
676
111k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
111k
            info.shared_state_map.end()) {
678
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
679
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
680
            }
681
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
682
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
683
0
                                                  ? 0
684
0
                                                  : info.task_idx]
685
0
                                  .get();
686
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
687
111k
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
111k
            _shared_state = info.shared_state->template cast<SharedState>();
692
111k
            _dependency = _shared_state->create_sink_dependency(
693
111k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
111k
        }
695
111k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
111k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
111k
    }
698
699
111k
    if (must_set_shared_state() && _shared_state == nullptr) {
700
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
701
0
    }
702
703
111k
    _rows_input_counter =
704
111k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
111k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
111k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
111k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
111k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
111k
    _memory_used_counter =
710
111k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
111k
    _common_profile->add_info_string("IsColocate",
712
111k
                                     std::to_string(_parent->is_colocated_operator()));
713
111k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
111k
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
111k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
111k
    return Status::OK();
717
111k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
283
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
283
    _operator_profile =
660
283
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
283
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
283
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
663
664
    // indentation is true
665
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
666
    // So we should set the indentation to true.
667
283
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
283
    _operator_profile->add_child(_common_profile, true);
669
283
    _operator_profile->add_child(_custom_profile, true);
670
671
283
    _operator_profile->set_metadata(_parent->node_id());
672
283
    _wait_for_finish_dependency_timer =
673
283
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
283
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
283
    if constexpr (!is_fake_shared) {
676
283
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
283
            info.shared_state_map.end()) {
678
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
679
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
680
            }
681
279
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
682
279
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
683
279
                                                  ? 0
684
279
                                                  : info.task_idx]
685
279
                                  .get();
686
279
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
687
279
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
4
            _shared_state = info.shared_state->template cast<SharedState>();
692
4
            _dependency = _shared_state->create_sink_dependency(
693
4
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
4
        }
695
283
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
283
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
283
    }
698
699
283
    if (must_set_shared_state() && _shared_state == nullptr) {
700
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
701
0
    }
702
703
283
    _rows_input_counter =
704
283
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
283
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
283
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
283
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
283
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
283
    _memory_used_counter =
710
283
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
283
    _common_profile->add_info_string("IsColocate",
712
283
                                     std::to_string(_parent->is_colocated_operator()));
713
283
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
283
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
283
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
283
    return Status::OK();
717
283
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
64
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
64
    _operator_profile =
660
64
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
64
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
64
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
663
664
    // indentation is true
665
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
666
    // So we should set the indentation to true.
667
64
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
64
    _operator_profile->add_child(_common_profile, true);
669
64
    _operator_profile->add_child(_custom_profile, true);
670
671
64
    _operator_profile->set_metadata(_parent->node_id());
672
64
    _wait_for_finish_dependency_timer =
673
64
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
64
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
64
    if constexpr (!is_fake_shared) {
676
64
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
64
            info.shared_state_map.end()) {
678
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
679
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
680
            }
681
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
682
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
683
0
                                                  ? 0
684
0
                                                  : info.task_idx]
685
0
                                  .get();
686
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
687
64
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
64
            _shared_state = info.shared_state->template cast<SharedState>();
692
64
            _dependency = _shared_state->create_sink_dependency(
693
64
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
64
        }
695
64
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
64
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
64
    }
698
699
64
    if (must_set_shared_state() && _shared_state == nullptr) {
700
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
701
0
    }
702
703
64
    _rows_input_counter =
704
64
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
64
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
64
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
64
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
64
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
64
    _memory_used_counter =
710
64
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
64
    _common_profile->add_info_string("IsColocate",
712
64
                                     std::to_string(_parent->is_colocated_operator()));
713
64
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
64
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
64
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
64
    return Status::OK();
717
64
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
593k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
593k
    _operator_profile =
660
593k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
593k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
593k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
663
664
    // indentation is true
665
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
666
    // So we should set the indentation to true.
667
593k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
593k
    _operator_profile->add_child(_common_profile, true);
669
593k
    _operator_profile->add_child(_custom_profile, true);
670
671
593k
    _operator_profile->set_metadata(_parent->node_id());
672
593k
    _wait_for_finish_dependency_timer =
673
593k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
593k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
    if constexpr (!is_fake_shared) {
676
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
            info.shared_state_map.end()) {
678
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
679
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
680
            }
681
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
682
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
683
                                                  ? 0
684
                                                  : info.task_idx]
685
                                  .get();
686
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
687
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
            _shared_state = info.shared_state->template cast<SharedState>();
692
            _dependency = _shared_state->create_sink_dependency(
693
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
        }
695
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
    }
698
699
593k
    if (must_set_shared_state() && _shared_state == nullptr) {
700
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
701
0
    }
702
703
593k
    _rows_input_counter =
704
593k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
593k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
593k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
593k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
593k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
593k
    _memory_used_counter =
710
593k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
593k
    _common_profile->add_info_string("IsColocate",
712
593k
                                     std::to_string(_parent->is_colocated_operator()));
713
593k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
593k
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
593k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
593k
    return Status::OK();
717
593k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
5.17k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
5.17k
    _operator_profile =
660
5.17k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
5.17k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
5.17k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
663
664
    // indentation is true
665
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
666
    // So we should set the indentation to true.
667
5.17k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
5.17k
    _operator_profile->add_child(_common_profile, true);
669
5.17k
    _operator_profile->add_child(_custom_profile, true);
670
671
5.17k
    _operator_profile->set_metadata(_parent->node_id());
672
5.17k
    _wait_for_finish_dependency_timer =
673
5.17k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
5.17k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
5.17k
    if constexpr (!is_fake_shared) {
676
5.17k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
5.17k
            info.shared_state_map.end()) {
678
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
679
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
680
            }
681
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
682
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
683
0
                                                  ? 0
684
0
                                                  : info.task_idx]
685
0
                                  .get();
686
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
687
5.17k
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
5.17k
            _shared_state = info.shared_state->template cast<SharedState>();
692
5.17k
            _dependency = _shared_state->create_sink_dependency(
693
5.17k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
5.17k
        }
695
5.17k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
5.17k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
5.17k
    }
698
699
5.17k
    if (must_set_shared_state() && _shared_state == nullptr) {
700
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
701
0
    }
702
703
5.17k
    _rows_input_counter =
704
5.17k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
5.17k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
5.17k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
5.17k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
5.17k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
5.17k
    _memory_used_counter =
710
5.17k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
5.17k
    _common_profile->add_info_string("IsColocate",
712
5.17k
                                     std::to_string(_parent->is_colocated_operator()));
713
5.17k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
5.17k
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
5.17k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
5.17k
    return Status::OK();
717
5.17k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
403
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
403
    _operator_profile =
660
403
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
403
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
403
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
663
664
    // indentation is true
665
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
666
    // So we should set the indentation to true.
667
403
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
403
    _operator_profile->add_child(_common_profile, true);
669
403
    _operator_profile->add_child(_custom_profile, true);
670
671
403
    _operator_profile->set_metadata(_parent->node_id());
672
403
    _wait_for_finish_dependency_timer =
673
403
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
403
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
403
    if constexpr (!is_fake_shared) {
676
403
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
403
            info.shared_state_map.end()) {
678
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
679
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
680
            }
681
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
682
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
683
0
                                                  ? 0
684
0
                                                  : info.task_idx]
685
0
                                  .get();
686
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
687
403
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
403
            _shared_state = info.shared_state->template cast<SharedState>();
692
403
            _dependency = _shared_state->create_sink_dependency(
693
403
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
403
        }
695
403
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
403
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
403
    }
698
699
403
    if (must_set_shared_state() && _shared_state == nullptr) {
700
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
701
0
    }
702
703
403
    _rows_input_counter =
704
403
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
403
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
403
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
403
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
403
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
403
    _memory_used_counter =
710
403
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
403
    _common_profile->add_info_string("IsColocate",
712
403
                                     std::to_string(_parent->is_colocated_operator()));
713
403
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
403
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
403
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
403
    return Status::OK();
717
403
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
2.56k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
2.56k
    _operator_profile =
660
2.56k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
2.56k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
2.56k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
663
664
    // indentation is true
665
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
666
    // So we should set the indentation to true.
667
2.56k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
2.56k
    _operator_profile->add_child(_common_profile, true);
669
2.56k
    _operator_profile->add_child(_custom_profile, true);
670
671
2.56k
    _operator_profile->set_metadata(_parent->node_id());
672
2.56k
    _wait_for_finish_dependency_timer =
673
2.56k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
2.56k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
2.56k
    if constexpr (!is_fake_shared) {
676
2.56k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
2.56k
            info.shared_state_map.end()) {
678
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
679
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
680
            }
681
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
682
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
683
0
                                                  ? 0
684
0
                                                  : info.task_idx]
685
0
                                  .get();
686
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
687
2.56k
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
2.56k
            _shared_state = info.shared_state->template cast<SharedState>();
692
2.56k
            _dependency = _shared_state->create_sink_dependency(
693
2.56k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
2.56k
        }
695
2.56k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
2.56k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
2.56k
    }
698
699
2.56k
    if (must_set_shared_state() && _shared_state == nullptr) {
700
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
701
0
    }
702
703
2.56k
    _rows_input_counter =
704
2.56k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
2.56k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
2.56k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
2.56k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
2.56k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
2.56k
    _memory_used_counter =
710
2.56k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
2.56k
    _common_profile->add_info_string("IsColocate",
712
2.56k
                                     std::to_string(_parent->is_colocated_operator()));
713
2.56k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
2.56k
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
2.56k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
2.56k
    return Status::OK();
717
2.56k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
12.4k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
12.4k
    _operator_profile =
660
12.4k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
12.4k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
12.4k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
663
664
    // indentation is true
665
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
666
    // So we should set the indentation to true.
667
12.4k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
12.4k
    _operator_profile->add_child(_common_profile, true);
669
12.4k
    _operator_profile->add_child(_custom_profile, true);
670
671
12.4k
    _operator_profile->set_metadata(_parent->node_id());
672
12.4k
    _wait_for_finish_dependency_timer =
673
12.4k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
12.4k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
12.4k
    if constexpr (!is_fake_shared) {
676
12.4k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
12.4k
            info.shared_state_map.end()) {
678
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
679
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
680
            }
681
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
682
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
683
0
                                                  ? 0
684
0
                                                  : info.task_idx]
685
0
                                  .get();
686
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
687
12.4k
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
12.4k
            _shared_state = info.shared_state->template cast<SharedState>();
692
12.4k
            _dependency = _shared_state->create_sink_dependency(
693
12.4k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
12.4k
        }
695
12.4k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
12.4k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
12.4k
    }
698
699
12.4k
    if (must_set_shared_state() && _shared_state == nullptr) {
700
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
701
0
    }
702
703
12.4k
    _rows_input_counter =
704
12.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
12.4k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
12.4k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
12.4k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
12.4k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
12.4k
    _memory_used_counter =
710
12.4k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
12.4k
    _common_profile->add_info_string("IsColocate",
712
12.4k
                                     std::to_string(_parent->is_colocated_operator()));
713
12.4k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
12.4k
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
12.4k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
12.4k
    return Status::OK();
717
12.4k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
275k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
275k
    _operator_profile =
660
275k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
275k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
275k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
663
664
    // indentation is true
665
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
666
    // So we should set the indentation to true.
667
275k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
275k
    _operator_profile->add_child(_common_profile, true);
669
275k
    _operator_profile->add_child(_custom_profile, true);
670
671
275k
    _operator_profile->set_metadata(_parent->node_id());
672
275k
    _wait_for_finish_dependency_timer =
673
275k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
275k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
275k
    if constexpr (!is_fake_shared) {
676
275k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
275k
            info.shared_state_map.end()) {
678
275k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
679
275k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
680
275k
            }
681
275k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
682
275k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
683
275k
                                                  ? 0
684
275k
                                                  : info.task_idx]
685
275k
                                  .get();
686
275k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
687
275k
        } else {
688
257
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
257
                DCHECK(false);
690
257
            }
691
257
            _shared_state = info.shared_state->template cast<SharedState>();
692
257
            _dependency = _shared_state->create_sink_dependency(
693
257
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
257
        }
695
275k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
275k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
275k
    }
698
699
275k
    if (must_set_shared_state() && _shared_state == nullptr) {
700
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
701
0
    }
702
703
275k
    _rows_input_counter =
704
275k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
275k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
275k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
275k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
275k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
275k
    _memory_used_counter =
710
275k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
275k
    _common_profile->add_info_string("IsColocate",
712
275k
                                     std::to_string(_parent->is_colocated_operator()));
713
275k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
275k
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
275k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
275k
    return Status::OK();
717
275k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
450k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
450k
    _operator_profile =
660
450k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
450k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
450k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
663
664
    // indentation is true
665
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
666
    // So we should set the indentation to true.
667
450k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
450k
    _operator_profile->add_child(_common_profile, true);
669
450k
    _operator_profile->add_child(_custom_profile, true);
670
671
450k
    _operator_profile->set_metadata(_parent->node_id());
672
450k
    _wait_for_finish_dependency_timer =
673
450k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
450k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
450k
    if constexpr (!is_fake_shared) {
676
450k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
450k
            info.shared_state_map.end()) {
678
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
679
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
680
            }
681
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
682
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
683
0
                                                  ? 0
684
0
                                                  : info.task_idx]
685
0
                                  .get();
686
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
687
450k
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
450k
            _shared_state = info.shared_state->template cast<SharedState>();
692
450k
            _dependency = _shared_state->create_sink_dependency(
693
450k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
450k
        }
695
450k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
450k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
450k
    }
698
699
450k
    if (must_set_shared_state() && _shared_state == nullptr) {
700
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
701
0
    }
702
703
450k
    _rows_input_counter =
704
450k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
450k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
450k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
450k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
450k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
450k
    _memory_used_counter =
710
450k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
450k
    _common_profile->add_info_string("IsColocate",
712
450k
                                     std::to_string(_parent->is_colocated_operator()));
713
450k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
450k
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
450k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
450k
    return Status::OK();
717
450k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
17
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
17
    _operator_profile =
660
17
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
17
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
17
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
663
664
    // indentation is true
665
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
666
    // So we should set the indentation to true.
667
17
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
17
    _operator_profile->add_child(_common_profile, true);
669
17
    _operator_profile->add_child(_custom_profile, true);
670
671
17
    _operator_profile->set_metadata(_parent->node_id());
672
17
    _wait_for_finish_dependency_timer =
673
17
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
17
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
17
    if constexpr (!is_fake_shared) {
676
17
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
17
            info.shared_state_map.end()) {
678
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
679
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
680
            }
681
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
682
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
683
0
                                                  ? 0
684
0
                                                  : info.task_idx]
685
0
                                  .get();
686
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
687
17
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
17
            _shared_state = info.shared_state->template cast<SharedState>();
692
17
            _dependency = _shared_state->create_sink_dependency(
693
17
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
17
        }
695
17
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
17
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
17
    }
698
699
17
    if (must_set_shared_state() && _shared_state == nullptr) {
700
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
701
0
    }
702
703
17
    _rows_input_counter =
704
17
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
17
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
17
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
17
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
17
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
17
    _memory_used_counter =
710
17
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
17
    _common_profile->add_info_string("IsColocate",
712
17
                                     std::to_string(_parent->is_colocated_operator()));
713
17
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
17
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
17
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
17
    return Status::OK();
717
17
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
302
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
302
    _operator_profile =
660
302
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
302
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
302
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
663
664
    // indentation is true
665
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
666
    // So we should set the indentation to true.
667
302
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
302
    _operator_profile->add_child(_common_profile, true);
669
302
    _operator_profile->add_child(_custom_profile, true);
670
671
302
    _operator_profile->set_metadata(_parent->node_id());
672
302
    _wait_for_finish_dependency_timer =
673
302
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
302
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
302
    if constexpr (!is_fake_shared) {
676
302
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
302
            info.shared_state_map.end()) {
678
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
679
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
680
            }
681
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
682
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
683
0
                                                  ? 0
684
0
                                                  : info.task_idx]
685
0
                                  .get();
686
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
687
302
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
302
            _shared_state = info.shared_state->template cast<SharedState>();
692
302
            _dependency = _shared_state->create_sink_dependency(
693
302
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
302
        }
695
302
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
302
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
302
    }
698
699
302
    if (must_set_shared_state() && _shared_state == nullptr) {
700
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
701
0
    }
702
703
302
    _rows_input_counter =
704
302
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
302
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
302
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
302
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
302
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
302
    _memory_used_counter =
710
302
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
302
    _common_profile->add_info_string("IsColocate",
712
302
                                     std::to_string(_parent->is_colocated_operator()));
713
302
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
302
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
302
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
302
    return Status::OK();
717
302
}
718
719
template <typename SharedState>
720
1.79M
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
1.79M
    if (_closed) {
722
2
        return Status::OK();
723
2
    }
724
1.79M
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
1.20M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
1.20M
    }
727
1.79M
    _closed = true;
728
1.79M
    return Status::OK();
729
1.79M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
111k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
111k
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
111k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
111k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
111k
    }
727
111k
    _closed = true;
728
111k
    return Status::OK();
729
111k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
1
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
1
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
1
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
1
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
1
    }
727
1
    _closed = true;
728
1
    return Status::OK();
729
1
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
212k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
212k
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
212k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
212k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
212k
    }
727
212k
    _closed = true;
728
212k
    return Status::OK();
729
212k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
22
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
22
    if (_closed) {
722
2
        return Status::OK();
723
2
    }
724
20
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
20
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
20
    }
727
20
    _closed = true;
728
20
    return Status::OK();
729
22
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
8.52k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
8.52k
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
8.52k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
8.52k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
8.52k
    }
727
8.52k
    _closed = true;
728
8.52k
    return Status::OK();
729
8.52k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
5.82k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
5.82k
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
5.82k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
5.82k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
5.82k
    }
727
5.82k
    _closed = true;
728
5.82k
    return Status::OK();
729
5.82k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
111k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
111k
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
111k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
111k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
111k
    }
727
111k
    _closed = true;
728
111k
    return Status::OK();
729
111k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
280
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
280
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
280
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
280
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
280
    }
727
280
    _closed = true;
728
280
    return Status::OK();
729
280
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
53
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
53
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
53
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
53
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
53
    }
727
53
    _closed = true;
728
53
    return Status::OK();
729
53
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
596k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
596k
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
    }
727
596k
    _closed = true;
728
596k
    return Status::OK();
729
596k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
5.20k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
5.20k
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
5.20k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
5.20k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
5.20k
    }
727
5.20k
    _closed = true;
728
5.20k
    return Status::OK();
729
5.20k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
300
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
300
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
300
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
300
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
300
    }
727
300
    _closed = true;
728
300
    return Status::OK();
729
300
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
2.58k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
2.58k
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
2.58k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
2.58k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
2.58k
    }
727
2.58k
    _closed = true;
728
2.58k
    return Status::OK();
729
2.58k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
12.4k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
12.4k
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
12.4k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
12.4k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
12.4k
    }
727
12.4k
    _closed = true;
728
12.4k
    return Status::OK();
729
12.4k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
277k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
277k
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
277k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
277k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
277k
    }
727
277k
    _closed = true;
728
277k
    return Status::OK();
729
277k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
455k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
455k
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
455k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
455k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
455k
    }
727
455k
    _closed = true;
728
455k
    return Status::OK();
729
455k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
14
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
14
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
14
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
14
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
14
    }
727
14
    _closed = true;
728
14
    return Status::OK();
729
14
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
302
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
302
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
302
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
302
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
302
    }
727
302
    _closed = true;
728
302
    return Status::OK();
729
302
}
730
731
template <typename LocalStateType>
732
8.02k
Status StreamingOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
733
8.02k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
734
8.02k
    return pull(state, block, eos);
735
8.02k
}
_ZN5doris18StreamingOperatorXINS_23AssertNumRowsLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
732
231
Status StreamingOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
733
231
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
734
231
    return pull(state, block, eos);
735
231
}
_ZN5doris18StreamingOperatorXINS_16SelectLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
732
7.79k
Status StreamingOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
733
7.79k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
734
7.79k
    return pull(state, block, eos);
735
7.79k
}
736
737
template <typename LocalStateType>
738
707k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
739
707k
    auto& local_state = get_local_state(state);
740
707k
    if (need_more_input_data(state)) {
741
680k
        local_state._child_block->clear_column_data(
742
680k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
743
680k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
744
680k
                state, local_state._child_block.get(), &local_state._child_eos));
745
680k
        *eos = local_state._child_eos;
746
680k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
747
85.0k
            return Status::OK();
748
85.0k
        }
749
595k
        {
750
595k
            SCOPED_TIMER(local_state.exec_time_counter());
751
595k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
752
595k
        }
753
595k
    }
754
755
622k
    if (!need_more_input_data(state)) {
756
583k
        SCOPED_TIMER(local_state.exec_time_counter());
757
583k
        bool new_eos = false;
758
583k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
759
583k
        if (new_eos) {
760
508k
            *eos = true;
761
508k
        } else if (!need_more_input_data(state)) {
762
23.0k
            *eos = false;
763
23.0k
        }
764
583k
    }
765
622k
    return Status::OK();
766
622k
}
_ZN5doris17StatefulOperatorXINS_23HashJoinProbeLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
738
135k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
739
135k
    auto& local_state = get_local_state(state);
740
135k
    if (need_more_input_data(state)) {
741
120k
        local_state._child_block->clear_column_data(
742
120k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
743
120k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
744
120k
                state, local_state._child_block.get(), &local_state._child_eos));
745
120k
        *eos = local_state._child_eos;
746
120k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
747
43.9k
            return Status::OK();
748
43.9k
        }
749
76.4k
        {
750
76.4k
            SCOPED_TIMER(local_state.exec_time_counter());
751
76.4k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
752
76.4k
        }
753
76.4k
    }
754
755
91.1k
    if (!need_more_input_data(state)) {
756
91.1k
        SCOPED_TIMER(local_state.exec_time_counter());
757
91.1k
        bool new_eos = false;
758
91.1k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
759
91.1k
        if (new_eos) {
760
39.4k
            *eos = true;
761
51.7k
        } else if (!need_more_input_data(state)) {
762
8.83k
            *eos = false;
763
8.83k
        }
764
91.1k
    }
765
91.1k
    return Status::OK();
766
91.1k
}
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_34PartitionedHashJoinProbeLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
_ZN5doris17StatefulOperatorXINS_16RepeatLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
738
3.17k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
739
3.17k
    auto& local_state = get_local_state(state);
740
3.17k
    if (need_more_input_data(state)) {
741
1.81k
        local_state._child_block->clear_column_data(
742
1.81k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
743
1.81k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
744
1.81k
                state, local_state._child_block.get(), &local_state._child_eos));
745
1.81k
        *eos = local_state._child_eos;
746
1.81k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
747
245
            return Status::OK();
748
245
        }
749
1.57k
        {
750
1.57k
            SCOPED_TIMER(local_state.exec_time_counter());
751
1.57k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
752
1.57k
        }
753
1.57k
    }
754
755
2.96k
    if (!need_more_input_data(state)) {
756
2.96k
        SCOPED_TIMER(local_state.exec_time_counter());
757
2.96k
        bool new_eos = false;
758
2.96k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
759
2.96k
        if (new_eos) {
760
1.28k
            *eos = true;
761
1.67k
        } else if (!need_more_input_data(state)) {
762
1.36k
            *eos = false;
763
1.36k
        }
764
2.96k
    }
765
2.92k
    return Status::OK();
766
2.92k
}
_ZN5doris17StatefulOperatorXINS_25MaterializationLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
738
3.08k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
739
3.08k
    auto& local_state = get_local_state(state);
740
3.08k
    if (need_more_input_data(state)) {
741
3.08k
        local_state._child_block->clear_column_data(
742
3.08k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
743
3.08k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
744
3.08k
                state, local_state._child_block.get(), &local_state._child_eos));
745
3.08k
        *eos = local_state._child_eos;
746
3.08k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
747
1.08k
            return Status::OK();
748
1.08k
        }
749
1.99k
        {
750
1.99k
            SCOPED_TIMER(local_state.exec_time_counter());
751
1.99k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
752
1.99k
        }
753
1.99k
    }
754
755
1.99k
    if (!need_more_input_data(state)) {
756
1.99k
        SCOPED_TIMER(local_state.exec_time_counter());
757
1.99k
        bool new_eos = false;
758
1.99k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
759
1.99k
        if (new_eos) {
760
1.12k
            *eos = true;
761
1.12k
        } else if (!need_more_input_data(state)) {
762
0
            *eos = false;
763
0
        }
764
1.99k
    }
765
1.99k
    return Status::OK();
766
1.99k
}
_ZN5doris17StatefulOperatorXINS_22StreamingAggLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
738
19.0k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
739
19.0k
    auto& local_state = get_local_state(state);
740
19.0k
    if (need_more_input_data(state)) {
741
19.0k
        local_state._child_block->clear_column_data(
742
19.0k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
743
19.0k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
744
19.0k
                state, local_state._child_block.get(), &local_state._child_eos));
745
19.0k
        *eos = local_state._child_eos;
746
19.0k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
747
3.02k
            return Status::OK();
748
3.02k
        }
749
15.9k
        {
750
15.9k
            SCOPED_TIMER(local_state.exec_time_counter());
751
15.9k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
752
15.9k
        }
753
15.9k
    }
754
755
15.9k
    if (!need_more_input_data(state)) {
756
7.47k
        SCOPED_TIMER(local_state.exec_time_counter());
757
7.47k
        bool new_eos = false;
758
7.47k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
759
7.47k
        if (new_eos) {
760
7.37k
            *eos = true;
761
7.37k
        } else if (!need_more_input_data(state)) {
762
4
            *eos = false;
763
4
        }
764
7.47k
    }
765
15.9k
    return Status::OK();
766
15.9k
}
_ZN5doris17StatefulOperatorXINS_30DistinctStreamingAggLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
738
512k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
739
512k
    auto& local_state = get_local_state(state);
740
514k
    if (need_more_input_data(state)) {
741
514k
        local_state._child_block->clear_column_data(
742
514k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
743
514k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
744
514k
                state, local_state._child_block.get(), &local_state._child_eos));
745
514k
        *eos = local_state._child_eos;
746
514k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
747
34.7k
            return Status::OK();
748
34.7k
        }
749
479k
        {
750
479k
            SCOPED_TIMER(local_state.exec_time_counter());
751
479k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
752
479k
        }
753
479k
    }
754
755
478k
    if (!need_more_input_data(state)) {
756
448k
        SCOPED_TIMER(local_state.exec_time_counter());
757
448k
        bool new_eos = false;
758
448k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
759
448k
        if (new_eos) {
760
447k
            *eos = true;
761
447k
        } else if (!need_more_input_data(state)) {
762
0
            *eos = false;
763
0
        }
764
448k
    }
765
478k
    return Status::OK();
766
478k
}
_ZN5doris17StatefulOperatorXINS_29NestedLoopJoinProbeLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
738
28.1k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
739
28.1k
    auto& local_state = get_local_state(state);
740
28.1k
    if (need_more_input_data(state)) {
741
15.6k
        local_state._child_block->clear_column_data(
742
15.6k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
743
15.6k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
744
15.6k
                state, local_state._child_block.get(), &local_state._child_eos));
745
15.6k
        *eos = local_state._child_eos;
746
15.6k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
747
1.46k
            return Status::OK();
748
1.46k
        }
749
14.1k
        {
750
14.1k
            SCOPED_TIMER(local_state.exec_time_counter());
751
14.1k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
752
14.1k
        }
753
14.1k
    }
754
755
26.6k
    if (!need_more_input_data(state)) {
756
26.2k
        SCOPED_TIMER(local_state.exec_time_counter());
757
26.2k
        bool new_eos = false;
758
26.2k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
759
26.2k
        if (new_eos) {
760
8.52k
            *eos = true;
761
17.6k
        } else if (!need_more_input_data(state)) {
762
12.5k
            *eos = false;
763
12.5k
        }
764
26.2k
    }
765
26.6k
    return Status::OK();
766
26.6k
}
_ZN5doris17StatefulOperatorXINS_23TableFunctionLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
738
6.36k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
739
6.36k
    auto& local_state = get_local_state(state);
740
6.36k
    if (need_more_input_data(state)) {
741
6.00k
        local_state._child_block->clear_column_data(
742
6.00k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
743
6.00k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
744
6.00k
                state, local_state._child_block.get(), &local_state._child_eos));
745
6.00k
        *eos = local_state._child_eos;
746
6.00k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
747
580
            return Status::OK();
748
580
        }
749
5.42k
        {
750
5.42k
            SCOPED_TIMER(local_state.exec_time_counter());
751
5.42k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
752
5.42k
        }
753
5.42k
    }
754
755
5.78k
    if (!need_more_input_data(state)) {
756
5.78k
        SCOPED_TIMER(local_state.exec_time_counter());
757
5.78k
        bool new_eos = false;
758
5.78k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
759
5.78k
        if (new_eos) {
760
3.63k
            *eos = true;
761
3.63k
        } else if (!need_more_input_data(state)) {
762
366
            *eos = false;
763
366
        }
764
5.78k
    }
765
5.77k
    return Status::OK();
766
5.77k
}
767
768
template <typename Writer, typename Parent>
769
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
770
53.2k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
771
53.2k
    RETURN_IF_ERROR(Base::init(state, info));
772
53.2k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
773
53.2k
                                                         "AsyncWriterDependency", true);
774
53.2k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
775
53.2k
                             _finish_dependency));
776
777
53.2k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
778
53.2k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
779
53.2k
    return Status::OK();
780
53.2k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
770
430
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
771
430
    RETURN_IF_ERROR(Base::init(state, info));
772
430
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
773
430
                                                         "AsyncWriterDependency", true);
774
430
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
775
430
                             _finish_dependency));
776
777
430
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
778
430
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
779
430
    return Status::OK();
780
430
}
_ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
770
44
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
771
44
    RETURN_IF_ERROR(Base::init(state, info));
772
44
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
773
44
                                                         "AsyncWriterDependency", true);
774
44
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
775
44
                             _finish_dependency));
776
777
44
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
778
44
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
779
44
    return Status::OK();
780
44
}
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
770
43.5k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
771
43.5k
    RETURN_IF_ERROR(Base::init(state, info));
772
43.5k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
773
43.5k
                                                         "AsyncWriterDependency", true);
774
43.5k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
775
43.5k
                             _finish_dependency));
776
777
43.5k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
778
43.5k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
779
43.5k
    return Status::OK();
780
43.5k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
770
4.50k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
771
4.50k
    RETURN_IF_ERROR(Base::init(state, info));
772
4.50k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
773
4.50k
                                                         "AsyncWriterDependency", true);
774
4.50k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
775
4.50k
                             _finish_dependency));
776
777
4.50k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
778
4.50k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
779
4.50k
    return Status::OK();
780
4.50k
}
_ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
770
2.57k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
771
2.57k
    RETURN_IF_ERROR(Base::init(state, info));
772
2.57k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
773
2.57k
                                                         "AsyncWriterDependency", true);
774
2.57k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
775
2.57k
                             _finish_dependency));
776
777
2.57k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
778
2.57k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
779
2.57k
    return Status::OK();
780
2.57k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
770
1.68k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
771
1.68k
    RETURN_IF_ERROR(Base::init(state, info));
772
1.68k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
773
1.68k
                                                         "AsyncWriterDependency", true);
774
1.68k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
775
1.68k
                             _finish_dependency));
776
777
1.68k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
778
1.68k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
779
1.68k
    return Status::OK();
780
1.68k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
770
80
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
771
80
    RETURN_IF_ERROR(Base::init(state, info));
772
80
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
773
80
                                                         "AsyncWriterDependency", true);
774
80
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
775
80
                             _finish_dependency));
776
777
80
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
778
80
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
779
80
    return Status::OK();
780
80
}
_ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
770
320
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
771
320
    RETURN_IF_ERROR(Base::init(state, info));
772
320
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
773
320
                                                         "AsyncWriterDependency", true);
774
320
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
775
320
                             _finish_dependency));
776
777
320
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
778
320
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
779
320
    return Status::OK();
780
320
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
770
78
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
771
78
    RETURN_IF_ERROR(Base::init(state, info));
772
78
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
773
78
                                                         "AsyncWriterDependency", true);
774
78
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
775
78
                             _finish_dependency));
776
777
78
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
778
78
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
779
78
    return Status::OK();
780
78
}
781
782
template <typename Writer, typename Parent>
783
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
784
53.6k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
785
53.6k
    RETURN_IF_ERROR(Base::open(state));
786
53.6k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
787
470k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
788
417k
        RETURN_IF_ERROR(
789
417k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
790
417k
    }
791
53.6k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
792
53.6k
    return Status::OK();
793
53.6k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
784
430
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
785
430
    RETURN_IF_ERROR(Base::open(state));
786
430
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
787
2.29k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
788
1.86k
        RETURN_IF_ERROR(
789
1.86k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
790
1.86k
    }
791
430
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
792
430
    return Status::OK();
793
430
}
_ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
784
44
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
785
44
    RETURN_IF_ERROR(Base::open(state));
786
44
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
787
206
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
788
162
        RETURN_IF_ERROR(
789
162
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
790
162
    }
791
44
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
792
44
    return Status::OK();
793
44
}
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
784
43.9k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
785
43.9k
    RETURN_IF_ERROR(Base::open(state));
786
43.9k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
787
348k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
788
304k
        RETURN_IF_ERROR(
789
304k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
790
304k
    }
791
43.9k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
792
43.9k
    return Status::OK();
793
43.9k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
784
4.48k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
785
4.48k
    RETURN_IF_ERROR(Base::open(state));
786
4.48k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
787
28.0k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
788
23.5k
        RETURN_IF_ERROR(
789
23.5k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
790
23.5k
    }
791
4.48k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
792
4.48k
    return Status::OK();
793
4.48k
}
_ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
784
2.57k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
785
2.57k
    RETURN_IF_ERROR(Base::open(state));
786
2.57k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
787
67.7k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
788
65.2k
        RETURN_IF_ERROR(
789
65.2k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
790
65.2k
    }
791
2.57k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
792
2.57k
    return Status::OK();
793
2.57k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
784
1.68k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
785
1.68k
    RETURN_IF_ERROR(Base::open(state));
786
1.68k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
787
21.1k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
788
19.4k
        RETURN_IF_ERROR(
789
19.4k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
790
19.4k
    }
791
1.68k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
792
1.68k
    return Status::OK();
793
1.68k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
784
79
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
785
79
    RETURN_IF_ERROR(Base::open(state));
786
79
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
787
239
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
788
160
        RETURN_IF_ERROR(
789
160
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
790
160
    }
791
79
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
792
79
    return Status::OK();
793
79
}
_ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
784
320
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
785
320
    RETURN_IF_ERROR(Base::open(state));
786
320
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
787
2.19k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
788
1.87k
        RETURN_IF_ERROR(
789
1.87k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
790
1.87k
    }
791
320
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
792
320
    return Status::OK();
793
320
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
784
78
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
785
78
    RETURN_IF_ERROR(Base::open(state));
786
78
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
787
393
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
788
315
        RETURN_IF_ERROR(
789
315
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
790
315
    }
791
78
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
792
78
    return Status::OK();
793
78
}
794
795
template <typename Writer, typename Parent>
796
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
797
72.6k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
798
72.6k
    return _writer->sink(block, eos);
799
72.6k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
797
1.80k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
798
1.80k
    return _writer->sink(block, eos);
799
1.80k
}
_ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
797
56
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
798
56
    return _writer->sink(block, eos);
799
56
}
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
797
58.5k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
798
58.5k
    return _writer->sink(block, eos);
799
58.5k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
797
5.19k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
798
5.19k
    return _writer->sink(block, eos);
799
5.19k
}
_ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
797
3.74k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
798
3.74k
    return _writer->sink(block, eos);
799
3.74k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
797
2.67k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
798
2.67k
    return _writer->sink(block, eos);
799
2.67k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
797
90
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
798
90
    return _writer->sink(block, eos);
799
90
}
_ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
797
400
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
798
400
    return _writer->sink(block, eos);
799
400
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
797
155
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
798
155
    return _writer->sink(block, eos);
799
155
}
800
801
template <typename Writer, typename Parent>
802
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
803
53.7k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
804
53.7k
    if (_closed) {
805
0
        return Status::OK();
806
0
    }
807
53.7k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
808
53.7k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
809
    // if the init failed, the _writer may be nullptr. so here need check
810
53.8k
    if (_writer) {
811
53.8k
        Status st = _writer->get_writer_status();
812
53.8k
        if (exec_status.ok()) {
813
53.7k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
814
53.7k
                                                       : Status::Cancelled("force close"));
815
53.7k
        } else {
816
93
            _writer->force_close(exec_status);
817
93
        }
818
        // If there is an error in process_block thread, then we should get the writer
819
        // status before call force_close. For example, the thread may failed in commit
820
        // transaction.
821
53.8k
        RETURN_IF_ERROR(st);
822
53.8k
    }
823
53.7k
    return Base::close(state, exec_status);
824
53.7k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
803
418
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
804
418
    if (_closed) {
805
0
        return Status::OK();
806
0
    }
807
418
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
808
418
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
809
    // if the init failed, the _writer may be nullptr. so here need check
810
418
    if (_writer) {
811
418
        Status st = _writer->get_writer_status();
812
418
        if (exec_status.ok()) {
813
418
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
814
418
                                                       : Status::Cancelled("force close"));
815
418
        } else {
816
0
            _writer->force_close(exec_status);
817
0
        }
818
        // If there is an error in process_block thread, then we should get the writer
819
        // status before call force_close. For example, the thread may failed in commit
820
        // transaction.
821
418
        RETURN_IF_ERROR(st);
822
418
    }
823
418
    return Base::close(state, exec_status);
824
418
}
_ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
803
44
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
804
44
    if (_closed) {
805
0
        return Status::OK();
806
0
    }
807
44
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
808
44
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
809
    // if the init failed, the _writer may be nullptr. so here need check
810
44
    if (_writer) {
811
44
        Status st = _writer->get_writer_status();
812
44
        if (exec_status.ok()) {
813
44
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
814
44
                                                       : Status::Cancelled("force close"));
815
44
        } else {
816
0
            _writer->force_close(exec_status);
817
0
        }
818
        // If there is an error in process_block thread, then we should get the writer
819
        // status before call force_close. For example, the thread may failed in commit
820
        // transaction.
821
44
        RETURN_IF_ERROR(st);
822
44
    }
823
40
    return Base::close(state, exec_status);
824
44
}
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
803
44.0k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
804
44.0k
    if (_closed) {
805
0
        return Status::OK();
806
0
    }
807
44.0k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
808
44.0k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
809
    // if the init failed, the _writer may be nullptr. so here need check
810
44.1k
    if (_writer) {
811
44.1k
        Status st = _writer->get_writer_status();
812
44.1k
        if (exec_status.ok()) {
813
44.0k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
814
44.0k
                                                       : Status::Cancelled("force close"));
815
44.0k
        } else {
816
70
            _writer->force_close(exec_status);
817
70
        }
818
        // If there is an error in process_block thread, then we should get the writer
819
        // status before call force_close. For example, the thread may failed in commit
820
        // transaction.
821
44.1k
        RETURN_IF_ERROR(st);
822
44.1k
    }
823
44.0k
    return Base::close(state, exec_status);
824
44.0k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
803
4.49k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
804
4.49k
    if (_closed) {
805
0
        return Status::OK();
806
0
    }
807
4.49k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
808
4.49k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
809
    // if the init failed, the _writer may be nullptr. so here need check
810
4.49k
    if (_writer) {
811
4.49k
        Status st = _writer->get_writer_status();
812
4.49k
        if (exec_status.ok()) {
813
4.47k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
814
4.47k
                                                       : Status::Cancelled("force close"));
815
4.47k
        } else {
816
22
            _writer->force_close(exec_status);
817
22
        }
818
        // If there is an error in process_block thread, then we should get the writer
819
        // status before call force_close. For example, the thread may failed in commit
820
        // transaction.
821
4.49k
        RETURN_IF_ERROR(st);
822
4.49k
    }
823
4.49k
    return Base::close(state, exec_status);
824
4.49k
}
_ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
803
2.57k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
804
2.57k
    if (_closed) {
805
0
        return Status::OK();
806
0
    }
807
2.57k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
808
2.57k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
809
    // if the init failed, the _writer may be nullptr. so here need check
810
2.57k
    if (_writer) {
811
2.57k
        Status st = _writer->get_writer_status();
812
2.57k
        if (exec_status.ok()) {
813
2.57k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
814
2.57k
                                                       : Status::Cancelled("force close"));
815
2.57k
        } else {
816
1
            _writer->force_close(exec_status);
817
1
        }
818
        // If there is an error in process_block thread, then we should get the writer
819
        // status before call force_close. For example, the thread may failed in commit
820
        // transaction.
821
2.57k
        RETURN_IF_ERROR(st);
822
2.57k
    }
823
2.57k
    return Base::close(state, exec_status);
824
2.57k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
803
1.68k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
804
1.68k
    if (_closed) {
805
0
        return Status::OK();
806
0
    }
807
1.68k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
808
1.68k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
809
    // if the init failed, the _writer may be nullptr. so here need check
810
1.69k
    if (_writer) {
811
1.69k
        Status st = _writer->get_writer_status();
812
1.69k
        if (exec_status.ok()) {
813
1.69k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
814
1.69k
                                                       : Status::Cancelled("force close"));
815
1.69k
        } else {
816
0
            _writer->force_close(exec_status);
817
0
        }
818
        // If there is an error in process_block thread, then we should get the writer
819
        // status before call force_close. For example, the thread may failed in commit
820
        // transaction.
821
1.69k
        RETURN_IF_ERROR(st);
822
1.69k
    }
823
1.68k
    return Base::close(state, exec_status);
824
1.68k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
803
80
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
804
80
    if (_closed) {
805
0
        return Status::OK();
806
0
    }
807
80
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
808
80
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
809
    // if the init failed, the _writer may be nullptr. so here need check
810
80
    if (_writer) {
811
80
        Status st = _writer->get_writer_status();
812
80
        if (exec_status.ok()) {
813
80
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
814
80
                                                       : Status::Cancelled("force close"));
815
80
        } else {
816
0
            _writer->force_close(exec_status);
817
0
        }
818
        // If there is an error in process_block thread, then we should get the writer
819
        // status before call force_close. For example, the thread may failed in commit
820
        // transaction.
821
80
        RETURN_IF_ERROR(st);
822
80
    }
823
80
    return Base::close(state, exec_status);
824
80
}
_ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
803
320
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
804
320
    if (_closed) {
805
0
        return Status::OK();
806
0
    }
807
320
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
808
320
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
809
    // if the init failed, the _writer may be nullptr. so here need check
810
320
    if (_writer) {
811
320
        Status st = _writer->get_writer_status();
812
320
        if (exec_status.ok()) {
813
320
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
814
320
                                                       : Status::Cancelled("force close"));
815
320
        } else {
816
0
            _writer->force_close(exec_status);
817
0
        }
818
        // If there is an error in process_block thread, then we should get the writer
819
        // status before call force_close. For example, the thread may failed in commit
820
        // transaction.
821
320
        RETURN_IF_ERROR(st);
822
320
    }
823
320
    return Base::close(state, exec_status);
824
320
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
803
78
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
804
78
    if (_closed) {
805
0
        return Status::OK();
806
0
    }
807
78
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
808
78
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
809
    // if the init failed, the _writer may be nullptr. so here need check
810
78
    if (_writer) {
811
78
        Status st = _writer->get_writer_status();
812
78
        if (exec_status.ok()) {
813
78
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
814
78
                                                       : Status::Cancelled("force close"));
815
78
        } else {
816
0
            _writer->force_close(exec_status);
817
0
        }
818
        // If there is an error in process_block thread, then we should get the writer
819
        // status before call force_close. For example, the thread may failed in commit
820
        // transaction.
821
78
        RETURN_IF_ERROR(st);
822
78
    }
823
78
    return Base::close(state, exec_status);
824
78
}
825
826
#define DECLARE_OPERATOR(LOCAL_STATE) template class DataSinkOperatorX<LOCAL_STATE>;
827
DECLARE_OPERATOR(HashJoinBuildSinkLocalState)
828
DECLARE_OPERATOR(ResultSinkLocalState)
829
DECLARE_OPERATOR(JdbcTableSinkLocalState)
830
DECLARE_OPERATOR(MemoryScratchSinkLocalState)
831
DECLARE_OPERATOR(ResultFileSinkLocalState)
832
DECLARE_OPERATOR(OlapTableSinkLocalState)
833
DECLARE_OPERATOR(OlapTableSinkV2LocalState)
834
DECLARE_OPERATOR(HiveTableSinkLocalState)
835
DECLARE_OPERATOR(TVFTableSinkLocalState)
836
DECLARE_OPERATOR(IcebergTableSinkLocalState)
837
DECLARE_OPERATOR(SpillIcebergTableSinkLocalState)
838
DECLARE_OPERATOR(IcebergDeleteSinkLocalState)
839
DECLARE_OPERATOR(IcebergMergeSinkLocalState)
840
DECLARE_OPERATOR(MCTableSinkLocalState)
841
DECLARE_OPERATOR(AnalyticSinkLocalState)
842
DECLARE_OPERATOR(BlackholeSinkLocalState)
843
DECLARE_OPERATOR(SortSinkLocalState)
844
DECLARE_OPERATOR(SpillSortSinkLocalState)
845
DECLARE_OPERATOR(LocalExchangeSinkLocalState)
846
DECLARE_OPERATOR(AggSinkLocalState)
847
DECLARE_OPERATOR(BucketedAggSinkLocalState)
848
DECLARE_OPERATOR(PartitionedAggSinkLocalState)
849
DECLARE_OPERATOR(ExchangeSinkLocalState)
850
DECLARE_OPERATOR(NestedLoopJoinBuildSinkLocalState)
851
DECLARE_OPERATOR(UnionSinkLocalState)
852
DECLARE_OPERATOR(MultiCastDataStreamSinkLocalState)
853
DECLARE_OPERATOR(PartitionSortSinkLocalState)
854
DECLARE_OPERATOR(SetProbeSinkLocalState<true>)
855
DECLARE_OPERATOR(SetProbeSinkLocalState<false>)
856
DECLARE_OPERATOR(SetSinkLocalState<true>)
857
DECLARE_OPERATOR(SetSinkLocalState<false>)
858
DECLARE_OPERATOR(PartitionedHashJoinSinkLocalState)
859
DECLARE_OPERATOR(GroupCommitBlockSinkLocalState)
860
DECLARE_OPERATOR(CacheSinkLocalState)
861
DECLARE_OPERATOR(DictSinkLocalState)
862
DECLARE_OPERATOR(RecCTESinkLocalState)
863
DECLARE_OPERATOR(RecCTEAnchorSinkLocalState)
864
865
#undef DECLARE_OPERATOR
866
867
#define DECLARE_OPERATOR(LOCAL_STATE) template class OperatorX<LOCAL_STATE>;
868
DECLARE_OPERATOR(HashJoinProbeLocalState)
869
DECLARE_OPERATOR(OlapScanLocalState)
870
DECLARE_OPERATOR(GroupCommitLocalState)
871
DECLARE_OPERATOR(JDBCScanLocalState)
872
DECLARE_OPERATOR(FileScanLocalState)
873
DECLARE_OPERATOR(AnalyticLocalState)
874
DECLARE_OPERATOR(SortLocalState)
875
DECLARE_OPERATOR(SpillSortLocalState)
876
DECLARE_OPERATOR(LocalMergeSortLocalState)
877
DECLARE_OPERATOR(AggLocalState)
878
DECLARE_OPERATOR(BucketedAggLocalState)
879
DECLARE_OPERATOR(PartitionedAggLocalState)
880
DECLARE_OPERATOR(TableFunctionLocalState)
881
DECLARE_OPERATOR(ExchangeLocalState)
882
DECLARE_OPERATOR(RepeatLocalState)
883
DECLARE_OPERATOR(NestedLoopJoinProbeLocalState)
884
DECLARE_OPERATOR(AssertNumRowsLocalState)
885
DECLARE_OPERATOR(EmptySetLocalState)
886
DECLARE_OPERATOR(UnionSourceLocalState)
887
DECLARE_OPERATOR(MultiCastDataStreamSourceLocalState)
888
DECLARE_OPERATOR(PartitionSortSourceLocalState)
889
DECLARE_OPERATOR(SetSourceLocalState<true>)
890
DECLARE_OPERATOR(SetSourceLocalState<false>)
891
DECLARE_OPERATOR(DataGenLocalState)
892
DECLARE_OPERATOR(SchemaScanLocalState)
893
DECLARE_OPERATOR(MetaScanLocalState)
894
DECLARE_OPERATOR(LocalExchangeSourceLocalState)
895
DECLARE_OPERATOR(PartitionedHashJoinProbeLocalState)
896
DECLARE_OPERATOR(CacheSourceLocalState)
897
DECLARE_OPERATOR(RecCTESourceLocalState)
898
DECLARE_OPERATOR(RecCTEScanLocalState)
899
900
#ifdef BE_TEST
901
DECLARE_OPERATOR(MockLocalState)
902
DECLARE_OPERATOR(MockScanLocalState)
903
#endif
904
#undef DECLARE_OPERATOR
905
906
template class StreamingOperatorX<AssertNumRowsLocalState>;
907
template class StreamingOperatorX<SelectLocalState>;
908
909
template class StatefulOperatorX<HashJoinProbeLocalState>;
910
template class StatefulOperatorX<PartitionedHashJoinProbeLocalState>;
911
template class StatefulOperatorX<RepeatLocalState>;
912
template class StatefulOperatorX<MaterializationLocalState>;
913
template class StatefulOperatorX<StreamingAggLocalState>;
914
template class StatefulOperatorX<DistinctStreamingAggLocalState>;
915
template class StatefulOperatorX<NestedLoopJoinProbeLocalState>;
916
template class StatefulOperatorX<TableFunctionLocalState>;
917
918
template class PipelineXSinkLocalState<HashJoinSharedState>;
919
template class PipelineXSinkLocalState<PartitionedHashJoinSharedState>;
920
template class PipelineXSinkLocalState<SortSharedState>;
921
template class PipelineXSinkLocalState<SpillSortSharedState>;
922
template class PipelineXSinkLocalState<NestedLoopJoinSharedState>;
923
template class PipelineXSinkLocalState<AnalyticSharedState>;
924
template class PipelineXSinkLocalState<AggSharedState>;
925
template class PipelineXSinkLocalState<BucketedAggSharedState>;
926
template class PipelineXSinkLocalState<PartitionedAggSharedState>;
927
template class PipelineXSinkLocalState<FakeSharedState>;
928
template class PipelineXSinkLocalState<UnionSharedState>;
929
template class PipelineXSinkLocalState<PartitionSortNodeSharedState>;
930
template class PipelineXSinkLocalState<MultiCastSharedState>;
931
template class PipelineXSinkLocalState<SetSharedState>;
932
template class PipelineXSinkLocalState<LocalExchangeSharedState>;
933
template class PipelineXSinkLocalState<BasicSharedState>;
934
template class PipelineXSinkLocalState<DataQueueSharedState>;
935
template class PipelineXSinkLocalState<RecCTESharedState>;
936
937
template class PipelineXLocalState<HashJoinSharedState>;
938
template class PipelineXLocalState<PartitionedHashJoinSharedState>;
939
template class PipelineXLocalState<SortSharedState>;
940
template class PipelineXLocalState<SpillSortSharedState>;
941
template class PipelineXLocalState<NestedLoopJoinSharedState>;
942
template class PipelineXLocalState<AnalyticSharedState>;
943
template class PipelineXLocalState<AggSharedState>;
944
template class PipelineXLocalState<BucketedAggSharedState>;
945
template class PipelineXLocalState<PartitionedAggSharedState>;
946
template class PipelineXLocalState<FakeSharedState>;
947
template class PipelineXLocalState<UnionSharedState>;
948
template class PipelineXLocalState<DataQueueSharedState>;
949
template class PipelineXLocalState<MultiCastSharedState>;
950
template class PipelineXLocalState<PartitionSortNodeSharedState>;
951
template class PipelineXLocalState<SetSharedState>;
952
template class PipelineXLocalState<LocalExchangeSharedState>;
953
template class PipelineXLocalState<BasicSharedState>;
954
template class PipelineXLocalState<RecCTESharedState>;
955
956
template class AsyncWriterSink<doris::VFileResultWriter, ResultFileSinkOperatorX>;
957
template class AsyncWriterSink<doris::VJdbcTableWriter, JdbcTableSinkOperatorX>;
958
template class AsyncWriterSink<doris::VTabletWriter, OlapTableSinkOperatorX>;
959
template class AsyncWriterSink<doris::VTabletWriterV2, OlapTableSinkV2OperatorX>;
960
template class AsyncWriterSink<doris::VHiveTableWriter, HiveTableSinkOperatorX>;
961
template class AsyncWriterSink<doris::VIcebergTableWriter, IcebergTableSinkOperatorX>;
962
template class AsyncWriterSink<doris::VIcebergTableWriter, SpillIcebergTableSinkOperatorX>;
963
template class AsyncWriterSink<doris::VIcebergDeleteSink, IcebergDeleteSinkOperatorX>;
964
template class AsyncWriterSink<doris::VIcebergMergeSink, IcebergMergeSinkOperatorX>;
965
template class AsyncWriterSink<doris::VMCTableWriter, MCTableSinkOperatorX>;
966
template class AsyncWriterSink<doris::VTVFTableWriter, TVFTableSinkOperatorX>;
967
968
#ifdef BE_TEST
969
template class OperatorX<DummyOperatorLocalState>;
970
template class DataSinkOperatorX<DummySinkLocalState>;
971
#endif
972
973
} // namespace doris