Coverage Report

Created: 2026-05-22 07:53

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.54M
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
2.54M
    if (_parent->nereids_id() == -1) {
120
1.33M
        return fmt::format("(id={})", _parent->node_id());
121
1.33M
    } else {
122
1.20M
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
1.20M
    }
124
2.54M
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
69.9k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
69.9k
    if (_parent->nereids_id() == -1) {
120
0
        return fmt::format("(id={})", _parent->node_id());
121
69.9k
    } else {
122
69.9k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
69.9k
    }
124
69.9k
}
_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
281k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
281k
    if (_parent->nereids_id() == -1) {
120
12
        return fmt::format("(id={})", _parent->node_id());
121
281k
    } else {
122
281k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
281k
    }
124
281k
}
_ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
27
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
27
    if (_parent->nereids_id() == -1) {
120
0
        return fmt::format("(id={})", _parent->node_id());
121
27
    } else {
122
27
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
27
    }
124
27
}
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
31.5k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
31.5k
    if (_parent->nereids_id() == -1) {
120
0
        return fmt::format("(id={})", _parent->node_id());
121
31.5k
    } else {
122
31.5k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
31.5k
    }
124
31.5k
}
_ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
10.1k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
10.1k
    if (_parent->nereids_id() == -1) {
120
9
        return fmt::format("(id={})", _parent->node_id());
121
10.1k
    } else {
122
10.1k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
10.1k
    }
124
10.1k
}
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
211k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
211k
    if (_parent->nereids_id() == -1) {
120
27
        return fmt::format("(id={})", _parent->node_id());
121
211k
    } else {
122
211k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
211k
    }
124
211k
}
_ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
493
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
493
    if (_parent->nereids_id() == -1) {
120
0
        return fmt::format("(id={})", _parent->node_id());
121
493
    } else {
122
493
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
493
    }
124
493
}
_ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
178
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
178
    if (_parent->nereids_id() == -1) {
120
0
        return fmt::format("(id={})", _parent->node_id());
121
178
    } else {
122
178
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
178
    }
124
178
}
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
1.02M
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
1.02M
    if (_parent->nereids_id() == -1) {
120
479k
        return fmt::format("(id={})", _parent->node_id());
121
544k
    } else {
122
544k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
544k
    }
124
1.02M
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
54.6k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
54.6k
    if (_parent->nereids_id() == -1) {
120
2
        return fmt::format("(id={})", _parent->node_id());
121
54.6k
    } else {
122
54.6k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
54.6k
    }
124
54.6k
}
_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
42.0k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
42.0k
    if (_parent->nereids_id() == -1) {
120
41.9k
        return fmt::format("(id={})", _parent->node_id());
121
41.9k
    } else {
122
13
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
13
    }
124
42.0k
}
_ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
436
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
436
    if (_parent->nereids_id() == -1) {
120
102
        return fmt::format("(id={})", _parent->node_id());
121
334
    } else {
122
334
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
334
    }
124
436
}
_ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
4.79k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
4.79k
    if (_parent->nereids_id() == -1) {
120
12
        return fmt::format("(id={})", _parent->node_id());
121
4.78k
    } else {
122
4.78k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
4.78k
    }
124
4.79k
}
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
811k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
811k
    if (_parent->nereids_id() == -1) {
120
811k
        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
811k
}
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.48M
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
1.48M
    if (_parent->nereids_id() == -1) {
129
822k
        return fmt::format("(id={})", _parent->node_id());
130
822k
    } else {
131
662k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
662k
    }
133
1.48M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
118k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
118k
    if (_parent->nereids_id() == -1) {
129
0
        return fmt::format("(id={})", _parent->node_id());
130
118k
    } else {
131
118k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
118k
    }
133
118k
}
_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
282k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
282k
    if (_parent->nereids_id() == -1) {
129
9
        return fmt::format("(id={})", _parent->node_id());
130
282k
    } else {
131
282k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
282k
    }
133
282k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
33
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
33
    if (_parent->nereids_id() == -1) {
129
0
        return fmt::format("(id={})", _parent->node_id());
130
33
    } else {
131
33
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
33
    }
133
33
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
31.6k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
31.6k
    if (_parent->nereids_id() == -1) {
129
0
        return fmt::format("(id={})", _parent->node_id());
130
31.6k
    } else {
131
31.6k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
31.6k
    }
133
31.6k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
10.1k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
10.1k
    if (_parent->nereids_id() == -1) {
129
9
        return fmt::format("(id={})", _parent->node_id());
130
10.1k
    } else {
131
10.1k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
10.1k
    }
133
10.1k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
211k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
211k
    if (_parent->nereids_id() == -1) {
129
27
        return fmt::format("(id={})", _parent->node_id());
130
211k
    } else {
131
211k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
211k
    }
133
211k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
415
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
415
    if (_parent->nereids_id() == -1) {
129
0
        return fmt::format("(id={})", _parent->node_id());
130
415
    } else {
131
415
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
415
    }
133
415
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
188
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
188
    if (_parent->nereids_id() == -1) {
129
0
        return fmt::format("(id={})", _parent->node_id());
130
188
    } else {
131
188
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
188
    }
133
188
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
86
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
86
    if (_parent->nereids_id() == -1) {
129
86
        return fmt::format("(id={})", _parent->node_id());
130
86
    } else {
131
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
0
    }
133
86
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
6.58k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
6.58k
    if (_parent->nereids_id() == -1) {
129
3
        return fmt::format("(id={})", _parent->node_id());
130
6.58k
    } else {
131
6.58k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
6.58k
    }
133
6.58k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
438
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
438
    if (_parent->nereids_id() == -1) {
129
102
        return fmt::format("(id={})", _parent->node_id());
130
336
    } else {
131
336
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
336
    }
133
438
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
12.0k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
12.0k
    if (_parent->nereids_id() == -1) {
129
12.0k
        return fmt::format("(id={})", _parent->node_id());
130
12.0k
    } else {
131
2
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
2
    }
133
12.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
295k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
295k
    if (_parent->nereids_id() == -1) {
129
295k
        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
295k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
514k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
514k
    if (_parent->nereids_id() == -1) {
129
514k
        return fmt::format("(id={})", _parent->node_id());
130
514k
    } else {
131
275
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
275
    }
133
514k
}
_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
0
        return Status::OK();
139
0
    }
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
1.34k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
1.34k
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
1.34k
    _terminated = true;
141
1.34k
    return Status::OK();
142
1.34k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
12
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
12
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
12
    _terminated = true;
141
12
    return Status::OK();
142
12
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
2
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
2
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
2
    _terminated = true;
141
2
    return Status::OK();
142
2
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
3.96k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
3.96k
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
3.96k
    _terminated = true;
141
3.96k
    return Status::OK();
142
3.96k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
4
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
4
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
4
    _terminated = true;
141
4
    return Status::OK();
142
4
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
719
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
719
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
719
    _terminated = true;
141
719
    return Status::OK();
142
719
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
2
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
2
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
2
    _terminated = true;
141
2
    return Status::OK();
142
2
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
2.58k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
2.58k
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
2.58k
    _terminated = true;
141
2.58k
    return Status::OK();
142
2.58k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
6
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
6
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
6
    _terminated = true;
141
6
    return Status::OK();
142
6
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
170
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
170
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
170
    _terminated = true;
141
170
    return Status::OK();
142
170
}
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.09M
DataDistribution OperatorBase::required_data_distribution(RuntimeState* /*state*/) const {
145
1.09M
    return _child && _child->is_serial_operator() && !is_source()
146
1.09M
                   ? DataDistribution(ExchangeType::PASSTHROUGH)
147
1.09M
                   : DataDistribution(ExchangeType::NOOP);
148
1.09M
}
149
150
81.7k
const RowDescriptor& OperatorBase::row_desc() const {
151
81.7k
    return _child->row_desc();
152
81.7k
}
153
154
template <typename SharedStateArg>
155
20.9k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
156
20.9k
    fmt::memory_buffer debug_string_buffer;
157
20.9k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
158
20.9k
    return fmt::to_string(debug_string_buffer);
159
20.9k
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
155
42
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
156
42
    fmt::memory_buffer debug_string_buffer;
157
42
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
158
42
    return fmt::to_string(debug_string_buffer);
159
42
}
_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
21
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
156
21
    fmt::memory_buffer debug_string_buffer;
157
21
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
158
21
    return fmt::to_string(debug_string_buffer);
159
21
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
155
16
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
156
16
    fmt::memory_buffer debug_string_buffer;
157
16
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
158
16
    return fmt::to_string(debug_string_buffer);
159
16
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
155
28
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
156
28
    fmt::memory_buffer debug_string_buffer;
157
28
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
158
28
    return fmt::to_string(debug_string_buffer);
159
28
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
155
20.6k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
156
20.6k
    fmt::memory_buffer debug_string_buffer;
157
20.6k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
158
20.6k
    return fmt::to_string(debug_string_buffer);
159
20.6k
}
_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
154
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
156
154
    fmt::memory_buffer debug_string_buffer;
157
154
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
158
154
    return fmt::to_string(debug_string_buffer);
159
154
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
160
161
template <typename SharedStateArg>
162
20.8k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
163
20.8k
    fmt::memory_buffer debug_string_buffer;
164
20.8k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
165
20.8k
    return fmt::to_string(debug_string_buffer);
166
20.8k
}
_ZNK5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
162
7
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
163
7
    fmt::memory_buffer debug_string_buffer;
164
7
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
165
7
    return fmt::to_string(debug_string_buffer);
166
7
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
162
21
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
163
21
    fmt::memory_buffer debug_string_buffer;
164
21
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
165
21
    return fmt::to_string(debug_string_buffer);
166
21
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
162
7
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
163
7
    fmt::memory_buffer debug_string_buffer;
164
7
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
165
7
    return fmt::to_string(debug_string_buffer);
166
7
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
162
28
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
163
28
    fmt::memory_buffer debug_string_buffer;
164
28
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
165
28
    return fmt::to_string(debug_string_buffer);
166
28
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
162
117
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
163
117
    fmt::memory_buffer debug_string_buffer;
164
117
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
165
117
    return fmt::to_string(debug_string_buffer);
166
117
}
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
60
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
163
60
    fmt::memory_buffer debug_string_buffer;
164
60
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
165
60
    return fmt::to_string(debug_string_buffer);
166
60
}
_ZNK5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
162
20.6k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
163
20.6k
    fmt::memory_buffer debug_string_buffer;
164
20.6k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
165
20.6k
    return fmt::to_string(debug_string_buffer);
166
20.6k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
167
168
21.0k
std::string OperatorXBase::debug_string(int indentation_level) const {
169
21.0k
    fmt::memory_buffer debug_string_buffer;
170
21.0k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, parallel_tasks={}, _is_serial_operator={}",
171
21.0k
                   std::string(indentation_level * 2, ' '), _op_name, node_id(), _parallel_tasks,
172
21.0k
                   _is_serial_operator);
173
21.0k
    return fmt::to_string(debug_string_buffer);
174
21.0k
}
175
176
20.9k
std::string OperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
177
20.9k
    return state->get_local_state(operator_id())->debug_string(indentation_level);
178
20.9k
}
179
180
891k
Status OperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
181
891k
    std::string node_name = print_plan_node_type(tnode.node_type);
182
891k
    _nereids_id = tnode.nereids_id;
183
891k
    if (!tnode.intermediate_output_tuple_id_list.empty()) {
184
5.76k
        if (!tnode.__isset.output_tuple_id) {
185
0
            return Status::InternalError("no final output tuple id");
186
0
        }
187
5.76k
        if (tnode.intermediate_output_tuple_id_list.size() !=
188
5.76k
            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.76k
    }
196
891k
    auto substr = node_name.substr(0, node_name.find("_NODE"));
197
891k
    _op_name = substr + "_OPERATOR";
198
199
891k
    if (tnode.__isset.vconjunct) {
200
0
        return Status::InternalError("vconjunct is not supported yet");
201
891k
    } else if (tnode.__isset.conjuncts) {
202
439k
        for (const auto& conjunct : tnode.conjuncts) {
203
439k
            VExprContextSPtr context;
204
439k
            RETURN_IF_ERROR(VExpr::create_expr_tree(conjunct, context));
205
439k
            _conjuncts.emplace_back(context);
206
439k
        }
207
141k
    }
208
209
    // create the projections expr
210
891k
    if (tnode.__isset.projections) {
211
354k
        DCHECK(tnode.__isset.output_tuple_id);
212
354k
        RETURN_IF_ERROR(VExpr::create_expr_trees(tnode.projections, _projections));
213
354k
    }
214
891k
    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
891k
    return Status::OK();
224
891k
}
225
226
955k
Status OperatorXBase::prepare(RuntimeState* state) {
227
955k
    for (auto& conjunct : _conjuncts) {
228
439k
        RETURN_IF_ERROR(conjunct->prepare(state, intermediate_row_desc()));
229
439k
    }
230
955k
    if (state->enable_adjust_conjunct_order_by_cost()) {
231
904k
        std::ranges::sort(_conjuncts, [](const auto& a, const auto& b) {
232
594k
            return a->execute_cost() < b->execute_cost();
233
594k
        });
234
904k
    };
235
236
973k
    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
955k
    RETURN_IF_ERROR(VExpr::prepare(_projections, state, projections_row_desc()));
241
242
955k
    if (has_output_row_desc()) {
243
353k
        RETURN_IF_ERROR(VExpr::check_expr_output_type(_projections, *_output_row_descriptor));
244
353k
    }
245
246
955k
    for (auto& conjunct : _conjuncts) {
247
438k
        RETURN_IF_ERROR(conjunct->open(state));
248
438k
    }
249
955k
    RETURN_IF_ERROR(VExpr::open(_projections, state));
250
955k
    for (auto& projections : _intermediate_projections) {
251
17.7k
        RETURN_IF_ERROR(VExpr::open(projections, state));
252
17.7k
    }
253
955k
    if (_child && !is_source()) {
254
177k
        RETURN_IF_ERROR(_child->prepare(state));
255
177k
    }
256
257
955k
    if (VExpr::contains_blockable_function(_conjuncts) ||
258
955k
        VExpr::contains_blockable_function(_projections)) {
259
0
        _blockable = true;
260
0
    }
261
262
955k
    return Status::OK();
263
955k
}
264
265
13.2k
Status OperatorXBase::terminate(RuntimeState* state) {
266
13.2k
    if (_child && !is_source()) {
267
4.21k
        RETURN_IF_ERROR(_child->terminate(state));
268
4.21k
    }
269
13.2k
    auto result = state->get_local_state_result(operator_id());
270
13.2k
    if (!result) {
271
0
        return result.error();
272
0
    }
273
13.2k
    return result.value()->terminate(state);
274
13.2k
}
275
276
6.95M
Status OperatorXBase::close(RuntimeState* state) {
277
6.95M
    if (_child && !is_source()) {
278
1.27M
        RETURN_IF_ERROR(_child->close(state));
279
1.27M
    }
280
6.95M
    auto result = state->get_local_state_result(operator_id());
281
6.95M
    if (!result) {
282
0
        return result.error();
283
0
    }
284
6.95M
    return result.value()->close(state);
285
6.95M
}
286
287
354k
void PipelineXLocalStateBase::clear_origin_block() {
288
354k
    _origin_block.clear_column_data(_parent->intermediate_row_desc().num_materialized_slots());
289
354k
}
290
291
837k
Status PipelineXLocalStateBase::filter_block(const VExprContextSPtrs& expr_contexts, Block* block) {
292
837k
    RETURN_IF_ERROR(VExprContext::filter_block(expr_contexts, block, block->columns()));
293
294
837k
    _estimate_memory_usage += VExprContext::get_memory_usage(expr_contexts);
295
837k
    return Status::OK();
296
837k
}
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
354k
                                     Block* output_block) const {
305
354k
    auto* local_state = state->get_local_state(operator_id());
306
354k
    SCOPED_TIMER(local_state->exec_time_counter());
307
354k
    SCOPED_TIMER(local_state->_projection_timer);
308
354k
    const size_t rows = origin_block->rows();
309
354k
    if (rows == 0) {
310
171k
        return Status::OK();
311
171k
    }
312
182k
    Block input_block = *origin_block;
313
314
182k
    size_t bytes_usage = 0;
315
182k
    ColumnsWithTypeAndName new_columns;
316
182k
    for (const auto& projections : local_state->_intermediate_projections) {
317
1.28k
        if (projections.empty()) {
318
0
            return Status::InternalError("meet empty intermediate projection, node id: {}",
319
0
                                         node_id());
320
0
        }
321
1.28k
        new_columns.resize(projections.size());
322
9.17k
        for (int i = 0; i < projections.size(); i++) {
323
7.89k
            RETURN_IF_ERROR(projections[i]->execute(&input_block, new_columns[i]));
324
7.89k
            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
7.89k
        }
332
1.28k
        Block tmp_block {new_columns};
333
1.28k
        bytes_usage += tmp_block.allocated_bytes();
334
1.28k
        input_block.swap(tmp_block);
335
1.28k
    }
336
337
182k
    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
850k
    auto insert_column_datas = [&](auto& to, ColumnPtr& from, size_t rows) {
344
850k
        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
850k
        } else {
354
850k
            if (_keep_origin || !from->is_exclusive()) {
355
828k
                to->insert_range_from(*from, 0, rows);
356
828k
                bytes_usage += from->allocated_bytes();
357
828k
            } else {
358
21.3k
                to = from->assume_mutable();
359
21.3k
            }
360
850k
        }
361
850k
    };
362
363
182k
    MutableBlock mutable_block =
364
182k
            VectorizedUtils::build_mutable_mem_reuse_block(output_block, *_output_row_descriptor);
365
182k
    if (rows != 0) {
366
182k
        auto& mutable_columns = mutable_block.mutable_columns();
367
182k
        DCHECK_EQ(mutable_columns.size(), local_state->_projections.size()) << debug_string();
368
1.03M
        for (int i = 0; i < mutable_columns.size(); ++i) {
369
850k
            ColumnPtr column_ptr;
370
850k
            RETURN_IF_ERROR(local_state->_projections[i]->execute(&input_block, column_ptr));
371
850k
            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
850k
            column_ptr = column_ptr->convert_to_full_column_if_const();
378
850k
            bytes_usage += column_ptr->allocated_bytes();
379
850k
            insert_column_datas(mutable_columns[i], column_ptr, rows);
380
850k
        }
381
182k
        DCHECK(mutable_block.rows() == rows);
382
182k
        output_block->set_columns(std::move(mutable_columns));
383
182k
    }
384
385
182k
    local_state->_estimate_memory_usage += bytes_usage;
386
387
182k
    return Status::OK();
388
182k
}
389
390
5.61M
Status OperatorXBase::get_block_after_projects(RuntimeState* state, Block* block, bool* eos) {
391
5.61M
    DBUG_EXECUTE_IF("Pipeline::return_empty_block", {
392
5.61M
        if (this->_op_name == "AGGREGATION_OPERATOR" || this->_op_name == "HASH_JOIN_OPERATOR" ||
393
5.61M
            this->_op_name == "PARTITIONED_AGGREGATION_OPERATOR" ||
394
5.61M
            this->_op_name == "PARTITIONED_HASH_JOIN_OPERATOR" ||
395
5.61M
            this->_op_name == "CROSS_JOIN_OPERATOR" || this->_op_name == "SORT_OPERATOR") {
396
5.61M
            if (_debug_point_count++ % 2 == 0) {
397
5.61M
                return Status::OK();
398
5.61M
            }
399
5.61M
        }
400
5.61M
    });
401
402
5.61M
    Status status;
403
5.61M
    auto* local_state = state->get_local_state(operator_id());
404
5.61M
    Defer defer([&]() {
405
5.61M
        if (status.ok()) {
406
5.61M
            local_state->update_output_block_counters(*block);
407
5.61M
        }
408
5.61M
    });
409
5.61M
    if (_output_row_descriptor) {
410
354k
        local_state->clear_origin_block();
411
354k
        status = get_block(state, &local_state->_origin_block, eos);
412
354k
        if (UNLIKELY(!status.ok())) {
413
19
            return status;
414
19
        }
415
354k
        status = do_projections(state, &local_state->_origin_block, block);
416
354k
        RETURN_IF_ERROR(status);
417
354k
        RETURN_IF_ERROR(block->check_type_and_column());
418
354k
        return Status::OK();
419
354k
    }
420
5.25M
    status = get_block(state, block, eos);
421
5.25M
    RETURN_IF_ERROR(status);
422
5.25M
    RETURN_IF_ERROR(block->check_type_and_column());
423
5.25M
    return Status::OK();
424
5.25M
}
425
426
3.33M
void PipelineXLocalStateBase::reached_limit(Block* block, bool* eos) {
427
3.33M
    if (_parent->_limit != -1 and _num_rows_returned + block->rows() >= _parent->_limit) {
428
7.36k
        block->set_num_rows(_parent->_limit - _num_rows_returned);
429
7.36k
        *eos = true;
430
7.36k
    }
431
432
3.33M
    DBUG_EXECUTE_IF("Pipeline::reached_limit_early", {
433
3.33M
        auto op_name = to_lower(_parent->_op_name);
434
3.33M
        auto arg_op_name = dp->param<std::string>("op_name");
435
3.33M
        arg_op_name = to_lower(arg_op_name);
436
437
3.33M
        if (op_name == arg_op_name) {
438
3.33M
            *eos = true;
439
3.33M
        }
440
3.33M
    });
441
442
3.33M
    if (auto rows = block->rows()) {
443
924k
        _num_rows_returned += rows;
444
924k
        _state->get_query_ctx()->resource_ctx()->io_context()->update_process_rows(rows);
445
924k
    }
446
3.33M
}
447
448
32.9k
Status DataSinkOperatorXBase::terminate(RuntimeState* state) {
449
32.9k
    auto result = state->get_sink_local_state_result();
450
32.9k
    if (!result) {
451
0
        return result.error();
452
0
    }
453
32.9k
    return result.value()->terminate(state);
454
32.9k
}
455
456
20.9k
std::string DataSinkOperatorXBase::debug_string(int indentation_level) const {
457
20.9k
    fmt::memory_buffer debug_string_buffer;
458
459
20.9k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, _is_serial_operator={}",
460
20.9k
                   std::string(indentation_level * 2, ' '), _name, node_id(), _is_serial_operator);
461
20.9k
    return fmt::to_string(debug_string_buffer);
462
20.9k
}
463
464
20.8k
std::string DataSinkOperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
465
20.8k
    return state->get_sink_local_state()->debug_string(indentation_level);
