Coverage Report

Created: 2026-06-03 03:56

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