Coverage Report

Created: 2026-05-21 17:40

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
2.55M
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
2.55M
    if (_parent->nereids_id() == -1) {
120
1.31M
        return fmt::format("(id={})", _parent->node_id());
121
1.31M
    } else {
122
1.23M
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
1.23M
    }
124
2.55M
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
66.3k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
66.3k
    if (_parent->nereids_id() == -1) {
120
0
        return fmt::format("(id={})", _parent->node_id());
121
66.3k
    } else {
122
66.3k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
66.3k
    }
124
66.3k
}
_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
263k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
263k
    if (_parent->nereids_id() == -1) {
120
12
        return fmt::format("(id={})", _parent->node_id());
121
263k
    } else {
122
263k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
263k
    }
124
263k
}
_ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
22
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
22
    if (_parent->nereids_id() == -1) {
120
0
        return fmt::format("(id={})", _parent->node_id());
121
22
    } else {
122
22
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
22
    }
124
22
}
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
31.2k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
31.2k
    if (_parent->nereids_id() == -1) {
120
0
        return fmt::format("(id={})", _parent->node_id());
121
31.2k
    } else {
122
31.2k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
31.2k
    }
124
31.2k
}
_ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
8.65k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
8.65k
    if (_parent->nereids_id() == -1) {
120
9
        return fmt::format("(id={})", _parent->node_id());
121
8.64k
    } else {
122
8.64k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
8.64k
    }
124
8.65k
}
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
189k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
189k
    if (_parent->nereids_id() == -1) {
120
27
        return fmt::format("(id={})", _parent->node_id());
121
189k
    } else {
122
189k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
189k
    }
124
189k
}
_ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
552
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
552
    if (_parent->nereids_id() == -1) {
120
0
        return fmt::format("(id={})", _parent->node_id());
121
552
    } else {
122
552
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
552
    }
124
552
}
_ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
84
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
84
    if (_parent->nereids_id() == -1) {
120
0
        return fmt::format("(id={})", _parent->node_id());
121
84
    } else {
122
84
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
84
    }
124
84
}
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
1.13M
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
1.13M
    if (_parent->nereids_id() == -1) {
120
515k
        return fmt::format("(id={})", _parent->node_id());
121
617k
    } else {
122
617k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
617k
    }
124
1.13M
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
54.4k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
54.4k
    if (_parent->nereids_id() == -1) {
120
2
        return fmt::format("(id={})", _parent->node_id());
121
54.4k
    } else {
122
54.4k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
54.4k
    }
124
54.4k
}
_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
41.5k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
41.6k
    if (_parent->nereids_id() == -1) {
120
41.6k
        return fmt::format("(id={})", _parent->node_id());
121
18.4E
    } else {
122
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
18.4E
    }
124
41.5k
}
_ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
317
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
317
    if (_parent->nereids_id() == -1) {
120
102
        return fmt::format("(id={})", _parent->node_id());
121
215
    } else {
122
215
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
215
    }
124
317
}
_ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
4.73k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
4.73k
    if (_parent->nereids_id() == -1) {
120
12
        return fmt::format("(id={})", _parent->node_id());
121
4.72k
    } else {
122
4.72k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
4.72k
    }
124
4.73k
}
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
761k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
761k
    if (_parent->nereids_id() == -1) {
120
760k
        return fmt::format("(id={})", _parent->node_id());
121
760k
    } else {
122
826
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
826
    }
124
761k
}
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.44M
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
1.44M
    if (_parent->nereids_id() == -1) {
129
827k
        return fmt::format("(id={})", _parent->node_id());
130
827k
    } else {
131
617k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
617k
    }
133
1.44M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
114k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
114k
    if (_parent->nereids_id() == -1) {
129
0
        return fmt::format("(id={})", _parent->node_id());
130
114k
    } else {
131
114k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
114k
    }
133
114k
}
_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
264k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
264k
    if (_parent->nereids_id() == -1) {
129
9
        return fmt::format("(id={})", _parent->node_id());
130
264k
    } else {
131
264k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
264k
    }
133
264k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
28
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
28
    if (_parent->nereids_id() == -1) {
129
0
        return fmt::format("(id={})", _parent->node_id());
130
28
    } else {
131
28
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
28
    }
133
28
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
31.2k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
31.2k
    if (_parent->nereids_id() == -1) {
129
0
        return fmt::format("(id={})", _parent->node_id());
130
31.2k
    } else {
131
31.2k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
31.2k
    }
133
31.2k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
8.70k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
8.70k
    if (_parent->nereids_id() == -1) {
129
9
        return fmt::format("(id={})", _parent->node_id());
130
8.69k
    } else {
131
8.69k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
8.69k
    }
133
8.70k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
190k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
190k
    if (_parent->nereids_id() == -1) {
129
27
        return fmt::format("(id={})", _parent->node_id());
130
190k
    } else {
131
190k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
190k
    }
133
190k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
464
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
464
    if (_parent->nereids_id() == -1) {
129
0
        return fmt::format("(id={})", _parent->node_id());
130
464
    } else {
131
464
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
464
    }
133
464
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
94
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
94
    if (_parent->nereids_id() == -1) {
129
0
        return fmt::format("(id={})", _parent->node_id());
130
94
    } else {
131
94
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
94
    }
133
94
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
100
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
100
    if (_parent->nereids_id() == -1) {
129
99
        return fmt::format("(id={})", _parent->node_id());
130
99
    } else {
131
1
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
1
    }
133
100
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
5.96k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
5.96k
    if (_parent->nereids_id() == -1) {
129
3
        return fmt::format("(id={})", _parent->node_id());
130
5.96k
    } else {
131
5.96k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
5.96k
    }
133
5.96k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
317
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
317
    if (_parent->nereids_id() == -1) {
129
102
        return fmt::format("(id={})", _parent->node_id());
130
215
    } else {
131
215
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
215
    }
133
317
}
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
18.4E
    } else {
131
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
18.4E
    }
133
12.3k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
264k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
264k
    if (_parent->nereids_id() == -1) {
129
264k
        return fmt::format("(id={})", _parent->node_id());
130
264k
    } else {
131
91
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
91
    }
133
264k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
550k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
550k
    if (_parent->nereids_id() == -1) {
129
550k
        return fmt::format("(id={})", _parent->node_id());
130
550k
    } else {
131
509
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
509
    }
133
550k
}
_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
32.9k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
32.9k
    if (_terminated) {
138
1
        return Status::OK();
139
1
    }
140
32.9k
    _terminated = true;
141
32.9k
    return Status::OK();
142
32.9k
}
_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
741
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
741
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
741
    _terminated = true;
141
741
    return Status::OK();
142
741
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
7
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
7
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
7
    _terminated = true;
141
7
    return Status::OK();
142
7
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
4.38k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
4.38k
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
4.38k
    _terminated = true;
141
4.38k
    return Status::OK();
142
4.38k
}
_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
1.07k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
1.07k
    if (_terminated) {
138
1
        return Status::OK();
139
1
    }
140
1.07k
    _terminated = true;
141
1.07k
    return Status::OK();
142
1.07k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
20
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
20
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
20
    _terminated = true;
141
20
    return Status::OK();
142
20
}
_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
2.28k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
2.28k
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
2.28k
    _terminated = true;
141
2.28k
    return Status::OK();
142
2.28k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE9terminateEPNS_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_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
205
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
205
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
205
    _terminated = true;
141
205
    return Status::OK();
142
205
}
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
1.11M
DataDistribution OperatorBase::required_data_distribution(RuntimeState* /*state*/) const {
145
1.11M
    return _child && _child->is_serial_operator() && !is_source()
146
1.11M
                   ? DataDistribution(ExchangeType::PASSTHROUGH)
147
1.11M
                   : DataDistribution(ExchangeType::NOOP);
148
1.11M
}
149
150
81.6k
const RowDescriptor& OperatorBase::row_desc() const {
151
81.6k
    return _child->row_desc();
152
81.6k
}
153
154
template <typename SharedStateArg>
155
20.1k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
156
20.1k
    fmt::memory_buffer debug_string_buffer;
157
20.1k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
158
20.1k
    return fmt::to_string(debug_string_buffer);
159
20.1k
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
155
10
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
156
10
    fmt::memory_buffer debug_string_buffer;
157
10
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
158
10
    return fmt::to_string(debug_string_buffer);
159
10
}
_ZNK5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
155
3
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
156
3
    fmt::memory_buffer debug_string_buffer;
157
3
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
158
3
    return fmt::to_string(debug_string_buffer);
159
3
}
_ZNK5doris19PipelineXLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
155
5
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
156
5
    fmt::memory_buffer debug_string_buffer;
157
5
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
158
5
    return fmt::to_string(debug_string_buffer);
159
5
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
155
10
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
156
10
    fmt::memory_buffer debug_string_buffer;
157
10
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
158
10
    return fmt::to_string(debug_string_buffer);
159
10
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
155
19.9k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
156
19.9k
    fmt::memory_buffer debug_string_buffer;
157
19.9k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
158
19.9k
    return fmt::to_string(debug_string_buffer);
159
19.9k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
155
1
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
156
1
    fmt::memory_buffer debug_string_buffer;
157
1
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
158
1
    return fmt::to_string(debug_string_buffer);
159
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
155
194
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
156
194
    fmt::memory_buffer debug_string_buffer;
157
194
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
158
194
    return fmt::to_string(debug_string_buffer);
159
194
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
160
161
template <typename SharedStateArg>
162
20.1k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
163
20.1k
    fmt::memory_buffer debug_string_buffer;
164
20.1k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
165
20.1k
    return fmt::to_string(debug_string_buffer);
166
20.1k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
162
5
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
163
5
    fmt::memory_buffer debug_string_buffer;
164
5
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
165
5
    return fmt::to_string(debug_string_buffer);
166
5
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
162
10
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
163
10
    fmt::memory_buffer debug_string_buffer;
164
10
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
165
10
    return fmt::to_string(debug_string_buffer);
166
10
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
162
194
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
163
194
    fmt::memory_buffer debug_string_buffer;
164
194
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
165
194
    return fmt::to_string(debug_string_buffer);
166
194
}
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
162
10
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
163
10
    fmt::memory_buffer debug_string_buffer;
164
10
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
165
10
    return fmt::to_string(debug_string_buffer);
166
10
}
_ZNK5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
162
19.9k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
163
19.9k
    fmt::memory_buffer debug_string_buffer;
164
19.9k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
165
19.9k
    return fmt::to_string(debug_string_buffer);
166
19.9k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
167
168
20.3k
std::string OperatorXBase::debug_string(int indentation_level) const {
169
20.3k
    fmt::memory_buffer debug_string_buffer;
170
20.3k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, parallel_tasks={}, _is_serial_operator={}",
171
20.3k
                   std::string(indentation_level * 2, ' '), _op_name, node_id(), _parallel_tasks,
172
20.3k
                   _is_serial_operator);
173
20.3k
    return fmt::to_string(debug_string_buffer);
174
20.3k
}
175
176
20.1k
std::string OperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
177
20.1k
    return state->get_local_state(operator_id())->debug_string(indentation_level);
178
20.1k
}
179
180
888k
Status OperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
181
888k
    std::string node_name = print_plan_node_type(tnode.node_type);
182
888k
    _nereids_id = tnode.nereids_id;
183
888k
    if (!tnode.intermediate_output_tuple_id_list.empty()) {
184
5.75k
        if (!tnode.__isset.output_tuple_id) {
185
0
            return Status::InternalError("no final output tuple id");
186
0
        }
187
5.75k
        if (tnode.intermediate_output_tuple_id_list.size() !=
188
5.75k
            tnode.intermediate_projections_list.size()) {
189
0
            return Status::InternalError(
190
0
                    "intermediate_output_tuple_id_list size:{} not match "
191
0
                    "intermediate_projections_list size:{}",
192
0
                    tnode.intermediate_output_tuple_id_list.size(),
193
0
                    tnode.intermediate_projections_list.size());
194
0
        }
195
5.75k
    }
196
888k
    auto substr = node_name.substr(0, node_name.find("_NODE"));
197
888k
    _op_name = substr + "_OPERATOR";
198
199
888k
    if (tnode.__isset.vconjunct) {
200
0
        return Status::InternalError("vconjunct is not supported yet");
201
888k
    } else if (tnode.__isset.conjuncts) {
202
440k
        for (const auto& conjunct : tnode.conjuncts) {
203
440k
            VExprContextSPtr context;
204
440k
            RETURN_IF_ERROR(VExpr::create_expr_tree(conjunct, context));
205
440k
            _conjuncts.emplace_back(context);
206
440k
        }
207
142k
    }
208
209
    // create the projections expr
210
888k
    if (tnode.__isset.projections) {
211
353k
        DCHECK(tnode.__isset.output_tuple_id);
212
353k
        RETURN_IF_ERROR(VExpr::create_expr_trees(tnode.projections, _projections));
213
353k
    }
214
888k
    if (!tnode.intermediate_projections_list.empty()) {
215
5.76k
        DCHECK(tnode.__isset.projections) << "no final projections";
216
5.76k
        _intermediate_projections.reserve(tnode.intermediate_projections_list.size());
217
17.7k
        for (const auto& tnode_projections : tnode.intermediate_projections_list) {
218
17.7k
            VExprContextSPtrs projections;
219
17.7k
            RETURN_IF_ERROR(VExpr::create_expr_trees(tnode_projections, projections));
220
17.7k
            _intermediate_projections.push_back(projections);
221
17.7k
        }
222
5.76k
    }
223
888k
    return Status::OK();
224
888k
}
225
226
952k
Status OperatorXBase::prepare(RuntimeState* state) {
227
952k
    for (auto& conjunct : _conjuncts) {
228
440k
        RETURN_IF_ERROR(conjunct->prepare(state, intermediate_row_desc()));
229
440k
    }
230
952k
    if (state->enable_adjust_conjunct_order_by_cost()) {
231
901k
        std::ranges::sort(_conjuncts, [](const auto& a, const auto& b) {
232
595k
            return a->execute_cost() < b->execute_cost();
233
595k
        });
234
901k
    };
235
236
970k
    for (int i = 0; i < _intermediate_projections.size(); i++) {
237
17.7k
        RETURN_IF_ERROR(
238
17.7k
                VExpr::prepare(_intermediate_projections[i], state, intermediate_row_desc(i)));
239
17.7k
    }
240
952k
    RETURN_IF_ERROR(VExpr::prepare(_projections, state, projections_row_desc()));
241
242
952k
    if (has_output_row_desc()) {
243
353k
        RETURN_IF_ERROR(VExpr::check_expr_output_type(_projections, *_output_row_descriptor));
244
353k
    }
245
246
952k
    for (auto& conjunct : _conjuncts) {
247
440k
        RETURN_IF_ERROR(conjunct->open(state));
248
440k
    }
249
952k
    RETURN_IF_ERROR(VExpr::open(_projections, state));
250
952k
    for (auto& projections : _intermediate_projections) {
251
17.7k
        RETURN_IF_ERROR(VExpr::open(projections, state));
252
17.7k
    }
253
952k
    if (_child && !is_source()) {
254
175k
        RETURN_IF_ERROR(_child->prepare(state));
255
175k
    }
256
257
952k
    if (VExpr::contains_blockable_function(_conjuncts) ||
258
952k
        VExpr::contains_blockable_function(_projections)) {
259
0
        _blockable = true;
260
0
    }
261
262
952k
    return Status::OK();
263
952k
}
264
265
12.8k
Status OperatorXBase::terminate(RuntimeState* state) {
266
12.8k
    if (_child && !is_source()) {
267
3.96k
        RETURN_IF_ERROR(_child->terminate(state));
268
3.96k
    }
269
12.8k
    auto result = state->get_local_state_result(operator_id());
270
12.8k
    if (!result) {
271
0
        return result.error();
272
0
    }
273
12.8k
    return result.value()->terminate(state);
274
12.8k
}
275
276
7.18M
Status OperatorXBase::close(RuntimeState* state) {
277
7.18M
    if (_child && !is_source()) {
278
1.41M
        RETURN_IF_ERROR(_child->close(state));
279
1.41M
    }
280
7.18M
    auto result = state->get_local_state_result(operator_id());
281
7.18M
    if (!result) {
282
0
        return result.error();
283
0
    }
284
7.18M
    return result.value()->close(state);
285
7.18M
}
286
287
342k
void PipelineXLocalStateBase::clear_origin_block() {
288
342k
    _origin_block.clear_column_data(_parent->intermediate_row_desc().num_materialized_slots());
289
342k
}
290
291
815k
Status PipelineXLocalStateBase::filter_block(const VExprContextSPtrs& expr_contexts, Block* block) {
292
815k
    RETURN_IF_ERROR(VExprContext::filter_block(expr_contexts, block, block->columns()));
293
294
815k
    _estimate_memory_usage += VExprContext::get_memory_usage(expr_contexts);
295
815k
    return Status::OK();
296
815k
}
297
298
0
bool PipelineXLocalStateBase::is_blockable() const {
299
0
    return std::any_of(_projections.begin(), _projections.end(),
300
0
                       [&](VExprContextSPtr expr) -> bool { return expr->is_blockable(); });
301
0
}
302
303
Status OperatorXBase::do_projections(RuntimeState* state, Block* origin_block,
304
342k
                                     Block* output_block) const {
305
342k
    auto* local_state = state->get_local_state(operator_id());
306
342k
    SCOPED_TIMER(local_state->exec_time_counter());
307
342k
    SCOPED_TIMER(local_state->_projection_timer);
308
342k
    const size_t rows = origin_block->rows();
309
342k
    if (rows == 0) {
310
164k
        return Status::OK();
311
164k
    }
312
178k
    Block input_block = *origin_block;
313
314
178k
    size_t bytes_usage = 0;
315
178k
    ColumnsWithTypeAndName new_columns;
316
178k
    for (const auto& projections : local_state->_intermediate_projections) {
317
1.05k
        if (projections.empty()) {
318
0
            return Status::InternalError("meet empty intermediate projection, node id: {}",
319
0
                                         node_id());
320
0
        }
321
1.05k
        new_columns.resize(projections.size());
322
7.88k
        for (int i = 0; i < projections.size(); i++) {
323
6.82k
            RETURN_IF_ERROR(projections[i]->execute(&input_block, new_columns[i]));
324
6.82k
            if (new_columns[i].column->size() != rows) {
325
0
                return Status::InternalError(
326
0
                        "intermediate projection result column size {} not equal input rows {}, "
327
0
                        "expr: {}",
328
0
                        new_columns[i].column->size(), rows,
329
0
                        projections[i]->root()->debug_string());
330
0
            }
331
6.82k
        }
332
1.05k
        Block tmp_block {new_columns};
333
1.05k
        bytes_usage += tmp_block.allocated_bytes();
334
1.05k
        input_block.swap(tmp_block);
335
1.05k
    }
336
337
178k
    if (input_block.rows() != rows) {
338
0
        return Status::InternalError(
339
0
                "after intermediate projections input block rows {} not equal origin rows {}, "
340
0
                "input_block: {}",
341
0
                input_block.rows(), rows, input_block.dump_structure());
342
0
    }
343
838k
    auto insert_column_datas = [&](auto& to, ColumnPtr& from, size_t rows) {
344
838k
        if (to->is_nullable() && !from->is_nullable()) {
345
0
            if (_keep_origin || !from->is_exclusive()) {
346
0
                auto& null_column = reinterpret_cast<ColumnNullable&>(*to);
347
0
                null_column.get_nested_column().insert_range_from(*from, 0, rows);
348
0
                null_column.get_null_map_column().get_data().resize_fill(rows, 0);
349
0
                bytes_usage += null_column.allocated_bytes();
350
0
            } else {
351
0
                to = make_nullable(from, false)->assume_mutable();
352
0
            }
353
838k
        } else {
354
838k
            if (_keep_origin || !from->is_exclusive()) {
355
815k
                to->insert_range_from(*from, 0, rows);
356
815k
                bytes_usage += from->allocated_bytes();
357
815k
            } else {
358
23.0k
                to = from->assume_mutable();
359
23.0k
            }
360
838k
        }
361
838k
    };
362
363
178k
    MutableBlock mutable_block =
364
178k
            VectorizedUtils::build_mutable_mem_reuse_block(output_block, *_output_row_descriptor);
365
178k
    if (rows != 0) {
366
178k
        auto& mutable_columns = mutable_block.mutable_columns();
367
178k
        DCHECK_EQ(mutable_columns.size(), local_state->_projections.size()) << debug_string();
368
1.01M
        for (int i = 0; i < mutable_columns.size(); ++i) {
369
838k
            ColumnPtr column_ptr;
370
838k
            RETURN_IF_ERROR(local_state->_projections[i]->execute(&input_block, column_ptr));
371
838k
            if (column_ptr->size() != rows) {
372
0
                return Status::InternalError(
373
0
                        "projection result column size {} not equal input rows {}, expr: {}",
374
0
                        column_ptr->size(), rows,
375
0
                        local_state->_projections[i]->root()->debug_string());
376
0
            }
377
838k
            column_ptr = column_ptr->convert_to_full_column_if_const();
378
838k
            bytes_usage += column_ptr->allocated_bytes();
379
838k
            insert_column_datas(mutable_columns[i], column_ptr, rows);
380
838k
        }
381
178k
        DCHECK(mutable_block.rows() == rows);
382
178k
        output_block->set_columns(std::move(mutable_columns));
383
178k
    }
384
385
178k
    local_state->_estimate_memory_usage += bytes_usage;
386
387
178k
    return Status::OK();
388
178k
}
389
390
5.50M
Status OperatorXBase::get_block_after_projects(RuntimeState* state, Block* block, bool* eos) {
391
5.50M
    DBUG_EXECUTE_IF("Pipeline::return_empty_block", {
392
5.50M
        if (this->_op_name == "AGGREGATION_OPERATOR" || this->_op_name == "HASH_JOIN_OPERATOR" ||
393
5.50M
            this->_op_name == "PARTITIONED_AGGREGATION_OPERATOR" ||
394
5.50M
            this->_op_name == "PARTITIONED_HASH_JOIN_OPERATOR" ||
395
5.50M
            this->_op_name == "CROSS_JOIN_OPERATOR" || this->_op_name == "SORT_OPERATOR") {
396
5.50M
            if (_debug_point_count++ % 2 == 0) {
397
5.50M
                return Status::OK();
398
5.50M
            }
399
5.50M
        }
400
5.50M
    });
401
402
5.50M
    Status status;
403
5.50M
    auto* local_state = state->get_local_state(operator_id());
404
5.50M
    Defer defer([&]() {
405
5.50M
        if (status.ok()) {
406
5.50M
            local_state->update_output_block_counters(*block);
407
5.50M
        }
408
5.50M
    });
409
5.50M
    if (_output_row_descriptor) {
410
342k
        local_state->clear_origin_block();
411
342k
        status = get_block(state, &local_state->_origin_block, eos);
412
342k
        if (UNLIKELY(!status.ok())) {
413
20
            return status;
414
20
        }
415
342k
        status = do_projections(state, &local_state->_origin_block, block);
416
342k
        return status;
417
342k
    }
418
5.15M
    status = get_block(state, block, eos);
419
5.15M
    RETURN_IF_ERROR(block->check_type_and_column());
420
5.15M
    return status;
421
5.15M
}
422
423
3.23M
void PipelineXLocalStateBase::reached_limit(Block* block, bool* eos) {
424
3.23M
    if (_parent->_limit != -1 and _num_rows_returned + block->rows() >= _parent->_limit) {
425
7.85k
        block->set_num_rows(_parent->_limit - _num_rows_returned);
426
7.85k
        *eos = true;
427
7.85k
    }
428
429
3.23M
    DBUG_EXECUTE_IF("Pipeline::reached_limit_early", {
430
3.23M
        auto op_name = to_lower(_parent->_op_name);
431
3.23M
        auto arg_op_name = dp->param<std::string>("op_name");
432
3.23M
        arg_op_name = to_lower(arg_op_name);
433
434
3.23M
        if (op_name == arg_op_name) {
435
3.23M
            *eos = true;
436
3.23M
        }
437
3.23M
    });
438
439
3.23M
    if (auto rows = block->rows()) {
440
896k
        _num_rows_returned += rows;
441
896k
        _state->get_query_ctx()->resource_ctx()->io_context()->update_process_rows(rows);
442
896k
    }
443
3.23M
}
444
445
32.9k
Status DataSinkOperatorXBase::terminate(RuntimeState* state) {
446
32.9k
    auto result = state->get_sink_local_state_result();
447
32.9k
    if (!result) {
448
0
        return result.error();
449
0
    }
450
32.9k
    return result.value()->terminate(state);
451
32.9k
}
452
453
20.3k
std::string DataSinkOperatorXBase::debug_string(int indentation_level) const {
454
20.3k
    fmt::memory_buffer debug_string_buffer;
455
456
20.3k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, _is_serial_operator={}",
457
20.3k
                   std::string(indentation_level * 2, ' '), _name, node_id(), _is_serial_operator);