466
20.8k
}
467
468
540k
Status DataSinkOperatorXBase::init(const TDataSink& tsink) {
469
540k
    std::string op_name = "UNKNOWN_SINK";
470
540k
    auto it = _TDataSinkType_VALUES_TO_NAMES.find(tsink.type);
471
472
541k
    if (it != _TDataSinkType_VALUES_TO_NAMES.end()) {
473
541k
        op_name = it->second;
474
541k
    }
475
540k
    _name = op_name + "_OPERATOR";
476
540k
    return Status::OK();
477
540k
}
478
479
282k
Status DataSinkOperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
480
282k
    std::string op_name = print_plan_node_type(tnode.node_type);
481
282k
    _nereids_id = tnode.nereids_id;
482
282k
    auto substr = op_name.substr(0, op_name.find("_NODE"));
483
282k
    _name = substr + "_SINK_OPERATOR";
484
282k
    return Status::OK();
485
282k
}
486
487
template <typename LocalStateType>
488
Status DataSinkOperatorX<LocalStateType>::setup_local_state(RuntimeState* state,
489
2.30M
                                                            LocalSinkStateInfo& info) {
490
2.30M
    auto local_state = LocalStateType::create_unique(this, state);
491
2.30M
    RETURN_IF_ERROR(local_state->init(state, info));
492
2.30M
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
493
2.30M
    return Status::OK();
494
2.30M
}
_ZN5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
489
118k
                                                            LocalSinkStateInfo& info) {
490
118k
    auto local_state = LocalStateType::create_unique(this, state);
491
118k
    RETURN_IF_ERROR(local_state->init(state, info));
492
118k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
493
118k
    return Status::OK();
494
118k
}
_ZN5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
489
452k
                                                            LocalSinkStateInfo& info) {
490
452k
    auto local_state = LocalStateType::create_unique(this, state);
491
452k
    RETURN_IF_ERROR(local_state->init(state, info));
492
452k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
493
452k
    return Status::OK();
494
452k
}
_ZN5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
489
88
                                                            LocalSinkStateInfo& info) {
490
88
    auto local_state = LocalStateType::create_unique(this, state);
491
88
    RETURN_IF_ERROR(local_state->init(state, info));
492
88
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
493
88
    return Status::OK();
494
88
}
_ZN5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
489
3
                                                            LocalSinkStateInfo& info) {
490
3
    auto local_state = LocalStateType::create_unique(this, state);
491
3
    RETURN_IF_ERROR(local_state->init(state, info));
492
3
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
493
3
    return Status::OK();
494
3
}
_ZN5doris17DataSinkOperatorXINS_24ResultFileSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
489
515
                                                            LocalSinkStateInfo& info) {
490
515
    auto local_state = LocalStateType::create_unique(this, state);
491
515
    RETURN_IF_ERROR(local_state->init(state, info));
492
515
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
493
515
    return Status::OK();
494
515
}
_ZN5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
489
43.7k
                                                            LocalSinkStateInfo& info) {
490
43.7k
    auto local_state = LocalStateType::create_unique(this, state);
491
43.7k
    RETURN_IF_ERROR(local_state->init(state, info));
492
43.7k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
493
43.7k
    return Status::OK();
494
43.7k
}
_ZN5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
489
8.85k
                                                            LocalSinkStateInfo& info) {
490
8.85k
    auto local_state = LocalStateType::create_unique(this, state);
491
8.85k
    RETURN_IF_ERROR(local_state->init(state, info));
492
8.85k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
493
8.85k
    return Status::OK();
494
8.85k
}
_ZN5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
489
3.86k
                                                            LocalSinkStateInfo& info) {
490
3.86k
    auto local_state = LocalStateType::create_unique(this, state);
491
3.86k
    RETURN_IF_ERROR(local_state->init(state, info));
492
3.86k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
493
3.86k
    return Status::OK();
494
3.86k
}
_ZN5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
489
156
                                                            LocalSinkStateInfo& info) {
490
156
    auto local_state = LocalStateType::create_unique(this, state);
491
156
    RETURN_IF_ERROR(local_state->init(state, info));
492
156
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
493
156
    return Status::OK();
494
156
}
_ZN5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
489
3.38k
                                                            LocalSinkStateInfo& info) {
490
3.38k
    auto local_state = LocalStateType::create_unique(this, state);
491
3.38k
    RETURN_IF_ERROR(local_state->init(state, info));
492
3.38k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
493
3.38k
    return Status::OK();
494
3.38k
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_27IcebergDeleteSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
489
160
                                                            LocalSinkStateInfo& info) {
490
160
    auto local_state = LocalStateType::create_unique(this, state);
491
160
    RETURN_IF_ERROR(local_state->init(state, info));
492
160
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
493
160
    return Status::OK();
494
160
}
_ZN5doris17DataSinkOperatorXINS_26IcebergMergeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
489
640
                                                            LocalSinkStateInfo& info) {
490
640
    auto local_state = LocalStateType::create_unique(this, state);
491
640
    RETURN_IF_ERROR(local_state->init(state, info));
492
640
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
493
640
    return Status::OK();
494
640
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_21MCTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
489
10.1k
                                                            LocalSinkStateInfo& info) {
490
10.1k
    auto local_state = LocalStateType::create_unique(this, state);
491
10.1k
    RETURN_IF_ERROR(local_state->init(state, info));
492
10.1k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
493
10.1k
    return Status::OK();
494
10.1k
}
_ZN5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
489
83
                                                            LocalSinkStateInfo& info) {
490
83
    auto local_state = LocalStateType::create_unique(this, state);
491
83
    RETURN_IF_ERROR(local_state->init(state, info));
492
83
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
493
83
    return Status::OK();
494
83
}
_ZN5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
489
283k
                                                            LocalSinkStateInfo& info) {
490
283k
    auto local_state = LocalStateType::create_unique(this, state);
491
283k
    RETURN_IF_ERROR(local_state->init(state, info));
492
283k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
493
283k
    return Status::OK();
494
283k
}
_ZN5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
489
33
                                                            LocalSinkStateInfo& info) {
490
33
    auto local_state = LocalStateType::create_unique(this, state);
491
33
    RETURN_IF_ERROR(local_state->init(state, info));
492
33
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
493
33
    return Status::OK();
494
33
}
_ZN5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
489
295k
                                                            LocalSinkStateInfo& info) {
490
295k
    auto local_state = LocalStateType::create_unique(this, state);
491
295k
    RETURN_IF_ERROR(local_state->init(state, info));
492
295k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
493
295k
    return Status::OK();
494
295k
}
_ZN5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
489
211k
                                                            LocalSinkStateInfo& info) {
490
211k
    auto local_state = LocalStateType::create_unique(this, state);
491
211k
    RETURN_IF_ERROR(local_state->init(state, info));
492
211k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
493
211k
    return Status::OK();
494
211k
}
_ZN5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
489
415
                                                            LocalSinkStateInfo& info) {
490
415
    auto local_state = LocalStateType::create_unique(this, state);
491
415
    RETURN_IF_ERROR(local_state->init(state, info));
492
415
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
493
415
    return Status::OK();
494
415
}
_ZN5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
489
188
                                                            LocalSinkStateInfo& info) {
490
188
    auto local_state = LocalStateType::create_unique(this, state);
491
188
    RETURN_IF_ERROR(local_state->init(state, info));
492
188
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
493
188
    return Status::OK();
494
188
}
_ZN5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
489
801k
                                                            LocalSinkStateInfo& info) {
490
801k
    auto local_state = LocalStateType::create_unique(this, state);
491
801k
    RETURN_IF_ERROR(local_state->init(state, info));
492
801k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
493
801k
    return Status::OK();
494
801k
}
_ZN5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
489
31.6k
                                                            LocalSinkStateInfo& info) {
490
31.6k
    auto local_state = LocalStateType::create_unique(this, state);
491
31.6k
    RETURN_IF_ERROR(local_state->init(state, info));
492
31.6k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
493
31.6k
    return Status::OK();
494
31.6k
}
_ZN5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
489
6.57k
                                                            LocalSinkStateInfo& info) {
490
6.57k
    auto local_state = LocalStateType::create_unique(this, state);
491
6.57k
    RETURN_IF_ERROR(local_state->init(state, info));
492
6.57k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
493
6.57k
    return Status::OK();
494
6.57k
}
_ZN5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
489
14.3k
                                                            LocalSinkStateInfo& info) {
490
14.3k
    auto local_state = LocalStateType::create_unique(this, state);
491
14.3k
    RETURN_IF_ERROR(local_state->init(state, info));
492
14.3k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
493
14.3k
    return Status::OK();
494
14.3k
}
_ZN5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
489
335
                                                            LocalSinkStateInfo& info) {
490
335
    auto local_state = LocalStateType::create_unique(this, state);
491
335
    RETURN_IF_ERROR(local_state->init(state, info));
492
335
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
493
335
    return Status::OK();
494
335
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
489
4.54k
                                                            LocalSinkStateInfo& info) {
490
4.54k
    auto local_state = LocalStateType::create_unique(this, state);
491
4.54k
    RETURN_IF_ERROR(local_state->init(state, info));
492
4.54k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
493
4.54k
    return Status::OK();
494
4.54k
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
489
2.54k
                                                            LocalSinkStateInfo& info) {
490
2.54k
    auto local_state = LocalStateType::create_unique(this, state);
491
2.54k
    RETURN_IF_ERROR(local_state->init(state, info));
492
2.54k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
493
2.54k
    return Status::OK();
494
2.54k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
489
2.36k
                                                            LocalSinkStateInfo& info) {
490
2.36k
    auto local_state = LocalStateType::create_unique(this, state);
491
2.36k
    RETURN_IF_ERROR(local_state->init(state, info));
492
2.36k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
493
2.36k
    return Status::OK();
494
2.36k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
489
2.46k
                                                            LocalSinkStateInfo& info) {
490
2.46k
    auto local_state = LocalStateType::create_unique(this, state);
491
2.46k
    RETURN_IF_ERROR(local_state->init(state, info));
492
2.46k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
493
2.46k
    return Status::OK();
494
2.46k
}
_ZN5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
489
1
                                                            LocalSinkStateInfo& info) {
490
1
    auto local_state = LocalStateType::create_unique(this, state);
491
1
    RETURN_IF_ERROR(local_state->init(state, info));
492
1
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
493
1
    return Status::OK();
494
1
}
_ZN5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
489
166
                                                            LocalSinkStateInfo& info) {
490
166
    auto local_state = LocalStateType::create_unique(this, state);
491
166
    RETURN_IF_ERROR(local_state->init(state, info));
492
166
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
493
166
    return Status::OK();
494
166
}
_ZN5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
489
14
                                                            LocalSinkStateInfo& info) {
490
14
    auto local_state = LocalStateType::create_unique(this, state);
491
14
    RETURN_IF_ERROR(local_state->init(state, info));
492
14
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
493
14
    return Status::OK();
494
14
}
_ZN5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
489
105
                                                            LocalSinkStateInfo& info) {
490
105
    auto local_state = LocalStateType::create_unique(this, state);
491
105
    RETURN_IF_ERROR(local_state->init(state, info));
492
105
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
493
105
    return Status::OK();
494
105
}
_ZN5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
489
151
                                                            LocalSinkStateInfo& info) {
490
151
    auto local_state = LocalStateType::create_unique(this, state);
491
151
    RETURN_IF_ERROR(local_state->init(state, info));
492
151
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
493
151
    return Status::OK();
494
151
}
_ZN5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
489
151
                                                            LocalSinkStateInfo& info) {
490
151
    auto local_state = LocalStateType::create_unique(this, state);
491
151
    RETURN_IF_ERROR(local_state->init(state, info));
492
151
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
493
151
    return Status::OK();
494
151
}
495
496
template <typename LocalStateType>
497
1.96M
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
498
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
499
0
                                 LocalExchangeSharedState>) {
500
0
        return nullptr;
501
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
502
0
                                        MultiCastSharedState>) {
503
0
        throw Exception(Status::FatalError("should not reach here!"));
504
1.96M
    } else {
505
1.96M
        auto ss = LocalStateType::SharedStateType::create_shared();
506
1.96M
        ss->id = operator_id();
507
1.96M
        for (auto& dest : dests_id()) {
508
1.95M
            ss->related_op_ids.insert(dest);
509
1.95M
        }
510
1.96M
        return ss;
511
1.96M
    }
512
1.96M
}
_ZNK5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
497
100k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
498
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
499
                                 LocalExchangeSharedState>) {
500
        return nullptr;
501
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
502
                                        MultiCastSharedState>) {
503
        throw Exception(Status::FatalError("should not reach here!"));
504
100k
    } else {
505
100k
        auto ss = LocalStateType::SharedStateType::create_shared();
506
100k
        ss->id = operator_id();
507
100k
        for (auto& dest : dests_id()) {
508
100k
            ss->related_op_ids.insert(dest);
509
100k
        }
510
100k
        return ss;
511
100k
    }
512
100k
}
_ZNK5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
497
453k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
498
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
499
                                 LocalExchangeSharedState>) {
500
        return nullptr;
501
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
502
                                        MultiCastSharedState>) {
503
        throw Exception(Status::FatalError("should not reach here!"));
504
453k
    } else {
505
453k
        auto ss = LocalStateType::SharedStateType::create_shared();
506
453k
        ss->id = operator_id();
507
453k
        for (auto& dest : dests_id()) {
508
452k
            ss->related_op_ids.insert(dest);
509
452k
        }
510
453k
        return ss;
511
453k
    }
512
453k
}
_ZNK5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
497
88
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
498
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
499
                                 LocalExchangeSharedState>) {
500
        return nullptr;
501
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
502
                                        MultiCastSharedState>) {
503
        throw Exception(Status::FatalError("should not reach here!"));
504
88
    } else {
505
88
        auto ss = LocalStateType::SharedStateType::create_shared();
506
88
        ss->id = operator_id();
507
88
        for (auto& dest : dests_id()) {
508
88
            ss->related_op_ids.insert(dest);
509
88
        }
510
88
        return ss;
511
88
    }
512
88
}
_ZNK5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
497
3
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
498
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
499
                                 LocalExchangeSharedState>) {
500
        return nullptr;
501
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
502
                                        MultiCastSharedState>) {
503
        throw Exception(Status::FatalError("should not reach here!"));
504
3
    } else {
505
3
        auto ss = LocalStateType::SharedStateType::create_shared();
506
3
        ss->id = operator_id();
507
3
        for (auto& dest : dests_id()) {
508
3
            ss->related_op_ids.insert(dest);
509
3
        }
510
3
        return ss;
511
3
    }
512
3
}
_ZNK5doris17DataSinkOperatorXINS_24ResultFileSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
497
514
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
498
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
499
                                 LocalExchangeSharedState>) {
500
        return nullptr;
501
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
502
                                        MultiCastSharedState>) {
503
        throw Exception(Status::FatalError("should not reach here!"));
504
514
    } else {
505
514
        auto ss = LocalStateType::SharedStateType::create_shared();
506
514
        ss->id = operator_id();
507
515
        for (auto& dest : dests_id()) {
508
515
            ss->related_op_ids.insert(dest);
509
515
        }
510
514
        return ss;
511
514
    }
512
514
}
_ZNK5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
497
43.6k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
498
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
499
                                 LocalExchangeSharedState>) {
500
        return nullptr;
501
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
502
                                        MultiCastSharedState>) {
503
        throw Exception(Status::FatalError("should not reach here!"));
504
43.6k
    } else {
505
43.6k
        auto ss = LocalStateType::SharedStateType::create_shared();
506
43.6k
        ss->id = operator_id();
507
43.7k
        for (auto& dest : dests_id()) {
508
43.7k
            ss->related_op_ids.insert(dest);
509
43.7k
        }
510
43.6k
        return ss;
511
43.6k
    }
512
43.6k
}
_ZNK5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE19create_shared_stateEv
Line
Count
Source
497
8.85k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
498
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
499
                                 LocalExchangeSharedState>) {
500
        return nullptr;
501
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
502
                                        MultiCastSharedState>) {
503
        throw Exception(Status::FatalError("should not reach here!"));
504
8.85k
    } else {
505
8.85k
        auto ss = LocalStateType::SharedStateType::create_shared();
506
8.85k
        ss->id = operator_id();
507
8.85k
        for (auto& dest : dests_id()) {
508
8.85k
            ss->related_op_ids.insert(dest);
509
8.85k
        }
510
8.85k
        return ss;
511
8.85k
    }
512
8.85k
}
_ZNK5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
497
3.86k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
498
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
499
                                 LocalExchangeSharedState>) {
500
        return nullptr;
501
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
502
                                        MultiCastSharedState>) {
503
        throw Exception(Status::FatalError("should not reach here!"));
504
3.86k
    } else {
505
3.86k
        auto ss = LocalStateType::SharedStateType::create_shared();
506
3.86k
        ss->id = operator_id();
507
3.86k
        for (auto& dest : dests_id()) {
508
3.85k
            ss->related_op_ids.insert(dest);
509
3.85k
        }
510
3.86k
        return ss;
511
3.86k
    }
512
3.86k
}
_ZNK5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
497
156
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
498
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
499
                                 LocalExchangeSharedState>) {
500
        return nullptr;
501
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
502
                                        MultiCastSharedState>) {
503
        throw Exception(Status::FatalError("should not reach here!"));
504
156
    } else {
505
156
        auto ss = LocalStateType::SharedStateType::create_shared();
506
156
        ss->id = operator_id();
507
156
        for (auto& dest : dests_id()) {
508
156
            ss->related_op_ids.insert(dest);
509
156
        }
510
156
        return ss;
511
156
    }
512
156
}
_ZNK5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
497
3.38k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
498
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
499
                                 LocalExchangeSharedState>) {
500
        return nullptr;
501
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
502
                                        MultiCastSharedState>) {
503
        throw Exception(Status::FatalError("should not reach here!"));
504
3.38k
    } else {
505
3.38k
        auto ss = LocalStateType::SharedStateType::create_shared();
506
3.38k
        ss->id = operator_id();
507
3.38k
        for (auto& dest : dests_id()) {
508
3.38k
            ss->related_op_ids.insert(dest);
509
3.38k
        }
510
3.38k
        return ss;
511
3.38k
    }
512
3.38k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27IcebergDeleteSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
497
160
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
498
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
499
                                 LocalExchangeSharedState>) {
500
        return nullptr;
501
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
502
                                        MultiCastSharedState>) {
503
        throw Exception(Status::FatalError("should not reach here!"));
504
160
    } else {
505
160
        auto ss = LocalStateType::SharedStateType::create_shared();
506
160
        ss->id = operator_id();
507
160
        for (auto& dest : dests_id()) {
508
160
            ss->related_op_ids.insert(dest);
509
160
        }
510
160
        return ss;
511
160
    }
512
160
}
_ZNK5doris17DataSinkOperatorXINS_26IcebergMergeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
497
640
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
498
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
499
                                 LocalExchangeSharedState>) {
500
        return nullptr;
501
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
502
                                        MultiCastSharedState>) {
503
        throw Exception(Status::FatalError("should not reach here!"));
504
640
    } else {
505
640
        auto ss = LocalStateType::SharedStateType::create_shared();
506
640
        ss->id = operator_id();
507
640
        for (auto& dest : dests_id()) {
508
640
            ss->related_op_ids.insert(dest);
509
640
        }
510
640
        return ss;
511
640
    }
512
640
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_21MCTableSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
497
10.1k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
498
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
499
                                 LocalExchangeSharedState>) {
500
        return nullptr;
501
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
502
                                        MultiCastSharedState>) {
503
        throw Exception(Status::FatalError("should not reach here!"));
504
10.1k
    } else {
505
10.1k
        auto ss = LocalStateType::SharedStateType::create_shared();
506
10.1k
        ss->id = operator_id();
507
10.1k
        for (auto& dest : dests_id()) {
508
10.1k
            ss->related_op_ids.insert(dest);
509
10.1k
        }
510
10.1k
        return ss;
511
10.1k
    }
512
10.1k
}
_ZNK5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
497
83
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
498
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
499
                                 LocalExchangeSharedState>) {
500
        return nullptr;
501
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
502
                                        MultiCastSharedState>) {
503
        throw Exception(Status::FatalError("should not reach here!"));
504
83
    } else {
505
83
        auto ss = LocalStateType::SharedStateType::create_shared();
506
83
        ss->id = operator_id();
507
83
        for (auto& dest : dests_id()) {
508
83
            ss->related_op_ids.insert(dest);
509
83
        }
510
83
        return ss;
511
83
    }
512
83
}
_ZNK5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
497
283k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
498
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
499
                                 LocalExchangeSharedState>) {
500
        return nullptr;
501
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
502
                                        MultiCastSharedState>) {
503
        throw Exception(Status::FatalError("should not reach here!"));
504
283k
    } else {
505
283k
        auto ss = LocalStateType::SharedStateType::create_shared();
506
283k
        ss->id = operator_id();
507
283k
        for (auto& dest : dests_id()) {
508
283k
            ss->related_op_ids.insert(dest);
509
283k
        }
510
283k
        return ss;
511
283k
    }
512
283k
}
_ZNK5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
497
35
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
498
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
499
                                 LocalExchangeSharedState>) {
500
        return nullptr;
501
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
502
                                        MultiCastSharedState>) {
503
        throw Exception(Status::FatalError("should not reach here!"));
504
35
    } else {
505
35
        auto ss = LocalStateType::SharedStateType::create_shared();
506
35
        ss->id = operator_id();
507
35
        for (auto& dest : dests_id()) {
508
35
            ss->related_op_ids.insert(dest);
509
35
        }
510
35
        return ss;
511
35
    }
512
35
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
497
212k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
498
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
499
                                 LocalExchangeSharedState>) {
500
        return nullptr;
501
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
502
                                        MultiCastSharedState>) {
503
        throw Exception(Status::FatalError("should not reach here!"));
504
212k
    } else {
505
212k
        auto ss = LocalStateType::SharedStateType::create_shared();
506
212k
        ss->id = operator_id();
507
212k
        for (auto& dest : dests_id()) {
508
212k
            ss->related_op_ids.insert(dest);
509
212k
        }
510
212k
        return ss;
511
212k
    }
512
212k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
497
187
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
498
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
499
                                 LocalExchangeSharedState>) {
500
        return nullptr;
501
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
502
                                        MultiCastSharedState>) {
503
        throw Exception(Status::FatalError("should not reach here!"));
504
187
    } else {
505
187
        auto ss = LocalStateType::SharedStateType::create_shared();
506
187
        ss->id = operator_id();
507
187
        for (auto& dest : dests_id()) {
508
187
            ss->related_op_ids.insert(dest);
509
187
        }
510
187
        return ss;
511
187
    }
512
187
}
_ZNK5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
497
801k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
498
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
499
                                 LocalExchangeSharedState>) {
500
        return nullptr;
501
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
502
                                        MultiCastSharedState>) {
503
        throw Exception(Status::FatalError("should not reach here!"));
504
801k
    } else {
505
801k
        auto ss = LocalStateType::SharedStateType::create_shared();
506
801k
        ss->id = operator_id();
507
801k
        for (auto& dest : dests_id()) {
508
799k
            ss->related_op_ids.insert(dest);
509
799k
        }
510
801k
        return ss;
511
801k
    }