458
20.3k
    return fmt::to_string(debug_string_buffer);
459
20.3k
}
460
461
20.1k
std::string DataSinkOperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
462
20.1k
    return state->get_sink_local_state()->debug_string(indentation_level);
463
20.1k
}
464
465
540k
Status DataSinkOperatorXBase::init(const TDataSink& tsink) {
466
540k
    std::string op_name = "UNKNOWN_SINK";
467
540k
    auto it = _TDataSinkType_VALUES_TO_NAMES.find(tsink.type);
468
469
541k
    if (it != _TDataSinkType_VALUES_TO_NAMES.end()) {
470
541k
        op_name = it->second;
471
541k
    }
472
540k
    _name = op_name + "_OPERATOR";
473
540k
    return Status::OK();
474
540k
}
475
476
280k
Status DataSinkOperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
477
280k
    std::string op_name = print_plan_node_type(tnode.node_type);
478
280k
    _nereids_id = tnode.nereids_id;
479
280k
    auto substr = op_name.substr(0, op_name.find("_NODE"));
480
280k
    _name = substr + "_SINK_OPERATOR";
481
280k
    return Status::OK();
482
280k
}
483
484
template <typename LocalStateType>
485
Status DataSinkOperatorX<LocalStateType>::setup_local_state(RuntimeState* state,
486
2.26M
                                                            LocalSinkStateInfo& info) {
487
2.26M
    auto local_state = LocalStateType::create_unique(this, state);
488
2.26M
    RETURN_IF_ERROR(local_state->init(state, info));
489
2.26M
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
490
2.26M
    return Status::OK();
491
2.26M
}
_ZN5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
486
114k
                                                            LocalSinkStateInfo& info) {
487
114k
    auto local_state = LocalStateType::create_unique(this, state);
488
114k
    RETURN_IF_ERROR(local_state->init(state, info));
489
114k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
490
114k
    return Status::OK();
491
114k
}
_ZN5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
486
489k
                                                            LocalSinkStateInfo& info) {
487
489k
    auto local_state = LocalStateType::create_unique(this, state);
488
489k
    RETURN_IF_ERROR(local_state->init(state, info));
489
489k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
490
489k
    return Status::OK();
491
489k
}
_ZN5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
486
88
                                                            LocalSinkStateInfo& info) {
487
88
    auto local_state = LocalStateType::create_unique(this, state);
488
88
    RETURN_IF_ERROR(local_state->init(state, info));
489
88
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
490
88
    return Status::OK();
491
88
}
_ZN5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
486
3
                                                            LocalSinkStateInfo& info) {
487
3
    auto local_state = LocalStateType::create_unique(this, state);
488
3
    RETURN_IF_ERROR(local_state->init(state, info));
489
3
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
490
3
    return Status::OK();
491
3
}
_ZN5doris17DataSinkOperatorXINS_24ResultFileSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
486
518
                                                            LocalSinkStateInfo& info) {
487
518
    auto local_state = LocalStateType::create_unique(this, state);
488
518
    RETURN_IF_ERROR(local_state->init(state, info));
489
518
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
490
518
    return Status::OK();
491
518
}
_ZN5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
486
43.6k
                                                            LocalSinkStateInfo& info) {
487
43.6k
    auto local_state = LocalStateType::create_unique(this, state);
488
43.6k
    RETURN_IF_ERROR(local_state->init(state, info));
489
43.6k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
490
43.6k
    return Status::OK();
491
43.6k
}
_ZN5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
486
8.74k
                                                            LocalSinkStateInfo& info) {
487
8.74k
    auto local_state = LocalStateType::create_unique(this, state);
488
8.74k
    RETURN_IF_ERROR(local_state->init(state, info));
489
8.74k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
490
8.74k
    return Status::OK();
491
8.74k
}
_ZN5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
486
5.15k
                                                            LocalSinkStateInfo& info) {
487
5.15k
    auto local_state = LocalStateType::create_unique(this, state);
488
5.15k
    RETURN_IF_ERROR(local_state->init(state, info));
489
5.15k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
490
5.15k
    return Status::OK();
491
5.15k
}
_ZN5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
486
156
                                                            LocalSinkStateInfo& info) {
487
156
    auto local_state = LocalStateType::create_unique(this, state);
488
156
    RETURN_IF_ERROR(local_state->init(state, info));
489
156
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
490
156
    return Status::OK();
491
156
}
_ZN5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
486
3.38k
                                                            LocalSinkStateInfo& info) {
487
3.38k
    auto local_state = LocalStateType::create_unique(this, state);
488
3.38k
    RETURN_IF_ERROR(local_state->init(state, info));
489
3.38k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
490
3.38k
    return Status::OK();
491
3.38k
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_27IcebergDeleteSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
486
160
                                                            LocalSinkStateInfo& info) {
487
160
    auto local_state = LocalStateType::create_unique(this, state);
488
160
    RETURN_IF_ERROR(local_state->init(state, info));
489
160
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
490
160
    return Status::OK();
491
160
}
_ZN5doris17DataSinkOperatorXINS_26IcebergMergeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
486
640
                                                            LocalSinkStateInfo& info) {
487
640
    auto local_state = LocalStateType::create_unique(this, state);
488
640
    RETURN_IF_ERROR(local_state->init(state, info));
489
640
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
490
640
    return Status::OK();
491
640
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_21MCTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
486
8.70k
                                                            LocalSinkStateInfo& info) {
487
8.70k
    auto local_state = LocalStateType::create_unique(this, state);
488
8.70k
    RETURN_IF_ERROR(local_state->init(state, info));
489
8.70k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
490
8.70k
    return Status::OK();
491
8.70k
}
_ZN5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
486
96
                                                            LocalSinkStateInfo& info) {
487
96
    auto local_state = LocalStateType::create_unique(this, state);
488
96
    RETURN_IF_ERROR(local_state->init(state, info));
489
96
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
490
96
    return Status::OK();
491
96
}
_ZN5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
486
265k
                                                            LocalSinkStateInfo& info) {
487
265k
    auto local_state = LocalStateType::create_unique(this, state);
488
265k
    RETURN_IF_ERROR(local_state->init(state, info));
489
265k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
490
265k
    return Status::OK();
491
265k
}
_ZN5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
486
28
                                                            LocalSinkStateInfo& info) {
487
28
    auto local_state = LocalStateType::create_unique(this, state);
488
28
    RETURN_IF_ERROR(local_state->init(state, info));
489
28
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
490
28
    return Status::OK();
491
28
}
_ZN5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
486
264k
                                                            LocalSinkStateInfo& info) {
487
264k
    auto local_state = LocalStateType::create_unique(this, state);
488
264k
    RETURN_IF_ERROR(local_state->init(state, info));
489
264k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
490
264k
    return Status::OK();
491
264k
}
_ZN5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
486
190k
                                                            LocalSinkStateInfo& info) {
487
190k
    auto local_state = LocalStateType::create_unique(this, state);
488
190k
    RETURN_IF_ERROR(local_state->init(state, info));
489
190k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
490
190k
    return Status::OK();
491
190k
}
_ZN5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
486
464
                                                            LocalSinkStateInfo& info) {
487
464
    auto local_state = LocalStateType::create_unique(this, state);
488
464
    RETURN_IF_ERROR(local_state->init(state, info));
489
464
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
490
464
    return Status::OK();
491
464
}
_ZN5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
486
94
                                                            LocalSinkStateInfo& info) {
487
94
    auto local_state = LocalStateType::create_unique(this, state);
488
94
    RETURN_IF_ERROR(local_state->init(state, info));
489
94
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
490
94
    return Status::OK();
491
94
}
_ZN5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
486
805k
                                                            LocalSinkStateInfo& info) {
487
805k
    auto local_state = LocalStateType::create_unique(this, state);
488
805k
    RETURN_IF_ERROR(local_state->init(state, info));
489
805k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
490
805k
    return Status::OK();
491
805k
}
_ZN5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
486
31.2k
                                                            LocalSinkStateInfo& info) {
487
31.2k
    auto local_state = LocalStateType::create_unique(this, state);
488
31.2k
    RETURN_IF_ERROR(local_state->init(state, info));
489
31.2k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
490
31.2k
    return Status::OK();
491
31.2k
}
_ZN5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
486
5.96k
                                                            LocalSinkStateInfo& info) {
487
5.96k
    auto local_state = LocalStateType::create_unique(this, state);
488
5.96k
    RETURN_IF_ERROR(local_state->init(state, info));
489
5.96k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
490
5.96k
    return Status::OK();
491
5.96k
}
_ZN5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
486
13.9k
                                                            LocalSinkStateInfo& info) {
487
13.9k
    auto local_state = LocalStateType::create_unique(this, state);
488
13.9k
    RETURN_IF_ERROR(local_state->init(state, info));
489
13.9k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
490
13.9k
    return Status::OK();
491
13.9k
}
_ZN5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
486
216
                                                            LocalSinkStateInfo& info) {
487
216
    auto local_state = LocalStateType::create_unique(this, state);
488
216
    RETURN_IF_ERROR(local_state->init(state, info));
489
216
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
490
216
    return Status::OK();
491
216
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
486
4.71k
                                                            LocalSinkStateInfo& info) {
487
4.71k
    auto local_state = LocalStateType::create_unique(this, state);
488
4.71k
    RETURN_IF_ERROR(local_state->init(state, info));
489
4.71k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
490
4.71k
    return Status::OK();
491
4.71k
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
486
2.58k
                                                            LocalSinkStateInfo& info) {
487
2.58k
    auto local_state = LocalStateType::create_unique(this, state);
488
2.58k
    RETURN_IF_ERROR(local_state->init(state, info));
489
2.58k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
490
2.58k
    return Status::OK();
491
2.58k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
486
2.49k
                                                            LocalSinkStateInfo& info) {
487
2.49k
    auto local_state = LocalStateType::create_unique(this, state);
488
2.49k
    RETURN_IF_ERROR(local_state->init(state, info));
489
2.49k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
490
2.49k
    return Status::OK();
491
2.49k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
486
2.48k
                                                            LocalSinkStateInfo& info) {
487
2.48k
    auto local_state = LocalStateType::create_unique(this, state);
488
2.48k
    RETURN_IF_ERROR(local_state->init(state, info));
489
2.48k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
490
2.48k
    return Status::OK();
491
2.48k
}
_ZN5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
486
1
                                                            LocalSinkStateInfo& info) {
487
1
    auto local_state = LocalStateType::create_unique(this, state);
488
1
    RETURN_IF_ERROR(local_state->init(state, info));
489
1
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
490
1
    return Status::OK();
491
1
}
_ZN5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
486
165
                                                            LocalSinkStateInfo& info) {
487
165
    auto local_state = LocalStateType::create_unique(this, state);
488
165
    RETURN_IF_ERROR(local_state->init(state, info));
489
165
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
490
165
    return Status::OK();
491
165
}
_ZN5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
486
14
                                                            LocalSinkStateInfo& info) {
487
14
    auto local_state = LocalStateType::create_unique(this, state);
488
14
    RETURN_IF_ERROR(local_state->init(state, info));
489
14
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
490
14
    return Status::OK();
491
14
}
_ZN5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
486
105
                                                            LocalSinkStateInfo& info) {
487
105
    auto local_state = LocalStateType::create_unique(this, state);
488
105
    RETURN_IF_ERROR(local_state->init(state, info));
489
105
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
490
105
    return Status::OK();
491
105
}
_ZN5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
486
151
                                                            LocalSinkStateInfo& info) {
487
151
    auto local_state = LocalStateType::create_unique(this, state);
488
151
    RETURN_IF_ERROR(local_state->init(state, info));
489
151
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
490
151
    return Status::OK();
491
151
}
_ZN5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
486
151
                                                            LocalSinkStateInfo& info) {
487
151
    auto local_state = LocalStateType::create_unique(this, state);
488
151
    RETURN_IF_ERROR(local_state->init(state, info));
489
151
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
490
151
    return Status::OK();
491
151
}
492
493
template <typename LocalStateType>
494
1.95M
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
495
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
496
0
                                 LocalExchangeSharedState>) {
497
0
        return nullptr;
498
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
499
0
                                        MultiCastSharedState>) {
500
0
        throw Exception(Status::FatalError("should not reach here!"));
501
1.95M
    } else {
502
1.95M
        auto ss = LocalStateType::SharedStateType::create_shared();
503
1.95M
        ss->id = operator_id();
504
1.95M
        for (auto& dest : dests_id()) {
505
1.95M
            ss->related_op_ids.insert(dest);
506
1.95M
        }
507
1.95M
        return ss;
508
1.95M
    }
509
1.95M
}
_ZNK5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
494
95.9k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
495
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
496
                                 LocalExchangeSharedState>) {
497
        return nullptr;
498
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
499
                                        MultiCastSharedState>) {
500
        throw Exception(Status::FatalError("should not reach here!"));
501
95.9k
    } else {
502
95.9k
        auto ss = LocalStateType::SharedStateType::create_shared();
503
95.9k
        ss->id = operator_id();
504
95.9k
        for (auto& dest : dests_id()) {
505
95.8k
            ss->related_op_ids.insert(dest);
506
95.8k
        }
507
95.9k
        return ss;
508
95.9k
    }
509
95.9k
}
_ZNK5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
494
490k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
495
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
496
                                 LocalExchangeSharedState>) {
497
        return nullptr;
498
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
499
                                        MultiCastSharedState>) {
500
        throw Exception(Status::FatalError("should not reach here!"));
501
490k
    } else {
502
490k
        auto ss = LocalStateType::SharedStateType::create_shared();
503
490k
        ss->id = operator_id();
504
490k
        for (auto& dest : dests_id()) {
505
488k
            ss->related_op_ids.insert(dest);
506
488k
        }
507
490k
        return ss;
508
490k
    }
509
490k
}
_ZNK5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
494
88
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
495
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
496
                                 LocalExchangeSharedState>) {
497
        return nullptr;
498
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
499
                                        MultiCastSharedState>) {
500
        throw Exception(Status::FatalError("should not reach here!"));
501
88
    } else {
502
88
        auto ss = LocalStateType::SharedStateType::create_shared();
503
88
        ss->id = operator_id();
504
88
        for (auto& dest : dests_id()) {
505
88
            ss->related_op_ids.insert(dest);
506
88
        }
507
88
        return ss;
508
88
    }
509
88
}
_ZNK5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
494
3
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
495
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
496
                                 LocalExchangeSharedState>) {
497
        return nullptr;
498
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
499
                                        MultiCastSharedState>) {
500
        throw Exception(Status::FatalError("should not reach here!"));
501
3
    } else {
502
3
        auto ss = LocalStateType::SharedStateType::create_shared();
503
3
        ss->id = operator_id();
504
3
        for (auto& dest : dests_id()) {
505
3
            ss->related_op_ids.insert(dest);
506
3
        }
507
3
        return ss;
508
3
    }
509
3
}
_ZNK5doris17DataSinkOperatorXINS_24ResultFileSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
494
517
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
495
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
496
                                 LocalExchangeSharedState>) {
497
        return nullptr;
498
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
499
                                        MultiCastSharedState>) {
500
        throw Exception(Status::FatalError("should not reach here!"));
501
517
    } else {
502
517
        auto ss = LocalStateType::SharedStateType::create_shared();
503
517
        ss->id = operator_id();
504
518
        for (auto& dest : dests_id()) {
505
518
            ss->related_op_ids.insert(dest);
506
518
        }
507
517
        return ss;
508
517
    }
509
517
}
_ZNK5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
494
43.6k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
495
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
496
                                 LocalExchangeSharedState>) {
497
        return nullptr;
498
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
499
                                        MultiCastSharedState>) {
500
        throw Exception(Status::FatalError("should not reach here!"));
501
43.6k
    } else {
502
43.6k
        auto ss = LocalStateType::SharedStateType::create_shared();
503
43.6k
        ss->id = operator_id();
504
43.6k
        for (auto& dest : dests_id()) {
505
43.4k
            ss->related_op_ids.insert(dest);
506
43.4k
        }
507
43.6k
        return ss;
508
43.6k
    }
509
43.6k
}
_ZNK5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE19create_shared_stateEv
Line
Count
Source
494
8.74k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
495
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
496
                                 LocalExchangeSharedState>) {
497
        return nullptr;
498
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
499
                                        MultiCastSharedState>) {
500
        throw Exception(Status::FatalError("should not reach here!"));
501
8.74k
    } else {
502
8.74k
        auto ss = LocalStateType::SharedStateType::create_shared();
503
8.74k
        ss->id = operator_id();
504
8.74k
        for (auto& dest : dests_id()) {
505
8.74k
            ss->related_op_ids.insert(dest);
506
8.74k
        }
507
8.74k
        return ss;
508
8.74k
    }
509
8.74k
}
_ZNK5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
494
5.15k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
495
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
496
                                 LocalExchangeSharedState>) {
497
        return nullptr;
498
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
499
                                        MultiCastSharedState>) {
500
        throw Exception(Status::FatalError("should not reach here!"));
501
5.15k
    } else {
502
5.15k
        auto ss = LocalStateType::SharedStateType::create_shared();
503
5.15k
        ss->id = operator_id();
504
5.15k
        for (auto& dest : dests_id()) {
505
5.14k
            ss->related_op_ids.insert(dest);
506
5.14k
        }
507
5.15k
        return ss;
508
5.15k
    }
509
5.15k
}
_ZNK5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
494
156
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
495
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
496
                                 LocalExchangeSharedState>) {
497
        return nullptr;
498
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
499
                                        MultiCastSharedState>) {
500
        throw Exception(Status::FatalError("should not reach here!"));
501
156
    } else {
502
156
        auto ss = LocalStateType::SharedStateType::create_shared();
503
156
        ss->id = operator_id();
504
156
        for (auto& dest : dests_id()) {
505
156
            ss->related_op_ids.insert(dest);
506
156
        }
507
156
        return ss;
508
156
    }
509
156
}
_ZNK5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
494
3.38k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
495
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
496
                                 LocalExchangeSharedState>) {
497
        return nullptr;
498
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
499
                                        MultiCastSharedState>) {
500
        throw Exception(Status::FatalError("should not reach here!"));
501
3.38k
    } else {
502
3.38k
        auto ss = LocalStateType::SharedStateType::create_shared();
503
3.38k
        ss->id = operator_id();
504
3.38k
        for (auto& dest : dests_id()) {
505
3.38k
            ss->related_op_ids.insert(dest);
506
3.38k
        }
507
3.38k
        return ss;
508
3.38k
    }
509
3.38k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27IcebergDeleteSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
494
160
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
495
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
496
                                 LocalExchangeSharedState>) {
497
        return nullptr;
498
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
499
                                        MultiCastSharedState>) {
500
        throw Exception(Status::FatalError("should not reach here!"));
501
160
    } else {
502
160
        auto ss = LocalStateType::SharedStateType::create_shared();
503
160
        ss->id = operator_id();
504
160
        for (auto& dest : dests_id()) {
505
160
            ss->related_op_ids.insert(dest);
506
160
        }
507
160
        return ss;
508
160
    }
509
160
}
_ZNK5doris17DataSinkOperatorXINS_26IcebergMergeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
494
640
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
495
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
496
                                 LocalExchangeSharedState>) {
497
        return nullptr;
498
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
499
                                        MultiCastSharedState>) {
500
        throw Exception(Status::FatalError("should not reach here!"));
501
640
    } else {
502
640
        auto ss = LocalStateType::SharedStateType::create_shared();
503
640
        ss->id = operator_id();
504
640
        for (auto& dest : dests_id()) {
505
640
            ss->related_op_ids.insert(dest);
506
640
        }
507
640
        return ss;
508
640
    }
509
640
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_21MCTableSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
494
8.72k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
495
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
496
                                 LocalExchangeSharedState>) {
497
        return nullptr;
498
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
499
                                        MultiCastSharedState>) {
500
        throw Exception(Status::FatalError("should not reach here!"));
501
8.72k
    } else {
502
8.72k
        auto ss = LocalStateType::SharedStateType::create_shared();
503
8.72k
        ss->id = operator_id();
504
8.72k
        for (auto& dest : dests_id()) {
505
8.71k
            ss->related_op_ids.insert(dest);
506
8.71k
        }
507
8.72k
        return ss;
508
8.72k
    }
509
8.72k
}
_ZNK5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
494
97
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
495
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
496
                                 LocalExchangeSharedState>) {
497
        return nullptr;
498
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
499
                                        MultiCastSharedState>) {
500
        throw Exception(Status::FatalError("should not reach here!"));
501
97
    } else {
502
97
        auto ss = LocalStateType::SharedStateType::create_shared();
503
97
        ss->id = operator_id();
504
97
        for (auto& dest : dests_id()) {
505
97
            ss->related_op_ids.insert(dest);
506
97
        }
507
97
        return ss;
508
97
    }
509
97
}
_ZNK5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
494
265k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
495
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
496
                                 LocalExchangeSharedState>) {
497
        return nullptr;
498
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
499
                                        MultiCastSharedState>) {
500
        throw Exception(Status::FatalError("should not reach here!"));
501
265k
    } else {
502
265k
        auto ss = LocalStateType::SharedStateType::create_shared();
503
265k
        ss->id = operator_id();
504
265k
        for (auto& dest : dests_id()) {
505
265k
            ss->related_op_ids.insert(dest);
506
265k
        }
507
265k
        return ss;
508
265k
    }
509
265k
}
_ZNK5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
494
30
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
495
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
496
                                 LocalExchangeSharedState>) {
497
        return nullptr;
498
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
499
                                        MultiCastSharedState>) {
500
        throw Exception(Status::FatalError("should not reach here!"));
501
30
    } else {
502
30
        auto ss = LocalStateType::SharedStateType::create_shared();
503
30
        ss->id = operator_id();
504
30
        for (auto& dest : dests_id()) {
505
30
            ss->related_op_ids.insert(dest);
506
30
        }
507
30
        return ss;
508
30
    }
509
30
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
494
190k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
495
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
496
                                 LocalExchangeSharedState>) {
497
        return nullptr;
498
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
499
                                        MultiCastSharedState>) {
500
        throw Exception(Status::FatalError("should not reach here!"));
501
190k
    } else {
502
190k
        auto ss = LocalStateType::SharedStateType::create_shared();
503
190k
        ss->id = operator_id();
504
190k
        for (auto& dest : dests_id()) {
505
190k
            ss->related_op_ids.insert(dest);
506
190k
        }
507
190k
        return ss;
508
190k
    }
509
190k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
494
93
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
495
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
496
                                 LocalExchangeSharedState>) {
497
        return nullptr;
498
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
499
                                        MultiCastSharedState>) {
500
        throw Exception(Status::FatalError("should not reach here!"));
501
93
    } else {
502
93
        auto ss = LocalStateType::SharedStateType::create_shared();
503
93
        ss->id = operator_id();
504
93
        for (auto& dest : dests_id()) {
505
93
            ss->related_op_ids.insert(dest);
506
93
        }
507
93
        return ss;
508
93
    }
509
93
}
_ZNK5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
494
805k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
495
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
496
                                 LocalExchangeSharedState>) {
497
        return nullptr;
498
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
499
                                        MultiCastSharedState>) {
500
        throw Exception(Status::FatalError("should not reach here!"));
501
805k
    } else {
502
805k
        auto ss = LocalStateType::SharedStateType::create_shared();
503
805k
        ss->id = operator_id();
504
805k
        for (auto& dest : dests_id()) {
505
802k
            ss->related_op_ids.insert(dest);
506
802k
        }
507
805k
        return ss;
508
805k
    }
509
805k
}
_ZNK5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
494
31.3k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
495
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
496
                                 LocalExchangeSharedState>) {
497
        return nullptr;
498
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
499
                                        MultiCastSharedState>) {
500
        throw Exception(Status::FatalError("should not reach here!"));
501
31.3k
    } else {
502
31.3k
        auto ss = LocalStateType::SharedStateType::create_shared();
503
31.3k
        ss->id = operator_id();
504
31.3k
        for (auto& dest : dests_id()) {
505
31.3k
            ss->related_op_ids.insert(dest);
506
31.3k
        }
507
31.3k
        return ss;
508
31.3k
    }
509
31.3k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
494
318
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
495
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
496
                                 LocalExchangeSharedState>) {
497
        return nullptr;
498
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
499
                                        MultiCastSharedState>) {
500
        throw Exception(Status::FatalError("should not reach here!"));
501
318
    } else {
502
318
        auto ss = LocalStateType::SharedStateType::create_shared();
503
318
        ss->id = operator_id();
504
318
        for (auto& dest : dests_id()) {
505
317
            ss->related_op_ids.insert(dest);
506
317
        }
507
318
        return ss;
508
318
    }
509
318
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE19create_shared_stateEv
Line
Count
Source
494
2.51k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
495
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
496
                                 LocalExchangeSharedState>) {
497
        return nullptr;
498
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
499
                                        MultiCastSharedState>) {
500
        throw Exception(Status::FatalError("should not reach here!"));
501
2.51k
    } else {
502
2.51k
        auto ss = LocalStateType::SharedStateType::create_shared();
503
2.51k
        ss->id = operator_id();
504
2.51k
        for (auto& dest : dests_id()) {
505
2.51k
            ss->related_op_ids.insert(dest);
506
2.51k
        }
507
2.51k
        return ss;
508
2.51k
    }
509
2.51k
}
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE19create_shared_stateEv
Line
Count
Source
494
2.47k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
495
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
496
                                 LocalExchangeSharedState>) {
497
        return nullptr;
498
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
499
                                        MultiCastSharedState>) {
500
        throw Exception(Status::FatalError("should not reach here!"));
501
2.47k
    } else {
502
2.47k
        auto ss = LocalStateType::SharedStateType::create_shared();
503
2.47k
        ss->id = operator_id();
504
2.48k
        for (auto& dest : dests_id()) {
505
2.48k
            ss->related_op_ids.insert(dest);
506
2.48k
        }
507
2.47k
        return ss;
508
2.47k
    }
509
2.47k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
494
165
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
495
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
496
                                 LocalExchangeSharedState>) {
497
        return nullptr;
498
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
499
                                        MultiCastSharedState>) {
500
        throw Exception(Status::FatalError("should not reach here!"));
501
165
    } else {
502
165
        auto ss = LocalStateType::SharedStateType::create_shared();
503
165
        ss->id = operator_id();
504
165
        for (auto& dest : dests_id()) {
505
165
            ss->related_op_ids.insert(dest);
506
165
        }
507
165
        return ss;
508
165
    }
509
165
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
494
105
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
495
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
496
                                 LocalExchangeSharedState>) {
497
        return nullptr;
498
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
499
                                        MultiCastSharedState>) {
500
        throw Exception(Status::FatalError("should not reach here!"));
501
105
    } else {
502
105
        auto ss = LocalStateType::SharedStateType::create_shared();
503
105
        ss->id = operator_id();
504
105
        for (auto& dest : dests_id()) {
505
105
            ss->related_op_ids.insert(dest);
506
105
        }
507
105
        return ss;
508
105
    }
509
105
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE19create_shared_stateEv
510
511
template <typename LocalStateType>
512
2.90M
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
2.90M
    auto local_state = LocalStateType::create_unique(state, this);
514
2.90M
    RETURN_IF_ERROR(local_state->init(state, info));
515
2.90M
    state->emplace_local_state(operator_id(), std::move(local_state));
516
2.90M
    return Status::OK();
517
2.90M
}
_ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
512
66.3k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
66.3k
    auto local_state = LocalStateType::create_unique(state, this);
514
66.3k
    RETURN_IF_ERROR(local_state->init(state, info));
515
66.3k
    state->emplace_local_state(operator_id(), std::move(local_state));
516
66.3k
    return Status::OK();
517
66.3k
}
_ZN5doris9OperatorXINS_18OlapScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
512
297k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
297k
    auto local_state = LocalStateType::create_unique(state, this);
514
297k
    RETURN_IF_ERROR(local_state->init(state, info));
515
297k
    state->emplace_local_state(operator_id(), std::move(local_state));
516
297k
    return Status::OK();
517
297k
}
_ZN5doris9OperatorXINS_21GroupCommitLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
512
75
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
75
    auto local_state = LocalStateType::create_unique(state, this);
514
75
    RETURN_IF_ERROR(local_state->init(state, info));
515
75
    state->emplace_local_state(operator_id(), std::move(local_state));
516
75
    return Status::OK();
517
75
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_18JDBCScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_18FileScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
512
32.7k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
32.7k
    auto local_state = LocalStateType::create_unique(state, this);
514
32.7k
    RETURN_IF_ERROR(local_state->init(state, info));
515
32.7k
    state->emplace_local_state(operator_id(), std::move(local_state));
516
32.7k
    return Status::OK();
517
32.7k
}
_ZN5doris9OperatorXINS_18AnalyticLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
512
8.63k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
8.63k
    auto local_state = LocalStateType::create_unique(state, this);
514
8.63k
    RETURN_IF_ERROR(local_state->init(state, info));
515
8.63k
    state->emplace_local_state(operator_id(), std::move(local_state));
516
8.63k
    return Status::OK();
517
8.63k
}
_ZN5doris9OperatorXINS_14SortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
512
8.86k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
8.86k
    auto local_state = LocalStateType::create_unique(state, this);
514
8.86k
    RETURN_IF_ERROR(local_state->init(state, info));
515
8.86k
    state->emplace_local_state(operator_id(), std::move(local_state));
516
8.86k
    return Status::OK();
517
8.86k
}
_ZN5doris9OperatorXINS_19SpillSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
512
22
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
22
    auto local_state = LocalStateType::create_unique(state, this);
514
22
    RETURN_IF_ERROR(local_state->init(state, info));
515
22
    state->emplace_local_state(operator_id(), std::move(local_state));
516
22
    return Status::OK();
517
22
}
_ZN5doris9OperatorXINS_24LocalMergeSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
512
255k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
255k
    auto local_state = LocalStateType::create_unique(state, this);
514
255k
    RETURN_IF_ERROR(local_state->init(state, info));
515
255k
    state->emplace_local_state(operator_id(), std::move(local_state));
516
255k
    return Status::OK();
517
255k
}
_ZN5doris9OperatorXINS_13AggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
512
189k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
189k
    auto local_state = LocalStateType::create_unique(state, this);
514
189k
    RETURN_IF_ERROR(local_state->init(state, info));
515
189k
    state->emplace_local_state(operator_id(), std::move(local_state));
516
189k
    return Status::OK();
517
189k
}
_ZN5doris9OperatorXINS_21BucketedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
512
554
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
554
    auto local_state = LocalStateType::create_unique(state, this);
514
554
    RETURN_IF_ERROR(local_state->init(state, info));
515
554
    state->emplace_local_state(operator_id(), std::move(local_state));
516
554
    return Status::OK();
517
554
}
_ZN5doris9OperatorXINS_24PartitionedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
512
84
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
84
    auto local_state = LocalStateType::create_unique(state, this);
514
84
    RETURN_IF_ERROR(local_state->init(state, info));
515
84
    state->emplace_local_state(operator_id(), std::move(local_state));
516
84
    return Status::OK();
517
84
}
_ZN5doris9OperatorXINS_23TableFunctionLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
512
5.35k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
5.35k
    auto local_state = LocalStateType::create_unique(state, this);
514
5.35k
    RETURN_IF_ERROR(local_state->init(state, info));
515
5.35k
    state->emplace_local_state(operator_id(), std::move(local_state));
516
5.35k
    return Status::OK();
517
5.35k
}
_ZN5doris9OperatorXINS_18ExchangeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
512
519k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
519k
    auto local_state = LocalStateType::create_unique(state, this);
514
519k
    RETURN_IF_ERROR(local_state->init(state, info));
515
519k
    state->emplace_local_state(operator_id(), std::move(local_state));
516
519k
    return Status::OK();
517
519k
}
_ZN5doris9OperatorXINS_16RepeatLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
512
1.28k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
1.28k
    auto local_state = LocalStateType::create_unique(state, this);
514
1.28k
    RETURN_IF_ERROR(local_state->init(state, info));
515
1.28k
    state->emplace_local_state(operator_id(), std::move(local_state));
516
1.28k
    return Status::OK();
517
1.28k
}
_ZN5doris9OperatorXINS_29NestedLoopJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
512
31.2k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
31.2k
    auto local_state = LocalStateType::create_unique(state, this);
514
31.2k
    RETURN_IF_ERROR(local_state->init(state, info));
515
31.2k
    state->emplace_local_state(operator_id(), std::move(local_state));
516
31.2k
    return Status::OK();
517
31.2k
}
_ZN5doris9OperatorXINS_23AssertNumRowsLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
512
221
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
221
    auto local_state = LocalStateType::create_unique(state, this);
514
221
    RETURN_IF_ERROR(local_state->init(state, info));
515
221
    state->emplace_local_state(operator_id(), std::move(local_state));
516
221
    return Status::OK();
517
221
}
_ZN5doris9OperatorXINS_18EmptySetLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
512
1.89k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
1.89k
    auto local_state = LocalStateType::create_unique(state, this);
514
1.89k
    RETURN_IF_ERROR(local_state->init(state, info));
515
1.89k
    state->emplace_local_state(operator_id(), std::move(local_state));
516
1.89k
    return Status::OK();
517
1.89k
}
_ZN5doris9OperatorXINS_21UnionSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
512
54.7k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
54.7k
    auto local_state = LocalStateType::create_unique(state, this);
514
54.7k
    RETURN_IF_ERROR(local_state->init(state, info));
515
54.7k
    state->emplace_local_state(operator_id(), std::move(local_state));
516
54.7k
    return Status::OK();
517
54.7k
}
_ZN5doris9OperatorXINS_35MultiCastDataStreamSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
512
41.6k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
41.6k
    auto local_state = LocalStateType::create_unique(state, this);
514
41.6k
    RETURN_IF_ERROR(local_state->init(state, info));
515
41.6k
    state->emplace_local_state(operator_id(), std::move(local_state));
516
41.6k
    return Status::OK();
517
41.6k
}
_ZN5doris9OperatorXINS_29PartitionSortSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
512
211
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
211
    auto local_state = LocalStateType::create_unique(state, this);
514
211
    RETURN_IF_ERROR(local_state->init(state, info));
515
211
    state->emplace_local_state(operator_id(), std::move(local_state));
516
211
    return Status::OK();
517
211
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
512
2.40k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
2.40k
    auto local_state = LocalStateType::create_unique(state, this);
514
2.40k
    RETURN_IF_ERROR(local_state->init(state, info));
515
2.40k
    state->emplace_local_state(operator_id(), std::move(local_state));
516
2.40k
    return Status::OK();
517
2.40k
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
512
2.42k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
2.42k
    auto local_state = LocalStateType::create_unique(state, this);
514
2.42k
    RETURN_IF_ERROR(local_state->init(state, info));
515
2.42k
    state->emplace_local_state(operator_id(), std::move(local_state));
516
2.42k
    return Status::OK();
517
2.42k
}
_ZN5doris9OperatorXINS_17DataGenLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
512
465
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
465
    auto local_state = LocalStateType::create_unique(state, this);
514
465
    RETURN_IF_ERROR(local_state->init(state, info));
515
465
    state->emplace_local_state(operator_id(), std::move(local_state));
516
465
    return Status::OK();
517
465
}
_ZN5doris9OperatorXINS_20SchemaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
512
2.02k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
2.02k
    auto local_state = LocalStateType::create_unique(state, this);
514
2.02k
    RETURN_IF_ERROR(local_state->init(state, info));
515
2.02k
    state->emplace_local_state(operator_id(), std::move(local_state));
516
2.02k
    return Status::OK();
517
2.02k
}
_ZN5doris9OperatorXINS_18MetaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
512
7.23k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
7.23k
    auto local_state = LocalStateType::create_unique(state, this);
514
7.23k
    RETURN_IF_ERROR(local_state->init(state, info));
515
7.23k
    state->emplace_local_state(operator_id(), std::move(local_state));
516
7.23k
    return Status::OK();
517
7.23k
}
_ZN5doris9OperatorXINS_29LocalExchangeSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
512
768k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
768k
    auto local_state = LocalStateType::create_unique(state, this);
514
768k
    RETURN_IF_ERROR(local_state->init(state, info));
515
768k
    state->emplace_local_state(operator_id(), std::move(local_state));
516
768k
    return Status::OK();
517
768k
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_34PartitionedHashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_21CacheSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
512
14
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
14
    auto local_state = LocalStateType::create_unique(state, this);
514
14
    RETURN_IF_ERROR(local_state->init(state, info));
515
14
    state->emplace_local_state(operator_id(), std::move(local_state));
516
14
    return Status::OK();
517
14
}
_ZN5doris9OperatorXINS_22RecCTESourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
512
151
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
151
    auto local_state = LocalStateType::create_unique(state, this);
514
151
    RETURN_IF_ERROR(local_state->init(state, info));
515
151
    state->emplace_local_state(operator_id(), std::move(local_state));
516
151
    return Status::OK();
517
151
}
_ZN5doris9OperatorXINS_20RecCTEScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
512
1.95k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
1.95k
    auto local_state = LocalStateType::create_unique(state, this);
514
1.95k
    RETURN_IF_ERROR(local_state->init(state, info));
515
1.95k
    state->emplace_local_state(operator_id(), std::move(local_state));
516
1.95k
    return Status::OK();
517
1.95k
}
_ZN5doris9OperatorXINS_25MaterializationLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
512
1.60k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
1.60k
    auto local_state = LocalStateType::create_unique(state, this);
514
1.60k
    RETURN_IF_ERROR(local_state->init(state, info));
515
1.60k
    state->emplace_local_state(operator_id(), std::move(local_state));
516
1.60k
    return Status::OK();
517
1.60k
}
_ZN5doris9OperatorXINS_16SelectLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
512
13.1k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
13.1k
    auto local_state = LocalStateType::create_unique(state, this);
514
13.1k
    RETURN_IF_ERROR(local_state->init(state, info));
515
13.1k
    state->emplace_local_state(operator_id(), std::move(local_state));
516
13.1k
    return Status::OK();
517
13.1k
}
_ZN5doris9OperatorXINS_22StreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
512
16.3k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
16.3k
    auto local_state = LocalStateType::create_unique(state, this);
514
16.3k
    RETURN_IF_ERROR(local_state->init(state, info));
515
16.3k
    state->emplace_local_state(operator_id(), std::move(local_state));
516
16.3k
    return Status::OK();
517
16.3k
}
_ZN5doris9OperatorXINS_30DistinctStreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
512
571k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
571k
    auto local_state = LocalStateType::create_unique(state, this);
514
571k
    RETURN_IF_ERROR(local_state->init(state, info));
515
571k
    state->emplace_local_state(operator_id(), std::move(local_state));
516
571k
    return Status::OK();
517
571k
}
518
519
PipelineXSinkLocalStateBase::PipelineXSinkLocalStateBase(DataSinkOperatorXBase* parent,
520
                                                         RuntimeState* state)
521
2.26M
        : _parent(parent), _state(state) {}
522
523
PipelineXLocalStateBase::PipelineXLocalStateBase(RuntimeState* state, OperatorXBase* parent)
524
2.89M
        : _num_rows_returned(0),
525
2.89M
          _rows_returned_counter(nullptr),
526
2.89M
          _parent(parent),
527
2.89M
          _state(state),
528
2.89M
          _budget(state->batch_size(), state->preferred_block_size_bytes()) {}
529
530
template <typename SharedStateArg>
531
2.90M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
532
2.90M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
533
2.90M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
534
2.90M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
535
2.90M
    _operator_profile->set_metadata(_parent->node_id());
536
    // indent is false so that source operator will have same
537
    // indentation_level with its parent operator.
538
2.90M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
539
2.90M
    _operator_profile->add_child(_common_profile.get(), true);
540
2.90M
    _operator_profile->add_child(_custom_profile.get(), true);
541
2.90M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
542
2.90M
    if constexpr (!is_fake_shared) {
543
1.43M
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
544
780k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
545
780k
                                    .first.get()
546
780k
                                    ->template cast<SharedStateArg>();
547
548
780k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
549
780k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
550
780k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
551
780k
        } else if (info.shared_state) {
552
584k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
553
0
                DCHECK(false);
554
0
            }
555
            // For UnionSourceOperator without children, there is no shared state.
556
584k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
557
558
584k
            _dependency = _shared_state->create_source_dependency(
559
584k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
560
584k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
561
584k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
562
584k
        } else {
563
72.6k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
564
12.1k
                DCHECK(false);
565
12.1k
            }
566
72.6k
        }
567
1.43M
    }
568
569
2.90M
    if (must_set_shared_state() && _shared_state == nullptr) {
570
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
571
0
    }
572
573
2.90M
    _rows_returned_counter =
574
2.90M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
575
2.90M
    _blocks_returned_counter =
576
2.90M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
577
2.90M
    _output_block_bytes_counter =
578
2.90M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
579
2.90M
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
580
2.90M
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
581
2.90M
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
582
2.90M
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
583
2.90M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
584
2.90M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
585
2.90M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
586
2.90M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
587
2.90M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
588
2.90M
    _memory_used_counter =
589
2.90M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
590
2.90M
    _common_profile->add_info_string("IsColocate",
591
2.90M
                                     std::to_string(_parent->is_colocated_operator()));
592
2.90M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
593
2.90M
    _common_profile->add_info_string("FollowedByShuffledOperator",
594
2.90M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
595
2.90M
    return Status::OK();
596
2.90M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
531
66.6k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
532
66.6k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
533
66.6k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
534
66.6k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
535
66.6k
    _operator_profile->set_metadata(_parent->node_id());
536
    // indent is false so that source operator will have same
537
    // indentation_level with its parent operator.
538
66.6k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
539
66.6k
    _operator_profile->add_child(_common_profile.get(), true);
540
66.6k
    _operator_profile->add_child(_custom_profile.get(), true);
541
66.6k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
542
66.6k
    if constexpr (!is_fake_shared) {
543
66.6k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
544
18.5k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
545
18.5k
                                    .first.get()
546
18.5k
                                    ->template cast<SharedStateArg>();
547
548
18.5k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
549
18.5k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
550
18.5k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
551
48.0k
        } else if (info.shared_state) {
552
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
553
                DCHECK(false);
554
            }
555
            // For UnionSourceOperator without children, there is no shared state.
556
47.5k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
557
558
47.5k
            _dependency = _shared_state->create_source_dependency(
559
47.5k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
560
47.5k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
561
47.5k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
562
47.5k
        } else {
563
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
564
                DCHECK(false);
565
            }
566
568
        }
567
66.6k
    }
568
569
66.6k
    if (must_set_shared_state() && _shared_state == nullptr) {
570
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
571
0
    }
572
573
66.6k
    _rows_returned_counter =
574
66.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
575
66.6k
    _blocks_returned_counter =
576
66.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
577
66.6k
    _output_block_bytes_counter =
578
66.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
579
66.6k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
580
66.6k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
581
66.6k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
582
66.6k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
583
66.6k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
584
66.6k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
585
66.6k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
586
66.6k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
587
66.6k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
588
66.6k
    _memory_used_counter =
589
66.6k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
590
66.6k
    _common_profile->add_info_string("IsColocate",
591
66.6k
                                     std::to_string(_parent->is_colocated_operator()));
592
66.6k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
593
66.6k
    _common_profile->add_info_string("FollowedByShuffledOperator",
594
66.6k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
595
66.6k
    return Status::OK();
596
66.6k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
531
1
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
532
1
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
533
1
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
534
1
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
535
1
    _operator_profile->set_metadata(_parent->node_id());
536
    // indent is false so that source operator will have same
537
    // indentation_level with its parent operator.
538
1
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
539
1
    _operator_profile->add_child(_common_profile.get(), true);
540
1
    _operator_profile->add_child(_custom_profile.get(), true);
541
1
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
542
1
    if constexpr (!is_fake_shared) {
543
1
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
544
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
545
0
                                    .first.get()
546
0
                                    ->template cast<SharedStateArg>();
547
548
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
549
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
550
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
551
1
        } else if (info.shared_state) {
552
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
553
                DCHECK(false);
554
            }
555
            // For UnionSourceOperator without children, there is no shared state.
556
1
            _shared_state = info.shared_state->template cast<SharedStateArg>();
557
558
1
            _dependency = _shared_state->create_source_dependency(
559
1
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
560
1
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
561
1
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
562
1
        } else {
563
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
564
                DCHECK(false);
565
            }
566
0
        }
567
1
    }
568
569
1
    if (must_set_shared_state() && _shared_state == nullptr) {
570
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
571
0
    }
572
573
1
    _rows_returned_counter =
574
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
575
1
    _blocks_returned_counter =
576
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
577
1
    _output_block_bytes_counter =
578
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
579
1
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
580
1
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
581
1
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
582
1
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
583
1
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
584
1
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
585
1
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
586
1
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
587
1
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
588
1
    _memory_used_counter =