512
801k
}
_ZNK5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
497
31.6k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
498
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
499
                                 LocalExchangeSharedState>) {
500
        return nullptr;
501
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
502
                                        MultiCastSharedState>) {
503
        throw Exception(Status::FatalError("should not reach here!"));
504
31.6k
    } else {
505
31.6k
        auto ss = LocalStateType::SharedStateType::create_shared();
506
31.6k
        ss->id = operator_id();
507
31.6k
        for (auto& dest : dests_id()) {
508
31.6k
            ss->related_op_ids.insert(dest);
509
31.6k
        }
510
31.6k
        return ss;
511
31.6k
    }
512
31.6k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
497
437
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
498
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
499
                                 LocalExchangeSharedState>) {
500
        return nullptr;
501
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
502
                                        MultiCastSharedState>) {
503
        throw Exception(Status::FatalError("should not reach here!"));
504
437
    } else {
505
437
        auto ss = LocalStateType::SharedStateType::create_shared();
506
437
        ss->id = operator_id();
507
438
        for (auto& dest : dests_id()) {
508
438
            ss->related_op_ids.insert(dest);
509
438
        }
510
437
        return ss;
511
437
    }
512
437
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE19create_shared_stateEv
Line
Count
Source
497
2.37k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
498
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
499
                                 LocalExchangeSharedState>) {
500
        return nullptr;
501
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
502
                                        MultiCastSharedState>) {
503
        throw Exception(Status::FatalError("should not reach here!"));
504
2.37k
    } else {
505
2.37k
        auto ss = LocalStateType::SharedStateType::create_shared();
506
2.37k
        ss->id = operator_id();
507
2.37k
        for (auto& dest : dests_id()) {
508
2.37k
            ss->related_op_ids.insert(dest);
509
2.37k
        }
510
2.37k
        return ss;
511
2.37k
    }
512
2.37k
}
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE19create_shared_stateEv
Line
Count
Source
497
2.48k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
498
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
499
                                 LocalExchangeSharedState>) {
500
        return nullptr;
501
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
502
                                        MultiCastSharedState>) {
503
        throw Exception(Status::FatalError("should not reach here!"));
504
2.48k
    } else {
505
2.48k
        auto ss = LocalStateType::SharedStateType::create_shared();
506
2.48k
        ss->id = operator_id();
507
2.48k
        for (auto& dest : dests_id()) {
508
2.48k
            ss->related_op_ids.insert(dest);
509
2.48k
        }
510
2.48k
        return ss;
511
2.48k
    }
512
2.48k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
497
166
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
498
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
499
                                 LocalExchangeSharedState>) {
500
        return nullptr;
501
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
502
                                        MultiCastSharedState>) {
503
        throw Exception(Status::FatalError("should not reach here!"));
504
166
    } else {
505
166
        auto ss = LocalStateType::SharedStateType::create_shared();
506
166
        ss->id = operator_id();
507
166
        for (auto& dest : dests_id()) {
508
166
            ss->related_op_ids.insert(dest);
509
166
        }
510
166
        return ss;
511
166
    }
512
166
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
497
105
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
498
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
499
                                 LocalExchangeSharedState>) {
500
        return nullptr;
501
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
502
                                        MultiCastSharedState>) {
503
        throw Exception(Status::FatalError("should not reach here!"));
504
105
    } else {
505
105
        auto ss = LocalStateType::SharedStateType::create_shared();
506
105
        ss->id = operator_id();
507
105
        for (auto& dest : dests_id()) {
508
105
            ss->related_op_ids.insert(dest);
509
105
        }
510
105
        return ss;
511
105
    }
512
105
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE19create_shared_stateEv
513
514
template <typename LocalStateType>
515
2.86M
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
516
2.86M
    auto local_state = LocalStateType::create_unique(state, this);
517
2.86M
    RETURN_IF_ERROR(local_state->init(state, info));
518
2.86M
    state->emplace_local_state(operator_id(), std::move(local_state));
519
2.86M
    return Status::OK();
520
2.86M
}
_ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
515
70.2k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
516
70.2k
    auto local_state = LocalStateType::create_unique(state, this);
517
70.2k
    RETURN_IF_ERROR(local_state->init(state, info));
518
70.2k
    state->emplace_local_state(operator_id(), std::move(local_state));
519
70.2k
    return Status::OK();
520
70.2k
}
_ZN5doris9OperatorXINS_18OlapScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
515
282k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
516
282k
    auto local_state = LocalStateType::create_unique(state, this);
517
282k
    RETURN_IF_ERROR(local_state->init(state, info));
518
282k
    state->emplace_local_state(operator_id(), std::move(local_state));
519
282k
    return Status::OK();
520
282k
}
_ZN5doris9OperatorXINS_21GroupCommitLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
515
80
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
516
80
    auto local_state = LocalStateType::create_unique(state, this);
517
80
    RETURN_IF_ERROR(local_state->init(state, info));
518
80
    state->emplace_local_state(operator_id(), std::move(local_state));
519
80
    return Status::OK();
520
80
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_18JDBCScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_18FileScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
515
31.8k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
516
31.8k
    auto local_state = LocalStateType::create_unique(state, this);
517
31.8k
    RETURN_IF_ERROR(local_state->init(state, info));
518
31.8k
    state->emplace_local_state(operator_id(), std::move(local_state));
519
31.8k
    return Status::OK();
520
31.8k
}
_ZN5doris9OperatorXINS_18AnalyticLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
515
10.1k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
516
10.1k
    auto local_state = LocalStateType::create_unique(state, this);
517
10.1k
    RETURN_IF_ERROR(local_state->init(state, info));
518
10.1k
    state->emplace_local_state(operator_id(), std::move(local_state));
519
10.1k
    return Status::OK();
520
10.1k
}
_ZN5doris9OperatorXINS_14SortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
515
10.6k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
516
10.6k
    auto local_state = LocalStateType::create_unique(state, this);
517
10.6k
    RETURN_IF_ERROR(local_state->init(state, info));
518
10.6k
    state->emplace_local_state(operator_id(), std::move(local_state));
519
10.6k
    return Status::OK();
520
10.6k
}
_ZN5doris9OperatorXINS_19SpillSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
515
27
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
516
27
    auto local_state = LocalStateType::create_unique(state, this);
517
27
    RETURN_IF_ERROR(local_state->init(state, info));
518
27
    state->emplace_local_state(operator_id(), std::move(local_state));
519
27
    return Status::OK();
520
27
}
_ZN5doris9OperatorXINS_24LocalMergeSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
515
271k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
516
271k
    auto local_state = LocalStateType::create_unique(state, this);
517
271k
    RETURN_IF_ERROR(local_state->init(state, info));
518
271k
    state->emplace_local_state(operator_id(), std::move(local_state));
519
271k
    return Status::OK();
520
271k
}
_ZN5doris9OperatorXINS_13AggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
515
211k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
516
211k
    auto local_state = LocalStateType::create_unique(state, this);
517
211k
    RETURN_IF_ERROR(local_state->init(state, info));
518
211k
    state->emplace_local_state(operator_id(), std::move(local_state));
519
211k
    return Status::OK();
520
211k
}
_ZN5doris9OperatorXINS_21BucketedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
515
490
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
516
490
    auto local_state = LocalStateType::create_unique(state, this);
517
490
    RETURN_IF_ERROR(local_state->init(state, info));
518
490
    state->emplace_local_state(operator_id(), std::move(local_state));
519
490
    return Status::OK();
520
490
}
_ZN5doris9OperatorXINS_24PartitionedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
515
178
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
516
178
    auto local_state = LocalStateType::create_unique(state, this);
517
178
    RETURN_IF_ERROR(local_state->init(state, info));
518
178
    state->emplace_local_state(operator_id(), std::move(local_state));
519
178
    return Status::OK();
520
178
}
_ZN5doris9OperatorXINS_23TableFunctionLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
515
4.39k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
516
4.39k
    auto local_state = LocalStateType::create_unique(state, this);
517
4.39k
    RETURN_IF_ERROR(local_state->init(state, info));
518
4.39k
    state->emplace_local_state(operator_id(), std::move(local_state));
519
4.39k
    return Status::OK();
520
4.39k
}
_ZN5doris9OperatorXINS_18ExchangeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
515
479k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
516
479k
    auto local_state = LocalStateType::create_unique(state, this);
517
479k
    RETURN_IF_ERROR(local_state->init(state, info));
518
479k
    state->emplace_local_state(operator_id(), std::move(local_state));
519
479k
    return Status::OK();
520
479k
}
_ZN5doris9OperatorXINS_16RepeatLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
515
1.27k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
516
1.27k
    auto local_state = LocalStateType::create_unique(state, this);
517
1.27k
    RETURN_IF_ERROR(local_state->init(state, info));
518
1.27k
    state->emplace_local_state(operator_id(), std::move(local_state));
519
1.27k
    return Status::OK();
520
1.27k
}
_ZN5doris9OperatorXINS_29NestedLoopJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
515
31.6k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
516
31.6k
    auto local_state = LocalStateType::create_unique(state, this);
517
31.6k
    RETURN_IF_ERROR(local_state->init(state, info));
518
31.6k
    state->emplace_local_state(operator_id(), std::move(local_state));
519
31.6k
    return Status::OK();
520
31.6k
}
_ZN5doris9OperatorXINS_23AssertNumRowsLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
515
221
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
516
221
    auto local_state = LocalStateType::create_unique(state, this);
517
221
    RETURN_IF_ERROR(local_state->init(state, info));
518
221
    state->emplace_local_state(operator_id(), std::move(local_state));
519
221
    return Status::OK();
520
221
}
_ZN5doris9OperatorXINS_18EmptySetLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
515
1.94k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
516
1.94k
    auto local_state = LocalStateType::create_unique(state, this);
517
1.94k
    RETURN_IF_ERROR(local_state->init(state, info));
518
1.94k
    state->emplace_local_state(operator_id(), std::move(local_state));
519
1.94k
    return Status::OK();
520
1.94k
}
_ZN5doris9OperatorXINS_21UnionSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
515
54.7k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
516
54.7k
    auto local_state = LocalStateType::create_unique(state, this);
517
54.7k
    RETURN_IF_ERROR(local_state->init(state, info));
518
54.7k
    state->emplace_local_state(operator_id(), std::move(local_state));
519
54.7k
    return Status::OK();
520
54.7k
}
_ZN5doris9OperatorXINS_35MultiCastDataStreamSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
515
42.0k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
516
42.0k
    auto local_state = LocalStateType::create_unique(state, this);
517
42.0k
    RETURN_IF_ERROR(local_state->init(state, info));
518
42.0k
    state->emplace_local_state(operator_id(), std::move(local_state));
519
42.0k
    return Status::OK();
520
42.0k
}
_ZN5doris9OperatorXINS_29PartitionSortSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
515
334
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
516
334
    auto local_state = LocalStateType::create_unique(state, this);
517
334
    RETURN_IF_ERROR(local_state->init(state, info));
518
334
    state->emplace_local_state(operator_id(), std::move(local_state));
519
334
    return Status::OK();
520
334
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
515
2.32k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
516
2.32k
    auto local_state = LocalStateType::create_unique(state, this);
517
2.32k
    RETURN_IF_ERROR(local_state->init(state, info));
518
2.32k
    state->emplace_local_state(operator_id(), std::move(local_state));
519
2.32k
    return Status::OK();
520
2.32k
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
515
2.45k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
516
2.45k
    auto local_state = LocalStateType::create_unique(state, this);
517
2.45k
    RETURN_IF_ERROR(local_state->init(state, info));
518
2.45k
    state->emplace_local_state(operator_id(), std::move(local_state));
519
2.45k
    return Status::OK();
520
2.45k
}
_ZN5doris9OperatorXINS_17DataGenLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
515
465
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
516
465
    auto local_state = LocalStateType::create_unique(state, this);
517
465
    RETURN_IF_ERROR(local_state->init(state, info));
518
465
    state->emplace_local_state(operator_id(), std::move(local_state));
519
465
    return Status::OK();
520
465
}
_ZN5doris9OperatorXINS_20SchemaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
515
2.04k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
516
2.04k
    auto local_state = LocalStateType::create_unique(state, this);
517
2.04k
    RETURN_IF_ERROR(local_state->init(state, info));
518
2.04k
    state->emplace_local_state(operator_id(), std::move(local_state));
519
2.04k
    return Status::OK();
520
2.04k
}
_ZN5doris9OperatorXINS_18MetaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
515
6.72k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
516
6.72k
    auto local_state = LocalStateType::create_unique(state, this);
517
6.72k
    RETURN_IF_ERROR(local_state->init(state, info));
518
6.72k
    state->emplace_local_state(operator_id(), std::move(local_state));
519
6.72k
    return Status::OK();
520
6.72k
}
_ZN5doris9OperatorXINS_29LocalExchangeSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
515
813k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
516
813k
    auto local_state = LocalStateType::create_unique(state, this);
517
813k
    RETURN_IF_ERROR(local_state->init(state, info));
518
813k
    state->emplace_local_state(operator_id(), std::move(local_state));
519
813k
    return Status::OK();
520
813k
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_34PartitionedHashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_21CacheSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
515
14
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
516
14
    auto local_state = LocalStateType::create_unique(state, this);
517
14
    RETURN_IF_ERROR(local_state->init(state, info));
518
14
    state->emplace_local_state(operator_id(), std::move(local_state));
519
14
    return Status::OK();
520
14
}
_ZN5doris9OperatorXINS_22RecCTESourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
515
151
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
516
151
    auto local_state = LocalStateType::create_unique(state, this);
517
151
    RETURN_IF_ERROR(local_state->init(state, info));
518
151
    state->emplace_local_state(operator_id(), std::move(local_state));
519
151
    return Status::OK();
520
151
}
_ZN5doris9OperatorXINS_20RecCTEScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
515
1.95k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
516
1.95k
    auto local_state = LocalStateType::create_unique(state, this);
517
1.95k
    RETURN_IF_ERROR(local_state->init(state, info));
518
1.95k
    state->emplace_local_state(operator_id(), std::move(local_state));
519
1.95k
    return Status::OK();
520
1.95k
}
_ZN5doris9OperatorXINS_25MaterializationLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
515
1.60k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
516
1.60k
    auto local_state = LocalStateType::create_unique(state, this);
517
1.60k
    RETURN_IF_ERROR(local_state->init(state, info));
518
1.60k
    state->emplace_local_state(operator_id(), std::move(local_state));
519
1.60k
    return Status::OK();
520
1.60k
}
_ZN5doris9OperatorXINS_16SelectLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
515
13.3k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
516
13.3k
    auto local_state = LocalStateType::create_unique(state, this);
517
13.3k
    RETURN_IF_ERROR(local_state->init(state, info));
518
13.3k
    state->emplace_local_state(operator_id(), std::move(local_state));
519
13.3k
    return Status::OK();
520
13.3k
}
_ZN5doris9OperatorXINS_22StreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
515
15.9k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
516
15.9k
    auto local_state = LocalStateType::create_unique(state, this);
517
15.9k
    RETURN_IF_ERROR(local_state->init(state, info));
518
15.9k
    state->emplace_local_state(operator_id(), std::move(local_state));
519
15.9k
    return Status::OK();
520
15.9k
}
_ZN5doris9OperatorXINS_30DistinctStreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
515
497k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
516
497k
    auto local_state = LocalStateType::create_unique(state, this);
517
497k
    RETURN_IF_ERROR(local_state->init(state, info));
518
497k
    state->emplace_local_state(operator_id(), std::move(local_state));
519
497k
    return Status::OK();
520
497k
}
521
522
PipelineXSinkLocalStateBase::PipelineXSinkLocalStateBase(DataSinkOperatorXBase* parent,
523
                                                         RuntimeState* state)
524
2.30M
        : _parent(parent), _state(state) {}
525
526
PipelineXLocalStateBase::PipelineXLocalStateBase(RuntimeState* state, OperatorXBase* parent)
527
2.86M
        : _num_rows_returned(0),
528
2.86M
          _rows_returned_counter(nullptr),
529
2.86M
          _parent(parent),
530
2.86M
          _state(state),
531
2.86M
          _budget(state->batch_size(), state->preferred_block_size_bytes()) {}
532
533
template <typename SharedStateArg>
534
2.87M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
2.87M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
2.87M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
537
2.87M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
538
2.87M
    _operator_profile->set_metadata(_parent->node_id());
539
    // indent is false so that source operator will have same
540
    // indentation_level with its parent operator.
541
2.87M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
2.87M
    _operator_profile->add_child(_common_profile.get(), true);
543
2.87M
    _operator_profile->add_child(_custom_profile.get(), true);
544
2.87M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
2.87M
    if constexpr (!is_fake_shared) {
546
1.52M
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
547
829k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
548
829k
                                    .first.get()
549
829k
                                    ->template cast<SharedStateArg>();
550
551
829k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
552
829k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
553
829k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
554
829k
        } else if (info.shared_state) {
555
630k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
556
0
                DCHECK(false);
557
0
            }
558
            // For UnionSourceOperator without children, there is no shared state.
559
630k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
630k
            _dependency = _shared_state->create_source_dependency(
562
630k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
630k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
630k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
630k
        } else {
566
69.2k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
7.10k
                DCHECK(false);
568
7.10k
            }
569
69.2k
        }
570
1.52M
    }
571
572
2.87M
    if (must_set_shared_state() && _shared_state == nullptr) {
573
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
574
0
    }
575
576
2.87M
    _rows_returned_counter =
577
2.87M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
578
2.87M
    _blocks_returned_counter =
579
2.87M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
580
2.87M
    _output_block_bytes_counter =
581
2.87M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
582
2.87M
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
583
2.87M
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
584
2.87M
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
585
2.87M
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
586
2.87M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
587
2.87M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
588
2.87M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
589
2.87M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
590
2.87M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
591
2.87M
    _memory_used_counter =
592
2.87M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
593
2.87M
    _common_profile->add_info_string("IsColocate",
594
2.87M
                                     std::to_string(_parent->is_colocated_operator()));
595
2.87M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
596
2.87M
    _common_profile->add_info_string("FollowedByShuffledOperator",
597
2.87M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
598
2.87M
    return Status::OK();
599
2.87M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
70.2k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
70.2k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
70.2k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
537
70.2k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
538
70.2k
    _operator_profile->set_metadata(_parent->node_id());
539
    // indent is false so that source operator will have same
540
    // indentation_level with its parent operator.
541
70.2k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
70.2k
    _operator_profile->add_child(_common_profile.get(), true);
543
70.2k
    _operator_profile->add_child(_custom_profile.get(), true);
544
70.2k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
70.2k
    if constexpr (!is_fake_shared) {
546
70.2k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
547
17.6k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
548
17.6k
                                    .first.get()
549
17.6k
                                    ->template cast<SharedStateArg>();
550
551
17.6k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
552
17.6k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
553
17.6k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
554
52.6k
        } else if (info.shared_state) {
555
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
556
                DCHECK(false);
557
            }
558
            // For UnionSourceOperator without children, there is no shared state.
559
51.8k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
51.8k
            _dependency = _shared_state->create_source_dependency(
562
51.8k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
51.8k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
51.8k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
51.8k
        } else {
566
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
                DCHECK(false);
568
            }
569
786
        }
570
70.2k
    }
571
572
70.2k
    if (must_set_shared_state() && _shared_state == nullptr) {
573
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
574
0
    }
575
576
70.2k
    _rows_returned_counter =
577
70.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
578
70.2k
    _blocks_returned_counter =
579
70.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
580
70.2k
    _output_block_bytes_counter =
581
70.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
582
70.2k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
583
70.2k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
584
70.2k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
585
70.2k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
586
70.2k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
587
70.2k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
588
70.2k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
589
70.2k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
590
70.2k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
591
70.2k
    _memory_used_counter =
592
70.2k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
593
70.2k
    _common_profile->add_info_string("IsColocate",
594
70.2k
                                     std::to_string(_parent->is_colocated_operator()));
595
70.2k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
596
70.2k
    _common_profile->add_info_string("FollowedByShuffledOperator",
597
70.2k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
598
70.2k
    return Status::OK();
599
70.2k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
1
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
1
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
1
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
537
1
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
538
1
    _operator_profile->set_metadata(_parent->node_id());
539
    // indent is false so that source operator will have same
540
    // indentation_level with its parent operator.
541
1
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
1
    _operator_profile->add_child(_common_profile.get(), true);
543
1
    _operator_profile->add_child(_custom_profile.get(), true);
544
1
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
1
    if constexpr (!is_fake_shared) {
546
1
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
547
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
548
0
                                    .first.get()
549
0
                                    ->template cast<SharedStateArg>();
550
551
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
552
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
553
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
554
1
        } else if (info.shared_state) {
555
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
556
                DCHECK(false);
557
            }
558
            // For UnionSourceOperator without children, there is no shared state.
559
1
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
1
            _dependency = _shared_state->create_source_dependency(
562
1
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
1
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
1
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
1
        } else {
566
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
                DCHECK(false);
568
            }
569
0
        }
570
1
    }
571
572
1
    if (must_set_shared_state() && _shared_state == nullptr) {
573
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
574
0
    }
575
576
1
    _rows_returned_counter =
577
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
578
1
    _blocks_returned_counter =
579
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
580
1
    _output_block_bytes_counter =
581
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
582
1
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
583
1
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
584
1
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
585
1
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
586
1
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
587
1
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
588
1
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
589
1
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
590
1
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
591
1
    _memory_used_counter =
592
1
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
593
1
    _common_profile->add_info_string("IsColocate",
594
1
                                     std::to_string(_parent->is_colocated_operator()));
595
1
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
596
1
    _common_profile->add_info_string("FollowedByShuffledOperator",
597
1
                                     std::to_string(_parent->followed_by_shuffled_operator()));
598
1
    return Status::OK();
599
1
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
283k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
283k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
283k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
537
283k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
538
283k
    _operator_profile->set_metadata(_parent->node_id());
539
    // indent is false so that source operator will have same
540
    // indentation_level with its parent operator.
541
283k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
283k
    _operator_profile->add_child(_common_profile.get(), true);
543
283k
    _operator_profile->add_child(_custom_profile.get(), true);
544
283k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
283k
    if constexpr (!is_fake_shared) {
546
283k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
547
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
548
0
                                    .first.get()
549
0
                                    ->template cast<SharedStateArg>();
550
551
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
552
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
553
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
554
283k
        } else if (info.shared_state) {
555
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
556
                DCHECK(false);
557
            }
558
            // For UnionSourceOperator without children, there is no shared state.