589
1
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
590
1
    _common_profile->add_info_string("IsColocate",
591
1
                                     std::to_string(_parent->is_colocated_operator()));
592
1
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
593
1
    _common_profile->add_info_string("FollowedByShuffledOperator",
594
1
                                     std::to_string(_parent->followed_by_shuffled_operator()));
595
1
    return Status::OK();
596
1
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
531
265k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
532
265k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
533
265k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
534
265k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
535
265k
    _operator_profile->set_metadata(_parent->node_id());
536
    // indent is false so that source operator will have same
537
    // indentation_level with its parent operator.
538
265k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
539
265k
    _operator_profile->add_child(_common_profile.get(), true);
540
265k
    _operator_profile->add_child(_custom_profile.get(), true);
541
265k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
542
265k
    if constexpr (!is_fake_shared) {
543
265k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
544
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
545
0
                                    .first.get()
546
0
                                    ->template cast<SharedStateArg>();
547
548
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
549
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
550
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
551
265k
        } else if (info.shared_state) {
552
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
553
                DCHECK(false);
554
            }
555
            // For UnionSourceOperator without children, there is no shared state.
556
259k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
557
558
259k
            _dependency = _shared_state->create_source_dependency(
559
259k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
560
259k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
561
259k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
562
259k
        } else {
563
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
564
                DCHECK(false);
565
            }
566
5.67k
        }
567
265k
    }
568
569
265k
    if (must_set_shared_state() && _shared_state == nullptr) {
570
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
571
0
    }
572
573
265k
    _rows_returned_counter =
574
265k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
575
265k
    _blocks_returned_counter =
576
265k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
577
265k
    _output_block_bytes_counter =
578
265k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
579
265k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
580
265k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
581
265k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
582
265k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
583
265k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
584
265k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
585
265k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
586
265k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
587
265k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
588
265k
    _memory_used_counter =
589
265k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
590
265k
    _common_profile->add_info_string("IsColocate",
591
265k
                                     std::to_string(_parent->is_colocated_operator()));
592
265k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
593
265k
    _common_profile->add_info_string("FollowedByShuffledOperator",
594
265k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
595
265k
    return Status::OK();
596
265k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
531
22
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
532
22
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
533
22
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
534
22
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
535
22
    _operator_profile->set_metadata(_parent->node_id());
536
    // indent is false so that source operator will have same
537
    // indentation_level with its parent operator.
538
22
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
539
22
    _operator_profile->add_child(_common_profile.get(), true);
540
22
    _operator_profile->add_child(_custom_profile.get(), true);
541
22
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
542
22
    if constexpr (!is_fake_shared) {
543
22
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
544
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
545
0
                                    .first.get()
546
0
                                    ->template cast<SharedStateArg>();
547
548
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
549
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
550
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
551
22
        } else if (info.shared_state) {
552
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
553
                DCHECK(false);
554
            }
555
            // For UnionSourceOperator without children, there is no shared state.
556
22
            _shared_state = info.shared_state->template cast<SharedStateArg>();
557
558
22
            _dependency = _shared_state->create_source_dependency(
559
22
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
560
22
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
561
22
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
562
22
        } else {
563
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
564
                DCHECK(false);
565
            }
566
0
        }
567
22
    }
568
569
22
    if (must_set_shared_state() && _shared_state == nullptr) {
570
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
571
0
    }
572
573
22
    _rows_returned_counter =
574
22
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
575
22
    _blocks_returned_counter =
576
22
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
577
22
    _output_block_bytes_counter =
578
22
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
579
22
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
580
22
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
581
22
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
582
22
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
583
22
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
584
22
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
585
22
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
586
22
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
587
22
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
588
22
    _memory_used_counter =
589
22
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
590
22
    _common_profile->add_info_string("IsColocate",
591
22
                                     std::to_string(_parent->is_colocated_operator()));
592
22
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
593
22
    _common_profile->add_info_string("FollowedByShuffledOperator",
594
22
                                     std::to_string(_parent->followed_by_shuffled_operator()));
595
22
    return Status::OK();
596
22
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
531
31.1k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
532
31.1k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
533
31.1k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
534
31.1k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
535
31.1k
    _operator_profile->set_metadata(_parent->node_id());
536
    // indent is false so that source operator will have same
537
    // indentation_level with its parent operator.
538
31.1k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
539
31.1k
    _operator_profile->add_child(_common_profile.get(), true);
540
31.1k
    _operator_profile->add_child(_custom_profile.get(), true);
541
31.1k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
542
31.1k
    if constexpr (!is_fake_shared) {
543
31.1k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
544
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
545
0
                                    .first.get()
546
0
                                    ->template cast<SharedStateArg>();
547
548
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
549
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
550
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
551
31.1k
        } else if (info.shared_state) {
552
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
553
                DCHECK(false);
554
            }
555
            // For UnionSourceOperator without children, there is no shared state.
556
30.9k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
557
558
30.9k
            _dependency = _shared_state->create_source_dependency(
559
30.9k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
560
30.9k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
561
30.9k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
562
30.9k
        } else {
563
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
564
                DCHECK(false);
565
            }
566
224
        }
567
31.1k
    }
568
569
31.1k
    if (must_set_shared_state() && _shared_state == nullptr) {
570
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
571
0
    }
572
573
31.1k
    _rows_returned_counter =
574
31.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
575
31.1k
    _blocks_returned_counter =
576
31.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
577
31.1k
    _output_block_bytes_counter =
578
31.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
579
31.1k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
580
31.1k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
581
31.1k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
582
31.1k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
583
31.1k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
584
31.1k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
585
31.1k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
586
31.1k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
587
31.1k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
588
31.1k
    _memory_used_counter =
589
31.1k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
590
31.1k
    _common_profile->add_info_string("IsColocate",
591
31.1k
                                     std::to_string(_parent->is_colocated_operator()));
592
31.1k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
593
31.1k
    _common_profile->add_info_string("FollowedByShuffledOperator",
594
31.1k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
595
31.1k
    return Status::OK();
596
31.1k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
531
8.72k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
532
8.72k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
533
8.72k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
534
8.72k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
535
8.72k
    _operator_profile->set_metadata(_parent->node_id());
536
    // indent is false so that source operator will have same
537
    // indentation_level with its parent operator.
538
8.72k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
539
8.72k
    _operator_profile->add_child(_common_profile.get(), true);
540
8.72k
    _operator_profile->add_child(_custom_profile.get(), true);
541
8.72k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
542
8.72k
    if constexpr (!is_fake_shared) {
543
8.72k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
544
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
545
0
                                    .first.get()
546
0
                                    ->template cast<SharedStateArg>();
547
548
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
549
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
550
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
551
8.72k
        } else if (info.shared_state) {
552
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
553
                DCHECK(false);
554
            }
555
            // For UnionSourceOperator without children, there is no shared state.
556
8.52k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
557
558
8.52k
            _dependency = _shared_state->create_source_dependency(
559
8.52k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
560
8.52k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
561
8.52k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
562
8.52k
        } else {
563
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
564
                DCHECK(false);
565
            }
566
193
        }
567
8.72k
    }
568
569
8.72k
    if (must_set_shared_state() && _shared_state == nullptr) {
570
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
571
0
    }
572
573
8.72k
    _rows_returned_counter =
574
8.72k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
575
8.72k
    _blocks_returned_counter =
576
8.72k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
577
8.72k
    _output_block_bytes_counter =
578
8.72k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
579
8.72k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
580
8.72k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
581
8.72k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
582
8.72k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
583
8.72k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
584
8.72k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
585
8.72k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
586
8.72k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
587
8.72k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
588
8.72k
    _memory_used_counter =
589
8.72k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
590
8.72k
    _common_profile->add_info_string("IsColocate",
591
8.72k
                                     std::to_string(_parent->is_colocated_operator()));
592
8.72k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
593
8.72k
    _common_profile->add_info_string("FollowedByShuffledOperator",
594
8.72k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
595
8.72k
    return Status::OK();
596
8.72k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
531
190k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
532
190k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
533
190k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
534
190k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
535
190k
    _operator_profile->set_metadata(_parent->node_id());
536
    // indent is false so that source operator will have same
537
    // indentation_level with its parent operator.
538
190k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
539
190k
    _operator_profile->add_child(_common_profile.get(), true);
540
190k
    _operator_profile->add_child(_custom_profile.get(), true);
541
190k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
542
190k
    if constexpr (!is_fake_shared) {
543
190k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
544
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
545
0
                                    .first.get()
546
0
                                    ->template cast<SharedStateArg>();
547
548
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
549
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
550
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
551
190k
        } else if (info.shared_state) {
552
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
553
                DCHECK(false);
554
            }
555
            // For UnionSourceOperator without children, there is no shared state.
556
188k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
557
558
188k
            _dependency = _shared_state->create_source_dependency(
559
188k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
560
188k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
561
188k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
562
188k
        } else {
563
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
564
                DCHECK(false);
565
            }
566
1.60k
        }
567
190k
    }
568
569
190k
    if (must_set_shared_state() && _shared_state == nullptr) {
570
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
571
0
    }
572
573
190k
    _rows_returned_counter =
574
190k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
575
190k
    _blocks_returned_counter =
576
190k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
577
190k
    _output_block_bytes_counter =
578
190k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
579
190k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
580
190k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
581
190k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
582
190k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
583
190k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
584
190k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
585
190k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
586
190k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
587
190k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
588
190k
    _memory_used_counter =
589
190k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
590
190k
    _common_profile->add_info_string("IsColocate",
591
190k
                                     std::to_string(_parent->is_colocated_operator()));
592
190k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
593
190k
    _common_profile->add_info_string("FollowedByShuffledOperator",
594
190k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
595
190k
    return Status::OK();
596
190k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
531
557
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
532
557
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
533
557
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
534
557
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
535
557
    _operator_profile->set_metadata(_parent->node_id());
536
    // indent is false so that source operator will have same
537
    // indentation_level with its parent operator.
538
557
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
539
557
    _operator_profile->add_child(_common_profile.get(), true);
540
557
    _operator_profile->add_child(_custom_profile.get(), true);
541
557
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
542
557
    if constexpr (!is_fake_shared) {
543
557
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
544
549
            _shared_state = info.shared_state_map.at(_parent->operator_id())
545
549
                                    .first.get()
546
549
                                    ->template cast<SharedStateArg>();
547
548
549
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
549
549
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
550
549
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
551
549
        } else if (info.shared_state) {
552
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
553
                DCHECK(false);
554
            }
555
            // For UnionSourceOperator without children, there is no shared state.
556
0
            _shared_state = info.shared_state->template cast<SharedStateArg>();
557
558
0
            _dependency = _shared_state->create_source_dependency(
559
0
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
560
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
561
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
562
8
        } else {
563
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
564
                DCHECK(false);
565
            }
566
8
        }
567
557
    }
568
569
557
    if (must_set_shared_state() && _shared_state == nullptr) {
570
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
571
0
    }
572
573
557
    _rows_returned_counter =
574
557
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
575
557
    _blocks_returned_counter =
576
557
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
577
557
    _output_block_bytes_counter =
578
557
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
579
557
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
580
557
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
581
557
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
582
557
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
583
557
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
584
557
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
585
557
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
586
557
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
587
557
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
588
557
    _memory_used_counter =
589
557
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
590
557
    _common_profile->add_info_string("IsColocate",
591
557
                                     std::to_string(_parent->is_colocated_operator()));
592
557
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
593
557
    _common_profile->add_info_string("FollowedByShuffledOperator",
594
557
                                     std::to_string(_parent->followed_by_shuffled_operator()));
595
557
    return Status::OK();
596
557
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
531
84
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
532
84
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
533
84
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
534
84
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
535
84
    _operator_profile->set_metadata(_parent->node_id());
536
    // indent is false so that source operator will have same
537
    // indentation_level with its parent operator.
538
84
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
539
84
    _operator_profile->add_child(_common_profile.get(), true);
540
84
    _operator_profile->add_child(_custom_profile.get(), true);
541
84
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
542
84
    if constexpr (!is_fake_shared) {
543
84
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
544
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
545
0
                                    .first.get()
546
0
                                    ->template cast<SharedStateArg>();
547
548
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
549
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
550
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
551
84
        } else if (info.shared_state) {
552
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
553
                DCHECK(false);
554
            }
555
            // For UnionSourceOperator without children, there is no shared state.
556
84
            _shared_state = info.shared_state->template cast<SharedStateArg>();
557
558
84
            _dependency = _shared_state->create_source_dependency(
559
84
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
560
84
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
561
84
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
562
84
        } else {
563
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
564
                DCHECK(false);
565
            }
566
0
        }
567
84
    }
568
569
84
    if (must_set_shared_state() && _shared_state == nullptr) {
570
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
571
0
    }
572
573
84
    _rows_returned_counter =
574
84
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
575
84
    _blocks_returned_counter =
576
84
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
577
84
    _output_block_bytes_counter =
578
84
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
579
84
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
580
84
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
581
84
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
582
84
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
583
84
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
584
84
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
585
84
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
586
84
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
587
84
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
588
84
    _memory_used_counter =
589
84
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
590
84
    _common_profile->add_info_string("IsColocate",
591
84
                                     std::to_string(_parent->is_colocated_operator()));
592
84
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
593
84
    _common_profile->add_info_string("FollowedByShuffledOperator",
594
84
                                     std::to_string(_parent->followed_by_shuffled_operator()));
595
84
    return Status::OK();
596
84
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
531
1.47M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
532
1.47M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
533
1.47M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
534
1.47M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
535
1.47M
    _operator_profile->set_metadata(_parent->node_id());
536
    // indent is false so that source operator will have same
537
    // indentation_level with its parent operator.
538
1.47M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
539
1.47M
    _operator_profile->add_child(_common_profile.get(), true);
540
1.47M
    _operator_profile->add_child(_custom_profile.get(), true);
541
1.47M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
542
    if constexpr (!is_fake_shared) {
543
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
544
            _shared_state = info.shared_state_map.at(_parent->operator_id())
545
                                    .first.get()
546
                                    ->template cast<SharedStateArg>();
547
548
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
549
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
550
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
551
        } else if (info.shared_state) {
552
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
553
                DCHECK(false);
554
            }
555
            // For UnionSourceOperator without children, there is no shared state.
556
            _shared_state = info.shared_state->template cast<SharedStateArg>();
557
558
            _dependency = _shared_state->create_source_dependency(
559
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
560
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
561
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
562
        } else {
563
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
564
                DCHECK(false);
565
            }
566
        }
567
    }
568
569
1.47M
    if (must_set_shared_state() && _shared_state == nullptr) {
570
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
571
0
    }
572
573
1.47M
    _rows_returned_counter =
574
1.47M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
575
1.47M
    _blocks_returned_counter =
576
1.47M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
577
1.47M
    _output_block_bytes_counter =
578
1.47M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
579
1.47M
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
580
1.47M
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
581
1.47M
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
582
1.47M
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
583
1.47M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
584
1.47M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
585
1.47M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
586
1.47M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
587
1.47M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
588
1.47M
    _memory_used_counter =
589
1.47M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
590
1.47M
    _common_profile->add_info_string("IsColocate",
591
1.47M
                                     std::to_string(_parent->is_colocated_operator()));
592
1.47M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
593
1.47M
    _common_profile->add_info_string("FollowedByShuffledOperator",
594
1.47M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
595
1.47M
    return Status::OK();
596
1.47M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
531
54.6k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
532
54.6k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
533
54.6k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
534
54.6k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
535
54.6k
    _operator_profile->set_metadata(_parent->node_id());
536
    // indent is false so that source operator will have same
537
    // indentation_level with its parent operator.
538
54.6k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
539
54.6k
    _operator_profile->add_child(_common_profile.get(), true);
540
54.6k
    _operator_profile->add_child(_custom_profile.get(), true);
541
54.6k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
542
54.6k
    if constexpr (!is_fake_shared) {
543
54.6k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
544
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
545
0
                                    .first.get()
546
0
                                    ->template cast<SharedStateArg>();
547
548
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
549
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
550
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
551
54.6k
        } else if (info.shared_state) {
552
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
553
                DCHECK(false);
554
            }
555
            // For UnionSourceOperator without children, there is no shared state.
556
2.85k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
557
558
2.85k
            _dependency = _shared_state->create_source_dependency(
559
2.85k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
560
2.85k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
561
2.85k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
562
51.7k
        } else {
563
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
564
                DCHECK(false);
565
            }
566
51.7k
        }
567
54.6k
    }
568
569
54.6k
    if (must_set_shared_state() && _shared_state == nullptr) {
570
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
571
0
    }
572
573
54.6k
    _rows_returned_counter =
574
54.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
575
54.6k
    _blocks_returned_counter =
576
54.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
577
54.6k
    _output_block_bytes_counter =
578
54.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
579
54.6k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
580
54.6k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
581
54.6k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
582
54.6k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
583
54.6k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
584
54.6k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
585
54.6k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
586
54.6k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
587
54.6k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
588
54.6k
    _memory_used_counter =
589
54.6k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
590
54.6k
    _common_profile->add_info_string("IsColocate",
591
54.6k
                                     std::to_string(_parent->is_colocated_operator()));
592
54.6k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
593
54.6k
    _common_profile->add_info_string("FollowedByShuffledOperator",
594
54.6k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
595
54.6k
    return Status::OK();
596
54.6k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
531
17
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
532
17
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
533
17
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
534
17
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
535
17
    _operator_profile->set_metadata(_parent->node_id());
536
    // indent is false so that source operator will have same
537
    // indentation_level with its parent operator.
538
17
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
539
17
    _operator_profile->add_child(_common_profile.get(), true);
540
17
    _operator_profile->add_child(_custom_profile.get(), true);
541
17
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
542
17
    if constexpr (!is_fake_shared) {
543
17
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
544
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
545
0
                                    .first.get()
546
0
                                    ->template cast<SharedStateArg>();
547
548
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
549
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
550
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
551
17
        } else if (info.shared_state) {
552
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
553
                DCHECK(false);
554
            }
555
            // For UnionSourceOperator without children, there is no shared state.
556
17
            _shared_state = info.shared_state->template cast<SharedStateArg>();
557
558
17
            _dependency = _shared_state->create_source_dependency(
559
17
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
560
17
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
561
17
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
562
17
        } else {
563
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
564
                DCHECK(false);
565
            }
566
0
        }
567
17
    }
568
569
17
    if (must_set_shared_state() && _shared_state == nullptr) {
570
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
571
0
    }
572
573
17
    _rows_returned_counter =
574
17
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
575
17
    _blocks_returned_counter =
576
17
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
577
17
    _output_block_bytes_counter =
578
17
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
579
17
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
580
17
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
581
17
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
582
17
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
583
17
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
584
17
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
585
17
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
586
17
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
587
17
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
588
17
    _memory_used_counter =
589
17
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
590
17
    _common_profile->add_info_string("IsColocate",
591
17
                                     std::to_string(_parent->is_colocated_operator()));
592
17
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
593
17
    _common_profile->add_info_string("FollowedByShuffledOperator",
594
17
                                     std::to_string(_parent->followed_by_shuffled_operator()));
595
17
    return Status::OK();
596
17
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
531
41.6k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
532
41.6k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
533
41.6k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
534
41.6k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
535
41.6k
    _operator_profile->set_metadata(_parent->node_id());
536
    // indent is false so that source operator will have same
537
    // indentation_level with its parent operator.
538
41.6k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
539
41.6k
    _operator_profile->add_child(_common_profile.get(), true);
540
41.6k
    _operator_profile->add_child(_custom_profile.get(), true);
541
41.6k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
542
41.6k
    if constexpr (!is_fake_shared) {
543
41.6k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
544
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
545
0
                                    .first.get()
546
0
                                    ->template cast<SharedStateArg>();
547
548
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
549
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
550
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
551
41.6k
        } else if (info.shared_state) {
552
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
553
                DCHECK(false);
554
            }
555
            // For UnionSourceOperator without children, there is no shared state.
556
41.5k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
557
558
41.5k
            _dependency = _shared_state->create_source_dependency(
559
41.5k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
560
41.5k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
561
41.5k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
562
41.5k
        } else {
563
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
564
                DCHECK(false);
565
            }
566
70
        }
567
41.6k
    }
568
569
41.6k
    if (must_set_shared_state() && _shared_state == nullptr) {
570
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
571
0
    }
572
573
41.6k
    _rows_returned_counter =
574
41.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
575
41.6k
    _blocks_returned_counter =
576
41.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
577
41.6k
    _output_block_bytes_counter =
578
41.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
579
41.6k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
580
41.6k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
581
41.6k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
582
41.6k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
583
41.6k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
584
41.6k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
585
41.6k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
586
41.6k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
587
41.6k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
588
41.6k
    _memory_used_counter =
589
41.6k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
590
41.6k
    _common_profile->add_info_string("IsColocate",
591
41.6k
                                     std::to_string(_parent->is_colocated_operator()));
592
41.6k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
593
41.6k
    _common_profile->add_info_string("FollowedByShuffledOperator",
594
41.6k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
595
41.6k
    return Status::OK();
596
41.6k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
531
317
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
532
317
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
533
317
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
534
317
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
535
317
    _operator_profile->set_metadata(_parent->node_id());
536
    // indent is false so that source operator will have same
537
    // indentation_level with its parent operator.
538
317
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
539
317
    _operator_profile->add_child(_common_profile.get(), true);
540
317
    _operator_profile->add_child(_custom_profile.get(), true);
541
317
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
542
317
    if constexpr (!is_fake_shared) {
543
317
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
544
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
545
0
                                    .first.get()
546
0
                                    ->template cast<SharedStateArg>();
547
548
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
549
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
550
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
551
317
        } else if (info.shared_state) {
552
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
553
                DCHECK(false);
554
            }
555
            // For UnionSourceOperator without children, there is no shared state.
556
304
            _shared_state = info.shared_state->template cast<SharedStateArg>();
557
558
304
            _dependency = _shared_state->create_source_dependency(
559
304
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
560
304
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
561
304
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
562
304
        } else {
563
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
564
                DCHECK(false);
565
            }
566
13
        }
567
317
    }
568
569
317
    if (must_set_shared_state() && _shared_state == nullptr) {
570
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
571
0
    }
572
573
317
    _rows_returned_counter =
574
317
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
575
317
    _blocks_returned_counter =
576
317
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
577
317
    _output_block_bytes_counter =
578
317
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
579
317
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
580
317
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
581
317
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
582
317
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
583
317
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
584
317
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
585
317
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
586
317
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
587
317
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
588
317
    _memory_used_counter =
589
317
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
590
317
    _common_profile->add_info_string("IsColocate",
591
317
                                     std::to_string(_parent->is_colocated_operator()));
592
317
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
593
317
    _common_profile->add_info_string("FollowedByShuffledOperator",
594
317
                                     std::to_string(_parent->followed_by_shuffled_operator()));
595
317
    return Status::OK();
596
317
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
531
4.95k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
532
4.95k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
533
4.95k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
534
4.95k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
535
4.95k
    _operator_profile->set_metadata(_parent->node_id());
536
    // indent is false so that source operator will have same
537
    // indentation_level with its parent operator.
538
4.95k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
539
4.95k
    _operator_profile->add_child(_common_profile.get(), true);