559
277k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
277k
            _dependency = _shared_state->create_source_dependency(
562
277k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
277k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
277k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
277k
        } else {
566
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
                DCHECK(false);
568
            }
569
5.88k
        }
570
283k
    }
571
572
283k
    if (must_set_shared_state() && _shared_state == nullptr) {
573
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
574
0
    }
575
576
283k
    _rows_returned_counter =
577
283k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
578
283k
    _blocks_returned_counter =
579
283k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
580
283k
    _output_block_bytes_counter =
581
283k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
582
283k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
583
283k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
584
283k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
585
283k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
586
283k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
587
283k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
588
283k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
589
283k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
590
283k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
591
283k
    _memory_used_counter =
592
283k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
593
283k
    _common_profile->add_info_string("IsColocate",
594
283k
                                     std::to_string(_parent->is_colocated_operator()));
595
283k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
596
283k
    _common_profile->add_info_string("FollowedByShuffledOperator",
597
283k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
598
283k
    return Status::OK();
599
283k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
27
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
27
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
27
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
537
27
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
538
27
    _operator_profile->set_metadata(_parent->node_id());
539
    // indent is false so that source operator will have same
540
    // indentation_level with its parent operator.
541
27
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
27
    _operator_profile->add_child(_common_profile.get(), true);
543
27
    _operator_profile->add_child(_custom_profile.get(), true);
544
27
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
27
    if constexpr (!is_fake_shared) {
546
27
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
547
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
548
0
                                    .first.get()
549
0
                                    ->template cast<SharedStateArg>();
550
551
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
552
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
553
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
554
27
        } else if (info.shared_state) {
555
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
556
                DCHECK(false);
557
            }
558
            // For UnionSourceOperator without children, there is no shared state.
559
27
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
27
            _dependency = _shared_state->create_source_dependency(
562
27
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
27
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
27
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
27
        } else {
566
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
                DCHECK(false);
568
            }
569
0
        }
570
27
    }
571
572
27
    if (must_set_shared_state() && _shared_state == nullptr) {
573
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
574
0
    }
575
576
27
    _rows_returned_counter =
577
27
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
578
27
    _blocks_returned_counter =
579
27
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
580
27
    _output_block_bytes_counter =
581
27
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
582
27
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
583
27
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
584
27
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
585
27
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
586
27
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
587
27
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
588
27
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
589
27
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
590
27
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
591
27
    _memory_used_counter =
592
27
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
593
27
    _common_profile->add_info_string("IsColocate",
594
27
                                     std::to_string(_parent->is_colocated_operator()));
595
27
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
596
27
    _common_profile->add_info_string("FollowedByShuffledOperator",
597
27
                                     std::to_string(_parent->followed_by_shuffled_operator()));
598
27
    return Status::OK();
599
27
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
31.5k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
31.5k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
31.5k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
537
31.5k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
538
31.5k
    _operator_profile->set_metadata(_parent->node_id());
539
    // indent is false so that source operator will have same
540
    // indentation_level with its parent operator.
541
31.5k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
31.5k
    _operator_profile->add_child(_common_profile.get(), true);
543
31.5k
    _operator_profile->add_child(_custom_profile.get(), true);
544
31.5k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
31.5k
    if constexpr (!is_fake_shared) {
546
31.5k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
547
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
548
0
                                    .first.get()
549
0
                                    ->template cast<SharedStateArg>();
550
551
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
552
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
553
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
554
31.5k
        } else if (info.shared_state) {
555
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
556
                DCHECK(false);
557
            }
558
            // For UnionSourceOperator without children, there is no shared state.
559
31.5k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
31.5k
            _dependency = _shared_state->create_source_dependency(
562
31.5k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
31.5k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
31.5k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
31.5k
        } else {
566
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
                DCHECK(false);
568
            }
569
15
        }
570
31.5k
    }
571
572
31.5k
    if (must_set_shared_state() && _shared_state == nullptr) {
573
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
574
0
    }
575
576
31.5k
    _rows_returned_counter =
577
31.5k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
578
31.5k
    _blocks_returned_counter =
579
31.5k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
580
31.5k
    _output_block_bytes_counter =
581
31.5k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
582
31.5k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
583
31.5k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
584
31.5k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
585
31.5k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
586
31.5k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
587
31.5k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
588
31.5k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
589
31.5k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
590
31.5k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
591
31.5k
    _memory_used_counter =
592
31.5k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
593
31.5k
    _common_profile->add_info_string("IsColocate",
594
31.5k
                                     std::to_string(_parent->is_colocated_operator()));
595
31.5k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
596
31.5k
    _common_profile->add_info_string("FollowedByShuffledOperator",
597
31.5k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
598
31.5k
    return Status::OK();
599
31.5k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
10.1k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
10.1k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
10.1k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
537
10.1k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
538
10.1k
    _operator_profile->set_metadata(_parent->node_id());
539
    // indent is false so that source operator will have same
540
    // indentation_level with its parent operator.
541
10.1k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
10.1k
    _operator_profile->add_child(_common_profile.get(), true);
543
10.1k
    _operator_profile->add_child(_custom_profile.get(), true);
544
10.1k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
10.1k
    if constexpr (!is_fake_shared) {
546
10.1k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
547
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
548
0
                                    .first.get()
549
0
                                    ->template cast<SharedStateArg>();
550
551
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
552
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
553
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
554
10.1k
        } else if (info.shared_state) {
555
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
556
                DCHECK(false);
557
            }
558
            // For UnionSourceOperator without children, there is no shared state.
559
10.1k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
10.1k
            _dependency = _shared_state->create_source_dependency(
562
10.1k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
10.1k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
10.1k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
10.1k
        } else {
566
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
                DCHECK(false);
568
            }
569
73
        }
570
10.1k
    }
571
572
10.1k
    if (must_set_shared_state() && _shared_state == nullptr) {
573
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
574
0
    }
575
576
10.1k
    _rows_returned_counter =
577
10.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
578
10.1k
    _blocks_returned_counter =
579
10.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
580
10.1k
    _output_block_bytes_counter =
581
10.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
582
10.1k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
583
10.1k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
584
10.1k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
585
10.1k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
586
10.1k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
587
10.1k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
588
10.1k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
589
10.1k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
590
10.1k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
591
10.1k
    _memory_used_counter =
592
10.1k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
593
10.1k
    _common_profile->add_info_string("IsColocate",
594
10.1k
                                     std::to_string(_parent->is_colocated_operator()));
595
10.1k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
596
10.1k
    _common_profile->add_info_string("FollowedByShuffledOperator",
597
10.1k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
598
10.1k
    return Status::OK();
599
10.1k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
212k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
212k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
212k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
537
212k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
538
212k
    _operator_profile->set_metadata(_parent->node_id());
539
    // indent is false so that source operator will have same
540
    // indentation_level with its parent operator.
541
212k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
212k
    _operator_profile->add_child(_common_profile.get(), true);
543
212k
    _operator_profile->add_child(_custom_profile.get(), true);
544
212k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
212k
    if constexpr (!is_fake_shared) {
546
212k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
547
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
548
0
                                    .first.get()
549
0
                                    ->template cast<SharedStateArg>();
550
551
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
552
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
553
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
554
212k
        } else if (info.shared_state) {
555
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
556
                DCHECK(false);
557
            }
558
            // For UnionSourceOperator without children, there is no shared state.
559
208k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
208k
            _dependency = _shared_state->create_source_dependency(
562
208k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
208k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
208k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
208k
        } else {
566
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
                DCHECK(false);
568
            }
569
3.29k
        }
570
212k
    }
571
572
212k
    if (must_set_shared_state() && _shared_state == nullptr) {
573
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
574
0
    }
575
576
212k
    _rows_returned_counter =
577
212k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
578
212k
    _blocks_returned_counter =
579
212k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
580
212k
    _output_block_bytes_counter =
581
212k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
582
212k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
583
212k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
584
212k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
585
212k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
586
212k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
587
212k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
588
212k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
589
212k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
590
212k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
591
212k
    _memory_used_counter =
592
212k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
593
212k
    _common_profile->add_info_string("IsColocate",
594
212k
                                     std::to_string(_parent->is_colocated_operator()));
595
212k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
596
212k
    _common_profile->add_info_string("FollowedByShuffledOperator",
597
212k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
598
212k
    return Status::OK();
599
212k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
493
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
493
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
493
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
537
493
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
538
493
    _operator_profile->set_metadata(_parent->node_id());
539
    // indent is false so that source operator will have same
540
    // indentation_level with its parent operator.
541
493
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
493
    _operator_profile->add_child(_common_profile.get(), true);
543
493
    _operator_profile->add_child(_custom_profile.get(), true);
544
493
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
493
    if constexpr (!is_fake_shared) {
546
493
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
547
486
            _shared_state = info.shared_state_map.at(_parent->operator_id())
548
486
                                    .first.get()
549
486
                                    ->template cast<SharedStateArg>();
550
551
486
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
552
486
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
553
486
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
554
486
        } else if (info.shared_state) {
555
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
556
                DCHECK(false);
557
            }
558
            // For UnionSourceOperator without children, there is no shared state.
559
0
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
0
            _dependency = _shared_state->create_source_dependency(
562
0
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
7
        } else {
566
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
                DCHECK(false);
568
            }
569
7
        }
570
493
    }
571
572
493
    if (must_set_shared_state() && _shared_state == nullptr) {
573
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
574
0
    }
575
576
493
    _rows_returned_counter =
577
493
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
578
493
    _blocks_returned_counter =
579
493
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
580
493
    _output_block_bytes_counter =
581
493
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
582
493
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
583
493
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
584
493
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
585
493
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
586
493
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
587
493
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
588
493
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
589
493
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
590
493
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
591
493
    _memory_used_counter =
592
493
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
593
493
    _common_profile->add_info_string("IsColocate",
594
493
                                     std::to_string(_parent->is_colocated_operator()));
595
493
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
596
493
    _common_profile->add_info_string("FollowedByShuffledOperator",
597
493
                                     std::to_string(_parent->followed_by_shuffled_operator()));
598
493
    return Status::OK();
599
493
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
178
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
178
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
178
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
537
178
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
538
178
    _operator_profile->set_metadata(_parent->node_id());
539
    // indent is false so that source operator will have same
540
    // indentation_level with its parent operator.
541
178
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
178
    _operator_profile->add_child(_common_profile.get(), true);
543
178
    _operator_profile->add_child(_custom_profile.get(), true);
544
178
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
178
    if constexpr (!is_fake_shared) {
546
178
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
547
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
548
0
                                    .first.get()
549
0
                                    ->template cast<SharedStateArg>();
550
551
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
552
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
553
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
554
178
        } else if (info.shared_state) {
555
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
556
                DCHECK(false);
557
            }
558
            // For UnionSourceOperator without children, there is no shared state.
559
178
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
178
            _dependency = _shared_state->create_source_dependency(
562
178
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
178
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
178
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
178
        } else {
566
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
                DCHECK(false);
568
            }
569
0
        }
570
178
    }
571
572
178
    if (must_set_shared_state() && _shared_state == nullptr) {
573
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
574
0
    }
575
576
178
    _rows_returned_counter =
577
178
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
578
178
    _blocks_returned_counter =
579
178
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
580
178
    _output_block_bytes_counter =
581
178
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
582
178
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
583
178
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
584
178
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
585
178
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
586
178
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
587
178
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
588
178
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
589
178
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
590
178
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
591
178
    _memory_used_counter =
592
178
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
593
178
    _common_profile->add_info_string("IsColocate",
594
178
                                     std::to_string(_parent->is_colocated_operator()));
595
178
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
596
178
    _common_profile->add_info_string("FollowedByShuffledOperator",
597
178
                                     std::to_string(_parent->followed_by_shuffled_operator()));
598
178
    return Status::OK();
599
178
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
1.34M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
1.34M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
1.34M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
537
1.34M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
538
1.34M
    _operator_profile->set_metadata(_parent->node_id());
539
    // indent is false so that source operator will have same
540
    // indentation_level with its parent operator.
541
1.34M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
1.34M
    _operator_profile->add_child(_common_profile.get(), true);
543
1.34M
    _operator_profile->add_child(_custom_profile.get(), true);
544
1.34M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
    if constexpr (!is_fake_shared) {
546
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
547
            _shared_state = info.shared_state_map.at(_parent->operator_id())
548
                                    .first.get()
549
                                    ->template cast<SharedStateArg>();
550
551
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
552
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
553
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
554
        } else if (info.shared_state) {
555
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
556
                DCHECK(false);
557
            }
558
            // For UnionSourceOperator without children, there is no shared state.
559
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
            _dependency = _shared_state->create_source_dependency(
562
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
        } else {
566
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
                DCHECK(false);
568
            }
569
        }
570
    }
571
572
1.34M
    if (must_set_shared_state() && _shared_state == nullptr) {
573
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
574
0
    }
575
576
1.34M
    _rows_returned_counter =
577
1.34M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
578
1.34M
    _blocks_returned_counter =
579
1.34M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
580
1.34M
    _output_block_bytes_counter =
581
1.34M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
582
1.34M
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
583
1.34M
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
584
1.34M
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
585
1.34M
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
586
1.34M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
587
1.34M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
588
1.34M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
589
1.34M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
590
1.34M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
591
1.34M
    _memory_used_counter =
592
1.34M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
593
1.34M
    _common_profile->add_info_string("IsColocate",
594
1.34M
                                     std::to_string(_parent->is_colocated_operator()));
595
1.34M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
596
1.34M
    _common_profile->add_info_string("FollowedByShuffledOperator",
597
1.34M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
598
1.34M
    return Status::OK();
599
1.34M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
54.7k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
54.7k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
54.7k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
537
54.7k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
538
54.7k
    _operator_profile->set_metadata(_parent->node_id());
539
    // indent is false so that source operator will have same
540
    // indentation_level with its parent operator.
541
54.7k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
54.7k
    _operator_profile->add_child(_common_profile.get(), true);
543
54.7k
    _operator_profile->add_child(_custom_profile.get(), true);
544
54.7k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
54.7k
    if constexpr (!is_fake_shared) {
546
54.7k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
547
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
548
0
                                    .first.get()
549
0
                                    ->template cast<SharedStateArg>();
550
551
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
552
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
553
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
554
54.7k
        } else if (info.shared_state) {
555
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
556
                DCHECK(false);
557
            }
558
            // For UnionSourceOperator without children, there is no shared state.
559
2.93k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
2.93k
            _dependency = _shared_state->create_source_dependency(
562
2.93k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
2.93k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
2.93k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
51.8k
        } else {
566
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
                DCHECK(false);
568
            }
569
51.8k
        }
570
54.7k
    }
571
572
54.7k
    if (must_set_shared_state() && _shared_state == nullptr) {
573
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
574
0
    }
575
576
54.7k
    _rows_returned_counter =
577
54.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
578
54.7k
    _blocks_returned_counter =
579
54.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
580
54.7k
    _output_block_bytes_counter =
581
54.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
582
54.7k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
583
54.7k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
584
54.7k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
585
54.7k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
586
54.7k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
587
54.7k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
588
54.7k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
589
54.7k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
590
54.7k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
591
54.7k
    _memory_used_counter =
592
54.7k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
593
54.7k
    _common_profile->add_info_string("IsColocate",
594
54.7k
                                     std::to_string(_parent->is_colocated_operator()));
595
54.7k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
596
54.7k
    _common_profile->add_info_string("FollowedByShuffledOperator",
597
54.7k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
598
54.7k
    return Status::OK();
599
54.7k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
17
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
17
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
17
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
537
17
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
538
17
    _operator_profile->set_metadata(_parent->node_id());
539
    // indent is false so that source operator will have same
540
    // indentation_level with its parent operator.
541
17
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
17
    _operator_profile->add_child(_common_profile.get(), true);
543
17
    _operator_profile->add_child(_custom_profile.get(), true);
544
17
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
17
    if constexpr (!is_fake_shared) {
546
17
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
547
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
548
0
                                    .first.get()
549
0
                                    ->template cast<SharedStateArg>();
550
551
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
552
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
553
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
554
17
        } else if (info.shared_state) {
555
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
556
                DCHECK(false);
557
            }
558
            // For UnionSourceOperator without children, there is no shared state.
559
17
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
17
            _dependency = _shared_state->create_source_dependency(
562
17
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
17
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
17
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
17
        } else {
566
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
                DCHECK(false);
568
            }
569
0
        }
570
17
    }
571
572
17
    if (must_set_shared_state() && _shared_state == nullptr) {
573
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
574
0
    }
575
576
17
    _rows_returned_counter =
577
17
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
578
17
    _blocks_returned_counter =
579
17
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
580
17
    _output_block_bytes_counter =
581
17
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
582
17
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
583
17
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
584
17
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
585
17
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
586
17
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
587
17
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
588
17
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
589
17
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
590
17
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
591
17
    _memory_used_counter =
592
17
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
593
17
    _common_profile->add_info_string("IsColocate",
594
17
                                     std::to_string(_parent->is_colocated_operator()));
595
17
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
596
17
    _common_profile->add_info_string("FollowedByShuffledOperator",
597
17
                                     std::to_string(_parent->followed_by_shuffled_operator()));
598
17
    return Status::OK();
599
17
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
41.9k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
41.9k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
41.9k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
537
41.9k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
538
41.9k
    _operator_profile->set_metadata(_parent->node_id());
539
    // indent is false so that source operator will have same
540
    // indentation_level with its parent operator.
541
41.9k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
41.9k
    _operator_profile->add_child(_common_profile.get(), true);
543
41.9k
    _operator_profile->add_child(_custom_profile.get(), true);
544
41.9k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
41.9k
    if constexpr (!is_fake_shared) {
546
41.9k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
547
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
548
0
                                    .first.get()
549
0
                                    ->template cast<SharedStateArg>();
550
551
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
552
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
553
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
554
41.9k
        } else if (info.shared_state) {
555
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
556
                DCHECK(false);
557
            }
558
            // For UnionSourceOperator without children, there is no shared state.
559
41.9k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
41.9k
            _dependency = _shared_state->create_source_dependency(
562
41.9k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
41.9k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
41.9k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
41.9k
        } else {
566
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
                DCHECK(false);
568
            }
569
84
        }
570
41.9k
    }
571
572
41.9k
    if (must_set_shared_state() && _shared_state == nullptr) {
573
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
574
0
    }
575
576
41.9k
    _rows_returned_counter =
577
41.9k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
578
41.9k
    _blocks_returned_counter =
579
41.9k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
580
41.9k
    _output_block_bytes_counter =
581
41.9k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
582
41.9k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
583
41.9k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
584
41.9k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
585
41.9k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
586
41.9k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
587
41.9k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
588
41.9k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
589
41.9k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
590
41.9k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
591
41.9k
    _memory_used_counter =
592
41.9k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
593
41.9k
    _common_profile->add_info_string("IsColocate",
594
41.9k
                                     std::to_string(_parent->is_colocated_operator()));
595
41.9k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
596
41.9k
    _common_profile->add_info_string("FollowedByShuffledOperator",
597
41.9k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
598
41.9k
    return Status::OK();
599
41.9k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
438
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
438
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
438
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
537
438
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
538
438
    _operator_profile->set_metadata(_parent->node_id());
539
    // indent is false so that source operator will have same
540
    // indentation_level with its parent operator.
541
438
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
438
    _operator_profile->add_child(_common_profile.get(), true);
543
438
    _operator_profile->add_child(_custom_profile.get(), true);
544
438
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
438
    if constexpr (!is_fake_shared) {
546
438
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
547
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
548
0
                                    .first.get()
549
0
                                    ->template cast<SharedStateArg>();
550
551
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
552
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
553
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
554
438
        } else if (info.shared_state) {
555
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
556
                DCHECK(false);
557
            }
558
            // For UnionSourceOperator without children, there is no shared state.
559
436
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
436
            _dependency = _shared_state->create_source_dependency(
562
436
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
436
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
436
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
436
        } else {
566
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
                DCHECK(false);
568
            }
569
2
        }
570
438
    }
571
572
438
    if (must_set_shared_state() && _shared_state == nullptr) {
573
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
574
0
    }
575
576
438
    _rows_returned_counter =
577
438
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
578
438
    _blocks_returned_counter =
579
438
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
580
438
    _output_block_bytes_counter =
581
438
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
582
438
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
583
438
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
584
438
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
585
438
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
586
438
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
587
438
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
588
438
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
589
438
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
590
438
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
591
438
    _memory_used_counter =
592
438
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
593
438
    _common_profile->add_info_string("IsColocate",
594
438
                                     std::to_string(_parent->is_colocated_operator()));
595
438
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
596
438
    _common_profile->add_info_string("FollowedByShuffledOperator",
597
438
                                     std::to_string(_parent->followed_by_shuffled_operator()));
598
438
    return Status::OK();
599
438
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
4.86k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
4.86k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
4.86k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
537
4.86k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
538
4.86k
    _operator_profile->set_metadata(_parent->node_id());
539
    // indent is false so that source operator will have same
540
    // indentation_level with its parent operator.
541
4.86k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
4.86k
    _operator_profile->add_child(_common_profile.get(), true);
543
4.86k
    _operator_profile->add_child(_custom_profile.get(), true);
544
4.86k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
4.86k
    if constexpr (!is_fake_shared) {
546
4.86k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
547
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
548
0
                                    .first.get()
549
0
                                    ->template cast<SharedStateArg>();
550
551
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
552
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
553
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
554
4.86k
        } else if (info.shared_state) {
555
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
556
                DCHECK(false);
557
            }
558
            // For UnionSourceOperator without children, there is no shared state.
559
4.72k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
4.72k
            _dependency = _shared_state->create_source_dependency(
562
4.72k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
4.72k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
4.72k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
4.72k
        } else {
566
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
                DCHECK(false);
568
            }
569
135
        }
570
4.86k
    }
571
572
4.86k
    if (must_set_shared_state() && _shared_state == nullptr) {
573
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
574
0
    }
575
576
4.86k
    _rows_returned_counter =
577
4.86k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
578
4.86k
    _blocks_returned_counter =
579
4.86k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
580
4.86k
    _output_block_bytes_counter =
581
4.86k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
582
4.86k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
583
4.86k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
584
4.86k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
585
4.86k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
586
4.86k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
587
4.86k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
588
4.86k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
589
4.86k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
590
4.86k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
591
4.86k
    _memory_used_counter =
592
4.86k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
593
4.86k
    _common_profile->add_info_string("IsColocate",
594
4.86k
                                     std::to_string(_parent->is_colocated_operator()));