540
4.95k
    _operator_profile->add_child(_custom_profile.get(), true);
541
4.95k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
542
4.95k
    if constexpr (!is_fake_shared) {
543
4.95k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
544
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
545
0
                                    .first.get()
546
0
                                    ->template cast<SharedStateArg>();
547
548
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
549
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
550
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
551
4.95k
        } else if (info.shared_state) {
552
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
553
                DCHECK(false);
554
            }
555
            // For UnionSourceOperator without children, there is no shared state.
556
4.49k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
557
558
4.49k
            _dependency = _shared_state->create_source_dependency(
559
4.49k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
560
4.49k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
561
4.49k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
562
4.49k
        } else {
563
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
564
                DCHECK(false);
565
            }
566
455
        }
567
4.95k
    }
568
569
4.95k
    if (must_set_shared_state() && _shared_state == nullptr) {
570
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
571
0
    }
572
573
4.95k
    _rows_returned_counter =
574
4.95k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
575
4.95k
    _blocks_returned_counter =
576
4.95k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
577
4.95k
    _output_block_bytes_counter =
578
4.95k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
579
4.95k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
580
4.95k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
581
4.95k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
582
4.95k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
583
4.95k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
584
4.95k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
585
4.95k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
586
4.95k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
587
4.95k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
588
4.95k
    _memory_used_counter =
589
4.95k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
590
4.95k
    _common_profile->add_info_string("IsColocate",
591
4.95k
                                     std::to_string(_parent->is_colocated_operator()));
592
4.95k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
593
4.95k
    _common_profile->add_info_string("FollowedByShuffledOperator",
594
4.95k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
595
4.95k
    return Status::OK();
596
4.95k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
531
773k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
532
773k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
533
773k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
534
773k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
535
773k
    _operator_profile->set_metadata(_parent->node_id());
536
    // indent is false so that source operator will have same
537
    // indentation_level with its parent operator.
538
773k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
539
773k
    _operator_profile->add_child(_common_profile.get(), true);
540
773k
    _operator_profile->add_child(_custom_profile.get(), true);
541
773k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
542
773k
    if constexpr (!is_fake_shared) {
543
773k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
544
761k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
545
761k
                                    .first.get()
546
761k
                                    ->template cast<SharedStateArg>();
547
548
761k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
549
761k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
550
761k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
551
761k
        } else if (info.shared_state) {
552
0
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
553
0
                DCHECK(false);
554
0
            }
555
            // For UnionSourceOperator without children, there is no shared state.
556
0
            _shared_state = info.shared_state->template cast<SharedStateArg>();
557
558
0
            _dependency = _shared_state->create_source_dependency(
559
0
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
560
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
561
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
562
12.1k
        } else {
563
12.1k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
564
12.1k
                DCHECK(false);
565
12.1k
            }
566
12.1k
        }
567
773k
    }
568
569
773k
    if (must_set_shared_state() && _shared_state == nullptr) {
570
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
571
0
    }
572
573
773k
    _rows_returned_counter =
574
773k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
575
773k
    _blocks_returned_counter =
576
773k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
577
773k
    _output_block_bytes_counter =
578
773k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
579
773k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
580
773k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
581
773k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
582
773k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
583
773k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
584
773k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
585
773k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
586
773k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
587
773k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
588
773k
    _memory_used_counter =
589
773k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
590
773k
    _common_profile->add_info_string("IsColocate",
591
773k
                                     std::to_string(_parent->is_colocated_operator()));
592
773k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
593
773k
    _common_profile->add_info_string("FollowedByShuffledOperator",
594
773k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
595
773k
    return Status::OK();
596
773k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
531
151
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
532
151
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
533
151
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
534
151
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
535
151
    _operator_profile->set_metadata(_parent->node_id());
536
    // indent is false so that source operator will have same
537
    // indentation_level with its parent operator.
538
151
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
539
151
    _operator_profile->add_child(_common_profile.get(), true);
540
151
    _operator_profile->add_child(_custom_profile.get(), true);
541
151
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
542
151
    if constexpr (!is_fake_shared) {
543
151
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
544
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
545
0
                                    .first.get()
546
0
                                    ->template cast<SharedStateArg>();
547
548
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
549
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
550
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
551
151
        } else if (info.shared_state) {
552
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
553
                DCHECK(false);
554
            }
555
            // For UnionSourceOperator without children, there is no shared state.
556
151
            _shared_state = info.shared_state->template cast<SharedStateArg>();
557
558
151
            _dependency = _shared_state->create_source_dependency(
559
151
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
560
151
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
561
151
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
562
151
        } else {
563
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
564
                DCHECK(false);
565
            }
566
0
        }
567
151
    }
568
569
151
    if (must_set_shared_state() && _shared_state == nullptr) {
570
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
571
0
    }
572
573
151
    _rows_returned_counter =
574
151
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
575
151
    _blocks_returned_counter =
576
151
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
577
151
    _output_block_bytes_counter =
578
151
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
579
151
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
580
151
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
581
151
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
582
151
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
583
151
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
584
151
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
585
151
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
586
151
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
587
151
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
588
151
    _memory_used_counter =
589
151
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
590
151
    _common_profile->add_info_string("IsColocate",
591
151
                                     std::to_string(_parent->is_colocated_operator()));
592
151
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
593
151
    _common_profile->add_info_string("FollowedByShuffledOperator",
594
151
                                     std::to_string(_parent->followed_by_shuffled_operator()));
595
151
    return Status::OK();
596
151
}
597
598
template <typename SharedStateArg>
599
2.92M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
600
2.92M
    _conjuncts.resize(_parent->_conjuncts.size());
601
2.92M
    _projections.resize(_parent->_projections.size());
602
3.42M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
603
499k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
604
499k
    }
605
5.78M
    for (size_t i = 0; i < _projections.size(); i++) {
606
2.86M
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
607
2.86M
    }
608
2.92M
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
609
2.94M
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
610
21.7k
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
611
137k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
612
116k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
613
116k
                    state, _intermediate_projections[i][j]));
614
116k
        }
615
21.7k
    }
616
2.92M
    return Status::OK();
617
2.92M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
599
66.6k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
600
66.6k
    _conjuncts.resize(_parent->_conjuncts.size());
601
66.6k
    _projections.resize(_parent->_projections.size());
602
67.6k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
603
1.00k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
604
1.00k
    }
605
337k
    for (size_t i = 0; i < _projections.size(); i++) {
606
270k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
607
270k
    }
608
66.6k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
609
67.9k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
610
1.24k
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
611
14.2k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
612
12.9k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
613
12.9k
                    state, _intermediate_projections[i][j]));
614
12.9k
        }
615
1.24k
    }
616
66.6k
    return Status::OK();
617
66.6k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
599
3
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
600
3
    _conjuncts.resize(_parent->_conjuncts.size());
601
3
    _projections.resize(_parent->_projections.size());
602
3
    for (size_t i = 0; i < _conjuncts.size(); i++) {
603
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
604
0
    }
605
3
    for (size_t i = 0; i < _projections.size(); i++) {
606
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
607
0
    }
608
3
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
609
3
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
610
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
611
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
612
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
613
0
                    state, _intermediate_projections[i][j]));
614
0
        }
615
0
    }
616
3
    return Status::OK();
617
3
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
599
266k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
600
266k
    _conjuncts.resize(_parent->_conjuncts.size());
601
266k
    _projections.resize(_parent->_projections.size());
602
266k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
603
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
604
0
    }
605
266k
    for (size_t i = 0; i < _projections.size(); i++) {
606
355
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
607
355
    }
608
266k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
609
266k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
610
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
611
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
612
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
613
0
                    state, _intermediate_projections[i][j]));
614
0
        }
615
0
    }
616
266k
    return Status::OK();
617
266k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
599
22
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
600
22
    _conjuncts.resize(_parent->_conjuncts.size());
601
22
    _projections.resize(_parent->_projections.size());
602
22
    for (size_t i = 0; i < _conjuncts.size(); i++) {
603
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
604
0
    }
605
22
    for (size_t i = 0; i < _projections.size(); i++) {
606
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
607
0
    }
608
22
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
609
22
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
610
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
611
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
612
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
613
0
                    state, _intermediate_projections[i][j]));
614
0
        }
615
0
    }
616
22
    return Status::OK();
617
22
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
599
31.3k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
600
31.3k
    _conjuncts.resize(_parent->_conjuncts.size());
601
31.3k
    _projections.resize(_parent->_projections.size());
602
31.4k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
603
69
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
604
69
    }
605
258k
    for (size_t i = 0; i < _projections.size(); i++) {
606
227k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
607
227k
    }
608
31.3k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
609
31.5k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
610
140
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
611
876
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
612
736
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
613
736
                    state, _intermediate_projections[i][j]));
614
736
        }
615
140
    }
616
31.3k
    return Status::OK();
617
31.3k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
599
8.74k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
600
8.74k
    _conjuncts.resize(_parent->_conjuncts.size());
601
8.74k
    _projections.resize(_parent->_projections.size());
602
9.36k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
603
622
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
604
622
    }
605
22.5k
    for (size_t i = 0; i < _projections.size(); i++) {
606
13.7k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
607
13.7k
    }
608
8.74k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
609
8.83k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
610
90
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
611
685
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
612
595
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
613
595
                    state, _intermediate_projections[i][j]));
614
595
        }
615
90
    }
616
8.74k
    return Status::OK();
617
8.74k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
599
190k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
600
190k
    _conjuncts.resize(_parent->_conjuncts.size());
601
190k
    _projections.resize(_parent->_projections.size());
602
194k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
603
4.06k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
604
4.06k
    }
605
466k
    for (size_t i = 0; i < _projections.size(); i++) {
606
276k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
607
276k
    }
608
190k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
609
190k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
610
253
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
611
1.82k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
612
1.57k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
613
1.57k
                    state, _intermediate_projections[i][j]));
614
1.57k
        }
615
253
    }
616
190k
    return Status::OK();
617
190k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
599
559
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
600
559
    _conjuncts.resize(_parent->_conjuncts.size());
601
559
    _projections.resize(_parent->_projections.size());
602
573
    for (size_t i = 0; i < _conjuncts.size(); i++) {
603
14
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
604
14
    }
605
1.99k
    for (size_t i = 0; i < _projections.size(); i++) {
606
1.43k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
607
1.43k
    }
608
559
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
609
559
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
610
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
611
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
612
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
613
0
                    state, _intermediate_projections[i][j]));
614
0
        }
615
0
    }
616
559
    return Status::OK();
617
559
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
599
88
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
600
88
    _conjuncts.resize(_parent->_conjuncts.size());
601
88
    _projections.resize(_parent->_projections.size());
602
88
    for (size_t i = 0; i < _conjuncts.size(); i++) {
603
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
604
0
    }
605
180
    for (size_t i = 0; i < _projections.size(); i++) {
606
92
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
607
92
    }
608
88
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
609
88
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
610
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
611
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
612
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
613
0
                    state, _intermediate_projections[i][j]));
614
0
        }
615
0
    }
616
88
    return Status::OK();
617
88
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
599
1.48M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
600
1.48M
    _conjuncts.resize(_parent->_conjuncts.size());
601
1.48M
    _projections.resize(_parent->_projections.size());
602
1.96M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
603
479k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
604
479k
    }
605
3.46M
    for (size_t i = 0; i < _projections.size(); i++) {
606
1.98M
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
607
1.98M
    }
608
1.48M
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
609
1.50M
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
610
20.0k
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
611
120k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
612
100k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
613
100k
                    state, _intermediate_projections[i][j]));
614
100k
        }
615
20.0k
    }
616
1.48M
    return Status::OK();
617
1.48M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
599
54.8k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
600
54.8k
    _conjuncts.resize(_parent->_conjuncts.size());
601
54.8k
    _projections.resize(_parent->_projections.size());
602
54.8k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
603
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
604
0
    }
605
147k
    for (size_t i = 0; i < _projections.size(); i++) {
606
92.9k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
607
92.9k
    }
608
54.8k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
609
54.8k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
610
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
611
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
612
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
613
0
                    state, _intermediate_projections[i][j]));
614
0
        }
615
0
    }
616
54.8k
    return Status::OK();
617
54.8k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
599
17
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
600
17
    _conjuncts.resize(_parent->_conjuncts.size());
601
17
    _projections.resize(_parent->_projections.size());
602
17
    for (size_t i = 0; i < _conjuncts.size(); i++) {
603
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
604
0
    }
605
17
    for (size_t i = 0; i < _projections.size(); i++) {
606
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
607
0
    }
608
17
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
609
17
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
610
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
611
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
612
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
613
0
                    state, _intermediate_projections[i][j]));
614
0
        }
615
0
    }
616
17
    return Status::OK();
617
17
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
599
41.6k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
600
41.6k
    _conjuncts.resize(_parent->_conjuncts.size());
601
41.6k
    _projections.resize(_parent->_projections.size());
602
56.4k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
603
14.8k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
604
14.8k
    }
605
41.6k
    for (size_t i = 0; i < _projections.size(); i++) {
606
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
607
0
    }
608
41.6k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
609
41.6k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
610
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
611
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
612
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
613
0
                    state, _intermediate_projections[i][j]));
614
0
        }
615
0
    }
616
41.6k
    return Status::OK();
617
41.6k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
599
318
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
600
318
    _conjuncts.resize(_parent->_conjuncts.size());
601
318
    _projections.resize(_parent->_projections.size());
602
318
    for (size_t i = 0; i < _conjuncts.size(); i++) {
603
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
604
0
    }
605
318
    for (size_t i = 0; i < _projections.size(); i++) {
606
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
607
0
    }
608
318
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
609
318
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
610
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
611
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
612
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
613
0
                    state, _intermediate_projections[i][j]));
614
0
        }
615
0
    }
616
318
    return Status::OK();
617
318
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
599
5.05k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
600
5.05k
    _conjuncts.resize(_parent->_conjuncts.size());
601
5.05k
    _projections.resize(_parent->_projections.size());
602
5.05k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
603
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
604
0
    }
605
5.05k
    for (size_t i = 0; i < _projections.size(); i++) {
606
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
607
0
    }
608
5.05k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
609
5.05k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
610
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
611
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
612
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
613
0
                    state, _intermediate_projections[i][j]));
614
0
        }
615
0
    }
616
5.05k
    return Status::OK();
617
5.05k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
599
775k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
600
775k
    _conjuncts.resize(_parent->_conjuncts.size());
601
775k
    _projections.resize(_parent->_projections.size());
602
775k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
603
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
604
0
    }
605
775k
    for (size_t i = 0; i < _projections.size(); i++) {
606
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
607
0
    }
608
775k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
609
775k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
610
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
611
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
612
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
613
0
                    state, _intermediate_projections[i][j]));
614
0
        }
615
0
    }
616
775k
    return Status::OK();
617
775k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4openEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
599
151
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
600
151
    _conjuncts.resize(_parent->_conjuncts.size());
601
151
    _projections.resize(_parent->_projections.size());
602
158
    for (size_t i = 0; i < _conjuncts.size(); i++) {
603
7
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
604
7
    }
605
447
    for (size_t i = 0; i < _projections.size(); i++) {
606
296
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
607
296
    }
608
151
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
609
152
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
610
1
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
611
3
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
612
2
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
613
2
                    state, _intermediate_projections[i][j]));
614
2
        }
615
1
    }
616
151
    return Status::OK();
617
151
}
618
619
template <typename SharedStateArg>
620
12.8k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
621
12.8k
    if (_terminated) {
622
2
        return Status::OK();
623
2
    }
624
12.8k
    _terminated = true;
625
12.8k
    return Status::OK();
626
12.8k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
620
1.11k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
621
1.11k
    if (_terminated) {
622
0
        return Status::OK();
623
0
    }
624
1.11k
    _terminated = true;
625
1.11k
    return Status::OK();
626
1.11k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
620
282
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
621
282
    if (_terminated) {
622
0
        return Status::OK();
623
0
    }
624
282
    _terminated = true;
625
282
    return Status::OK();
626
282
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
620
329
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
621
329
    if (_terminated) {
622
0
        return Status::OK();
623
0
    }
624
329
    _terminated = true;
625
329
    return Status::OK();
626
329
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
620
183
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
621
183
    if (_terminated) {
622
0
        return Status::OK();
623
0
    }
624
183
    _terminated = true;
625
183
    return Status::OK();
626
183
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
620
9.70k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
621
9.70k
    if (_terminated) {
622
1
        return Status::OK();
623
1
    }
624
9.70k
    _terminated = true;
625
9.70k
    return Status::OK();
626
9.70k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
620
8
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
621
8
    if (_terminated) {
622
0
        return Status::OK();
623
0
    }
624
8
    _terminated = true;
625
8
    return Status::OK();
626
8
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
620
7
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
621
7
    if (_terminated) {
622
0
        return Status::OK();
623
0
    }
624
7
    _terminated = true;
625
7
    return Status::OK();
626
7
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
620
185
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
621
185
    if (_terminated) {
622
0
        return Status::OK();
623
0
    }
624
185
    _terminated = true;
625
185
    return Status::OK();
626
185
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
620
1.05k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
621
1.05k
    if (_terminated) {
622
1
        return Status::OK();
623
1
    }
624
1.05k
    _terminated = true;
625
1.05k
    return Status::OK();
626
1.05k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
620
19
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
621
19
    if (_terminated) {
622
0
        return Status::OK();
623
0
    }
624
19
    _terminated = true;
625
19
    return Status::OK();
626
19
}
627
628
template <typename SharedStateArg>
629
3.23M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
630
3.23M
    if (_closed) {
631
309k
        return Status::OK();
632
309k
    }
633
2.92M
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
634
1.44M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
635
1.44M
    }
636
2.92M
    _closed = true;
637
2.92M
    return Status::OK();
638
3.23M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
629
66.6k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
630
66.6k
    if (_closed) {
631
0
        return Status::OK();
632
0
    }
633
66.6k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
634
66.6k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
635
66.6k
    }
636
66.6k
    _closed = true;
637
66.6k
    return Status::OK();
638
66.6k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
629
3
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
630
3
    if (_closed) {
631
0
        return Status::OK();
632
0
    }
633
3
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
634
3
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
635
3
    }
636
3
    _closed = true;
637
3
    return Status::OK();
638
3
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
629
529k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
630
529k
    if (_closed) {
631
264k
        return Status::OK();
632
264k
    }
633
264k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
634
264k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
635
264k
    }
636
264k
    _closed = true;
637
264k
    return Status::OK();
638
529k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
629
22
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
630
22
    if (_closed) {
631
0
        return Status::OK();
632
0
    }
633
22
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
634
22
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
635
22
    }
636
22
    _closed = true;
637
22
    return Status::OK();
638
22
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
629
31.3k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
630
31.3k
    if (_closed) {
631
0
        return Status::OK();
632
0
    }
633
31.3k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
634
31.3k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
635
31.3k
    }
636
31.3k
    _closed = true;
637
31.3k
    return Status::OK();
638
31.3k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
629
17.5k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
630
17.5k
    if (_closed) {
631
8.86k
        return Status::OK();
632
8.86k
    }
633
8.72k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
634
8.72k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
635
8.72k
    }
636
8.72k
    _closed = true;
637
8.72k
    return Status::OK();
638
17.5k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
629
190k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
630
190k
    if (_closed) {
631
0
        return Status::OK();
632
0
    }
633
190k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
634
190k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
635
190k
    }
636
190k
    _closed = true;
637
190k
    return Status::OK();
638
190k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
629
560
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
630
560
    if (_closed) {
631
0
        return Status::OK();
632
0
    }
633
560
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
634
560
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
635
560
    }
636
560
    _closed = true;
637
560
    return Status::OK();
638
560
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
629
83
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
630
83
    if (_closed) {
631
0
        return Status::OK();
632
0
    }
633
83
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
634
83
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
635
83
    }
636
83
    _closed = true;
637
83
    return Status::OK();
638
83
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
629
1.51M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
630
1.51M
    if (_closed) {
631
30.4k
        return Status::OK();
632
30.4k
    }
633
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
634
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
635
    }
636
1.48M
    _closed = true;
637
1.48M
    return Status::OK();
638
1.51M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
629
54.9k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
630
54.9k
    if (_closed) {
631
0
        return Status::OK();
632
0
    }
633
54.9k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
634
54.9k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
635
54.9k
    }
636
54.9k
    _closed = true;
637
54.9k
    return Status::OK();
638
54.9k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
629
28
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
630
28
    if (_closed) {
631
14
        return Status::OK();
632
14
    }
633
14
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
634
14
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
635
14
    }
636
14
    _closed = true;
637
14
    return Status::OK();
638
28
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
629
41.3k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
630
41.3k
    if (_closed) {
631
0
        return Status::OK();
632
0
    }
633
41.3k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
634
41.3k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
635
41.3k
    }
636
41.3k
    _closed = true;
637
41.3k
    return Status::OK();
638
41.3k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
629
432
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
630
432
    if (_closed) {
631
216
        return Status::OK();
632
216
    }
633
216
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
634
216
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
635
216
    }
636
216
    _closed = true;
637
216
    return Status::OK();
638
432
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
629
10.3k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
630
10.3k
    if (_closed) {
631
5.26k
        return Status::OK();
632
5.26k
    }
633
5.04k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
634
5.04k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
635
5.04k
    }
636
5.04k
    _closed = true;
637
5.04k
    return Status::OK();
638
10.3k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
629
777k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
630
777k
    if (_closed) {
631
0
        return Status::OK();
632
0
    }
633
777k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
634
777k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
635
777k
    }
636
777k
    _closed = true;
637
777k
    return Status::OK();
638
777k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
629
304
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
630
304
    if (_closed) {
631
162
        return Status::OK();
632
162
    }
633
142
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
634
142
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
635
142
    }
636
142
    _closed = true;
637
142
    return Status::OK();
638
304
}
639
640
template <typename SharedState>
641
2.27M
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
642
    // create profile
643
2.27M
    _operator_profile =
644
2.27M
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
645
2.27M
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
646
2.27M
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
647
648
    // indentation is true
649
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
650
    // So we should set the indentation to true.
651
2.27M
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
652
2.27M
    _operator_profile->add_child(_common_profile, true);
653
2.27M
    _operator_profile->add_child(_custom_profile, true);
654
655
2.27M
    _operator_profile->set_metadata(_parent->node_id());
656
2.27M
    _wait_for_finish_dependency_timer =
657
2.27M
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
658
2.27M
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
659
2.27M
    if constexpr (!is_fake_shared) {
660
1.46M
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
661
1.46M
            info.shared_state_map.end()) {
662
283k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
663
263k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
664
263k
            }
665
283k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
666
283k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
667
283k
                                                  ? 0
668
283k
                                                  : info.task_idx]
669
283k
                                  .get();
670
283k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
671
1.17M
        } else {
672
1.17M
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
787
                DCHECK(false);
674
787
            }
675
1.17M
            _shared_state = info.shared_state->template cast<SharedState>();
676
1.17M
            _dependency = _shared_state->create_sink_dependency(
677
1.17M
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
678
1.17M
        }
679
1.46M
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
680
1.46M
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
681
1.46M
    }
682
683
2.27M
    if (must_set_shared_state() && _shared_state == nullptr) {
684
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
685
0
    }
686
687
2.27M
    _rows_input_counter =
688
2.27M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
689
2.27M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
690
2.27M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
691
2.27M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
692
2.27M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
693
2.27M
    _memory_used_counter =