595
4.86k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
596
4.86k
    _common_profile->add_info_string("FollowedByShuffledOperator",
597
4.86k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
598
4.86k
    return Status::OK();
599
4.86k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
818k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
818k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
818k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
537
818k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
538
818k
    _operator_profile->set_metadata(_parent->node_id());
539
    // indent is false so that source operator will have same
540
    // indentation_level with its parent operator.
541
818k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
818k
    _operator_profile->add_child(_common_profile.get(), true);
543
818k
    _operator_profile->add_child(_custom_profile.get(), true);
544
818k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
818k
    if constexpr (!is_fake_shared) {
546
818k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
547
811k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
548
811k
                                    .first.get()
549
811k
                                    ->template cast<SharedStateArg>();
550
551
811k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
552
811k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
553
811k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
554
811k
        } else if (info.shared_state) {
555
0
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
556
0
                DCHECK(false);
557
0
            }
558
            // For UnionSourceOperator without children, there is no shared state.
559
0
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
0
            _dependency = _shared_state->create_source_dependency(
562
0
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
7.10k
        } else {
566
7.10k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
7.10k
                DCHECK(false);
568
7.10k
            }
569
7.10k
        }
570
818k
    }
571
572
818k
    if (must_set_shared_state() && _shared_state == nullptr) {
573
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
574
0
    }
575
576
818k
    _rows_returned_counter =
577
818k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
578
818k
    _blocks_returned_counter =
579
818k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
580
818k
    _output_block_bytes_counter =
581
818k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
582
818k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
583
818k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
584
818k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
585
818k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
586
818k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
587
818k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
588
818k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
589
818k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
590
818k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
591
818k
    _memory_used_counter =
592
818k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
593
818k
    _common_profile->add_info_string("IsColocate",
594
818k
                                     std::to_string(_parent->is_colocated_operator()));
595
818k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
596
818k
    _common_profile->add_info_string("FollowedByShuffledOperator",
597
818k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
598
818k
    return Status::OK();
599
818k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
151
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
151
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
151
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
537
151
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
538
151
    _operator_profile->set_metadata(_parent->node_id());
539
    // indent is false so that source operator will have same
540
    // indentation_level with its parent operator.
541
151
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
151
    _operator_profile->add_child(_common_profile.get(), true);
543
151
    _operator_profile->add_child(_custom_profile.get(), true);
544
151
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
151
    if constexpr (!is_fake_shared) {
546
151
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
547
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
548
0
                                    .first.get()
549
0
                                    ->template cast<SharedStateArg>();
550
551
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
552
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
553
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
554
151
        } else if (info.shared_state) {
555
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
556
                DCHECK(false);
557
            }
558
            // For UnionSourceOperator without children, there is no shared state.
559
151
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
151
            _dependency = _shared_state->create_source_dependency(
562
151
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
151
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
151
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
151
        } else {
566
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
                DCHECK(false);
568
            }
569
0
        }
570
151
    }
571
572
151
    if (must_set_shared_state() && _shared_state == nullptr) {
573
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
574
0
    }
575
576
151
    _rows_returned_counter =
577
151
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
578
151
    _blocks_returned_counter =
579
151
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
580
151
    _output_block_bytes_counter =
581
151
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
582
151
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
583
151
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
584
151
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
585
151
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
586
151
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
587
151
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
588
151
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
589
151
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
590
151
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
591
151
    _memory_used_counter =
592
151
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
593
151
    _common_profile->add_info_string("IsColocate",
594
151
                                     std::to_string(_parent->is_colocated_operator()));
595
151
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
596
151
    _common_profile->add_info_string("FollowedByShuffledOperator",
597
151
                                     std::to_string(_parent->followed_by_shuffled_operator()));
598
151
    return Status::OK();
599
151
}
600
601
template <typename SharedStateArg>
602
2.87M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
603
2.87M
    _conjuncts.resize(_parent->_conjuncts.size());
604
2.87M
    _projections.resize(_parent->_projections.size());
605
3.37M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
606
495k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
607
495k
    }
608
5.69M
    for (size_t i = 0; i < _projections.size(); i++) {
609
2.81M
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
610
2.81M
    }
611
2.87M
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
612
2.90M
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
613
22.7k
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
614
143k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
615
120k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
616
120k
                    state, _intermediate_projections[i][j]));
617
120k
        }
618
22.7k
    }
619
2.87M
    return Status::OK();
620
2.87M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
602
70.6k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
603
70.6k
    _conjuncts.resize(_parent->_conjuncts.size());
604
70.6k
    _projections.resize(_parent->_projections.size());
605
71.8k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
606
1.20k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
607
1.20k
    }
608
357k
    for (size_t i = 0; i < _projections.size(); i++) {
609
286k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
610
286k
    }
611
70.6k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
612
71.8k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
613
1.19k
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
614
13.4k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
615
12.2k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
616
12.2k
                    state, _intermediate_projections[i][j]));
617
12.2k
        }
618
1.19k
    }
619
70.6k
    return Status::OK();
620
70.6k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
602
3
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
603
3
    _conjuncts.resize(_parent->_conjuncts.size());
604
3
    _projections.resize(_parent->_projections.size());
605
3
    for (size_t i = 0; i < _conjuncts.size(); i++) {
606
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
607
0
    }
608
3
    for (size_t i = 0; i < _projections.size(); i++) {
609
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
610
0
    }
611
3
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
612
3
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
613
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
614
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
615
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
616
0
                    state, _intermediate_projections[i][j]));
617
0
        }
618
0
    }
619
3
    return Status::OK();
620
3
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
602
283k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
603
283k
    _conjuncts.resize(_parent->_conjuncts.size());
604
283k
    _projections.resize(_parent->_projections.size());
605
283k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
606
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
607
0
    }
608
284k
    for (size_t i = 0; i < _projections.size(); i++) {
609
355
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
610
355
    }
611
283k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
612
283k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
613
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
614
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
615
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
616
0
                    state, _intermediate_projections[i][j]));
617
0
        }
618
0
    }
619
283k
    return Status::OK();
620
283k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
602
27
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
603
27
    _conjuncts.resize(_parent->_conjuncts.size());
604
27
    _projections.resize(_parent->_projections.size());
605
27
    for (size_t i = 0; i < _conjuncts.size(); i++) {
606
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
607
0
    }
608
27
    for (size_t i = 0; i < _projections.size(); i++) {
609
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
610
0
    }
611
27
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
612
27
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
613
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
614
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
615
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
616
0
                    state, _intermediate_projections[i][j]));
617
0
        }
618
0
    }
619
27
    return Status::OK();
620
27
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
602
31.7k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
603
31.7k
    _conjuncts.resize(_parent->_conjuncts.size());
604
31.7k
    _projections.resize(_parent->_projections.size());
605
31.8k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
606
178
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
607
178
    }
608
261k
    for (size_t i = 0; i < _projections.size(); i++) {
609
229k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
610
229k
    }
611
31.7k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
612
31.8k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
613
163
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
614
1.02k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
615
860
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
616
860
                    state, _intermediate_projections[i][j]));
617
860
        }
618
163
    }
619
31.7k
    return Status::OK();
620
31.7k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
602
10.1k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
603
10.1k
    _conjuncts.resize(_parent->_conjuncts.size());
604
10.1k
    _projections.resize(_parent->_projections.size());
605
10.8k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
606
702
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
607
702
    }
608
28.9k
    for (size_t i = 0; i < _projections.size(); i++) {
609
18.7k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
610
18.7k
    }
611
10.1k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
612
10.2k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
613
94
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
614
722
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
615
628
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
616
628
                    state, _intermediate_projections[i][j]));
617
628
        }
618
94
    }
619
10.1k
    return Status::OK();
620
10.1k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
602
212k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
603
212k
    _conjuncts.resize(_parent->_conjuncts.size());
604
212k
    _projections.resize(_parent->_projections.size());
605
216k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
606
3.90k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
607
3.90k
    }
608
489k
    for (size_t i = 0; i < _projections.size(); i++) {
609
276k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
610
276k
    }
611
212k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
612
212k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
613
257
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
614
1.98k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
615
1.72k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
616
1.72k
                    state, _intermediate_projections[i][j]));
617
1.72k
        }
618
257
    }
619
212k
    return Status::OK();
620
212k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
602
494
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
603
494
    _conjuncts.resize(_parent->_conjuncts.size());
604
494
    _projections.resize(_parent->_projections.size());
605
502
    for (size_t i = 0; i < _conjuncts.size(); i++) {
606
8
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
607
8
    }
608
1.70k
    for (size_t i = 0; i < _projections.size(); i++) {
609
1.21k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
610
1.21k
    }
611
494
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
612
494
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
613
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
614
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
615
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
616
0
                    state, _intermediate_projections[i][j]));
617
0
        }
618
0
    }
619
494
    return Status::OK();
620
494
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
602
182
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
603
182
    _conjuncts.resize(_parent->_conjuncts.size());
604
182
    _projections.resize(_parent->_projections.size());
605
182
    for (size_t i = 0; i < _conjuncts.size(); i++) {
606
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
607
0
    }
608
406
    for (size_t i = 0; i < _projections.size(); i++) {
609
224
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
610
224
    }
611
182
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
612
182
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
613
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
614
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
615
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
616
0
                    state, _intermediate_projections[i][j]));
617
0
        }
618
0
    }
619
182
    return Status::OK();
620
182
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
602
1.34M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
603
1.34M
    _conjuncts.resize(_parent->_conjuncts.size());
604
1.34M
    _projections.resize(_parent->_projections.size());
605
1.82M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
606
474k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
607
474k
    }
608
3.25M
    for (size_t i = 0; i < _projections.size(); i++) {
609
1.90M
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
610
1.90M
    }
611
1.34M
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
612
1.36M
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
613
21.0k
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
614
125k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
615
104k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
616
104k
                    state, _intermediate_projections[i][j]));
617
104k
        }
618
21.0k
    }
619
1.34M
    return Status::OK();
620
1.34M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
602
54.8k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
603
54.8k
    _conjuncts.resize(_parent->_conjuncts.size());
604
54.8k
    _projections.resize(_parent->_projections.size());
605
54.8k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
606
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
607
0
    }
608
148k
    for (size_t i = 0; i < _projections.size(); i++) {
609
93.6k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
610
93.6k
    }
611
54.8k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
612
54.8k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
613
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
614
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
615
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
616
0
                    state, _intermediate_projections[i][j]));
617
0
        }
618
0
    }
619
54.8k
    return Status::OK();
620
54.8k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
602
17
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
603
17
    _conjuncts.resize(_parent->_conjuncts.size());
604
17
    _projections.resize(_parent->_projections.size());
605
17
    for (size_t i = 0; i < _conjuncts.size(); i++) {
606
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
607
0
    }
608
17
    for (size_t i = 0; i < _projections.size(); i++) {
609
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
610
0
    }
611
17
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
612
17
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
613
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
614
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
615
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
616
0
                    state, _intermediate_projections[i][j]));
617
0
        }
618
0
    }
619
17
    return Status::OK();
620
17
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
602
41.9k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
603
41.9k
    _conjuncts.resize(_parent->_conjuncts.size());
604
41.9k
    _projections.resize(_parent->_projections.size());
605
56.9k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
606
14.9k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
607
14.9k
    }
608
41.9k
    for (size_t i = 0; i < _projections.size(); i++) {
609
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
610
0
    }
611
41.9k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
612
41.9k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
613
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
614
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
615
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
616
0
                    state, _intermediate_projections[i][j]));
617
0
        }
618
0
    }
619
41.9k
    return Status::OK();
620
41.9k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
602
438
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
603
438
    _conjuncts.resize(_parent->_conjuncts.size());
604
438
    _projections.resize(_parent->_projections.size());
605
438
    for (size_t i = 0; i < _conjuncts.size(); i++) {
606
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
607
0
    }
608
438
    for (size_t i = 0; i < _projections.size(); i++) {
609
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
610
0
    }
611
438
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
612
438
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
613
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
614
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
615
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
616
0
                    state, _intermediate_projections[i][j]));
617
0
        }
618
0
    }
619
438
    return Status::OK();
620
438
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
602
4.91k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
603
4.91k
    _conjuncts.resize(_parent->_conjuncts.size());
604
4.91k
    _projections.resize(_parent->_projections.size());
605
4.91k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
606
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
607
0
    }
608
4.91k
    for (size_t i = 0; i < _projections.size(); i++) {
609
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
610
0
    }
611
4.91k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
612
4.91k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
613
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
614
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
615
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
616
0
                    state, _intermediate_projections[i][j]));
617
0
        }
618
0
    }
619
4.91k
    return Status::OK();
620
4.91k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
602
819k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
603
819k
    _conjuncts.resize(_parent->_conjuncts.size());
604
819k
    _projections.resize(_parent->_projections.size());
605
819k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
606
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
607
0
    }
608
819k
    for (size_t i = 0; i < _projections.size(); i++) {
609
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
610
0
    }
611
819k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
612
819k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
613
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
614
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
615
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
616
0
                    state, _intermediate_projections[i][j]));
617
0
        }
618
0
    }
619
819k
    return Status::OK();
620
819k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4openEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
602
151
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
603
151
    _conjuncts.resize(_parent->_conjuncts.size());
604
151
    _projections.resize(_parent->_projections.size());
605
158
    for (size_t i = 0; i < _conjuncts.size(); i++) {
606
7
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
607
7
    }
608
447
    for (size_t i = 0; i < _projections.size(); i++) {
609
296
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
610
296
    }
611
151
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
612
152
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
613
1
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
614
3
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
615
2
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
616
2
                    state, _intermediate_projections[i][j]));
617
2
        }
618
1
    }
619
151
    return Status::OK();
620
151
}
621
622
template <typename SharedStateArg>
623
13.2k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
624
13.2k
    if (_terminated) {
625
0
        return Status::OK();
626
0
    }
627
13.2k
    _terminated = true;
628
13.2k
    return Status::OK();
629
13.2k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
623
1.18k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
624
1.18k
    if (_terminated) {
625
0
        return Status::OK();
626
0
    }
627
1.18k
    _terminated = true;
628
1.18k
    return Status::OK();
629
1.18k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
623
83
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
624
83
    if (_terminated) {
625
0
        return Status::OK();
626
0
    }
627
83
    _terminated = true;
628
83
    return Status::OK();
629
83
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
623
282
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
624
282
    if (_terminated) {
625
0
        return Status::OK();
626
0
    }
627
282
    _terminated = true;
628
282
    return Status::OK();
629
282
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
623
177
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
624
177
    if (_terminated) {
625
0
        return Status::OK();
626
0
    }
627
177
    _terminated = true;
628
177
    return Status::OK();
629
177
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
623
10.1k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
624
10.1k
    if (_terminated) {
625
0
        return Status::OK();
626
0
    }
627
10.1k
    _terminated = true;
628
10.1k
    return Status::OK();
629
10.1k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
623
7
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
624
7
    if (_terminated) {
625
0
        return Status::OK();
626
0
    }
627
7
    _terminated = true;
628
7
    return Status::OK();
629
7
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
623
33
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
624
33
    if (_terminated) {
625
0
        return Status::OK();
626
0
    }
627
33
    _terminated = true;
628
33
    return Status::OK();
629
33
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
623
152
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
624
152
    if (_terminated) {
625
0
        return Status::OK();
626
0
    }
627
152
    _terminated = true;
628
152
    return Status::OK();
629
152
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
623
1.08k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
624
1.08k
    if (_terminated) {
625
0
        return Status::OK();
626
0
    }
627
1.08k
    _terminated = true;
628
1.08k
    return Status::OK();
629
1.08k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
623
16
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
624
16
    if (_terminated) {
625
0
        return Status::OK();
626
0
    }
627
16
    _terminated = true;
628
16
    return Status::OK();
629
16
}
630
631
template <typename SharedStateArg>
632
3.20M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
633
3.20M
    if (_closed) {
634
328k
        return Status::OK();
635
328k
    }
636
2.87M
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
637
1.53M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
638
1.53M
    }
639
2.87M
    _closed = true;
640
2.87M
    return Status::OK();
641
3.20M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
632
70.5k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
633
70.5k
    if (_closed) {
634
0
        return Status::OK();
635
0
    }
636
70.5k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
637
70.5k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
638
70.5k
    }
639
70.5k
    _closed = true;
640
70.5k
    return Status::OK();
641
70.5k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
632
3
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
633
3
    if (_closed) {
634
0
        return Status::OK();
635
0
    }
636
3
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
637
3
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
638
3
    }
639
3
    _closed = true;
640
3
    return Status::OK();
641
3
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
632
565k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
633
565k
    if (_closed) {
634
282k
        return Status::OK();
635
282k
    }
636
282k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
637
282k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
638
282k
    }
639
282k
    _closed = true;
640
282k
    return Status::OK();
641
565k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
632
27
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
633
27
    if (_closed) {
634
0
        return Status::OK();
635
0
    }
636
27
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
637
27
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
638
27
    }
639
27
    _closed = true;
640
27
    return Status::OK();
641
27
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
632
31.7k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
633
31.7k
    if (_closed) {
634
0
        return Status::OK();
635
0
    }
636
31.7k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
637
31.7k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
638
31.7k
    }
639
31.7k
    _closed = true;
640
31.7k
    return Status::OK();
641
31.7k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
632
20.4k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
633
20.4k
    if (_closed) {
634
10.2k
        return Status::OK();
635
10.2k
    }
636
10.1k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
637
10.1k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
638
10.1k
    }
639
10.1k
    _closed = true;
640
10.1k
    return Status::OK();
641
20.4k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
632
212k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
633
212k
    if (_closed) {
634
0
        return Status::OK();
635
0
    }
636
212k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
637
212k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
638
212k
    }
639
212k
    _closed = true;
640
212k
    return Status::OK();
641
212k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
632
492
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
633
492
    if (_closed) {
634
0
        return Status::OK();
635
0
    }
636
492
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
637
492
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
638
492
    }
639
492
    _closed = true;
640
492
    return Status::OK();
641
492
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
632
177
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
633
177
    if (_closed) {
634
0
        return Status::OK();
635
0
    }
636
177
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
637
177
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
638
177
    }
639
177
    _closed = true;
640
177
    return Status::OK();
641
177
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
632
1.37M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
633
1.37M
    if (_closed) {
634
29.5k
        return Status::OK();
635
29.5k
    }
636
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
637
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
638
    }
639
1.34M
    _closed = true;
640
1.34M
    return Status::OK();
641
1.37M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
632
54.9k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
633
54.9k
    if (_closed) {
634
0
        return Status::OK();
635
0
    }
636
54.9k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
637
54.9k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
638
54.9k
    }
639
54.9k
    _closed = true;
640
54.9k
    return Status::OK();
641
54.9k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
632
28
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
633
28
    if (_closed) {
634
14
        return Status::OK();
635
14
    }
636
14
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
637
14
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
638
14
    }
639
14
    _closed = true;
640
14
    return Status::OK();
641
28
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
632
41.7k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
633
41.7k
    if (_closed) {
634
0
        return Status::OK();
635
0
    }
636
41.7k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
637
41.7k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
638
41.7k
    }
639
41.7k
    _closed = true;
640
41.7k
    return Status::OK();
641
41.7k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
632
668
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
633
668
    if (_closed) {
634
335
        return Status::OK();
635
335
    }
636
333
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
637
333
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
638
333
    }
639
333
    _closed = true;
640
333
    return Status::OK();
641
668
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
632
10.0k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
633
10.0k
    if (_closed) {
634
5.10k
        return Status::OK();
635
5.10k
    }
636
4.90k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
637
4.90k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
638
4.90k
    }
639
4.90k
    _closed = true;
640
4.90k
    return Status::OK();
641
10.0k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
632
820k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
633
820k
    if (_closed) {
634
0
        return Status::OK();
635
0
    }
636
820k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
637
820k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
638
820k
    }
639
820k
    _closed = true;
640
820k
    return Status::OK();
641
820k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
632
304
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
633
304
    if (_closed) {
634
162
        return Status::OK();
635
162
    }
636
142
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
637
142
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
638
142
    }
639
142
    _closed = true;
640
142
    return Status::OK();
641
304
}
642
643
template <typename SharedState>
644
2.30M
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
645
    // create profile
646
2.30M
    _operator_profile =
647
2.30M
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
648
2.30M
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
649
2.30M
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
650
651
    // indentation is true
652
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
653
    // So we should set the indentation to true.
654
2.30M
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
655
2.30M
    _operator_profile->add_child(_common_profile, true);
656
2.30M
    _operator_profile->add_child(_custom_profile, true);
657
658
2.30M
    _operator_profile->set_metadata(_parent->node_id());
659
2.30M
    _wait_for_finish_dependency_timer =
660
2.30M
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
661
2.30M
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
662
2.30M
    if constexpr (!is_fake_shared) {
663
1.50M
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
664
1.50M
            info.shared_state_map.end()) {
665
314k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
666
295k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
667
295k
            }
668
314k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
669
314k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
670
314k
                                                  ? 0
671
314k
                                                  : info.task_idx]
672
314k
                                  .get();
673
314k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
674
1.18M
        } else {
675
1.18M
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
138
                DCHECK(false);
677
138
            }
678
1.18M
            _shared_state = info.shared_state->template cast<SharedState>();
679
1.18M
            _dependency = _shared_state->create_sink_dependency(
680
1.18M
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
681
1.18M
        }
682
1.50M
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
683
1.50M
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
684
1.50M
    }
685
686
2.30M
    if (must_set_shared_state() && _shared_state == nullptr) {
687
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
688
0
    }
689
690
2.30M
    _rows_input_counter =
691
2.30M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
692
2.30M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
693
2.30M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
694
2.30M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
695
2.30M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
696
2.30M
    _memory_used_counter =
697
2.30M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
698
2.30M
    _common_profile->add_info_string("IsColocate",
699
2.30M
                                     std::to_string(_parent->is_colocated_operator()));
700
2.30M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
701
2.30M
    _common_profile->add_info_string("FollowedByShuffledOperator",
702
2.30M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
703
2.30M
    return Status::OK();
704
2.30M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
644
118k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
645
    // create profile
646
118k
    _operator_profile =
647
118k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
648
118k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
649
118k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
650
651
    // indentation is true
652
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
653
    // So we should set the indentation to true.
654
118k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
655
118k
    _operator_profile->add_child(_common_profile, true);
656
118k
    _operator_profile->add_child(_custom_profile, true);
657
658
118k
    _operator_profile->set_metadata(_parent->node_id());
659
118k
    _wait_for_finish_dependency_timer =
660
118k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
661
118k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
662
118k
    if constexpr (!is_fake_shared) {
663
118k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
664
118k
            info.shared_state_map.end()) {
665
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
666
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
667
            }
668
17.7k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
669
17.7k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
670
17.7k
                                                  ? 0
671
17.7k
                                                  : info.task_idx]
672
17.7k
                                  .get();
673
17.7k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
674
100k
        } else {
675
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
                DCHECK(false);
677
            }
678
100k
            _shared_state = info.shared_state->template cast<SharedState>();
679
100k
            _dependency = _shared_state->create_sink_dependency(
680
100k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
681
100k
        }
682
118k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
683
118k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
684
118k
    }
685
686
118k
    if (must_set_shared_state() && _shared_state == nullptr) {
687
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
688
0
    }
689
690
118k
    _rows_input_counter =
691
118k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
692
118k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
693
118k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
694
118k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
695
118k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
696
118k
    _memory_used_counter =
697
118k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
698
118k
    _common_profile->add_info_string("IsColocate",
699
118k
                                     std::to_string(_parent->is_colocated_operator()));
700
118k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
701
118k
    _common_profile->add_info_string("FollowedByShuffledOperator",
702
118k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
703
118k
    return Status::OK();
704
118k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
644
2
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
645
    // create profile
646
2
    _operator_profile =
647
2
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
648
2
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
649
2
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
650
651
    // indentation is true
652
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
653
    // So we should set the indentation to true.
654
2
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
655
2
    _operator_profile->add_child(_common_profile, true);
656
2
    _operator_profile->add_child(_custom_profile, true);
657
658
2
    _operator_profile->set_metadata(_parent->node_id());
659
2
    _wait_for_finish_dependency_timer =
660
2
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
661
2
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
662
2
    if constexpr (!is_fake_shared) {
663
2
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
664
2
            info.shared_state_map.end()) {
665
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
666
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
667
            }
668
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
669
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
670
0
                                                  ? 0
671
0
                                                  : info.task_idx]
672
0
                                  .get();
673
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
674
2
        } else {
675
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
                DCHECK(false);
677
            }
678
2
            _shared_state = info.shared_state->template cast<SharedState>();
679
2
            _dependency = _shared_state->create_sink_dependency(
680
2
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
681
2
        }
682
2
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
683
2
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
684
2
    }
685
686
2
    if (must_set_shared_state() && _shared_state == nullptr) {
687
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
688
0
    }
689
690
2
    _rows_input_counter =
691
2
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
692
2
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
693
2
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
694
2
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
695
2
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
696
2
    _memory_used_counter =
697
2
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
698
2
    _common_profile->add_info_string("IsColocate",
699
2
                                     std::to_string(_parent->is_colocated_operator()));
700
2
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
701
2
    _common_profile->add_info_string("FollowedByShuffledOperator",
702
2
                                     std::to_string(_parent->followed_by_shuffled_operator()));
703
2
    return Status::OK();
704
2
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
644
283k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
645
    // create profile
646
283k
    _operator_profile =
647
283k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
648
283k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
649
283k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
650
651
    // indentation is true
652
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
653
    // So we should set the indentation to true.
654
283k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
655
283k
    _operator_profile->add_child(_common_profile, true);
656
283k
    _operator_profile->add_child(_custom_profile, true);
657
658
283k
    _operator_profile->set_metadata(_parent->node_id());
659
283k
    _wait_for_finish_dependency_timer =
660
283k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
661
283k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
662
283k
    if constexpr (!is_fake_shared) {
663
283k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
664
283k
            info.shared_state_map.end()) {
665
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
666
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
667
            }
668
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
669
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
670
0
                                                  ? 0
671
0
                                                  : info.task_idx]
672
0
                                  .get();
673
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
674
283k
        } else {
675
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
                DCHECK(false);
677
            }
678
283k
            _shared_state = info.shared_state->template cast<SharedState>();
679
283k
            _dependency = _shared_state->create_sink_dependency(
680
283k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
681
283k
        }
682
283k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
683
283k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
684
283k
    }
685
686
283k
    if (must_set_shared_state() && _shared_state == nullptr) {
687
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
688
0
    }
689
690
283k
    _rows_input_counter =
691
283k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
692
283k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
693
283k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
694
283k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
695
283k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
696
283k
    _memory_used_counter =
697
283k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
698
283k
    _common_profile->add_info_string("IsColocate",
699
283k
                                     std::to_string(_parent->is_colocated_operator()));
700
283k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
701
283k
    _common_profile->add_info_string("FollowedByShuffledOperator",
702
283k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
703
283k
    return Status::OK();
704
283k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
644
33
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
645
    // create profile
646
33
    _operator_profile =
647
33
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
648
33
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
649
33
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
650
651
    // indentation is true
652
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
653
    // So we should set the indentation to true.
654
33
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
655
33
    _operator_profile->add_child(_common_profile, true);
656
33
    _operator_profile->add_child(_custom_profile, true);
657
658
33
    _operator_profile->set_metadata(_parent->node_id());
659
33
    _wait_for_finish_dependency_timer =
660
33
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
661
33
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
662
33
    if constexpr (!is_fake_shared) {
663
33
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
664
33
            info.shared_state_map.end()) {
665
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
666
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
667
            }
668
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
669
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
670
0
                                                  ? 0
671
0
                                                  : info.task_idx]
672
0
                                  .get();
673
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
674
33
        } else {
675
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
                DCHECK(false);
677
            }
678
33
            _shared_state = info.shared_state->template cast<SharedState>();
679
33
            _dependency = _shared_state->create_sink_dependency(
680
33
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
681
33
        }
682
33
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
683
33
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
684
33
    }
685
686
33
    if (must_set_shared_state() && _shared_state == nullptr) {
687
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
688
0
    }
689
690
33
    _rows_input_counter =
691
33
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
692
33
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
693
33
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
694
33
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
695
33
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
696
33
    _memory_used_counter =
697
33
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
698
33
    _common_profile->add_info_string("IsColocate",
699
33
                                     std::to_string(_parent->is_colocated_operator()));
700
33
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
701
33
    _common_profile->add_info_string("FollowedByShuffledOperator",
702
33
                                     std::to_string(_parent->followed_by_shuffled_operator()));
703
33
    return Status::OK();
704
33
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
644
31.6k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
645
    // create profile
646
31.6k
    _operator_profile =
647
31.6k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
648
31.6k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
649
31.6k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
650
651
    // indentation is true
652
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
653
    // So we should set the indentation to true.
654
31.6k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
655
31.6k
    _operator_profile->add_child(_common_profile, true);
656
31.6k
    _operator_profile->add_child(_custom_profile, true);
657
658
31.6k
    _operator_profile->set_metadata(_parent->node_id());
659
31.6k
    _wait_for_finish_dependency_timer =
660
31.6k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
661
31.6k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
662
31.6k
    if constexpr (!is_fake_shared) {
663
31.6k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
664
31.6k
            info.shared_state_map.end()) {
665
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
666
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
667
            }
668
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
669
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
670
0
                                                  ? 0
671
0
                                                  : info.task_idx]
672
0
                                  .get();
673
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
674
31.6k
        } else {
675
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
                DCHECK(false);
677
            }
678
31.6k
            _shared_state = info.shared_state->template cast<SharedState>();
679
31.6k
            _dependency = _shared_state->create_sink_dependency(
680
31.6k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
681
31.6k
        }
682
31.6k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
683
31.6k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
684
31.6k
    }
685
686
31.6k
    if (must_set_shared_state() && _shared_state == nullptr) {
687
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
688
0
    }
689
690
31.6k
    _rows_input_counter =
691
31.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
692
31.6k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
693
31.6k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
694
31.6k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
695
31.6k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
696
31.6k
    _memory_used_counter =
697
31.6k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
698
31.6k
    _common_profile->add_info_string("IsColocate",
699
31.6k
                                     std::to_string(_parent->is_colocated_operator()));
700
31.6k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
701
31.6k
    _common_profile->add_info_string("FollowedByShuffledOperator",
702
31.6k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
703
31.6k
    return Status::OK();
704
31.6k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
644
10.1k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
645
    // create profile
646
10.1k
    _operator_profile =
647
10.1k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
648
10.1k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
649
10.1k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
650
651
    // indentation is true
652
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
653
    // So we should set the indentation to true.
654
10.1k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
655
10.1k
    _operator_profile->add_child(_common_profile, true);
656
10.1k
    _operator_profile->add_child(_custom_profile, true);
657
658
10.1k
    _operator_profile->set_metadata(_parent->node_id());
659
10.1k
    _wait_for_finish_dependency_timer =
660
10.1k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
661
10.1k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
662
10.1k
    if constexpr (!is_fake_shared) {
663
10.1k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
664
10.1k
            info.shared_state_map.end()) {
665
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
666
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
667
            }
668
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
669
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
670
0
                                                  ? 0
671
0
                                                  : info.task_idx]
672
0
                                  .get();
673
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
674
10.1k
        } else {
675
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
                DCHECK(false);
677
            }
678
10.1k
            _shared_state = info.shared_state->template cast<SharedState>();
679
10.1k
            _dependency = _shared_state->create_sink_dependency(
680
10.1k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
681
10.1k
        }
682
10.1k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
683
10.1k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
684
10.1k
    }
685
686
10.1k
    if (must_set_shared_state() && _shared_state == nullptr) {
687
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
688
0
    }
689
690
10.1k
    _rows_input_counter =
691
10.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
692
10.1k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
693
10.1k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
694
10.1k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
695
10.1k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
696
10.1k
    _memory_used_counter =
697
10.1k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
698
10.1k
    _common_profile->add_info_string("IsColocate",
699
10.1k
                                     std::to_string(_parent->is_colocated_operator()));
700
10.1k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
701
10.1k
    _common_profile->add_info_string("FollowedByShuffledOperator",
702
10.1k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
703
10.1k
    return Status::OK();
704
10.1k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
644
212k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
645
    // create profile
646
212k
    _operator_profile =
647
212k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
648
212k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
649
212k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
650
651
    // indentation is true
652
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
653
    // So we should set the indentation to true.
654
212k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
655
212k
    _operator_profile->add_child(_common_profile, true);
656
212k
    _operator_profile->add_child(_custom_profile, true);
657
658
212k
    _operator_profile->set_metadata(_parent->node_id());
659
212k
    _wait_for_finish_dependency_timer =
660
212k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
661
212k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
662
212k
    if constexpr (!is_fake_shared) {
663
212k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
664
212k
            info.shared_state_map.end()) {
665
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
666
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
667
            }
668
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
669
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
670
0
                                                  ? 0
671
0
                                                  : info.task_idx]
672
0
                                  .get();
673
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
674
212k
        } else {
675
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
                DCHECK(false);
677
            }
678
212k
            _shared_state = info.shared_state->template cast<SharedState>();
679
212k
            _dependency = _shared_state->create_sink_dependency(
680
212k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
681
212k
        }
682
212k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
683
212k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
684
212k
    }
685
686
212k
    if (must_set_shared_state() && _shared_state == nullptr) {
687
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
688
0
    }
689
690
212k
    _rows_input_counter =
691
212k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
692
212k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
693
212k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
694
212k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
695
212k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
696
212k
    _memory_used_counter =
697
212k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
698
212k
    _common_profile->add_info_string("IsColocate",
699
212k
                                     std::to_string(_parent->is_colocated_operator()));
700
212k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
701
212k
    _common_profile->add_info_string("FollowedByShuffledOperator",
702
212k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
703
212k
    return Status::OK();
704
212k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
644
418
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
645
    // create profile
646
418
    _operator_profile =
647
418
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
648
418
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
649
418
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
650
651
    // indentation is true
652
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
653
    // So we should set the indentation to true.
654
418
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
655
418
    _operator_profile->add_child(_common_profile, true);
656
418
    _operator_profile->add_child(_custom_profile, true);
657
658
418
    _operator_profile->set_metadata(_parent->node_id());
659
418
    _wait_for_finish_dependency_timer =
660
418
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
661
418
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
662
418
    if constexpr (!is_fake_shared) {
663
418
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
664
418
            info.shared_state_map.end()) {
665
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
666
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
667
            }
668
416
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
669
416
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
670
416
                                                  ? 0
671
416
                                                  : info.task_idx]
672
416
                                  .get();
673
416
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
674
416
        } else {
675
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
                DCHECK(false);
677
            }
678
2
            _shared_state = info.shared_state->template cast<SharedState>();
679
2
            _dependency = _shared_state->create_sink_dependency(
680
2
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
681
2
        }
682
418
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
683
418
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
684
418
    }
685
686
418
    if (must_set_shared_state() && _shared_state == nullptr) {
687
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
688
0
    }
689
690
418
    _rows_input_counter =
691
418
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
692
418
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
693
418
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
694
418
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
695
418
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
696
418
    _memory_used_counter =
697
418
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
698
418
    _common_profile->add_info_string("IsColocate",
699
418
                                     std::to_string(_parent->is_colocated_operator()));
700
418
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
701
418
    _common_profile->add_info_string("FollowedByShuffledOperator",
702
418
                                     std::to_string(_parent->followed_by_shuffled_operator()));
703
418
    return Status::OK();
704
418
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
644
188
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
645
    // create profile
646
188
    _operator_profile =
647
188
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
648
188
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
649
188
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
650
651
    // indentation is true
652
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
653
    // So we should set the indentation to true.
654
188
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
655
188
    _operator_profile->add_child(_common_profile, true);
656
188
    _operator_profile->add_child(_custom_profile, true);
657
658
188
    _operator_profile->set_metadata(_parent->node_id());
659
188
    _wait_for_finish_dependency_timer =
660
188
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
661
188
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
662
188
    if constexpr (!is_fake_shared) {
663
188
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
664
188
            info.shared_state_map.end()) {
665
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
666
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
667
            }
668
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
669
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
670
0
                                                  ? 0
671
0
                                                  : info.task_idx]
672
0
                                  .get();
673
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
674
188
        } else {
675
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
                DCHECK(false);
677
            }
678
188
            _shared_state = info.shared_state->template cast<SharedState>();
679
188
            _dependency = _shared_state->create_sink_dependency(
680
188
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
681
188
        }
682
188
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
683
188
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
684
188
    }
685
686
188
    if (must_set_shared_state() && _shared_state == nullptr) {
687
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
688
0
    }
689
690
188
    _rows_input_counter =
691
188
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
692
188
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
693
188
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
694
188
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
695
188
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
696
188
    _memory_used_counter =
697
188
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
698
188
    _common_profile->add_info_string("IsColocate",
699
188
                                     std::to_string(_parent->is_colocated_operator()));
700
188
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
701
188
    _common_profile->add_info_string("FollowedByShuffledOperator",
702
188
                                     std::to_string(_parent->followed_by_shuffled_operator()));
703
188
    return Status::OK();
704
188
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
644
804k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
645
    // create profile
646
804k
    _operator_profile =
647
804k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
648
804k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
649
804k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
650
651
    // indentation is true
652
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
653
    // So we should set the indentation to true.
654
804k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
655
804k
    _operator_profile->add_child(_common_profile, true);
656
804k
    _operator_profile->add_child(_custom_profile, true);
657
658
804k
    _operator_profile->set_metadata(_parent->node_id());
659
804k
    _wait_for_finish_dependency_timer =
660
804k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
661
804k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
662
    if constexpr (!is_fake_shared) {
663
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
664
            info.shared_state_map.end()) {
665
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
666
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
667
            }
668
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
669
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
670
                                                  ? 0
671
                                                  : info.task_idx]
672
                                  .get();
673
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
674
        } else {
675
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
                DCHECK(false);
677
            }
678
            _shared_state = info.shared_state->template cast<SharedState>();
679
            _dependency = _shared_state->create_sink_dependency(
680
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
681
        }
682
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
683
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
684
    }
685
686
804k
    if (must_set_shared_state() && _shared_state == nullptr) {
687
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
688
0
    }
689
690
804k
    _rows_input_counter =
691
804k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
692
804k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
693
804k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
694
804k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
695
804k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
696
804k
    _memory_used_counter =
697
804k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
698
804k
    _common_profile->add_info_string("IsColocate",
699
804k
                                     std::to_string(_parent->is_colocated_operator()));
700
804k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
701
804k
    _common_profile->add_info_string("FollowedByShuffledOperator",
702
804k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
703
804k
    return Status::OK();
704
804k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
644
6.59k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
645
    // create profile
646
6.59k
    _operator_profile =
647
6.59k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
648
6.59k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
649
6.59k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
650
651
    // indentation is true
652
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
653
    // So we should set the indentation to true.
654
6.59k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
655
6.59k
    _operator_profile->add_child(_common_profile, true);
656
6.59k
    _operator_profile->add_child(_custom_profile, true);
657
658
6.59k
    _operator_profile->set_metadata(_parent->node_id());
659
6.59k
    _wait_for_finish_dependency_timer =
660
6.59k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
661
6.59k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
662
6.59k
    if constexpr (!is_fake_shared) {
663
6.59k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
664
6.59k
            info.shared_state_map.end()) {
665
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
666
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
667
            }
668
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
669
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
670
0
                                                  ? 0
671
0
                                                  : info.task_idx]
672
0
                                  .get();
673
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
674
6.59k
        } else {
675
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
                DCHECK(false);
677
            }
678
6.59k
            _shared_state = info.shared_state->template cast<SharedState>();
679
6.59k
            _dependency = _shared_state->create_sink_dependency(
680
6.59k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
681
6.59k
        }
682
6.59k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
683
6.59k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
684
6.59k
    }
685
686
6.59k
    if (must_set_shared_state() && _shared_state == nullptr) {
687
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
688
0
    }
689
690
6.59k
    _rows_input_counter =
691
6.59k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
692
6.59k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
693
6.59k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
694
6.59k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
695
6.59k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
696
6.59k
    _memory_used_counter =
697
6.59k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
698
6.59k
    _common_profile->add_info_string("IsColocate",
699
6.59k
                                     std::to_string(_parent->is_colocated_operator()));
700
6.59k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
701
6.59k
    _common_profile->add_info_string("FollowedByShuffledOperator",
702
6.59k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
703
6.59k
    return Status::OK();
704
6.59k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
644
437
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
645
    // create profile
646
437
    _operator_profile =
647
437
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
648
437
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
649
437
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
650
651
    // indentation is true
652
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
653
    // So we should set the indentation to true.
654
437
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
655
437
    _operator_profile->add_child(_common_profile, true);
656
437
    _operator_profile->add_child(_custom_profile, true);
657
658
437
    _operator_profile->set_metadata(_parent->node_id());
659
437
    _wait_for_finish_dependency_timer =
660
437
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
661
437
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
662
437
    if constexpr (!is_fake_shared) {
663
437
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
664
437
            info.shared_state_map.end()) {
665
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
666
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
667
            }
668
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
669
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
670
0
                                                  ? 0
671
0
                                                  : info.task_idx]
672
0
                                  .get();
673
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
674
437
        } else {
675
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
                DCHECK(false);
677
            }
678
437
            _shared_state = info.shared_state->template cast<SharedState>();
679
437
            _dependency = _shared_state->create_sink_dependency(
680
437
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
681
437
        }
682
437
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
683
437
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
684
437
    }
685
686
437
    if (must_set_shared_state() && _shared_state == nullptr) {
687
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
688
0
    }
689
690
437
    _rows_input_counter =
691
437
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
692
437
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
693
437
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
694
437
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
695
437
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
696
437
    _memory_used_counter =
697
437
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
698
437
    _common_profile->add_info_string("IsColocate",
699
437
                                     std::to_string(_parent->is_colocated_operator()));
700
437
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
701
437
    _common_profile->add_info_string("FollowedByShuffledOperator",
702
437
                                     std::to_string(_parent->followed_by_shuffled_operator()));
703
437
    return Status::OK();
704
437
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
644
14.3k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
645
    // create profile
646
14.3k
    _operator_profile =
647
14.3k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
648
14.3k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
649
14.3k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
650
651
    // indentation is true
652
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
653
    // So we should set the indentation to true.
654
14.3k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
655
14.3k
    _operator_profile->add_child(_common_profile, true);
656
14.3k
    _operator_profile->add_child(_custom_profile, true);
657
658
14.3k
    _operator_profile->set_metadata(_parent->node_id());
659
14.3k
    _wait_for_finish_dependency_timer =
660
14.3k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
661
14.3k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
662
14.3k
    if constexpr (!is_fake_shared) {
663
14.3k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
664
14.3k
            info.shared_state_map.end()) {
665
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
666
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
667
            }
668
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
669
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
670
0
                                                  ? 0
671
0
                                                  : info.task_idx]
672
0
                                  .get();
673
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
674
14.3k
        } else {
675
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
                DCHECK(false);
677
            }
678
14.3k
            _shared_state = info.shared_state->template cast<SharedState>();
679
14.3k
            _dependency = _shared_state->create_sink_dependency(
680
14.3k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
681
14.3k
        }
682
14.3k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
683
14.3k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
684
14.3k
    }
685
686
14.3k
    if (must_set_shared_state() && _shared_state == nullptr) {
687
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
688
0
    }
689
690
14.3k
    _rows_input_counter =
691
14.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
692
14.3k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
693
14.3k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
694
14.3k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
695
14.3k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
696
14.3k
    _memory_used_counter =
697
14.3k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
698
14.3k
    _common_profile->add_info_string("IsColocate",
699
14.3k
                                     std::to_string(_parent->is_colocated_operator()));
700
14.3k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
701
14.3k
    _common_profile->add_info_string("FollowedByShuffledOperator",
702
14.3k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
703
14.3k
    return Status::OK();
704
14.3k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
644
12.0k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
645
    // create profile
646
12.0k
    _operator_profile =
647
12.0k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
648
12.0k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
649
12.0k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
650
651
    // indentation is true
652
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
653
    // So we should set the indentation to true.
654
12.0k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
655
12.0k
    _operator_profile->add_child(_common_profile, true);
656
12.0k
    _operator_profile->add_child(_custom_profile, true);
657
658
12.0k
    _operator_profile->set_metadata(_parent->node_id());
659
12.0k
    _wait_for_finish_dependency_timer =
660
12.0k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
661
12.0k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
662
12.0k
    if constexpr (!is_fake_shared) {
663
12.0k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
664
12.0k
            info.shared_state_map.end()) {
665
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
666
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
667
            }
668
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
669
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
670
0
                                                  ? 0
671
0
                                                  : info.task_idx]
672
0
                                  .get();
673
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
674
12.0k
        } else {
675
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
                DCHECK(false);
677
            }
678
12.0k
            _shared_state = info.shared_state->template cast<SharedState>();
679
12.0k
            _dependency = _shared_state->create_sink_dependency(
680
12.0k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
681
12.0k
        }
682
12.0k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
683
12.0k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
684
12.0k
    }
685
686
12.0k
    if (must_set_shared_state() && _shared_state == nullptr) {
687
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
688
0
    }
689
690
12.0k
    _rows_input_counter =
691
12.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
692
12.0k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
693
12.0k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
694
12.0k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
695
12.0k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
696
12.0k
    _memory_used_counter =
697
12.0k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
698
12.0k
    _common_profile->add_info_string("IsColocate",
699
12.0k
                                     std::to_string(_parent->is_colocated_operator()));