694
2.27M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
695
2.27M
    _common_profile->add_info_string("IsColocate",
696
2.27M
                                     std::to_string(_parent->is_colocated_operator()));
697
2.27M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
698
2.27M
    _common_profile->add_info_string("FollowedByShuffledOperator",
699
2.27M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
700
2.27M
    return Status::OK();
701
2.27M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
641
114k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
642
    // create profile
643
114k
    _operator_profile =
644
114k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
645
114k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
646
114k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
647
648
    // indentation is true
649
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
650
    // So we should set the indentation to true.
651
114k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
652
114k
    _operator_profile->add_child(_common_profile, true);
653
114k
    _operator_profile->add_child(_custom_profile, true);
654
655
114k
    _operator_profile->set_metadata(_parent->node_id());
656
114k
    _wait_for_finish_dependency_timer =
657
114k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
658
114k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
659
114k
    if constexpr (!is_fake_shared) {
660
114k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
661
114k
            info.shared_state_map.end()) {
662
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
663
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
664
            }
665
18.6k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
666
18.6k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
667
18.6k
                                                  ? 0
668
18.6k
                                                  : info.task_idx]
669
18.6k
                                  .get();
670
18.6k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
671
95.9k
        } else {
672
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
                DCHECK(false);
674
            }
675
95.9k
            _shared_state = info.shared_state->template cast<SharedState>();
676
95.9k
            _dependency = _shared_state->create_sink_dependency(
677
95.9k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
678
95.9k
        }
679
114k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
680
114k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
681
114k
    }
682
683
114k
    if (must_set_shared_state() && _shared_state == nullptr) {
684
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
685
0
    }
686
687
114k
    _rows_input_counter =
688
114k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
689
114k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
690
114k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
691
114k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
692
114k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
693
114k
    _memory_used_counter =
694
114k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
695
114k
    _common_profile->add_info_string("IsColocate",
696
114k
                                     std::to_string(_parent->is_colocated_operator()));
697
114k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
698
114k
    _common_profile->add_info_string("FollowedByShuffledOperator",
699
114k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
700
114k
    return Status::OK();
701
114k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
641
2
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
642
    // create profile
643
2
    _operator_profile =
644
2
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
645
2
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
646
2
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
647
648
    // indentation is true
649
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
650
    // So we should set the indentation to true.
651
2
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
652
2
    _operator_profile->add_child(_common_profile, true);
653
2
    _operator_profile->add_child(_custom_profile, true);
654
655
2
    _operator_profile->set_metadata(_parent->node_id());
656
2
    _wait_for_finish_dependency_timer =
657
2
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
658
2
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
659
2
    if constexpr (!is_fake_shared) {
660
2
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
661
2
            info.shared_state_map.end()) {
662
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
663
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
664
            }
665
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
666
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
667
0
                                                  ? 0
668
0
                                                  : info.task_idx]
669
0
                                  .get();
670
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
671
2
        } else {
672
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
                DCHECK(false);
674
            }
675
2
            _shared_state = info.shared_state->template cast<SharedState>();
676
2
            _dependency = _shared_state->create_sink_dependency(
677
2
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
678
2
        }
679
2
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
680
2
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
681
2
    }
682
683
2
    if (must_set_shared_state() && _shared_state == nullptr) {
684
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
685
0
    }
686
687
2
    _rows_input_counter =
688
2
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
689
2
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
690
2
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
691
2
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
692
2
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
693
2
    _memory_used_counter =
694
2
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
695
2
    _common_profile->add_info_string("IsColocate",
696
2
                                     std::to_string(_parent->is_colocated_operator()));
697
2
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
698
2
    _common_profile->add_info_string("FollowedByShuffledOperator",
699
2
                                     std::to_string(_parent->followed_by_shuffled_operator()));
700
2
    return Status::OK();
701
2
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
641
264k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
642
    // create profile
643
264k
    _operator_profile =
644
264k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
645
264k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
646
264k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
647
648
    // indentation is true
649
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
650
    // So we should set the indentation to true.
651
264k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
652
264k
    _operator_profile->add_child(_common_profile, true);
653
264k
    _operator_profile->add_child(_custom_profile, true);
654
655
264k
    _operator_profile->set_metadata(_parent->node_id());
656
264k
    _wait_for_finish_dependency_timer =
657
264k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
658
264k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
659
264k
    if constexpr (!is_fake_shared) {
660
264k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
661
264k
            info.shared_state_map.end()) {
662
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
663
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
664
            }
665
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
666
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
667
0
                                                  ? 0
668
0
                                                  : info.task_idx]
669
0
                                  .get();
670
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
671
264k
        } else {
672
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
                DCHECK(false);
674
            }
675
264k
            _shared_state = info.shared_state->template cast<SharedState>();
676
264k
            _dependency = _shared_state->create_sink_dependency(
677
264k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
678
264k
        }
679
264k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
680
264k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
681
264k
    }
682
683
264k
    if (must_set_shared_state() && _shared_state == nullptr) {
684
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
685
0
    }
686
687
264k
    _rows_input_counter =
688
264k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
689
264k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
690
264k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
691
264k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
692
264k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
693
264k
    _memory_used_counter =
694
264k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
695
264k
    _common_profile->add_info_string("IsColocate",
696
264k
                                     std::to_string(_parent->is_colocated_operator()));
697
264k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
698
264k
    _common_profile->add_info_string("FollowedByShuffledOperator",
699
264k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
700
264k
    return Status::OK();
701
264k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
641
28
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
642
    // create profile
643
28
    _operator_profile =
644
28
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
645
28
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
646
28
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
647
648
    // indentation is true
649
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
650
    // So we should set the indentation to true.
651
28
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
652
28
    _operator_profile->add_child(_common_profile, true);
653
28
    _operator_profile->add_child(_custom_profile, true);
654
655
28
    _operator_profile->set_metadata(_parent->node_id());
656
28
    _wait_for_finish_dependency_timer =
657
28
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
658
28
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
659
28
    if constexpr (!is_fake_shared) {
660
28
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
661
28
            info.shared_state_map.end()) {
662
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
663
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
664
            }
665
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
666
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
667
0
                                                  ? 0
668
0
                                                  : info.task_idx]
669
0
                                  .get();
670
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
671
28
        } else {
672
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
                DCHECK(false);
674
            }
675
28
            _shared_state = info.shared_state->template cast<SharedState>();
676
28
            _dependency = _shared_state->create_sink_dependency(
677
28
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
678
28
        }
679
28
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
680
28
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
681
28
    }
682
683
28
    if (must_set_shared_state() && _shared_state == nullptr) {
684
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
685
0
    }
686
687
28
    _rows_input_counter =
688
28
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
689
28
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
690
28
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
691
28
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
692
28
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
693
28
    _memory_used_counter =
694
28
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
695
28
    _common_profile->add_info_string("IsColocate",
696
28
                                     std::to_string(_parent->is_colocated_operator()));
697
28
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
698
28
    _common_profile->add_info_string("FollowedByShuffledOperator",
699
28
                                     std::to_string(_parent->followed_by_shuffled_operator()));
700
28
    return Status::OK();
701
28
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
641
31.2k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
642
    // create profile
643
31.2k
    _operator_profile =
644
31.2k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
645
31.2k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
646
31.2k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
647
648
    // indentation is true
649
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
650
    // So we should set the indentation to true.
651
31.2k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
652
31.2k
    _operator_profile->add_child(_common_profile, true);
653
31.2k
    _operator_profile->add_child(_custom_profile, true);
654
655
31.2k
    _operator_profile->set_metadata(_parent->node_id());
656
31.2k
    _wait_for_finish_dependency_timer =
657
31.2k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
658
31.2k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
659
31.2k
    if constexpr (!is_fake_shared) {
660
31.2k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
661
31.2k
            info.shared_state_map.end()) {
662
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
663
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
664
            }
665
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
666
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
667
0
                                                  ? 0
668
0
                                                  : info.task_idx]
669
0
                                  .get();
670
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
671
31.2k
        } else {
672
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
                DCHECK(false);
674
            }
675
31.2k
            _shared_state = info.shared_state->template cast<SharedState>();
676
31.2k
            _dependency = _shared_state->create_sink_dependency(
677
31.2k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
678
31.2k
        }
679
31.2k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
680
31.2k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
681
31.2k
    }
682
683
31.2k
    if (must_set_shared_state() && _shared_state == nullptr) {
684
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
685
0
    }
686
687
31.2k
    _rows_input_counter =
688
31.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
689
31.2k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
690
31.2k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
691
31.2k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
692
31.2k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
693
31.2k
    _memory_used_counter =
694
31.2k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
695
31.2k
    _common_profile->add_info_string("IsColocate",
696
31.2k
                                     std::to_string(_parent->is_colocated_operator()));
697
31.2k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
698
31.2k
    _common_profile->add_info_string("FollowedByShuffledOperator",
699
31.2k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
700
31.2k
    return Status::OK();
701
31.2k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
641
8.71k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
642
    // create profile
643
8.71k
    _operator_profile =
644
8.71k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
645
8.71k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
646
8.71k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
647
648
    // indentation is true
649
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
650
    // So we should set the indentation to true.
651
8.71k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
652
8.71k
    _operator_profile->add_child(_common_profile, true);
653
8.71k
    _operator_profile->add_child(_custom_profile, true);
654
655
8.71k
    _operator_profile->set_metadata(_parent->node_id());
656
8.71k
    _wait_for_finish_dependency_timer =
657
8.71k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
658
8.71k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
659
8.71k
    if constexpr (!is_fake_shared) {
660
8.71k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
661
8.71k
            info.shared_state_map.end()) {
662
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
663
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
664
            }
665
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
666
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
667
0
                                                  ? 0
668
0
                                                  : info.task_idx]
669
0
                                  .get();
670
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
671
8.71k
        } else {
672
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
                DCHECK(false);
674
            }
675
8.71k
            _shared_state = info.shared_state->template cast<SharedState>();
676
8.71k
            _dependency = _shared_state->create_sink_dependency(
677
8.71k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
678
8.71k
        }
679
8.71k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
680
8.71k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
681
8.71k
    }
682
683
8.71k
    if (must_set_shared_state() && _shared_state == nullptr) {
684
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
685
0
    }
686
687
8.71k
    _rows_input_counter =
688
8.71k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
689
8.71k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
690
8.71k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
691
8.71k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
692
8.71k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
693
8.71k
    _memory_used_counter =
694
8.71k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
695
8.71k
    _common_profile->add_info_string("IsColocate",
696
8.71k
                                     std::to_string(_parent->is_colocated_operator()));
697
8.71k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
698
8.71k
    _common_profile->add_info_string("FollowedByShuffledOperator",
699
8.71k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
700
8.71k
    return Status::OK();
701
8.71k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
641
190k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
642
    // create profile
643
190k
    _operator_profile =
644
190k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
645
190k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
646
190k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
647
648
    // indentation is true
649
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
650
    // So we should set the indentation to true.
651
190k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
652
190k
    _operator_profile->add_child(_common_profile, true);
653
190k
    _operator_profile->add_child(_custom_profile, true);
654
655
190k
    _operator_profile->set_metadata(_parent->node_id());
656
190k
    _wait_for_finish_dependency_timer =
657
190k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
658
190k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
659
190k
    if constexpr (!is_fake_shared) {
660
190k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
661
190k
            info.shared_state_map.end()) {
662
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
663
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
664
            }
665
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
666
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
667
0
                                                  ? 0
668
0
                                                  : info.task_idx]
669
0
                                  .get();
670
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
671
190k
        } else {
672
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
                DCHECK(false);
674
            }
675
190k
            _shared_state = info.shared_state->template cast<SharedState>();
676
190k
            _dependency = _shared_state->create_sink_dependency(
677
190k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
678
190k
        }
679
190k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
680
190k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
681
190k
    }
682
683
190k
    if (must_set_shared_state() && _shared_state == nullptr) {
684
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
685
0
    }
686
687
190k
    _rows_input_counter =
688
190k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
689
190k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
690
190k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
691
190k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
692
190k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
693
190k
    _memory_used_counter =
694
190k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
695
190k
    _common_profile->add_info_string("IsColocate",
696
190k
                                     std::to_string(_parent->is_colocated_operator()));
697
190k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
698
190k
    _common_profile->add_info_string("FollowedByShuffledOperator",
699
190k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
700
190k
    return Status::OK();
701
190k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
641
465
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
642
    // create profile
643
465
    _operator_profile =
644
465
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
645
465
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
646
465
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
647
648
    // indentation is true
649
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
650
    // So we should set the indentation to true.
651
465
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
652
465
    _operator_profile->add_child(_common_profile, true);
653
465
    _operator_profile->add_child(_custom_profile, true);
654
655
465
    _operator_profile->set_metadata(_parent->node_id());
656
465
    _wait_for_finish_dependency_timer =
657
465
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
658
465
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
659
465
    if constexpr (!is_fake_shared) {
660
465
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
661
465
            info.shared_state_map.end()) {
662
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
663
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
664
            }
665
460
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
666
460
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
667
460
                                                  ? 0
668
460
                                                  : info.task_idx]
669
460
                                  .get();
670
460
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
671
460
        } else {
672
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
                DCHECK(false);
674
            }
675
5
            _shared_state = info.shared_state->template cast<SharedState>();
676
5
            _dependency = _shared_state->create_sink_dependency(
677
5
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
678
5
        }
679
465
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
680
465
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
681
465
    }
682
683
465
    if (must_set_shared_state() && _shared_state == nullptr) {
684
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
685
0
    }
686
687
465
    _rows_input_counter =
688
465
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
689
465
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
690
465
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
691
465
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
692
465
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
693
465
    _memory_used_counter =
694
465
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
695
465
    _common_profile->add_info_string("IsColocate",
696
465
                                     std::to_string(_parent->is_colocated_operator()));
697
465
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
698
465
    _common_profile->add_info_string("FollowedByShuffledOperator",
699
465
                                     std::to_string(_parent->followed_by_shuffled_operator()));
700
465
    return Status::OK();
701
465
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
641
94
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
642
    // create profile
643
94
    _operator_profile =
644
94
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
645
94
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
646
94
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
647
648
    // indentation is true
649
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
650
    // So we should set the indentation to true.
651
94
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
652
94
    _operator_profile->add_child(_common_profile, true);
653
94
    _operator_profile->add_child(_custom_profile, true);
654
655
94
    _operator_profile->set_metadata(_parent->node_id());
656
94
    _wait_for_finish_dependency_timer =
657
94
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
658
94
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
659
94
    if constexpr (!is_fake_shared) {
660
94
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
661
94
            info.shared_state_map.end()) {
662
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
663
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
664
            }
665
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
666
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
667
0
                                                  ? 0
668
0
                                                  : info.task_idx]
669
0
                                  .get();
670
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
671
94
        } else {
672
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
                DCHECK(false);
674
            }
675
94
            _shared_state = info.shared_state->template cast<SharedState>();
676
94
            _dependency = _shared_state->create_sink_dependency(
677
94
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
678
94
        }
679
94
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
680
94
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
681
94
    }
682
683
94
    if (must_set_shared_state() && _shared_state == nullptr) {
684
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
685
0
    }
686
687
94
    _rows_input_counter =
688
94
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
689
94
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
690
94
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
691
94
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
692
94
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
693
94
    _memory_used_counter =
694
94
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
695
94
    _common_profile->add_info_string("IsColocate",
696
94
                                     std::to_string(_parent->is_colocated_operator()));
697
94
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
698
94
    _common_profile->add_info_string("FollowedByShuffledOperator",
699
94
                                     std::to_string(_parent->followed_by_shuffled_operator()));
700
94
    return Status::OK();
701
94
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
641
810k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
642
    // create profile
643
810k
    _operator_profile =
644
810k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
645
810k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
646
810k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
647
648
    // indentation is true
649
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
650
    // So we should set the indentation to true.
651
810k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
652
810k
    _operator_profile->add_child(_common_profile, true);
653
810k
    _operator_profile->add_child(_custom_profile, true);
654
655
810k
    _operator_profile->set_metadata(_parent->node_id());
656
810k
    _wait_for_finish_dependency_timer =
657
810k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
658
810k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
659
    if constexpr (!is_fake_shared) {
660
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
661
            info.shared_state_map.end()) {
662
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
663
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
664
            }
665
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
666
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
667
                                                  ? 0
668
                                                  : info.task_idx]
669
                                  .get();
670
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
671
        } else {
672
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
                DCHECK(false);
674
            }
675
            _shared_state = info.shared_state->template cast<SharedState>();
676
            _dependency = _shared_state->create_sink_dependency(
677
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
678
        }
679
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
680
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
681
    }
682
683
810k
    if (must_set_shared_state() && _shared_state == nullptr) {
684
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
685
0
    }
686
687
810k
    _rows_input_counter =
688
810k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
689
810k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
690
810k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
691
810k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
692
810k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
693
810k
    _memory_used_counter =
694
810k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
695
810k
    _common_profile->add_info_string("IsColocate",
696
810k
                                     std::to_string(_parent->is_colocated_operator()));
697
810k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
698
810k
    _common_profile->add_info_string("FollowedByShuffledOperator",
699
810k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
700
810k
    return Status::OK();
701
810k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
641
5.97k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
642
    // create profile
643
5.97k
    _operator_profile =
644
5.97k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
645
5.97k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
646
5.97k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
647
648
    // indentation is true
649
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
650
    // So we should set the indentation to true.
651
5.97k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
652
5.97k
    _operator_profile->add_child(_common_profile, true);
653
5.97k
    _operator_profile->add_child(_custom_profile, true);
654
655
5.97k
    _operator_profile->set_metadata(_parent->node_id());
656
5.97k
    _wait_for_finish_dependency_timer =
657
5.97k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
658
5.97k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
659
5.97k
    if constexpr (!is_fake_shared) {
660
5.97k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
661
5.97k
            info.shared_state_map.end()) {
662
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
663
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
664
            }
665
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
666
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
667
0
                                                  ? 0
668
0
                                                  : info.task_idx]
669
0
                                  .get();
670
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
671
5.97k
        } else {
672
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
                DCHECK(false);
674
            }
675
5.97k
            _shared_state = info.shared_state->template cast<SharedState>();
676
5.97k
            _dependency = _shared_state->create_sink_dependency(
677
5.97k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
678
5.97k
        }
679
5.97k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
680
5.97k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
681
5.97k
    }
682
683
5.97k
    if (must_set_shared_state() && _shared_state == nullptr) {
684
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
685
0
    }
686
687
5.97k
    _rows_input_counter =
688
5.97k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
689
5.97k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
690
5.97k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
691
5.97k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
692
5.97k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
693
5.97k
    _memory_used_counter =
694
5.97k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
695
5.97k
    _common_profile->add_info_string("IsColocate",
696
5.97k
                                     std::to_string(_parent->is_colocated_operator()));
697
5.97k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
698
5.97k
    _common_profile->add_info_string("FollowedByShuffledOperator",
699
5.97k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
700
5.97k
    return Status::OK();
701
5.97k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
641
317
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
642
    // create profile
643
317
    _operator_profile =
644
317
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
645
317
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
646
317
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
647
648
    // indentation is true
649
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
650
    // So we should set the indentation to true.
651
317
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
652
317
    _operator_profile->add_child(_common_profile, true);
653
317
    _operator_profile->add_child(_custom_profile, true);
654
655
317
    _operator_profile->set_metadata(_parent->node_id());
656
317
    _wait_for_finish_dependency_timer =
657
317
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
658
317
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
659
317
    if constexpr (!is_fake_shared) {
660
317
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
661
317
            info.shared_state_map.end()) {
662
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
663
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
664
            }
665
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
666
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
667
0
                                                  ? 0
668
0
                                                  : info.task_idx]
669
0
                                  .get();
670
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
671
317
        } else {
672
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
                DCHECK(false);
674
            }
675
317
            _shared_state = info.shared_state->template cast<SharedState>();
676
317
            _dependency = _shared_state->create_sink_dependency(
677
317
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
678
317
        }
679
317
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
680
317
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
681
317
    }
682
683
317
    if (must_set_shared_state() && _shared_state == nullptr) {
684
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
685
0
    }
686
687
317
    _rows_input_counter =
688
317
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
689
317
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
690
317
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
691
317
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
692
317
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
693
317
    _memory_used_counter =
694
317
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
695
317
    _common_profile->add_info_string("IsColocate",
696
317
                                     std::to_string(_parent->is_colocated_operator()));
697
317
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
698
317
    _common_profile->add_info_string("FollowedByShuffledOperator",
699
317
                                     std::to_string(_parent->followed_by_shuffled_operator()));
700
317
    return Status::OK();
701
317
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
641
13.9k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
642
    // create profile
643
13.9k
    _operator_profile =
644
13.9k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
645
13.9k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
646
13.9k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
647
648
    // indentation is true
649
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
650
    // So we should set the indentation to true.
651
13.9k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
652
13.9k
    _operator_profile->add_child(_common_profile, true);
653
13.9k
    _operator_profile->add_child(_custom_profile, true);
654
655
13.9k
    _operator_profile->set_metadata(_parent->node_id());
656
13.9k
    _wait_for_finish_dependency_timer =
657
13.9k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
658
13.9k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
659
13.9k
    if constexpr (!is_fake_shared) {
660
13.9k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
661
13.9k
            info.shared_state_map.end()) {
662
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
663
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
664
            }
665
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
666
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
667
0
                                                  ? 0
668
0
                                                  : info.task_idx]
669
0
                                  .get();
670
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
671
13.9k
        } else {
672
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
                DCHECK(false);
674
            }
675
13.9k
            _shared_state = info.shared_state->template cast<SharedState>();
676
13.9k
            _dependency = _shared_state->create_sink_dependency(
677
13.9k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
678
13.9k
        }
679
13.9k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
680
13.9k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
681
13.9k
    }
682
683
13.9k
    if (must_set_shared_state() && _shared_state == nullptr) {
684
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
685
0
    }
686
687
13.9k
    _rows_input_counter =
688
13.9k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
689
13.9k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
690
13.9k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
691
13.9k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
692
13.9k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
693
13.9k
    _memory_used_counter =
694
13.9k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
695
13.9k
    _common_profile->add_info_string("IsColocate",
696
13.9k
                                     std::to_string(_parent->is_colocated_operator()));
697
13.9k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
698
13.9k
    _common_profile->add_info_string("FollowedByShuffledOperator",
699
13.9k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
700
13.9k
    return Status::OK();
701
13.9k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
641
12.4k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
642
    // create profile
643
12.4k
    _operator_profile =
644
12.4k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
645
12.4k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
646
12.4k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
647
648
    // indentation is true
649
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
650
    // So we should set the indentation to true.
651
12.4k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
652
12.4k
    _operator_profile->add_child(_common_profile, true);
653
12.4k
    _operator_profile->add_child(_custom_profile, true);
654
655
12.4k
    _operator_profile->set_metadata(_parent->node_id());
656
12.4k
    _wait_for_finish_dependency_timer =
657
12.4k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
658
12.4k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
659
12.4k
    if constexpr (!is_fake_shared) {
660
12.4k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
661
12.4k
            info.shared_state_map.end()) {
662
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
663
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
664
            }
665
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
666
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
667
0
                                                  ? 0
668
0
                                                  : info.task_idx]
669
0
                                  .get();