700
12.0k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
701
12.0k
    _common_profile->add_info_string("FollowedByShuffledOperator",
702
12.0k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
703
12.0k
    return Status::OK();
704
12.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
644
296k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
645
    // create profile
646
296k
    _operator_profile =
647
296k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
648
296k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
649
296k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
650
651
    // indentation is true
652
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
653
    // So we should set the indentation to true.
654
296k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
655
296k
    _operator_profile->add_child(_common_profile, true);
656
296k
    _operator_profile->add_child(_custom_profile, true);
657
658
296k
    _operator_profile->set_metadata(_parent->node_id());
659
296k
    _wait_for_finish_dependency_timer =
660
296k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
661
296k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
662
296k
    if constexpr (!is_fake_shared) {
663
296k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
664
296k
            info.shared_state_map.end()) {
665
295k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
666
295k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
667
295k
            }
668
295k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
669
295k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
670
295k
                                                  ? 0
671
295k
                                                  : info.task_idx]
672
295k
                                  .get();
673
295k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
674
295k
        } else {
675
138
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
138
                DCHECK(false);
677
138
            }
678
138
            _shared_state = info.shared_state->template cast<SharedState>();
679
138
            _dependency = _shared_state->create_sink_dependency(
680
138
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
681
138
        }
682
296k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
683
296k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
684
296k
    }
685
686
296k
    if (must_set_shared_state() && _shared_state == nullptr) {
687
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
688
0
    }
689
690
296k
    _rows_input_counter =
691
296k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
692
296k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
693
296k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
694
296k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
695
296k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
696
296k
    _memory_used_counter =
697
296k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
698
296k
    _common_profile->add_info_string("IsColocate",
699
296k
                                     std::to_string(_parent->is_colocated_operator()));
700
296k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
701
296k
    _common_profile->add_info_string("FollowedByShuffledOperator",
702
296k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
703
296k
    return Status::OK();
704
296k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
644
515k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
645
    // create profile
646
515k
    _operator_profile =
647
515k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
648
515k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
649
515k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
650
651
    // indentation is true
652
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
653
    // So we should set the indentation to true.
654
515k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
655
515k
    _operator_profile->add_child(_common_profile, true);
656
515k
    _operator_profile->add_child(_custom_profile, true);
657
658
515k
    _operator_profile->set_metadata(_parent->node_id());
659
515k
    _wait_for_finish_dependency_timer =
660
515k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
661
515k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
662
515k
    if constexpr (!is_fake_shared) {
663
515k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
664
515k
            info.shared_state_map.end()) {
665
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
666
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
667
            }
668
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
669
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
670
0
                                                  ? 0
671
0
                                                  : info.task_idx]
672
0
                                  .get();
673
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
674
515k
        } else {
675
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
                DCHECK(false);
677
            }
678
515k
            _shared_state = info.shared_state->template cast<SharedState>();
679
515k
            _dependency = _shared_state->create_sink_dependency(
680
515k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
681
515k
        }
682
515k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
683
515k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
684
515k
    }
685
686
515k
    if (must_set_shared_state() && _shared_state == nullptr) {
687
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
688
0
    }
689
690
515k
    _rows_input_counter =
691
515k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
692
515k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
693
515k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
694
515k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
695
515k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
696
515k
    _memory_used_counter =
697
515k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
698
515k
    _common_profile->add_info_string("IsColocate",
699
515k
                                     std::to_string(_parent->is_colocated_operator()));
700
515k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
701
515k
    _common_profile->add_info_string("FollowedByShuffledOperator",
702
515k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
703
515k
    return Status::OK();
704
515k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
644
17
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
645
    // create profile
646
17
    _operator_profile =
647
17
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
648
17
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
649
17
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
650
651
    // indentation is true
652
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
653
    // So we should set the indentation to true.
654
17
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
655
17
    _operator_profile->add_child(_common_profile, true);
656
17
    _operator_profile->add_child(_custom_profile, true);
657
658
17
    _operator_profile->set_metadata(_parent->node_id());
659
17
    _wait_for_finish_dependency_timer =
660
17
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
661
17
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
662
17
    if constexpr (!is_fake_shared) {
663
17
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
664
17
            info.shared_state_map.end()) {
665
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
666
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
667
            }
668
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
669
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
670
0
                                                  ? 0
671
0
                                                  : info.task_idx]
672
0
                                  .get();
673
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
674
17
        } else {
675
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
                DCHECK(false);
677
            }
678
17
            _shared_state = info.shared_state->template cast<SharedState>();
679
17
            _dependency = _shared_state->create_sink_dependency(
680
17
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
681
17
        }
682
17
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
683
17
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
684
17
    }
685
686
17
    if (must_set_shared_state() && _shared_state == nullptr) {
687
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
688
0
    }
689
690
17
    _rows_input_counter =
691
17
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
692
17
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
693
17
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
694
17
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
695
17
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
696
17
    _memory_used_counter =
697
17
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
698
17
    _common_profile->add_info_string("IsColocate",
699
17
                                     std::to_string(_parent->is_colocated_operator()));
700
17
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
701
17
    _common_profile->add_info_string("FollowedByShuffledOperator",
702
17
                                     std::to_string(_parent->followed_by_shuffled_operator()));
703
17
    return Status::OK();
704
17
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
644
302
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
645
    // create profile
646
302
    _operator_profile =
647
302
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
648
302
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
649
302
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
650
651
    // indentation is true
652
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
653
    // So we should set the indentation to true.
654
302
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
655
302
    _operator_profile->add_child(_common_profile, true);
656
302
    _operator_profile->add_child(_custom_profile, true);
657
658
302
    _operator_profile->set_metadata(_parent->node_id());
659
302
    _wait_for_finish_dependency_timer =
660
302
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
661
302
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
662
302
    if constexpr (!is_fake_shared) {
663
302
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
664
302
            info.shared_state_map.end()) {
665
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
666
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
667
            }
668
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
669
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
670
0
                                                  ? 0
671
0
                                                  : info.task_idx]
672
0
                                  .get();
673
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
674
302
        } else {
675
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
                DCHECK(false);
677
            }
678
302
            _shared_state = info.shared_state->template cast<SharedState>();
679
302
            _dependency = _shared_state->create_sink_dependency(
680
302
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
681
302
        }
682
302
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
683
302
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
684
302
    }
685
686
302
    if (must_set_shared_state() && _shared_state == nullptr) {
687
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
688
0
    }
689
690
302
    _rows_input_counter =
691
302
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
692
302
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
693
302
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
694
302
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
695
302
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
696
302
    _memory_used_counter =
697
302
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
698
302
    _common_profile->add_info_string("IsColocate",
699
302
                                     std::to_string(_parent->is_colocated_operator()));
700
302
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
701
302
    _common_profile->add_info_string("FollowedByShuffledOperator",
702
302
                                     std::to_string(_parent->followed_by_shuffled_operator()));
703
302
    return Status::OK();
704
302
}
705
706
template <typename SharedState>
707
2.30M
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
708
2.30M
    if (_closed) {
709
2
        return Status::OK();
710
2
    }
711
2.30M
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
712
1.50M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
713
1.50M
    }
714
2.30M
    _closed = true;
715
2.30M
    return Status::OK();
716
2.30M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
707
118k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
708
118k
    if (_closed) {
709
0
        return Status::OK();
710
0
    }
711
118k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
712
118k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
713
118k
    }
714
118k
    _closed = true;
715
118k
    return Status::OK();
716
118k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
707
1
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
708
1
    if (_closed) {
709
0
        return Status::OK();
710
0
    }
711
1
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
712
1
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
713
1
    }
714
1
    _closed = true;
715
1
    return Status::OK();
716
1
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
707
283k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
708
283k
    if (_closed) {
709
0
        return Status::OK();
710
0
    }
711
283k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
712
283k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
713
283k
    }
714
283k
    _closed = true;
715
283k
    return Status::OK();
716
283k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
707
25
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
708
25
    if (_closed) {
709
2
        return Status::OK();
710
2
    }
711
23
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
712
23
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
713
23
    }
714
23
    _closed = true;
715
23
    return Status::OK();
716
25
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
707
31.6k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
708
31.6k
    if (_closed) {
709
0
        return Status::OK();
710
0
    }
711
31.6k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
712
31.6k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
713
31.6k
    }
714
31.6k
    _closed = true;
715
31.6k
    return Status::OK();
716
31.6k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
707
10.1k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
708
10.1k
    if (_closed) {
709
0
        return Status::OK();
710
0
    }
711
10.1k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
712
10.1k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
713
10.1k
    }
714
10.1k
    _closed = true;
715
10.1k
    return Status::OK();
716
10.1k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
707
212k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
708
212k
    if (_closed) {
709
0
        return Status::OK();
710
0
    }
711
212k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
712
212k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
713
212k
    }
714
212k
    _closed = true;
715
212k
    return Status::OK();
716
212k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
707
418
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
708
418
    if (_closed) {
709
0
        return Status::OK();
710
0
    }
711
418
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
712
418
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
713
418
    }
714
418
    _closed = true;
715
418
    return Status::OK();
716
418
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
707
177
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
708
177
    if (_closed) {
709
0
        return Status::OK();
710
0
    }
711
177
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
712
177
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
713
177
    }
714
177
    _closed = true;
715
177
    return Status::OK();
716
177
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
707
805k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
708
805k
    if (_closed) {
709
0
        return Status::OK();
710
0
    }
711
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
712
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
713
    }
714
805k
    _closed = true;
715
805k
    return Status::OK();
716
805k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
707
6.59k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
708
6.59k
    if (_closed) {
709
0
        return Status::OK();
710
0
    }
711
6.59k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
712
6.59k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
713
6.59k
    }
714
6.59k
    _closed = true;
715
6.59k
    return Status::OK();
716
6.59k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
707
335
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
708
335
    if (_closed) {
709
0
        return Status::OK();
710
0
    }
711
335
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
712
335
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
713
335
    }
714
335
    _closed = true;
715
335
    return Status::OK();
716
335
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
707
14.3k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
708
14.3k
    if (_closed) {
709
0
        return Status::OK();
710
0
    }
711
14.3k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
712
14.3k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
713
14.3k
    }
714
14.3k
    _closed = true;
715
14.3k
    return Status::OK();
716
14.3k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
707
12.0k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
708
12.0k
    if (_closed) {
709
0
        return Status::OK();
710
0
    }
711
12.0k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
712
12.0k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
713
12.0k
    }
714
12.0k
    _closed = true;
715
12.0k
    return Status::OK();
716
12.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
707
296k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
708
296k
    if (_closed) {
709
0
        return Status::OK();
710
0
    }
711
296k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
712
296k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
713
296k
    }
714
296k
    _closed = true;
715
296k
    return Status::OK();
716
296k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
707
516k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
708
516k
    if (_closed) {
709
0
        return Status::OK();
710
0
    }
711
516k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
712
516k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
713
516k
    }
714
516k
    _closed = true;
715
516k
    return Status::OK();
716
516k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
707
14
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
708
14
    if (_closed) {
709
0
        return Status::OK();
710
0
    }
711
14
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
712
14
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
713
14
    }
714
14
    _closed = true;
715
14
    return Status::OK();
716
14
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
707
302
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
708
302
    if (_closed) {
709
0
        return Status::OK();
710
0
    }
711
302
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
712
302
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
713
302
    }
714
302
    _closed = true;
715
302
    return Status::OK();
716
302
}
717
718
template <typename LocalStateType>
719
88.9k
Status StreamingOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
720
88.9k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
721
88.9k
    return pull(state, block, eos);
722
88.9k
}
_ZN5doris18StreamingOperatorXINS_23AssertNumRowsLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
719
431
Status StreamingOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
720
431
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
721
431
    return pull(state, block, eos);
722
431
}
_ZN5doris18StreamingOperatorXINS_16SelectLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
719
88.4k
Status StreamingOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
720
88.4k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
721
88.4k
    return pull(state, block, eos);
722
88.4k
}
723
724
template <typename LocalStateType>
725
893k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
726
893k
    auto& local_state = get_local_state(state);
727
893k
    if (need_more_input_data(state)) {
728
868k
        local_state._child_block->clear_column_data(
729
868k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
730
868k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
731
868k
                state, local_state._child_block.get(), &local_state._child_eos));
732
868k
        *eos = local_state._child_eos;
733
868k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
734
147k
            return Status::OK();
735
147k
        }
736
721k
        {
737
721k
            SCOPED_TIMER(local_state.exec_time_counter());
738
721k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
739
721k
        }
740
721k
    }
741
742
746k
    if (!need_more_input_data(state)) {
743
685k
        SCOPED_TIMER(local_state.exec_time_counter());
744
685k
        bool new_eos = false;
745
685k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
746
685k
        if (new_eos) {
747
599k
            *eos = true;
748
599k
        } else if (!need_more_input_data(state)) {
749
20.6k
            *eos = false;
750
20.6k
        }
751
685k
    }
752
746k
    return Status::OK();
753
746k
}
_ZN5doris17StatefulOperatorXINS_23HashJoinProbeLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
725
137k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
726
137k
    auto& local_state = get_local_state(state);
727
137k
    if (need_more_input_data(state)) {
728
123k
        local_state._child_block->clear_column_data(
729
123k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
730
123k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
731
123k
                state, local_state._child_block.get(), &local_state._child_eos));
732
123k
        *eos = local_state._child_eos;
733
123k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
734
36.9k
            return Status::OK();
735
36.9k
        }
736
86.4k
        {
737
86.4k
            SCOPED_TIMER(local_state.exec_time_counter());
738
86.4k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
739
86.4k
        }
740
86.4k
    }
741
742
100k
    if (!need_more_input_data(state)) {
743
100k
        SCOPED_TIMER(local_state.exec_time_counter());
744
100k
        bool new_eos = false;
745
100k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
746
100k
        if (new_eos) {
747
46.3k
            *eos = true;
748
54.2k
        } else if (!need_more_input_data(state)) {
749
8.21k
            *eos = false;
750
8.21k
        }
751
100k
    }
752
100k
    return Status::OK();
753
100k
}
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_34PartitionedHashJoinProbeLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
_ZN5doris17StatefulOperatorXINS_16RepeatLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
725
3.40k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
726
3.40k
    auto& local_state = get_local_state(state);
727
3.40k
    if (need_more_input_data(state)) {
728
2.18k
        local_state._child_block->clear_column_data(
729
2.18k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
730
2.18k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
731
2.18k
                state, local_state._child_block.get(), &local_state._child_eos));
732
2.18k
        *eos = local_state._child_eos;
733
2.18k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
734
489
            return Status::OK();
735
489
        }
736
1.69k
        {
737
1.69k
            SCOPED_TIMER(local_state.exec_time_counter());
738
1.69k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
739
1.69k
        }
740
1.69k
    }
741
742
2.92k
    if (!need_more_input_data(state)) {
743
2.92k
        SCOPED_TIMER(local_state.exec_time_counter());
744
2.92k
        bool new_eos = false;
745
2.92k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
746
2.92k
        if (new_eos) {
747
1.29k
            *eos = true;
748
1.63k
        } else if (!need_more_input_data(state)) {
749
1.23k
            *eos = false;
750
1.23k
        }
751
2.92k
    }
752
2.92k
    return Status::OK();
753
2.92k
}
_ZN5doris17StatefulOperatorXINS_25MaterializationLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
725
4.69k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
726
4.69k
    auto& local_state = get_local_state(state);
727
4.69k
    if (need_more_input_data(state)) {
728
4.69k
        local_state._child_block->clear_column_data(
729
4.69k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
730
4.69k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
731
4.69k
                state, local_state._child_block.get(), &local_state._child_eos));
732
4.69k
        *eos = local_state._child_eos;
733
4.69k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
734
1.56k
            return Status::OK();
735
1.56k
        }
736
3.13k
        {
737
3.13k
            SCOPED_TIMER(local_state.exec_time_counter());
738
3.13k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
739
3.13k
        }
740
3.13k
    }
741
742
3.13k
    if (!need_more_input_data(state)) {
743
3.13k
        SCOPED_TIMER(local_state.exec_time_counter());
744
3.13k
        bool new_eos = false;
745
3.13k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
746
3.13k
        if (new_eos) {
747
1.59k
            *eos = true;
748
1.59k
        } else if (!need_more_input_data(state)) {
749
0
            *eos = false;
750
0
        }
751
3.13k
    }
752
3.13k
    return Status::OK();
753
3.13k
}
_ZN5doris17StatefulOperatorXINS_22StreamingAggLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
725
49.2k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
726
49.2k
    auto& local_state = get_local_state(state);
727
49.2k
    if (need_more_input_data(state)) {
728
49.2k
        local_state._child_block->clear_column_data(
729
49.2k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
730
49.2k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
731
49.2k
                state, local_state._child_block.get(), &local_state._child_eos));
732
49.2k
        *eos = local_state._child_eos;
733
49.2k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
734
4.37k
            return Status::OK();
735
4.37k
        }
736
44.8k
        {
737
44.8k
            SCOPED_TIMER(local_state.exec_time_counter());
738
44.8k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
739
44.8k
        }
740
44.8k
    }
741
742
44.9k
    if (!need_more_input_data(state)) {
743
16.0k
        SCOPED_TIMER(local_state.exec_time_counter());
744
16.0k
        bool new_eos = false;
745
16.0k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
746
16.0k
        if (new_eos) {
747
15.8k
            *eos = true;
748
15.8k
        } else if (!need_more_input_data(state)) {
749
62
            *eos = false;
750
62
        }
751
16.0k
    }
752
44.9k
    return Status::OK();
753
44.9k
}
_ZN5doris17StatefulOperatorXINS_30DistinctStreamingAggLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
725
621k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
726
621k
    auto& local_state = get_local_state(state);
727
622k
    if (need_more_input_data(state)) {
728
622k
        local_state._child_block->clear_column_data(
729
622k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
730
622k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
731
622k
                state, local_state._child_block.get(), &local_state._child_eos));
732
622k
        *eos = local_state._child_eos;
733
622k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
734
89.6k
            return Status::OK();
735
89.6k
        }
736
532k
        {
737
532k
            SCOPED_TIMER(local_state.exec_time_counter());
738
532k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
739
532k
        }
740
532k
    }
741
742
531k
    if (!need_more_input_data(state)) {
743
499k
        SCOPED_TIMER(local_state.exec_time_counter());
744
499k
        bool new_eos = false;
745
499k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
746
499k
        if (new_eos) {
747
498k
            *eos = true;
748
498k
        } else if (!need_more_input_data(state)) {
749
0
            *eos = false;
750
0
        }
751
499k
    }
752
531k
    return Status::OK();
753
531k
}
_ZN5doris17StatefulOperatorXINS_29NestedLoopJoinProbeLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
725
70.7k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
726
70.7k
    auto& local_state = get_local_state(state);
727
70.7k
    if (need_more_input_data(state)) {
728
59.9k
        local_state._child_block->clear_column_data(
729
59.9k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
730
59.9k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
731
59.9k
                state, local_state._child_block.get(), &local_state._child_eos));
732
59.9k
        *eos = local_state._child_eos;
733
59.9k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
734
13.3k
            return Status::OK();
735
13.3k
        }
736
46.5k
        {
737
46.5k
            SCOPED_TIMER(local_state.exec_time_counter());
738
46.5k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
739
46.5k
        }
740
46.5k
    }
741
742
57.3k
    if (!need_more_input_data(state)) {
743
56.8k
        SCOPED_TIMER(local_state.exec_time_counter());
744
56.8k
        bool new_eos = false;
745
56.8k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
746
56.8k
        if (new_eos) {
747
31.6k
            *eos = true;
748
31.6k
        } else if (!need_more_input_data(state)) {
749
10.7k
            *eos = false;
750
10.7k
        }
751
56.8k
    }
752
57.3k
    return Status::OK();
753
57.3k
}
_ZN5doris17StatefulOperatorXINS_23TableFunctionLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
725
7.04k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
726
7.04k
    auto& local_state = get_local_state(state);
727
7.04k
    if (need_more_input_data(state)) {
728
6.67k
        local_state._child_block->clear_column_data(
729
6.67k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
730
6.67k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
731
6.67k
                state, local_state._child_block.get(), &local_state._child_eos));
732
6.67k
        *eos = local_state._child_eos;
733
6.67k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
734
694
            return Status::OK();
735
694
        }
736
5.98k
        {
737
5.98k
            SCOPED_TIMER(local_state.exec_time_counter());
738
5.98k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
739
5.98k
        }
740
5.98k
    }
741
742
6.34k
    if (!need_more_input_data(state)) {
743
6.34k
        SCOPED_TIMER(local_state.exec_time_counter());
744
6.34k
        bool new_eos = false;
745
6.34k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
746
6.34k
        if (new_eos) {
747
4.37k
            *eos = true;
748
4.37k
        } else if (!need_more_input_data(state)) {
749
366
            *eos = false;
750
366
        }
751
6.34k
    }
752
6.34k
    return Status::OK();
753
6.34k
}
754
755
template <typename Writer, typename Parent>
756
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
757
61.3k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
758
61.3k
    RETURN_IF_ERROR(Base::init(state, info));
759
61.3k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
760
61.3k
                                                         "AsyncWriterDependency", true);
761
61.3k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
762
61.3k
                             _finish_dependency));
763
764
61.3k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
765
61.3k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
766
61.3k
    return Status::OK();
767
61.3k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
757
516
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
758
516
    RETURN_IF_ERROR(Base::init(state, info));
759
516
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
760
516
                                                         "AsyncWriterDependency", true);
761
516
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
762
516
                             _finish_dependency));
763
764
516
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
765
516
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
766
516
    return Status::OK();
767
516
}
_ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
757
88
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
758
88
    RETURN_IF_ERROR(Base::init(state, info));
759
88
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
760
88
                                                         "AsyncWriterDependency", true);
761
88
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
762
88
                             _finish_dependency));
763
764
88
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
765
88
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
766
88
    return Status::OK();
767
88
}
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
757
43.6k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
758
43.6k
    RETURN_IF_ERROR(Base::init(state, info));
759
43.6k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
760
43.6k
                                                         "AsyncWriterDependency", true);
761
43.6k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
762
43.6k
                             _finish_dependency));
763
764
43.6k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
765
43.6k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
766
43.6k
    return Status::OK();
767
43.6k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
757
8.85k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
758
8.85k
    RETURN_IF_ERROR(Base::init(state, info));
759
8.85k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
760
8.85k
                                                         "AsyncWriterDependency", true);
761
8.85k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
762
8.85k
                             _finish_dependency));
763
764
8.85k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
765
8.85k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
766
8.85k
    return Status::OK();
767
8.85k
}
_ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
757
3.86k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
758
3.86k
    RETURN_IF_ERROR(Base::init(state, info));
759
3.86k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
760
3.86k
                                                         "AsyncWriterDependency", true);
761
3.86k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
762
3.86k
                             _finish_dependency));
763
764
3.86k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
765
3.86k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
766
3.86k
    return Status::OK();
767
3.86k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
757
3.38k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
758
3.38k
    RETURN_IF_ERROR(Base::init(state, info));
759
3.38k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
760
3.38k
                                                         "AsyncWriterDependency", true);
761
3.38k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
762
3.38k
                             _finish_dependency));
763
764
3.38k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
765
3.38k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
766
3.38k
    return Status::OK();
767
3.38k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
757
160
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
758
160
    RETURN_IF_ERROR(Base::init(state, info));
759
160
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
760
160
                                                         "AsyncWriterDependency", true);
761
160
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
762
160
                             _finish_dependency));
763
764
160
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
765
160
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
766
160
    return Status::OK();
767
160
}
_ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
757
640
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
758
640
    RETURN_IF_ERROR(Base::init(state, info));
759
640
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
760
640
                                                         "AsyncWriterDependency", true);
761
640
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
762
640
                             _finish_dependency));
763
764
640
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
765
640
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
766
640
    return Status::OK();
767
640
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
757
156
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
758
156
    RETURN_IF_ERROR(Base::init(state, info));
759
156
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
760
156
                                                         "AsyncWriterDependency", true);
761
156
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
762
156
                             _finish_dependency));
763
764
156
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
765
156
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
766
156
    return Status::OK();
767
156
}
768
769
template <typename Writer, typename Parent>
770
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
771
61.4k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
772
61.4k
    RETURN_IF_ERROR(Base::open(state));
773
61.4k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
774
487k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
775
426k
        RETURN_IF_ERROR(
776
426k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
777
426k
    }
778
61.4k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
779
61.4k
    return Status::OK();
780
61.4k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
771
516
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
772
516
    RETURN_IF_ERROR(Base::open(state));
773
516
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
774
2.77k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
775
2.26k
        RETURN_IF_ERROR(
776
2.26k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
777
2.26k
    }
778
516
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
779
516
    return Status::OK();
780
516
}
_ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
771
88
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
772
88
    RETURN_IF_ERROR(Base::open(state));
773
88
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
774
412
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
775
324
        RETURN_IF_ERROR(
776
324
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
777
324
    }
778
88
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
779
88
    return Status::OK();
780
88
}
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
771
43.8k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
772
43.8k
    RETURN_IF_ERROR(Base::open(state));
773
43.8k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
774
326k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
775
282k
        RETURN_IF_ERROR(
776
282k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
777
282k
    }
778
43.8k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
779
43.8k
    return Status::OK();
780
43.8k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
771
8.82k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
772
8.82k
    RETURN_IF_ERROR(Base::open(state));
773
8.82k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
774
52.9k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
775
44.1k
        RETURN_IF_ERROR(
776
44.1k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
777
44.1k
    }
778
8.82k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
779
8.82k
    return Status::OK();
780
8.82k
}
_ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
771
3.85k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
772
3.85k
    RETURN_IF_ERROR(Base::open(state));
773
3.85k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
774
57.3k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
775
53.4k
        RETURN_IF_ERROR(
776
53.4k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
777
53.4k
    }
778
3.85k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
779
3.85k
    return Status::OK();
780
3.85k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
771
3.37k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
772
3.37k
    RETURN_IF_ERROR(Base::open(state));
773
3.37k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
774
42.3k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
775
38.9k
        RETURN_IF_ERROR(
776
38.9k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
777
38.9k
    }
778
3.37k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
779
3.37k
    return Status::OK();
780
3.37k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
771
160
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
772
160
    RETURN_IF_ERROR(Base::open(state));
773
160
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
774
480
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
775
320
        RETURN_IF_ERROR(
776
320
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
777
320
    }
778
160
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
779
160
    return Status::OK();
780
160
}
_ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
771
640
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
772
640
    RETURN_IF_ERROR(Base::open(state));
773
640
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
774
4.38k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
775
3.74k
        RETURN_IF_ERROR(
776
3.74k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
777
3.74k
    }
778
640
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
779
640
    return Status::OK();
780
640
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
771
156
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
772
156
    RETURN_IF_ERROR(Base::open(state));
773
156
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
774
786
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
775
630
        RETURN_IF_ERROR(
776
630
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
777
630
    }
778
156
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
779
156
    return Status::OK();
780
156
}
781
782
template <typename Writer, typename Parent>
783
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
784
82.9k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
785
82.9k
    return _writer->sink(block, eos);
786
82.9k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
784
2.27k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
785
2.27k
    return _writer->sink(block, eos);
786
2.27k
}
_ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
784
112
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
785
112
    return _writer->sink(block, eos);
786
112
}
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
784
58.3k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
785
58.3k
    return _writer->sink(block, eos);
786
58.3k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
784
10.2k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
785
10.2k
    return _writer->sink(block, eos);
786
10.2k
}
_ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
784
5.34k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
785
5.34k
    return _writer->sink(block, eos);
786
5.34k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
784
5.34k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
785
5.34k
    return _writer->sink(block, eos);
786
5.34k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
784
180
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
785
180
    return _writer->sink(block, eos);
786
180
}
_ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
784
794
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
785
794
    return _writer->sink(block, eos);
786
794
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
784
310
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
785
310
    return _writer->sink(block, eos);
786
310
}
787
788
template <typename Writer, typename Parent>
789
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
790
61.4k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
791
61.4k
    if (_closed) {
792
0
        return Status::OK();
793
0
    }
794
61.4k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
795
61.4k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
796
    // if the init failed, the _writer may be nullptr. so here need check
797
61.5k
    if (_writer) {
798
61.5k
        Status st = _writer->get_writer_status();
799
61.5k
        if (exec_status.ok()) {
800
61.3k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
801
61.3k
                                                       : Status::Cancelled("force close"));
802
61.3k
        } else {
803
172
            _writer->force_close(exec_status);
804
172
        }
805
        // If there is an error in process_block thread, then we should get the writer
806
        // status before call force_close. For example, the thread may failed in commit
807
        // transaction.
808
61.5k
        RETURN_IF_ERROR(st);
809
61.5k
    }
810
61.4k
    return Base::close(state, exec_status);
811
61.4k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
790
504
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
791
504
    if (_closed) {
792
0
        return Status::OK();
793
0
    }
794
504
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
795
504
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
796
    // if the init failed, the _writer may be nullptr. so here need check
797
504
    if (_writer) {
798
504
        Status st = _writer->get_writer_status();
799
504
        if (exec_status.ok()) {
800
504
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
801
504
                                                       : Status::Cancelled("force close"));
802
504
        } else {
803
0
            _writer->force_close(exec_status);
804
0
        }
805
        // If there is an error in process_block thread, then we should get the writer
806
        // status before call force_close. For example, the thread may failed in commit
807
        // transaction.
808
504
        RETURN_IF_ERROR(st);
809
504
    }
810
504
    return Base::close(state, exec_status);
811
504
}
_ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
790
88
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
791
88
    if (_closed) {
792
0
        return Status::OK();
793
0
    }
794
88
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
795
88
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
796
    // if the init failed, the _writer may be nullptr. so here need check
797
88
    if (_writer) {
798
88
        Status st = _writer->get_writer_status();
799
88
        if (exec_status.ok()) {
800
88
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
801
88
                                                       : Status::Cancelled("force close"));
802
88
        } else {
803
0
            _writer->force_close(exec_status);
804
0
        }
805
        // If there is an error in process_block thread, then we should get the writer
806
        // status before call force_close. For example, the thread may failed in commit
807
        // transaction.
808
88
        RETURN_IF_ERROR(st);
809
88
    }
810
80
    return Base::close(state, exec_status);
811
88
}
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
790
43.8k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
791
43.8k
    if (_closed) {
792
0
        return Status::OK();
793
0
    }
794
43.8k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
795
43.8k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
796
    // if the init failed, the _writer may be nullptr. so here need check
797
43.8k
    if (_writer) {
798
43.8k
        Status st = _writer->get_writer_status();
799
43.8k
        if (exec_status.ok()) {
800
43.8k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
801
43.8k
                                                       : Status::Cancelled("force close"));
802
43.8k
        } else {
803
74
            _writer->force_close(exec_status);
804
74
        }
805
        // If there is an error in process_block thread, then we should get the writer
806
        // status before call force_close. For example, the thread may failed in commit
807
        // transaction.
808
43.8k
        RETURN_IF_ERROR(st);
809
43.8k
    }
810
43.8k
    return Base::close(state, exec_status);
811
43.8k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
790
8.84k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
791
8.84k
    if (_closed) {
792
0
        return Status::OK();
793
0
    }
794
8.84k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
795
8.84k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
796
    // if the init failed, the _writer may be nullptr. so here need check
797
8.85k
    if (_writer) {
798
8.85k
        Status st = _writer->get_writer_status();
799
8.85k
        if (exec_status.ok()) {
800
8.75k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
801
8.75k
                                                       : Status::Cancelled("force close"));
802
8.75k
        } else {
803
96
            _writer->force_close(exec_status);
804
96
        }
805
        // If there is an error in process_block thread, then we should get the writer
806
        // status before call force_close. For example, the thread may failed in commit
807
        // transaction.
808
8.85k
        RETURN_IF_ERROR(st);
809
8.85k
    }
810
8.84k
    return Base::close(state, exec_status);
811
8.84k
}
_ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
790
3.85k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
791
3.85k
    if (_closed) {
792
0
        return Status::OK();
793
0
    }
794
3.85k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
795
3.85k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
796
    // if the init failed, the _writer may be nullptr. so here need check
797
3.86k
    if (_writer) {
798
3.86k
        Status st = _writer->get_writer_status();
799
3.86k
        if (exec_status.ok()) {
800
3.86k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
801
3.86k
                                                       : Status::Cancelled("force close"));
802
3.86k
        } else {
803
0
            _writer->force_close(exec_status);
804
0
        }
805
        // If there is an error in process_block thread, then we should get the writer
806
        // status before call force_close. For example, the thread may failed in commit
807
        // transaction.
808
3.86k
        RETURN_IF_ERROR(st);
809
3.86k
    }
810
3.85k
    return Base::close(state, exec_status);
811
3.85k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
790
3.38k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
791
3.38k
    if (_closed) {
792
0
        return Status::OK();
793
0
    }
794
3.38k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
795
3.38k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
796
    // if the init failed, the _writer may be nullptr. so here need check
797
3.38k
    if (_writer) {
798
3.38k
        Status st = _writer->get_writer_status();
799
3.38k
        if (exec_status.ok()) {
800
3.38k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
801
3.38k
                                                       : Status::Cancelled("force close"));
802
3.38k
        } else {
803
2
            _writer->force_close(exec_status);
804
2
        }
805
        // If there is an error in process_block thread, then we should get the writer
806
        // status before call force_close. For example, the thread may failed in commit
807
        // transaction.
808
3.38k
        RETURN_IF_ERROR(st);
809
3.38k
    }
810
3.38k
    return Base::close(state, exec_status);
811
3.38k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
790
160
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
791
160
    if (_closed) {
792
0
        return Status::OK();
793
0
    }
794
160
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
795
160
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
796
    // if the init failed, the _writer may be nullptr. so here need check
797
160
    if (_writer) {
798
160
        Status st = _writer->get_writer_status();
799
160
        if (exec_status.ok()) {
800
160
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
801
160
                                                       : Status::Cancelled("force close"));
802
160
        } else {
803
0
            _writer->force_close(exec_status);
804
0
        }
805
        // If there is an error in process_block thread, then we should get the writer
806
        // status before call force_close. For example, the thread may failed in commit
807
        // transaction.
808
160
        RETURN_IF_ERROR(st);
809
160
    }
810
160
    return Base::close(state, exec_status);
811
160
}
_ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
790
640
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
791
640
    if (_closed) {
792
0
        return Status::OK();
793
0
    }
794
640
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
795
640
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
796
    // if the init failed, the _writer may be nullptr. so here need check
797
640
    if (_writer) {
798
640
        Status st = _writer->get_writer_status();
799
640
        if (exec_status.ok()) {
800
640
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
801
640
                                                       : Status::Cancelled("force close"));
802
640
        } else {
803
0
            _writer->force_close(exec_status);
804
0
        }
805
        // If there is an error in process_block thread, then we should get the writer
806
        // status before call force_close. For example, the thread may failed in commit
807
        // transaction.
808
640
        RETURN_IF_ERROR(st);
809
640
    }
810
640
    return Base::close(state, exec_status);
811
640
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
790
156
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
791
156
    if (_closed) {
792
0
        return Status::OK();
793
0
    }
794
156
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
795
156
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
796
    // if the init failed, the _writer may be nullptr. so here need check
797
156
    if (_writer) {
798
156
        Status st = _writer->get_writer_status();
799
156
        if (exec_status.ok()) {
800
156
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
801
156
                                                       : Status::Cancelled("force close"));
802
156
        } else {
803
0
            _writer->force_close(exec_status);
804
0
        }
805
        // If there is an error in process_block thread, then we should get the writer
806
        // status before call force_close. For example, the thread may failed in commit
807
        // transaction.
808
156
        RETURN_IF_ERROR(st);
809
156
    }
810
156
    return Base::close(state, exec_status);
811
156
}
812
813
#define DECLARE_OPERATOR(LOCAL_STATE) template class DataSinkOperatorX<LOCAL_STATE>;
814
DECLARE_OPERATOR(HashJoinBuildSinkLocalState)
815
DECLARE_OPERATOR(ResultSinkLocalState)
816
DECLARE_OPERATOR(JdbcTableSinkLocalState)
817
DECLARE_OPERATOR(MemoryScratchSinkLocalState)
818
DECLARE_OPERATOR(ResultFileSinkLocalState)
819
DECLARE_OPERATOR(OlapTableSinkLocalState)
820
DECLARE_OPERATOR(OlapTableSinkV2LocalState)
821
DECLARE_OPERATOR(HiveTableSinkLocalState)
822
DECLARE_OPERATOR(TVFTableSinkLocalState)
823
DECLARE_OPERATOR(IcebergTableSinkLocalState)
824
DECLARE_OPERATOR(SpillIcebergTableSinkLocalState)
825
DECLARE_OPERATOR(IcebergDeleteSinkLocalState)
826
DECLARE_OPERATOR(IcebergMergeSinkLocalState)
827
DECLARE_OPERATOR(MCTableSinkLocalState)
828
DECLARE_OPERATOR(AnalyticSinkLocalState)
829
DECLARE_OPERATOR(BlackholeSinkLocalState)
830
DECLARE_OPERATOR(SortSinkLocalState)
831
DECLARE_OPERATOR(SpillSortSinkLocalState)
832
DECLARE_OPERATOR(LocalExchangeSinkLocalState)
833
DECLARE_OPERATOR(AggSinkLocalState)
834
DECLARE_OPERATOR(BucketedAggSinkLocalState)
835
DECLARE_OPERATOR(PartitionedAggSinkLocalState)
836
DECLARE_OPERATOR(ExchangeSinkLocalState)
837
DECLARE_OPERATOR(NestedLoopJoinBuildSinkLocalState)
838
DECLARE_OPERATOR(UnionSinkLocalState)
839
DECLARE_OPERATOR(MultiCastDataStreamSinkLocalState)
840
DECLARE_OPERATOR(PartitionSortSinkLocalState)
841
DECLARE_OPERATOR(SetProbeSinkLocalState<true>)
842
DECLARE_OPERATOR(SetProbeSinkLocalState<false>)
843
DECLARE_OPERATOR(SetSinkLocalState<true>)
844
DECLARE_OPERATOR(SetSinkLocalState<false>)
845
DECLARE_OPERATOR(PartitionedHashJoinSinkLocalState)
846
DECLARE_OPERATOR(GroupCommitBlockSinkLocalState)
847
DECLARE_OPERATOR(CacheSinkLocalState)
848
DECLARE_OPERATOR(DictSinkLocalState)
849
DECLARE_OPERATOR(RecCTESinkLocalState)
850
DECLARE_OPERATOR(RecCTEAnchorSinkLocalState)
851
852
#undef DECLARE_OPERATOR
853
854
#define DECLARE_OPERATOR(LOCAL_STATE) template class OperatorX<LOCAL_STATE>;
855
DECLARE_OPERATOR(HashJoinProbeLocalState)
856
DECLARE_OPERATOR(OlapScanLocalState)
857
DECLARE_OPERATOR(GroupCommitLocalState)
858
DECLARE_OPERATOR(JDBCScanLocalState)
859
DECLARE_OPERATOR(FileScanLocalState)
860
DECLARE_OPERATOR(AnalyticLocalState)
861
DECLARE_OPERATOR(SortLocalState)
862
DECLARE_OPERATOR(SpillSortLocalState)
863
DECLARE_OPERATOR(LocalMergeSortLocalState)
864
DECLARE_OPERATOR(AggLocalState)
865
DECLARE_OPERATOR(BucketedAggLocalState)
866
DECLARE_OPERATOR(PartitionedAggLocalState)
867
DECLARE_OPERATOR(TableFunctionLocalState)
868
DECLARE_OPERATOR(ExchangeLocalState)
869
DECLARE_OPERATOR(RepeatLocalState)
870
DECLARE_OPERATOR(NestedLoopJoinProbeLocalState)
871
DECLARE_OPERATOR(AssertNumRowsLocalState)
872
DECLARE_OPERATOR(EmptySetLocalState)
873
DECLARE_OPERATOR(UnionSourceLocalState)
874
DECLARE_OPERATOR(MultiCastDataStreamSourceLocalState)
875
DECLARE_OPERATOR(PartitionSortSourceLocalState)
876
DECLARE_OPERATOR(SetSourceLocalState<true>)
877
DECLARE_OPERATOR(SetSourceLocalState<false>)
878
DECLARE_OPERATOR(DataGenLocalState)
879
DECLARE_OPERATOR(SchemaScanLocalState)
880
DECLARE_OPERATOR(MetaScanLocalState)
881
DECLARE_OPERATOR(LocalExchangeSourceLocalState)
882
DECLARE_OPERATOR(PartitionedHashJoinProbeLocalState)
883
DECLARE_OPERATOR(CacheSourceLocalState)
884
DECLARE_OPERATOR(RecCTESourceLocalState)
885
DECLARE_OPERATOR(RecCTEScanLocalState)
886
887
#ifdef BE_TEST
888
DECLARE_OPERATOR(MockLocalState)
889
DECLARE_OPERATOR(MockScanLocalState)
890
#endif
891
#undef DECLARE_OPERATOR
892
893
template class StreamingOperatorX<AssertNumRowsLocalState>;
894
template class StreamingOperatorX<SelectLocalState>;
895
896
template class StatefulOperatorX<HashJoinProbeLocalState>;
897
template class StatefulOperatorX<PartitionedHashJoinProbeLocalState>;
898
template class StatefulOperatorX<RepeatLocalState>;
899
template class StatefulOperatorX<MaterializationLocalState>;
900
template class StatefulOperatorX<StreamingAggLocalState>;
901
template class StatefulOperatorX<DistinctStreamingAggLocalState>;
902
template class StatefulOperatorX<NestedLoopJoinProbeLocalState>;
903
template class StatefulOperatorX<TableFunctionLocalState>;
904
905
template class PipelineXSinkLocalState<HashJoinSharedState>;
906
template class PipelineXSinkLocalState<PartitionedHashJoinSharedState>;
907
template class PipelineXSinkLocalState<SortSharedState>;
908
template class PipelineXSinkLocalState<SpillSortSharedState>;
909
template class PipelineXSinkLocalState<NestedLoopJoinSharedState>;
910
template class PipelineXSinkLocalState<AnalyticSharedState>;
911
template class PipelineXSinkLocalState<AggSharedState>;
912
template class PipelineXSinkLocalState<BucketedAggSharedState>;
913
template class PipelineXSinkLocalState<PartitionedAggSharedState>;
914
template class PipelineXSinkLocalState<FakeSharedState>;
915
template class PipelineXSinkLocalState<UnionSharedState>;
916
template class PipelineXSinkLocalState<PartitionSortNodeSharedState>;
917
template class PipelineXSinkLocalState<MultiCastSharedState>;
918
template class PipelineXSinkLocalState<SetSharedState>;
919
template class PipelineXSinkLocalState<LocalExchangeSharedState>;
920
template class PipelineXSinkLocalState<BasicSharedState>;
921
template class PipelineXSinkLocalState<DataQueueSharedState>;
922
template class PipelineXSinkLocalState<RecCTESharedState>;
923
924
template class PipelineXLocalState<HashJoinSharedState>;
925
template class PipelineXLocalState<PartitionedHashJoinSharedState>;
926
template class PipelineXLocalState<SortSharedState>;
927
template class PipelineXLocalState<SpillSortSharedState>;
928
template class PipelineXLocalState<NestedLoopJoinSharedState>;
929
template class PipelineXLocalState<AnalyticSharedState>;
930
template class PipelineXLocalState<AggSharedState>;
931
template class PipelineXLocalState<BucketedAggSharedState>;
932
template class PipelineXLocalState<PartitionedAggSharedState>;
933
template class PipelineXLocalState<FakeSharedState>;
934
template class PipelineXLocalState<UnionSharedState>;
935
template class PipelineXLocalState<DataQueueSharedState>;
936
template class PipelineXLocalState<MultiCastSharedState>;
937
template class PipelineXLocalState<PartitionSortNodeSharedState>;
938
template class PipelineXLocalState<SetSharedState>;
939
template class PipelineXLocalState<LocalExchangeSharedState>;
940
template class PipelineXLocalState<BasicSharedState>;
941
template class PipelineXLocalState<RecCTESharedState>;
942
943
template class AsyncWriterSink<doris::VFileResultWriter, ResultFileSinkOperatorX>;
944
template class AsyncWriterSink<doris::VJdbcTableWriter, JdbcTableSinkOperatorX>;
945
template class AsyncWriterSink<doris::VTabletWriter, OlapTableSinkOperatorX>;
946
template class AsyncWriterSink<doris::VTabletWriterV2, OlapTableSinkV2OperatorX>;
947
template class AsyncWriterSink<doris::VHiveTableWriter, HiveTableSinkOperatorX>;
948
template class AsyncWriterSink<doris::VIcebergTableWriter, IcebergTableSinkOperatorX>;
949
template class AsyncWriterSink<doris::VIcebergTableWriter, SpillIcebergTableSinkOperatorX>;
950
template class AsyncWriterSink<doris::VIcebergDeleteSink, IcebergDeleteSinkOperatorX>;
951
template class AsyncWriterSink<doris::VIcebergMergeSink, IcebergMergeSinkOperatorX>;
952
template class AsyncWriterSink<doris::VMCTableWriter, MCTableSinkOperatorX>;
953
template class AsyncWriterSink<doris::VTVFTableWriter, TVFTableSinkOperatorX>;
954
955
#ifdef BE_TEST
956
template class OperatorX<DummyOperatorLocalState>;
957
template class DataSinkOperatorX<DummySinkLocalState>;
958
#endif
959
960
} // namespace doris