670
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
671
12.4k
        } else {
672
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
                DCHECK(false);
674
            }
675
12.4k
            _shared_state = info.shared_state->template cast<SharedState>();
676
12.4k
            _dependency = _shared_state->create_sink_dependency(
677
12.4k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
678
12.4k
        }
679
12.4k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
680
12.4k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
681
12.4k
    }
682
683
12.4k
    if (must_set_shared_state() && _shared_state == nullptr) {
684
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
685
0
    }
686
687
12.4k
    _rows_input_counter =
688
12.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
689
12.4k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
690
12.4k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
691
12.4k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
692
12.4k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
693
12.4k
    _memory_used_counter =
694
12.4k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
695
12.4k
    _common_profile->add_info_string("IsColocate",
696
12.4k
                                     std::to_string(_parent->is_colocated_operator()));
697
12.4k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
698
12.4k
    _common_profile->add_info_string("FollowedByShuffledOperator",
699
12.4k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
700
12.4k
    return Status::OK();
701
12.4k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
641
264k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
642
    // create profile
643
264k
    _operator_profile =
644
264k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
645
264k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
646
264k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
647
648
    // indentation is true
649
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
650
    // So we should set the indentation to true.
651
264k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
652
264k
    _operator_profile->add_child(_common_profile, true);
653
264k
    _operator_profile->add_child(_custom_profile, true);
654
655
264k
    _operator_profile->set_metadata(_parent->node_id());
656
264k
    _wait_for_finish_dependency_timer =
657
264k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
658
264k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
659
264k
    if constexpr (!is_fake_shared) {
660
264k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
661
264k
            info.shared_state_map.end()) {
662
263k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
663
263k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
664
263k
            }
665
263k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
666
263k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
667
263k
                                                  ? 0
668
263k
                                                  : info.task_idx]
669
263k
                                  .get();
670
263k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
671
263k
        } else {
672
787
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
787
                DCHECK(false);
674
787
            }
675
787
            _shared_state = info.shared_state->template cast<SharedState>();
676
787
            _dependency = _shared_state->create_sink_dependency(
677
787
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
678
787
        }
679
264k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
680
264k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
681
264k
    }
682
683
264k
    if (must_set_shared_state() && _shared_state == nullptr) {
684
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
685
0
    }
686
687
264k
    _rows_input_counter =
688
264k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
689
264k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
690
264k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
691
264k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
692
264k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
693
264k
    _memory_used_counter =
694
264k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
695
264k
    _common_profile->add_info_string("IsColocate",
696
264k
                                     std::to_string(_parent->is_colocated_operator()));
697
264k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
698
264k
    _common_profile->add_info_string("FollowedByShuffledOperator",
699
264k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
700
264k
    return Status::OK();
701
264k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
641
553k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
642
    // create profile
643
553k
    _operator_profile =
644
553k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
645
553k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
646
553k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
647
648
    // indentation is true
649
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
650
    // So we should set the indentation to true.
651
553k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
652
553k
    _operator_profile->add_child(_common_profile, true);
653
553k
    _operator_profile->add_child(_custom_profile, true);
654
655
553k
    _operator_profile->set_metadata(_parent->node_id());
656
553k
    _wait_for_finish_dependency_timer =
657
553k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
658
553k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
659
553k
    if constexpr (!is_fake_shared) {
660
553k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
661
553k
            info.shared_state_map.end()) {
662
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
663
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
664
            }
665
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
666
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
667
0
                                                  ? 0
668
0
                                                  : info.task_idx]
669
0
                                  .get();
670
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
671
553k
        } else {
672
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
                DCHECK(false);
674
            }
675
553k
            _shared_state = info.shared_state->template cast<SharedState>();
676
553k
            _dependency = _shared_state->create_sink_dependency(
677
553k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
678
553k
        }
679
553k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
680
553k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
681
553k
    }
682
683
553k
    if (must_set_shared_state() && _shared_state == nullptr) {
684
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
685
0
    }
686
687
553k
    _rows_input_counter =
688
553k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
689
553k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
690
553k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
691
553k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
692
553k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
693
553k
    _memory_used_counter =
694
553k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
695
553k
    _common_profile->add_info_string("IsColocate",
696
553k
                                     std::to_string(_parent->is_colocated_operator()));
697
553k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
698
553k
    _common_profile->add_info_string("FollowedByShuffledOperator",
699
553k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
700
553k
    return Status::OK();
701
553k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
641
17
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
642
    // create profile
643
17
    _operator_profile =
644
17
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
645
17
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
646
17
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
647
648
    // indentation is true
649
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
650
    // So we should set the indentation to true.
651
17
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
652
17
    _operator_profile->add_child(_common_profile, true);
653
17
    _operator_profile->add_child(_custom_profile, true);
654
655
17
    _operator_profile->set_metadata(_parent->node_id());
656
17
    _wait_for_finish_dependency_timer =
657
17
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
658
17
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
659
17
    if constexpr (!is_fake_shared) {
660
17
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
661
17
            info.shared_state_map.end()) {
662
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
663
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
664
            }
665
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
666
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
667
0
                                                  ? 0
668
0
                                                  : info.task_idx]
669
0
                                  .get();
670
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
671
17
        } else {
672
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
                DCHECK(false);
674
            }
675
17
            _shared_state = info.shared_state->template cast<SharedState>();
676
17
            _dependency = _shared_state->create_sink_dependency(
677
17
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
678
17
        }
679
17
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
680
17
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
681
17
    }
682
683
17
    if (must_set_shared_state() && _shared_state == nullptr) {
684
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
685
0
    }
686
687
17
    _rows_input_counter =
688
17
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
689
17
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
690
17
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
691
17
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
692
17
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
693
17
    _memory_used_counter =
694
17
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
695
17
    _common_profile->add_info_string("IsColocate",
696
17
                                     std::to_string(_parent->is_colocated_operator()));
697
17
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
698
17
    _common_profile->add_info_string("FollowedByShuffledOperator",
699
17
                                     std::to_string(_parent->followed_by_shuffled_operator()));
700
17
    return Status::OK();
701
17
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
641
302
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
642
    // create profile
643
302
    _operator_profile =
644
302
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
645
302
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
646
302
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
647
648
    // indentation is true
649
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
650
    // So we should set the indentation to true.
651
302
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
652
302
    _operator_profile->add_child(_common_profile, true);
653
302
    _operator_profile->add_child(_custom_profile, true);
654
655
302
    _operator_profile->set_metadata(_parent->node_id());
656
302
    _wait_for_finish_dependency_timer =
657
302
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
658
302
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
659
302
    if constexpr (!is_fake_shared) {
660
302
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
661
302
            info.shared_state_map.end()) {
662
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
663
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
664
            }
665
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
666
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
667
0
                                                  ? 0
668
0
                                                  : info.task_idx]
669
0
                                  .get();
670
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
671
302
        } else {
672
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
                DCHECK(false);
674
            }
675
302
            _shared_state = info.shared_state->template cast<SharedState>();
676
302
            _dependency = _shared_state->create_sink_dependency(
677
302
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
678
302
        }
679
302
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
680
302
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
681
302
    }
682
683
302
    if (must_set_shared_state() && _shared_state == nullptr) {
684
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
685
0
    }
686
687
302
    _rows_input_counter =
688
302
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
689
302
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
690
302
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
691
302
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
692
302
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
693
302
    _memory_used_counter =
694
302
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
695
302
    _common_profile->add_info_string("IsColocate",
696
302
                                     std::to_string(_parent->is_colocated_operator()));
697
302
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
698
302
    _common_profile->add_info_string("FollowedByShuffledOperator",
699
302
                                     std::to_string(_parent->followed_by_shuffled_operator()));
700
302
    return Status::OK();
701
302
}
702
703
template <typename SharedState>
704
2.27M
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
705
2.27M
    if (_closed) {
706
2
        return Status::OK();
707
2
    }
708
2.27M
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
709
1.46M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
710
1.46M
    }
711
2.27M
    _closed = true;
712
2.27M
    return Status::OK();
713
2.27M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
704
114k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
705
114k
    if (_closed) {
706
0
        return Status::OK();
707
0
    }
708
114k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
709
114k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
710
114k
    }
711
114k
    _closed = true;
712
114k
    return Status::OK();
713
114k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
704
1
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
705
1
    if (_closed) {
706
0
        return Status::OK();
707
0
    }
708
1
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
709
1
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
710
1
    }
711
1
    _closed = true;
712
1
    return Status::OK();
713
1
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
704
265k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
705
265k
    if (_closed) {
706
0
        return Status::OK();
707
0
    }
708
265k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
709
265k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
710
265k
    }
711
265k
    _closed = true;
712
265k
    return Status::OK();
713
265k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
704
20
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
705
20
    if (_closed) {
706
2
        return Status::OK();
707
2
    }
708
18
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
709
18
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
710
18
    }
711
18
    _closed = true;
712
18
    return Status::OK();
713
20
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
704
31.3k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
705
31.3k
    if (_closed) {
706
0
        return Status::OK();
707
0
    }
708
31.3k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
709
31.3k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
710
31.3k
    }
711
31.3k
    _closed = true;
712
31.3k
    return Status::OK();
713
31.3k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
704
8.69k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
705
8.69k
    if (_closed) {
706
0
        return Status::OK();
707
0
    }
708
8.69k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
709
8.69k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
710
8.69k
    }
711
8.69k
    _closed = true;
712
8.69k
    return Status::OK();
713
8.69k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
704
190k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
705
190k
    if (_closed) {
706
0
        return Status::OK();
707
0
    }
708
190k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
709
190k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
710
190k
    }
711
190k
    _closed = true;
712
190k
    return Status::OK();
713
190k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
704
465
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
705
465
    if (_closed) {
706
0
        return Status::OK();
707
0
    }
708
465
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
709
465
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
710
465
    }
711
465
    _closed = true;
712
465
    return Status::OK();
713
465
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
704
83
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
705
83
    if (_closed) {
706
0
        return Status::OK();
707
0
    }
708
83
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
709
83
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
710
83
    }
711
83
    _closed = true;
712
83
    return Status::OK();
713
83
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
704
811k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
705
811k
    if (_closed) {
706
0
        return Status::OK();
707
0
    }
708
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
709
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
710
    }
711
811k
    _closed = true;
712
811k
    return Status::OK();
713
811k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
704
5.97k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
705
5.97k
    if (_closed) {
706
0
        return Status::OK();
707
0
    }
708
5.97k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
709
5.97k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
710
5.97k
    }
711
5.97k
    _closed = true;
712
5.97k
    return Status::OK();
713
5.97k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
704
215
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
705
215
    if (_closed) {
706
0
        return Status::OK();
707
0
    }
708
215
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
709
215
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
710
215
    }
711
215
    _closed = true;
712
215
    return Status::OK();
713
215
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
704
13.9k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
705
13.9k
    if (_closed) {
706
0
        return Status::OK();
707
0
    }
708
13.9k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
709
13.9k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
710
13.9k
    }
711
13.9k
    _closed = true;
712
13.9k
    return Status::OK();
713
13.9k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
704
12.3k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
705
12.3k
    if (_closed) {
706
0
        return Status::OK();
707
0
    }
708
12.3k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
709
12.3k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
710
12.3k
    }
711
12.3k
    _closed = true;
712
12.3k
    return Status::OK();
713
12.3k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
704
265k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
705
265k
    if (_closed) {
706
0
        return Status::OK();
707
0
    }
708
265k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
709
265k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
710
265k
    }
711
265k
    _closed = true;
712
265k
    return Status::OK();
713
265k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
704
558k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
705
558k
    if (_closed) {
706
0
        return Status::OK();
707
0
    }
708
558k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
709
558k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
710
558k
    }
711
558k
    _closed = true;
712
558k
    return Status::OK();
713
558k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
704
14
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
705
14
    if (_closed) {
706
0
        return Status::OK();
707
0
    }
708
14
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
709
14
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
710
14
    }
711
14
    _closed = true;
712
14
    return Status::OK();
713
14
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
704
302
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
705
302
    if (_closed) {
706
0
        return Status::OK();
707
0
    }
708
302
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
709
302
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
710
302
    }
711
302
    _closed = true;
712
302
    return Status::OK();
713
302
}
714
715
template <typename LocalStateType>
716
86.4k
Status StreamingOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
717
86.4k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
718
86.4k
    return pull(state, block, eos);
719
86.4k
}
_ZN5doris18StreamingOperatorXINS_23AssertNumRowsLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
716
431
Status StreamingOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
717
431
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
718
431
    return pull(state, block, eos);
719
431
}
_ZN5doris18StreamingOperatorXINS_16SelectLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
716
86.0k
Status StreamingOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
717
86.0k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
718
86.0k
    return pull(state, block, eos);
719
86.0k
}
720
721
template <typename LocalStateType>
722
908k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
723
908k
    auto& local_state = get_local_state(state);
724
908k
    if (need_more_input_data(state)) {
725
882k
        local_state._child_block->clear_column_data(
726
882k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
727
882k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
728
882k
                state, local_state._child_block.get(), &local_state._child_eos));
729
882k
        *eos = local_state._child_eos;
730
882k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
731
93.4k
            return Status::OK();
732
93.4k
        }
733
789k
        {
734
789k
            SCOPED_TIMER(local_state.exec_time_counter());
735
789k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
736
789k
        }
737
789k
    }
738
739
815k
    if (!need_more_input_data(state)) {
740
756k
        SCOPED_TIMER(local_state.exec_time_counter());
741
756k
        bool new_eos = false;
742
756k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
743
756k
        if (new_eos) {
744
672k
            *eos = true;
745
672k
        } else if (!need_more_input_data(state)) {
746
21.5k
            *eos = false;
747
21.5k
        }
748
756k
    }
749
815k
    return Status::OK();
750
815k
}
_ZN5doris17StatefulOperatorXINS_23HashJoinProbeLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
722
127k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
723
127k
    auto& local_state = get_local_state(state);
724
127k
    if (need_more_input_data(state)) {
725
112k
        local_state._child_block->clear_column_data(
726
112k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
727
112k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
728
112k
                state, local_state._child_block.get(), &local_state._child_eos));
729
112k
        *eos = local_state._child_eos;
730
112k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
731
34.3k
            return Status::OK();
732
34.3k
        }
733
78.4k
        {
734
78.4k
            SCOPED_TIMER(local_state.exec_time_counter());
735
78.4k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
736
78.4k
        }
737
78.4k
    }
738
739
93.2k
    if (!need_more_input_data(state)) {
740
93.2k
        SCOPED_TIMER(local_state.exec_time_counter());
741
93.2k
        bool new_eos = false;
742
93.2k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
743
93.2k
        if (new_eos) {
744
42.3k
            *eos = true;
745
50.9k
        } else if (!need_more_input_data(state)) {
746
8.89k
            *eos = false;
747
8.89k
        }
748
93.2k
    }
749
93.2k
    return Status::OK();
750
93.2k
}
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_34PartitionedHashJoinProbeLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
_ZN5doris17StatefulOperatorXINS_16RepeatLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
722
3.16k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
723
3.16k
    auto& local_state = get_local_state(state);
724
3.16k
    if (need_more_input_data(state)) {
725
1.94k
        local_state._child_block->clear_column_data(
726
1.94k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
727
1.94k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
728
1.94k
                state, local_state._child_block.get(), &local_state._child_eos));
729
1.94k
        *eos = local_state._child_eos;
730
1.94k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
731
337
            return Status::OK();
732
337
        }
733
1.61k
        {
734
1.61k
            SCOPED_TIMER(local_state.exec_time_counter());
735
1.61k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
736
1.61k
        }
737
1.61k
    }
738
739
2.84k
    if (!need_more_input_data(state)) {
740
2.84k
        SCOPED_TIMER(local_state.exec_time_counter());
741
2.84k
        bool new_eos = false;
742
2.84k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
743
2.84k
        if (new_eos) {
744
1.27k
            *eos = true;
745
1.57k
        } else if (!need_more_input_data(state)) {
746
1.21k
            *eos = false;
747
1.21k
        }
748
2.84k
    }
749
2.82k
    return Status::OK();
750
2.82k
}
_ZN5doris17StatefulOperatorXINS_25MaterializationLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
722
4.64k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
723
4.64k
    auto& local_state = get_local_state(state);
724
4.64k
    if (need_more_input_data(state)) {
725
4.64k
        local_state._child_block->clear_column_data(
726
4.64k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
727
4.64k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
728
4.64k
                state, local_state._child_block.get(), &local_state._child_eos));
729
4.64k
        *eos = local_state._child_eos;
730
4.64k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
731
1.56k
            return Status::OK();
732
1.56k
        }
733
3.08k
        {
734
3.08k
            SCOPED_TIMER(local_state.exec_time_counter());
735
3.08k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
736
3.08k
        }
737
3.08k
    }
738
739
3.08k
    if (!need_more_input_data(state)) {
740
3.08k
        SCOPED_TIMER(local_state.exec_time_counter());
741
3.08k
        bool new_eos = false;
742
3.08k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
743
3.08k
        if (new_eos) {
744
1.59k
            *eos = true;
745
1.59k
        } else if (!need_more_input_data(state)) {
746
0
            *eos = false;
747
0
        }
748
3.08k
    }
749
3.08k
    return Status::OK();
750
3.08k
}
_ZN5doris17StatefulOperatorXINS_22StreamingAggLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
722
46.2k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
723
46.2k
    auto& local_state = get_local_state(state);
724
46.2k
    if (need_more_input_data(state)) {
725
46.1k
        local_state._child_block->clear_column_data(
726
46.1k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
727
46.1k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
728
46.1k
                state, local_state._child_block.get(), &local_state._child_eos));
729
46.1k
        *eos = local_state._child_eos;
730
46.1k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
731
3.91k
            return Status::OK();
732
3.91k
        }
733
42.2k
        {
734
42.2k
            SCOPED_TIMER(local_state.exec_time_counter());
735
42.2k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
736
42.2k
        }
737
42.2k
    }
738
739
42.2k
    if (!need_more_input_data(state)) {
740
16.4k
        SCOPED_TIMER(local_state.exec_time_counter());
741
16.4k
        bool new_eos = false;
742
16.4k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
743
16.4k
        if (new_eos) {
744
16.2k
            *eos = true;
745
16.2k
        } else if (!need_more_input_data(state)) {
746
55
            *eos = false;
747
55
        }
748
16.4k
    }
749
42.2k
    return Status::OK();
750
42.2k
}
_ZN5doris17StatefulOperatorXINS_30DistinctStreamingAggLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
722
648k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
723
648k
    auto& local_state = get_local_state(state);
724
649k
    if (need_more_input_data(state)) {
725
649k
        local_state._child_block->clear_column_data(
726
649k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
727
649k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
728
649k
                state, local_state._child_block.get(), &local_state._child_eos));
729
649k
        *eos = local_state._child_eos;
730
649k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
731
39.7k
            return Status::OK();
732
39.7k
        }
733
610k
        {
734
610k
            SCOPED_TIMER(local_state.exec_time_counter());
735
610k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
736
610k
        }
737
610k
    }
738
739
608k
    if (!need_more_input_data(state)) {
740
575k
        SCOPED_TIMER(local_state.exec_time_counter());
741
575k
        bool new_eos = false;
742
575k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
743
575k
        if (new_eos) {
744
574k
            *eos = true;
745
574k
        } else if (!need_more_input_data(state)) {
746
0
            *eos = false;
747
0
        }
748
575k
    }
749
608k
    return Status::OK();
750
608k
}
_ZN5doris17StatefulOperatorXINS_29NestedLoopJoinProbeLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
722
71.0k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
723
71.0k
    auto& local_state = get_local_state(state);
724
71.0k
    if (need_more_input_data(state)) {
725
60.1k
        local_state._child_block->clear_column_data(
726
60.1k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
727
60.1k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
728
60.1k
                state, local_state._child_block.get(), &local_state._child_eos));
729
60.1k
        *eos = local_state._child_eos;
730
60.1k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
731
13.0k
            return Status::OK();
732
13.0k
        }
733
47.0k
        {
734
47.0k
            SCOPED_TIMER(local_state.exec_time_counter());
735
47.0k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
736
47.0k
        }
737
47.0k
    }
738
739
58.0k
    if (!need_more_input_data(state)) {
740
57.6k
        SCOPED_TIMER(local_state.exec_time_counter());
741
57.6k
        bool new_eos = false;
742
57.6k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
743
57.6k
        if (new_eos) {
744
31.3k
            *eos = true;
745
31.3k
        } else if (!need_more_input_data(state)) {
746
10.9k
            *eos = false;
747
10.9k
        }
748
57.6k
    }
749
58.0k
    return Status::OK();
750
58.0k
}
_ZN5doris17StatefulOperatorXINS_23TableFunctionLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
722
7.91k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
723
7.91k
    auto& local_state = get_local_state(state);
724
7.91k
    if (need_more_input_data(state)) {
725
7.55k
        local_state._child_block->clear_column_data(
726
7.55k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
727
7.55k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
728
7.55k
                state, local_state._child_block.get(), &local_state._child_eos));
729
7.55k
        *eos = local_state._child_eos;
730
7.55k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
731
524
            return Status::OK();
732
524
        }
733
7.02k
        {
734
7.02k
            SCOPED_TIMER(local_state.exec_time_counter());
735
7.02k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
736
7.02k
        }
737
7.02k
    }
738
739
7.38k
    if (!need_more_input_data(state)) {
740
7.38k
        SCOPED_TIMER(local_state.exec_time_counter());
741
7.38k
        bool new_eos = false;
742
7.38k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
743
7.38k
        if (new_eos) {
744
5.34k
            *eos = true;
745
5.34k
        } else if (!need_more_input_data(state)) {
746
366
            *eos = false;
747
366
        }
748
7.38k
    }
749
7.38k
    return Status::OK();
750
7.38k
}
751
752
template <typename Writer, typename Parent>
753
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
754
62.3k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
755
62.3k
    RETURN_IF_ERROR(Base::init(state, info));
756
62.3k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
757
62.3k
                                                         "AsyncWriterDependency", true);
758
62.3k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
759
62.3k
                             _finish_dependency));
760
761
62.3k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
762
62.3k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
763
62.3k
    return Status::OK();
764
62.3k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
754
518
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
755
518
    RETURN_IF_ERROR(Base::init(state, info));
756
518
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
757
518
                                                         "AsyncWriterDependency", true);
758
518
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
759
518
                             _finish_dependency));
760
761
518
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
762
518
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
763
518
    return Status::OK();
764
518
}
_ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
754
88
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
755
88
    RETURN_IF_ERROR(Base::init(state, info));
756
88
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
757
88
                                                         "AsyncWriterDependency", true);
758
88
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
759
88
                             _finish_dependency));
760
761
88
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
762
88
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
763
88
    return Status::OK();
764
88
}
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
754
43.5k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
755
43.5k
    RETURN_IF_ERROR(Base::init(state, info));
756
43.5k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
757
43.5k
                                                         "AsyncWriterDependency", true);
758
43.5k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
759
43.5k
                             _finish_dependency));
760
761
43.5k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
762
43.5k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
763
43.5k
    return Status::OK();
764
43.5k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
754
8.74k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
755
8.74k
    RETURN_IF_ERROR(Base::init(state, info));
756
8.74k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
757
8.74k
                                                         "AsyncWriterDependency", true);
758
8.74k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
759
8.74k
                             _finish_dependency));
760
761
8.74k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
762
8.74k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
763
8.74k
    return Status::OK();
764
8.74k
}
_ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
754
5.15k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
755
5.15k
    RETURN_IF_ERROR(Base::init(state, info));
756
5.15k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
757
5.15k
                                                         "AsyncWriterDependency", true);
758
5.15k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
759
5.15k
                             _finish_dependency));
760
761
5.15k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
762
5.15k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
763
5.15k
    return Status::OK();
764
5.15k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
754
3.38k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
755
3.38k
    RETURN_IF_ERROR(Base::init(state, info));
756
3.38k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
757
3.38k
                                                         "AsyncWriterDependency", true);
758
3.38k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
759
3.38k
                             _finish_dependency));
760
761
3.38k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
762
3.38k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
763
3.38k
    return Status::OK();
764
3.38k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
754
160
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
755
160
    RETURN_IF_ERROR(Base::init(state, info));
756
160
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
757
160
                                                         "AsyncWriterDependency", true);
758
160
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
759
160
                             _finish_dependency));
760
761
160
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
762
160
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
763
160
    return Status::OK();
764
160
}
_ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
754
640
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
755
640
    RETURN_IF_ERROR(Base::init(state, info));
756
640
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
757
640
                                                         "AsyncWriterDependency", true);
758
640
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
759
640
                             _finish_dependency));
760
761
640
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
762
640
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
763
640
    return Status::OK();
764
640
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
754
156
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
755
156
    RETURN_IF_ERROR(Base::init(state, info));
756
156
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
757
156
                                                         "AsyncWriterDependency", true);
758
156
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
759
156
                             _finish_dependency));
760
761
156
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
762
156
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
763
156
    return Status::OK();
764
156
}
765
766
template <typename Writer, typename Parent>
767
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
768
62.6k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
769
62.6k
    RETURN_IF_ERROR(Base::open(state));
770
62.6k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
771
572k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
772
509k
        RETURN_IF_ERROR(
773
509k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
774
509k
    }
775
62.6k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
776
62.6k
    return Status::OK();
777
62.6k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
768
518
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
769
518
    RETURN_IF_ERROR(Base::open(state));
770
518
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
771
2.78k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
772
2.26k
        RETURN_IF_ERROR(
773
2.26k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
774
2.26k
    }
775
518
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
776
518
    return Status::OK();
777
518
}
_ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
768
88
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
769
88
    RETURN_IF_ERROR(Base::open(state));
770
88
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
771
412
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
772
324
        RETURN_IF_ERROR(
773
324
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
774
324
    }
775
88
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
776
88
    return Status::OK();
777
88
}
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
768
43.9k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
769
43.9k
    RETURN_IF_ERROR(Base::open(state));
770
43.9k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
771
331k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
772
287k
        RETURN_IF_ERROR(
773
287k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
774
287k
    }
775
43.9k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
776
43.9k
    return Status::OK();
777
43.9k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
768
8.69k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
769
8.69k
    RETURN_IF_ERROR(Base::open(state));
770
8.69k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
771
52.7k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
772
44.0k
        RETURN_IF_ERROR(
773
44.0k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
774
44.0k
    }
775
8.69k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
776
8.69k
    return Status::OK();
777
8.69k
}
_ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
768
5.14k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
769
5.14k
    RETURN_IF_ERROR(Base::open(state));
770
5.14k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
771
136k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
772
131k
        RETURN_IF_ERROR(
773
131k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
774
131k
    }
775
5.14k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
776
5.14k
    return Status::OK();
777
5.14k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
768
3.38k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
769
3.38k
    RETURN_IF_ERROR(Base::open(state));
770
3.38k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
771
42.4k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
772
39.0k
        RETURN_IF_ERROR(
773
39.0k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
774
39.0k
    }
775
3.38k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
776
3.38k
    return Status::OK();
777
3.38k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
768
158
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
769
158
    RETURN_IF_ERROR(Base::open(state));
770
158
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
771
474
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
772
316
        RETURN_IF_ERROR(
773
316
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
774
316
    }
775
158
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
776
158
    return Status::OK();
777
158
}
_ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
768
638
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
769
638
    RETURN_IF_ERROR(Base::open(state));
770
638
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
771
4.39k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
772
3.75k
        RETURN_IF_ERROR(
773
3.75k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
774
3.75k
    }
775
638
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
776
638
    return Status::OK();
777
638
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
768
156
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
769
156
    RETURN_IF_ERROR(Base::open(state));
770
156
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
771
786
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
772
630
        RETURN_IF_ERROR(
773
630
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
774
630
    }
775
156
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
776
156
    return Status::OK();
777
156
}
778
779
template <typename Writer, typename Parent>
780
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
781
84.5k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
782
84.5k
    return _writer->sink(block, eos);
783
84.5k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
781
1.98k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
782
1.98k
    return _writer->sink(block, eos);
783
1.98k
}
_ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
781
112
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
782
112
    return _writer->sink(block, eos);
783
112
}
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
781
58.1k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
782
58.1k
    return _writer->sink(block, eos);
783
58.1k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
781
10.1k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
782
10.1k
    return _writer->sink(block, eos);
783
10.1k
}
_ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
781
7.49k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
782
7.49k
    return _writer->sink(block, eos);
783
7.49k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
781
5.36k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
782
5.36k
    return _writer->sink(block, eos);
783
5.36k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
781
180
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
782
180
    return _writer->sink(block, eos);
783
180
}
_ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
781
794
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
782
794
    return _writer->sink(block, eos);
783
794
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
781
310
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
782
310
    return _writer->sink(block, eos);
783
310
}
784
785
template <typename Writer, typename Parent>
786
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
787
62.7k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
788
62.7k
    if (_closed) {
789
0
        return Status::OK();
790
0
    }
791
62.7k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
792
62.7k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
793
    // if the init failed, the _writer may be nullptr. so here need check
794
62.8k
    if (_writer) {
795
62.8k
        Status st = _writer->get_writer_status();
796
62.8k
        if (exec_status.ok()) {
797
62.7k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
798
62.7k
                                                       : Status::Cancelled("force close"));
799
62.7k
        } else {
800
90
            _writer->force_close(exec_status);
801
90
        }
802
        // If there is an error in process_block thread, then we should get the writer
803
        // status before call force_close. For example, the thread may failed in commit
804
        // transaction.
805
62.8k
        RETURN_IF_ERROR(st);
806
62.8k
    }
807
62.7k
    return Base::close(state, exec_status);
808
62.7k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
787
506
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
788
506
    if (_closed) {
789
0
        return Status::OK();
790
0
    }
791
506
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
792
506
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
793
    // if the init failed, the _writer may be nullptr. so here need check
794
506
    if (_writer) {
795
506
        Status st = _writer->get_writer_status();
796
506
        if (exec_status.ok()) {
797
506
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
798
506
                                                       : Status::Cancelled("force close"));
799
506
        } else {
800
0
            _writer->force_close(exec_status);
801
0
        }
802
        // If there is an error in process_block thread, then we should get the writer
803
        // status before call force_close. For example, the thread may failed in commit
804
        // transaction.
805
506
        RETURN_IF_ERROR(st);
806
506
    }
807
506
    return Base::close(state, exec_status);
808
506
}
_ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
787
88
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
788
88
    if (_closed) {
789
0
        return Status::OK();
790
0
    }
791
88
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
792
88
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
793
    // if the init failed, the _writer may be nullptr. so here need check
794
88
    if (_writer) {
795
88
        Status st = _writer->get_writer_status();
796
88
        if (exec_status.ok()) {
797
88
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
798
88
                                                       : Status::Cancelled("force close"));
799
88
        } else {
800
0
            _writer->force_close(exec_status);
801
0
        }
802
        // If there is an error in process_block thread, then we should get the writer
803
        // status before call force_close. For example, the thread may failed in commit
804
        // transaction.
805
88
        RETURN_IF_ERROR(st);
806
88
    }
807
80
    return Base::close(state, exec_status);
808
88
}
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
787
43.9k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
788
43.9k
    if (_closed) {
789
0
        return Status::OK();
790
0
    }
791
43.9k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
792
43.9k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
793
    // if the init failed, the _writer may be nullptr. so here need check
794
44.0k
    if (_writer) {
795
44.0k
        Status st = _writer->get_writer_status();
796
44.0k
        if (exec_status.ok()) {
797
43.9k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
798
43.9k
                                                       : Status::Cancelled("force close"));
799
43.9k
        } else {
800
60
            _writer->force_close(exec_status);
801
60
        }
802
        // If there is an error in process_block thread, then we should get the writer
803
        // status before call force_close. For example, the thread may failed in commit
804
        // transaction.
805
44.0k
        RETURN_IF_ERROR(st);
806
44.0k
    }
807
43.9k
    return Base::close(state, exec_status);
808
43.9k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
787
8.73k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
788
8.73k
    if (_closed) {
789
0
        return Status::OK();
790
0
    }
791
8.73k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
792
8.73k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
793
    // if the init failed, the _writer may be nullptr. so here need check
794
8.74k
    if (_writer) {
795
8.74k
        Status st = _writer->get_writer_status();
796
8.74k
        if (exec_status.ok()) {
797
8.71k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
798
8.71k
                                                       : Status::Cancelled("force close"));
799
8.71k
        } else {
800
32
            _writer->force_close(exec_status);
801
32
        }
802
        // If there is an error in process_block thread, then we should get the writer
803
        // status before call force_close. For example, the thread may failed in commit
804
        // transaction.
805
8.74k
        RETURN_IF_ERROR(st);
806
8.74k
    }
807
8.73k
    return Base::close(state, exec_status);
808
8.73k
}
_ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
787
5.14k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
788
5.14k
    if (_closed) {
789
0
        return Status::OK();
790
0
    }
791
5.14k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
792
5.14k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
793
    // if the init failed, the _writer may be nullptr. so here need check
794
5.14k
    if (_writer) {
795
5.14k
        Status st = _writer->get_writer_status();
796
5.15k
        if (exec_status.ok()) {
797
5.15k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
798
5.15k
                                                       : Status::Cancelled("force close"));
799
18.4E
        } else {
800
18.4E
            _writer->force_close(exec_status);
801
18.4E
        }
802
        // If there is an error in process_block thread, then we should get the writer
803
        // status before call force_close. For example, the thread may failed in commit
804
        // transaction.
805
5.14k
        RETURN_IF_ERROR(st);
806
5.14k
    }
807
5.14k
    return Base::close(state, exec_status);
808
5.14k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
787
3.38k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
788
3.38k
    if (_closed) {
789
0
        return Status::OK();
790
0
    }
791
3.38k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
792
3.38k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
793
    // if the init failed, the _writer may be nullptr. so here need check
794
3.38k
    if (_writer) {
795
3.38k
        Status st = _writer->get_writer_status();
796
3.38k
        if (exec_status.ok()) {
797
3.38k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
798
3.38k
                                                       : Status::Cancelled("force close"));
799
3.38k
        } else {
800
0
            _writer->force_close(exec_status);
801
0
        }
802
        // If there is an error in process_block thread, then we should get the writer
803
        // status before call force_close. For example, the thread may failed in commit
804
        // transaction.
805
3.38k
        RETURN_IF_ERROR(st);
806
3.38k
    }
807
3.38k
    return Base::close(state, exec_status);
808
3.38k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
787
160
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
788
160
    if (_closed) {
789
0
        return Status::OK();
790
0
    }
791
160
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
792
160
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
793
    // if the init failed, the _writer may be nullptr. so here need check
794
160
    if (_writer) {
795
160
        Status st = _writer->get_writer_status();
796
160
        if (exec_status.ok()) {
797
160
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
798
160
                                                       : Status::Cancelled("force close"));
799
160
        } else {
800
0
            _writer->force_close(exec_status);
801
0
        }
802
        // If there is an error in process_block thread, then we should get the writer
803
        // status before call force_close. For example, the thread may failed in commit
804
        // transaction.
805
160
        RETURN_IF_ERROR(st);
806
160
    }
807
160
    return Base::close(state, exec_status);
808
160
}
_ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
787
640
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
788
640
    if (_closed) {
789
0
        return Status::OK();
790
0
    }
791
640
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
792
640
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
793
    // if the init failed, the _writer may be nullptr. so here need check
794
640
    if (_writer) {
795
640
        Status st = _writer->get_writer_status();
796
640
        if (exec_status.ok()) {
797
640
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
798
640
                                                       : Status::Cancelled("force close"));
799
640
        } else {
800
0
            _writer->force_close(exec_status);
801
0
        }
802
        // If there is an error in process_block thread, then we should get the writer
803
        // status before call force_close. For example, the thread may failed in commit
804
        // transaction.
805
640
        RETURN_IF_ERROR(st);
806
640
    }
807
640
    return Base::close(state, exec_status);
808
640
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
787
156
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
788
156
    if (_closed) {
789
0
        return Status::OK();
790
0
    }
791
156
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
792
156
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
793
    // if the init failed, the _writer may be nullptr. so here need check
794
156
    if (_writer) {
795
156
        Status st = _writer->get_writer_status();
796
156
        if (exec_status.ok()) {
797
156
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
798
156
                                                       : Status::Cancelled("force close"));
799
156
        } else {
800
0
            _writer->force_close(exec_status);
801
0
        }
802
        // If there is an error in process_block thread, then we should get the writer
803
        // status before call force_close. For example, the thread may failed in commit
804
        // transaction.
805
156
        RETURN_IF_ERROR(st);
806
156
    }
807
156
    return Base::close(state, exec_status);
808
156
}
809
810
#define DECLARE_OPERATOR(LOCAL_STATE) template class DataSinkOperatorX<LOCAL_STATE>;
811
DECLARE_OPERATOR(HashJoinBuildSinkLocalState)
812
DECLARE_OPERATOR(ResultSinkLocalState)
813
DECLARE_OPERATOR(JdbcTableSinkLocalState)
814
DECLARE_OPERATOR(MemoryScratchSinkLocalState)
815
DECLARE_OPERATOR(ResultFileSinkLocalState)
816
DECLARE_OPERATOR(OlapTableSinkLocalState)
817
DECLARE_OPERATOR(OlapTableSinkV2LocalState)
818
DECLARE_OPERATOR(HiveTableSinkLocalState)
819
DECLARE_OPERATOR(TVFTableSinkLocalState)
820
DECLARE_OPERATOR(IcebergTableSinkLocalState)
821
DECLARE_OPERATOR(SpillIcebergTableSinkLocalState)
822
DECLARE_OPERATOR(IcebergDeleteSinkLocalState)
823
DECLARE_OPERATOR(IcebergMergeSinkLocalState)
824
DECLARE_OPERATOR(MCTableSinkLocalState)
825
DECLARE_OPERATOR(AnalyticSinkLocalState)
826
DECLARE_OPERATOR(BlackholeSinkLocalState)
827
DECLARE_OPERATOR(SortSinkLocalState)
828
DECLARE_OPERATOR(SpillSortSinkLocalState)
829
DECLARE_OPERATOR(LocalExchangeSinkLocalState)
830
DECLARE_OPERATOR(AggSinkLocalState)
831
DECLARE_OPERATOR(BucketedAggSinkLocalState)
832
DECLARE_OPERATOR(PartitionedAggSinkLocalState)
833
DECLARE_OPERATOR(ExchangeSinkLocalState)
834
DECLARE_OPERATOR(NestedLoopJoinBuildSinkLocalState)
835
DECLARE_OPERATOR(UnionSinkLocalState)
836
DECLARE_OPERATOR(MultiCastDataStreamSinkLocalState)
837
DECLARE_OPERATOR(PartitionSortSinkLocalState)
838
DECLARE_OPERATOR(SetProbeSinkLocalState<true>)
839
DECLARE_OPERATOR(SetProbeSinkLocalState<false>)
840
DECLARE_OPERATOR(SetSinkLocalState<true>)
841
DECLARE_OPERATOR(SetSinkLocalState<false>)
842
DECLARE_OPERATOR(PartitionedHashJoinSinkLocalState)
843
DECLARE_OPERATOR(GroupCommitBlockSinkLocalState)
844
DECLARE_OPERATOR(CacheSinkLocalState)
845
DECLARE_OPERATOR(DictSinkLocalState)
846
DECLARE_OPERATOR(RecCTESinkLocalState)
847
DECLARE_OPERATOR(RecCTEAnchorSinkLocalState)
848
849
#undef DECLARE_OPERATOR
850
851
#define DECLARE_OPERATOR(LOCAL_STATE) template class OperatorX<LOCAL_STATE>;
852
DECLARE_OPERATOR(HashJoinProbeLocalState)
853
DECLARE_OPERATOR(OlapScanLocalState)
854
DECLARE_OPERATOR(GroupCommitLocalState)
855
DECLARE_OPERATOR(JDBCScanLocalState)
856
DECLARE_OPERATOR(FileScanLocalState)
857
DECLARE_OPERATOR(AnalyticLocalState)
858
DECLARE_OPERATOR(SortLocalState)
859
DECLARE_OPERATOR(SpillSortLocalState)
860
DECLARE_OPERATOR(LocalMergeSortLocalState)
861
DECLARE_OPERATOR(AggLocalState)
862
DECLARE_OPERATOR(BucketedAggLocalState)
863
DECLARE_OPERATOR(PartitionedAggLocalState)
864
DECLARE_OPERATOR(TableFunctionLocalState)
865
DECLARE_OPERATOR(ExchangeLocalState)
866
DECLARE_OPERATOR(RepeatLocalState)
867
DECLARE_OPERATOR(NestedLoopJoinProbeLocalState)
868
DECLARE_OPERATOR(AssertNumRowsLocalState)
869
DECLARE_OPERATOR(EmptySetLocalState)
870
DECLARE_OPERATOR(UnionSourceLocalState)
871
DECLARE_OPERATOR(MultiCastDataStreamSourceLocalState)
872
DECLARE_OPERATOR(PartitionSortSourceLocalState)
873
DECLARE_OPERATOR(SetSourceLocalState<true>)
874
DECLARE_OPERATOR(SetSourceLocalState<false>)
875
DECLARE_OPERATOR(DataGenLocalState)
876
DECLARE_OPERATOR(SchemaScanLocalState)
877
DECLARE_OPERATOR(MetaScanLocalState)
878
DECLARE_OPERATOR(LocalExchangeSourceLocalState)
879
DECLARE_OPERATOR(PartitionedHashJoinProbeLocalState)
880
DECLARE_OPERATOR(CacheSourceLocalState)
881
DECLARE_OPERATOR(RecCTESourceLocalState)
882
DECLARE_OPERATOR(RecCTEScanLocalState)
883
884
#ifdef BE_TEST
885
DECLARE_OPERATOR(MockLocalState)
886
DECLARE_OPERATOR(MockScanLocalState)
887
#endif
888
#undef DECLARE_OPERATOR
889
890
template class StreamingOperatorX<AssertNumRowsLocalState>;
891
template class StreamingOperatorX<SelectLocalState>;
892
893
template class StatefulOperatorX<HashJoinProbeLocalState>;
894
template class StatefulOperatorX<PartitionedHashJoinProbeLocalState>;
895
template class StatefulOperatorX<RepeatLocalState>;
896
template class StatefulOperatorX<MaterializationLocalState>;
897
template class StatefulOperatorX<StreamingAggLocalState>;
898
template class StatefulOperatorX<DistinctStreamingAggLocalState>;
899
template class StatefulOperatorX<NestedLoopJoinProbeLocalState>;
900
template class StatefulOperatorX<TableFunctionLocalState>;
901
902
template class PipelineXSinkLocalState<HashJoinSharedState>;
903
template class PipelineXSinkLocalState<PartitionedHashJoinSharedState>;
904
template class PipelineXSinkLocalState<SortSharedState>;
905
template class PipelineXSinkLocalState<SpillSortSharedState>;
906
template class PipelineXSinkLocalState<NestedLoopJoinSharedState>;
907
template class PipelineXSinkLocalState<AnalyticSharedState>;
908
template class PipelineXSinkLocalState<AggSharedState>;
909
template class PipelineXSinkLocalState<BucketedAggSharedState>;
910
template class PipelineXSinkLocalState<PartitionedAggSharedState>;
911
template class PipelineXSinkLocalState<FakeSharedState>;
912
template class PipelineXSinkLocalState<UnionSharedState>;
913
template class PipelineXSinkLocalState<PartitionSortNodeSharedState>;
914
template class PipelineXSinkLocalState<MultiCastSharedState>;
915
template class PipelineXSinkLocalState<SetSharedState>;
916
template class PipelineXSinkLocalState<LocalExchangeSharedState>;
917
template class PipelineXSinkLocalState<BasicSharedState>;
918
template class PipelineXSinkLocalState<DataQueueSharedState>;
919
template class PipelineXSinkLocalState<RecCTESharedState>;
920
921
template class PipelineXLocalState<HashJoinSharedState>;
922
template class PipelineXLocalState<PartitionedHashJoinSharedState>;
923
template class PipelineXLocalState<SortSharedState>;
924
template class PipelineXLocalState<SpillSortSharedState>;
925
template class PipelineXLocalState<NestedLoopJoinSharedState>;
926
template class PipelineXLocalState<AnalyticSharedState>;
927
template class PipelineXLocalState<AggSharedState>;
928
template class PipelineXLocalState<BucketedAggSharedState>;
929
template class PipelineXLocalState<PartitionedAggSharedState>;
930
template class PipelineXLocalState<FakeSharedState>;
931
template class PipelineXLocalState<UnionSharedState>;
932
template class PipelineXLocalState<DataQueueSharedState>;
933
template class PipelineXLocalState<MultiCastSharedState>;
934
template class PipelineXLocalState<PartitionSortNodeSharedState>;
935
template class PipelineXLocalState<SetSharedState>;
936
template class PipelineXLocalState<LocalExchangeSharedState>;
937
template class PipelineXLocalState<BasicSharedState>;
938
template class PipelineXLocalState<RecCTESharedState>;
939
940
template class AsyncWriterSink<doris::VFileResultWriter, ResultFileSinkOperatorX>;
941
template class AsyncWriterSink<doris::VJdbcTableWriter, JdbcTableSinkOperatorX>;
942
template class AsyncWriterSink<doris::VTabletWriter, OlapTableSinkOperatorX>;
943
template class AsyncWriterSink<doris::VTabletWriterV2, OlapTableSinkV2OperatorX>;
944
template class AsyncWriterSink<doris::VHiveTableWriter, HiveTableSinkOperatorX>;
945
template class AsyncWriterSink<doris::VIcebergTableWriter, IcebergTableSinkOperatorX>;
946
template class AsyncWriterSink<doris::VIcebergTableWriter, SpillIcebergTableSinkOperatorX>;
947
template class AsyncWriterSink<doris::VIcebergDeleteSink, IcebergDeleteSinkOperatorX>;
948
template class AsyncWriterSink<doris::VIcebergMergeSink, IcebergMergeSinkOperatorX>;
949
template class AsyncWriterSink<doris::VMCTableWriter, MCTableSinkOperatorX>;
950
template class AsyncWriterSink<doris::VTVFTableWriter, TVFTableSinkOperatorX>;
951
952
#ifdef BE_TEST
953
template class OperatorX<DummyOperatorLocalState>;
954
template class DataSinkOperatorX<DummySinkLocalState>;
955
#endif
956
957
} // namespace doris